[SciPy-User] Reading TDM/TDMS Files with scipy

426 views
Skip to first unread message

Nils Wagner

unread,
Nov 28, 2010, 2:12:07 PM11/28/10
to scipy...@scipy.org
Hi all,

Is it possible to read TDM/TDMS files with scipy ?

I found a tool for Matlab
http://zone.ni.com/devzone/cda/epd/p/id/5957

Nils

_______________________________________________
SciPy-User mailing list
SciPy...@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user

Sebastian Haase

unread,
Dec 20, 2010, 3:23:17 PM12/20/10
to SciPy Users List
Hi Nils,
did you get anywhere with this ? I sounds like ctypes / numpy thing ...
I'm also considering to read LabView data in binary format.
And it seems that while TDMS structure is documented
http://zone.ni.com/devzone/cda/tut/p/id/5696
there is a paragraph saying """
This article does not describe how to decode DAQmx data. If you
need to read a
TDMS file with software that implements native support for TDMS
(without using
any components provided by National Instruments), you will
__not__ be able to interpret this data.
"""

So I guess, the link you gave is really the only way to go ...


Cheers,


Sebastian Haase

Floris

unread,
Jan 12, 2011, 2:45:18 AM1/12/11
to scipy...@scipy.org
Nils Wagner <nwagner <at> iam.uni-stuttgart.de> writes:

>
> Hi all,
>
> Is it possible to read TDM/TDMS files with scipy ?
>
> I found a tool for Matlab
> http://zone.ni.com/devzone/cda/epd/p/id/5957
>
> Nils
>


Hello Nils,
I made a little tool for that: pyTDMS.
http://sourceforge.net/projects/pytdms/
Hope that helps.
Floris

Sebastian Haase

unread,
Jan 12, 2011, 3:38:45 AM1/12/11
to SciPy Users List
On Wed, Jan 12, 2011 at 8:45 AM, Floris <flor...@hotmail.com> wrote:
> Nils Wagner <nwagner <at> iam.uni-stuttgart.de> writes:
>
>>
>> Hi all,
>>
>> Is it possible to read TDM/TDMS files with scipy ?
>>
>> I found a tool for Matlab
>> http://zone.ni.com/devzone/cda/epd/p/id/5957
>>
>> Nils
>>
>
>
> Hello Nils,
> I made a little tool for that: pyTDMS.
> http://sourceforge.net/projects/pytdms/
> Hope that helps.
> Floris
>
Hi Floris,

this is great news ! I hope I find time to try it out soon.

- Sebastian

Dudi Bitran

unread,
Feb 14, 2011, 4:43:53 AM2/14/11
to scipy...@scipy.org
Sebastian Haase <seb.haase <at> gmail.com> writes:

>
> On Wed, Jan 12, 2011 at 8:45 AM, Floris <florisje <at> hotmail.com> wrote:
> > Nils Wagner <nwagner <at> iam.uni-stuttgart.de> writes:
> >
> >>
> >> Hi all,
> >>
> >> Is it possible to read TDM/TDMS files with scipy ?
> >>
> >> I found a tool for Matlab
> >> http://zone.ni.com/devzone/cda/epd/p/id/5957
> >>
> >> Nils
> >>
> >
> >
> > Hello Nils,
> > I made a little tool for that: pyTDMS.
> > http://sourceforge.net/projects/pytdms/
> > Hope that helps.
> > Floris
> >
> Hi Floris,
>
> this is great news ! I hope I find time to try it out soon.
>
> - Sebastian
>

The file looks great but when i try to use this file i get:
Traceback (most recent call last):
File "<module1>", line 17, in <module>
File "<module1>", line 14, in main
File "pyTDMS.py", line 892, in read
data = readSegment(f,sz,data)
File "pyTDMS.py", line 755, in readSegment
newdata = readRawData(f,leadin,newobjects,newobjectorder,filesize)
File "pyTDMS.py", line 609, in readRawData
n_chunks = total_chunks / chunk_size
ZeroDivisionError: integer division or modulo by zero

I tried to debug it but i couldn't find the source of the problem
If you can please help me I'm trying for a very long time to read this files in
python.

Reply all
Reply to author
Forward
0 new messages