cTDMS-0.91


توضیحات

Reading and writing TDM and TDMS files
ویژگی مقدار
سیستم عامل Microsoft :: Windows
نام فایل cTDMS-0.91
نام cTDMS
نسخه کتابخانه 0.91
نگهدارنده []
ایمیل نگهدارنده ['alfred.mechsner@googlemail.com']
نویسنده Alfred Mechsner
ایمیل نویسنده alfred.mechsner@googlemail.com
آدرس صفحه اصلی UNKNOWN
آدرس اینترنتی https://pypi.org/project/cTDMS/
مجوز UNKNOWN
############ Introduction ############ **cTDMS** is a Python package to read or write TDMS or TDM files. TDMS or TDM are file formats developed by National Instruments and are the main file formats for data storage in LabView from National Instruments. **cTDMS** is using the NILIBDDC library from National Instruments, which is accessed by the help of the Python ``ctypes`` package. Version 0.91 for 32bit and 64bit system ============================= 1. Reading TDMS or TDM files ============================= To read a TDMS or TDM file you simply have to call: :: from cTDMS.cTDMS import TDM_File tdm=TDM_File("Data4.tdm") tdm.open() or: :: from __future__ import with_statement from cTDMS.cTDMS import TDM_File with TDM_File("Data4.tdm") as tdm: ... ... ====================================== Accessing groups in a TDMS or TDM file ====================================== The tdm file object is organized like a dictionary. The groups contained in the TDM file can be acces by: :: for groupname in tdm: print "Group %s ------------"%( groupname) group=tdm[groupname] ==================== Creating a new group ==================== A new group in the TDM file can be created with following command: :: if "newgroupname" is not in tdm: new_group=tdm.add_Group("newgroupname", "Description of the group") Before creating a new group, it has to be checked, that this group is not already existing. ========================= Getting data from a group ========================= Measuring data are store in channels of a group. the can be easily accessed by getting the channels from the group: :: for groupname in tdm: print "Group %s ------------"%( groupname) group=tdm[groupname] for channelname in group: print "Channel %s ------------"%(channelname) channel=group[channelname] print "Channel Properties -----" for property in channel.attrs: print property, channel.attrs[property] # get some data d=channel[5] d=channel[-5] d=channel[:] d=channel[0:] d=channel[10:-1] t=type(d) print "data type: %s, length: %d"%(str(type(d)), len(d))


نحوه نصب


نصب پکیج whl cTDMS-0.91:

    pip install cTDMS-0.91.whl


نصب پکیج tar.gz cTDMS-0.91:

    pip install cTDMS-0.91.tar.gz