{"id":18811494,"url":"https://github.com/toelt-llc/software-tdms-converter","last_synced_at":"2026-01-11T07:30:16.047Z","repository":{"id":82243933,"uuid":"179973813","full_name":"toelt-llc/SOFTWARE-TDMS-Converter","owner":"toelt-llc","description":"This repository contains the code for a package that converts TDMS files into pandas data frame for easy usage.","archived":false,"fork":false,"pushed_at":"2019-04-24T12:51:04.000Z","size":5014,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T23:55:14.577Z","etag":null,"topics":["software","software-engineering"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toelt-llc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-07T13:58:20.000Z","updated_at":"2022-06-01T09:19:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"225a6dc0-34e2-4ac4-88a6-b87a06fe9c39","html_url":"https://github.com/toelt-llc/SOFTWARE-TDMS-Converter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toelt-llc%2FSOFTWARE-TDMS-Converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toelt-llc%2FSOFTWARE-TDMS-Converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toelt-llc%2FSOFTWARE-TDMS-Converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toelt-llc%2FSOFTWARE-TDMS-Converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toelt-llc","download_url":"https://codeload.github.com/toelt-llc/SOFTWARE-TDMS-Converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239748255,"owners_count":19690232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["software","software-engineering"],"created_at":"2024-11-07T23:26:32.991Z","updated_at":"2026-01-11T07:30:16.020Z","avatar_url":"https://github.com/toelt-llc.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDMS Converter Package\n\n[![license MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n![](https://img.shields.io/github/commits-since/toelt-llc/TDMS-Converter/v1.0.svg)\n![](https://img.shields.io/github/last-commit/toelt-llc/TDMS-Converter.svg)\n![](https://img.shields.io/github/repo-size/toelt-llc/TDMS-Converter.svg)\n![](https://img.shields.io/github/issues/toelt-llc/TDMS-Converter.svg)\n\nThis repository contains the code for a package that converts TDMS files into pandas data frame for easy usage. \n\n## Help\n\nYou can always get the up-to-date documentation with\n\n    from TDMSUtils import TDMSConverter as tdmsc\n    help(tdmsc)\n\n## Example usage\n\nThe package can be easily used. An example of usage is\n\n    from TDMSUtils import TDMSConverter as tdmsc\n\n    tc = tdmsc.TDMSConverter('./ExampleData/')\n    df , total_number_of_channels = tc.convert_to_df(debug = False)\n    df_avg = tc.average_files(df, debug = False)\n    \nIn the ```df``` pandas dataframe you will find all the measurements. An example of how it looks like is\n\n        data                     \t        groupName\tchannelName\t                filename\n    0\tx y 0 0.970000 -2.358...\tPD_Signal_0\tAvg_Data_20190405 09:28:53.72\t./ExampleData/0_cold_next_day.tdms\n    0\tx y 0 0.970000 -2.359...\tPD_Signal_0\tAvg_Data_20190405 09:29:08.93\t./ExampleData/0_cold_next_day.tdms\n    0\tx y 0 0.970000 -2.359...\tPD_Signal_0\tAvg_Data_20190405 09:29:24.14\t./ExampleData/0_cold_next_day.tdms\n    0\tx y 0 0.970000 -2.358...\tPD_Signal_0\tAvg_Data_20190405 09:29:39.35\t./ExampleData/0_cold_next_day.tdms\n    0\tx y 0 0.970000 -2.358...\tPD_Signal_0\tAvg_Data_20190405 09:29:54.56\t./ExampleData/0_cold_next_day.tdms\n\nFor example to extract the x and y from the first channel (record in the dataframe) you could do something like this\n    \n    x = df.iloc[0]['data']['x']\n    y = df.iloc[0]['data']['y']\n\nor if you want to plot the average of all channels for each file you can do the following\n\n    for i in range(0, df_avg.shape[1]):\n        plt.plot(df_avg.iloc[i]['average']['x'], df_avg.iloc[i]['average']['y'], \n                 label = df_avg.iloc[i]['filename'])\n    plt.legend()\n    plt.show()\n\n## Documentation as of 7.4.2019 20:58\n\nHelp on module TDMSUtils.TDMSConverter in TDMSUtils:\n\nNAME\n    TDMSUtils.TDMSConverter\n\nCLASSES\n    builtins.object\n        TDMSConverter\n    \n    class TDMSConverter(builtins.object)\n     |  TDMSConverter(path)\n     |  \n     |  Methods defined here:\n     |  \n     |  __init__(self, path)\n     |      Constructor for the converter\n     |  \n     |  average_files(self, df, debug=False)\n     |      This function evaluate the average of all channels for all files.\n     |      \n     |      Input parameters:\n     |      df: dataframe with all the files as obtained by the function\n     |      convert_to_df() in this package.\n     |      \n     |      Return Values:\n     |      A DataFrame that contains as many records as number of files. The\n     |      Dataframe contains two columns: 'filemname' that contains the name\n     |      of the file with the path, and 'average' that contains a pandas\n     |      dataframe with two columns 'x' and 'y'.\n     |  \n     |  convert_to_df(self, debug=False)\n     |      This function convert the content of the Files\n     |      into a list. Each element of the list is a pandas\n     |      dataframe with two columns: x,y.\n     |      \n     |      Input parameters:\n     |      debug: a boolean. If False no debug text is printed. If\n     |      True then debug informations are printed.\n     |      data_files: a list with the list of the file names.\n     |      Typically this is the value returned by the function\n     |      generate_file_list().\n     |      \n     |      Return Value:\n     |      1. A pandas dataframe with 3 columns:\n     |          'data', 'groupName', and 'channelName'.\n     |      2. the number of channels as integer.\n     |  \n     |  generate_file_list(self, debug=False)\n     |      Returns the list of file in the folder given as input\n     |      as a list.\n     |      \n     |      Input parameters:\n     |      path: a string with the folder name. If the data is in the same folder\n     |      as the file, you can use \"./\"\n     |      debug: a boolean variable (can be True or False). If False then\n     |      no output is printed. If True then the list of files is printed.$\n     |  \n     |  get_channel_name(self, channelName)\n     |      This is a helper function that from the output of the\n     |      tdms package for the channel name like\n     |      \n     |      \u003cTdmsObject with path /'PD_Signal_0'/'Avg_Data_20190404 15:30:45.93'\u003e\n     |      \n     |      extract the actual channel name. In this case\n     |      \n     |      Avg_Data_20190404 15:30:45.93\n     |      \n     |      Input Parameters:\n     |      channelName: a channelName as returned, for example, from a loop\n     |      like This\n     |      \n     |      for channel in tdms_file.group_channels(group):\n     |          ......\n     |      \n     |      Return Value:\n     |      a string with the channel name, that can be used in the function\n     |      \n     |      tdms_file.object(str(group), channelName).data\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoelt-llc%2Fsoftware-tdms-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoelt-llc%2Fsoftware-tdms-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoelt-llc%2Fsoftware-tdms-converter/lists"}