{ "info": { "author": "Lee Johnston", "author_email": "lee.johnston.100@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ], "description": "# `nitdms` - A pythonic TDMS file reader\n\nThe main export from the `nitdms` package is the TdmsFile class. Upon instantiation,\nthe reader loads the file into memory and discovers all of the file, group and channel\nobjects and respective properties. These objects and properties are dynamically \ninstantiated as attributes allowing easy access from within an interactive session\nwith tab completion such as Jupyter or bash.\n\nChannel data is returned as a list rather than Numpy array to avoid dependencies.\nTimestamps are datetime objects in UTC timezone.\n\n## Installing\n```bash\n$ pip install nitdms\n```\n\n## Usage\nWithin an interactive session with tab completion:\n```python\n>>>from nitdms import TdmsFile\n>>>tf = TdmsFile()\n>>>data = tf...data\n>>>t0 = tf...wf_start_time\n>>>dt = tf...wf_increment\n>>>group_property = tf..\n```\n\nWithout tab completion, print a tree view to see the file hierarchy:\n```python\n>>>from nitdms import TdmsFile\n>>>tf = TdmsFile()\n>>>print(tf)\nfile_name\n file_prop_0\n group_0\n group_prop_0\n channel_0\n channel_prop_0\n data\n>>>data = tf.group_0.channel_0.data\n```\n\nLabVIEW doesn't impose any constraints on the names of groups, channels\nor properties. But, Python's attributes must be valid indentifiers - generally\nASCII letters, numbers (except first character) and underscore. So, TdmsFile also\nsupports item access like a dict. For example, suppose a group name in the file\nis '1group' and has channel '1channel'. Both names are invalid identifiers and\nwill generate a syntax error when using dot access.\nThe usage pattern in this case is:\n```python\n>>>from nitdms import TdmsFile\n>>>tf = TdmsFile()\n>>>print(tf)\nfile_name\n 1group\n 1channel\n>>>group = tf['1group']\n>>>channel = group['1channel']\n>>>data = channel.data\n>>>\n```\n\nWant a Pandas DataFrame? For example, suppose the tdms file contains a group 'group_0'\nwith two channels 'ch_0' and 'ch_1' with equal length.\n```python\n>>>import pandas as pd\n>>>from nitdms import TdmsFile\n>>>tf = TdmsFile()\n>>>group = tf.group_0\n>>>data = dict(zip([ch for ch in group], [group[ch].data for ch in group]))\n>>>df = pd.DataFrame(data)\n>>>df\n ch_0 ch_1\n0 0 10\n1 1 11\n2 2 12\n...\n9 9 19\n>>>\n```\n\nSo, why doesn't TdmsFile just return a DataFrame? The contents of the tdms file are\narbitrary and have no general, direct mapping to a DataFrame. For example, the\ntdms file channel data is interpreted by the properties, but the DataFrame columns,\nwhich are Pandas Series objects, don't support metadata. In some situations a DataFrame\nis appropriate, but in general it isn't.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/l-johnston/nitdms", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nitdms", "package_url": "https://pypi.org/project/nitdms/", "platform": "", "project_url": "https://pypi.org/project/nitdms/", "project_urls": { "Homepage": "https://github.com/l-johnston/nitdms" }, "release_url": "https://pypi.org/project/nitdms/1.0.4/", "requires_dist": null, "requires_python": "", "summary": "A pythonic reader for TDMS files generated by LabVIEW", "version": "1.0.4" }, "last_serial": 5966445, "releases": { "1.0.4": [ { "comment_text": "", "digests": { "md5": "39756b1a3ff367bd515f6b9cc5ce347e", "sha256": "866b633d0ae3156e9d9c7d8b63a9af70c6ca76fe6ed6abe9d3be55c8abe02c6d" }, "downloads": -1, "filename": "nitdms-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "39756b1a3ff367bd515f6b9cc5ce347e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13467, "upload_time": "2019-10-13T05:36:51", "url": "https://files.pythonhosted.org/packages/81/85/19ed5838ee317c2a646aa432265a2bccc148de6d5fab2e3a03c17544d56c/nitdms-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c1b3f9357df2578e54f462953f7f37f", "sha256": "d651d111436d1a1977debc09196568979e264844dbe0f608479eef2043f84882" }, "downloads": -1, "filename": "nitdms-1.0.4.tar.gz", "has_sig": false, "md5_digest": "8c1b3f9357df2578e54f462953f7f37f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11224, "upload_time": "2019-10-13T05:36:54", "url": "https://files.pythonhosted.org/packages/9a/04/6d829a31b0b6250b3f741f1f6f0296c91497bfa4e5da1c8500044818f7b0/nitdms-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "39756b1a3ff367bd515f6b9cc5ce347e", "sha256": "866b633d0ae3156e9d9c7d8b63a9af70c6ca76fe6ed6abe9d3be55c8abe02c6d" }, "downloads": -1, "filename": "nitdms-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "39756b1a3ff367bd515f6b9cc5ce347e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13467, "upload_time": "2019-10-13T05:36:51", "url": "https://files.pythonhosted.org/packages/81/85/19ed5838ee317c2a646aa432265a2bccc148de6d5fab2e3a03c17544d56c/nitdms-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c1b3f9357df2578e54f462953f7f37f", "sha256": "d651d111436d1a1977debc09196568979e264844dbe0f608479eef2043f84882" }, "downloads": -1, "filename": "nitdms-1.0.4.tar.gz", "has_sig": false, "md5_digest": "8c1b3f9357df2578e54f462953f7f37f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11224, "upload_time": "2019-10-13T05:36:54", "url": "https://files.pythonhosted.org/packages/9a/04/6d829a31b0b6250b3f741f1f6f0296c91497bfa4e5da1c8500044818f7b0/nitdms-1.0.4.tar.gz" } ] }