Rank: 640 based on 117 downloads (last 30 days) and 2 files submitted
photo

Jim Hokanson

E-mail
Company/University
University of Pittsburgh
Lat/Long
40.44129943847656, -79.95919799804688

Personal Profile:

http://sites.google.com/site/jimhokanson/

Professional Interests:

 

Watch this Author's files

 

Files Posted by Jim View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Oct 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson tdms, labview 90 27
  • 5.0
5.0 | 3 ratings
29 Nov 2009 Unique Rows for a cell array Find unique rows of a cell array containing columns with strings or scalars, or N-D matrices Author: Jim Hokanson unique, cell array 27 7
  • 5.0
5.0 | 5 ratings
Comments and Ratings by Jim View all
Updated File Comments Rating
30 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson

Regarding improvements in documentation, that is probably one area to improve. Raw DAQ MX data is a proprietary Labview format and I've been turned down in requests to get specifications on that type. I've managed to parse a couple of examples but since I have had so few examples to go off of I haven't tried implementing it. In my experience the raw format is really just read as a normal data type (int16 in my experience??) with properties that specify how to scale that raw data into measured data. I don't know how to extract the real data type from their meta information. I could technically just treat it as some data type, say uint8, but to parse the data generally (not always) relies on knowing the size of the data type. In addition there is some strange buffering of the meta information which I can manually hard code around but I am not sure if it is always present.

That being said, if you have an example file I would be interested in looking at it so that I could eventually offer some workarounds. As I said I have had some luck in extracting the data.

29 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson

You can be as specific about reading data as you would like. See the documentation file TDMS_retrievingSubsets. You can get as fine grained in reading of the data as you would like, specifying down to the channel and sample numbers if you like. Please let me know if there is anything about the documentation you think should be clarified.

Looking over this more carefully it appears that I have made an error in my documentation related to the meta_struct. I will be updating that soon.

The main error is that subsequent calls is that if you read more more data and want to use the metaStruct from a previous call to reduce parsing time, you still need to pass in the filename again:

TDMS_readTDMSfile(filename,'META_STRUCT',metaStruct,etc)

I tend to recommend using TDMS_getStruct, in which case you would use:

TDMS_getStruct(filename,versionNumber,{'META_STRUCT' metaStruct etc})

07 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson

Andreas, I am unaware of any bugs in the code at this time. Please check the message I sent you.

12 Oct 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson

Hi Andreas,

  I've known about that bug for a while I just haven't uploaded a fix yet. I had been a bit slow since I wanted to incorporate some other changes and it is an error that will be thrown as opposed to failing silently and pretending to work. I'll upload a modification very soon but for now you just need to replace in that particular case structure (starting around line 100) in TDMS_readFileHelper_v1 the following:
dataType -> change to -> dataTypes(1)

Jim

05 Aug 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson

That shouldn't be a problem. The raw format is currently unsupported because its type is unspecified.

Comments and Ratings on Jim's Files View all
Updated File Comment by Comments Rating
02 Feb 2012 Unique Rows for a cell array Find unique rows of a cell array containing columns with strings or scalars, or N-D matrices Author: Jim Hokanson Nate

Great job. Exactly what I was looking for.

27 Jan 2012 Unique Rows for a cell array Find unique rows of a cell array containing columns with strings or scalars, or N-D matrices Author: Jim Hokanson ALiveris

Worked for me fast (1s) on a 50000x3 array of strings

01 Dec 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson Blaine

I'm new to TDMS files I just assumed that they can all be read the same. The test file I have is just an example file I downloaded from NI. I wasn't aware that Raw DAQ MX was different than any other TDMS file.

30 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson Hokanson, Jim

Regarding improvements in documentation, that is probably one area to improve. Raw DAQ MX data is a proprietary Labview format and I've been turned down in requests to get specifications on that type. I've managed to parse a couple of examples but since I have had so few examples to go off of I haven't tried implementing it. In my experience the raw format is really just read as a normal data type (int16 in my experience??) with properties that specify how to scale that raw data into measured data. I don't know how to extract the real data type from their meta information. I could technically just treat it as some data type, say uint8, but to parse the data generally (not always) relies on knowing the size of the data type. In addition there is some strange buffering of the meta information which I can manually hard code around but I am not sure if it is always present.

That being said, if you have an example file I would be interested in looking at it so that I could eventually offer some workarounds. As I said I have had some luck in extracting the data.

30 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson Blaine

I tried to open my large data file with:

[tmp,metaStruct] = TDMS_readTDMSfile('C:\Users\bjmarti4.NDC\Desktop\FIRST_LIGHT_CO2.tdms','GET_DATA_OPTION','getnone')

I get the following error:

??? Error using ==> TDMS_processLeadIn at 50
Currently code is unable to ignore/handle Raw Daq MX data

Error in ==> TDMS_preprocessFile at 179
    [flags,info] = TDMS_processLeadIn(fid,lastLetter);

Error in ==> TDMS_readTDMSFile at 223
metaStruct = TDMS_preprocessFile(fid,tdmsFileName,paramsStruct);

Error in ==> TDMS_exampleFunctionCalls at 95
[tmp,metaStruct] =
TDMS_readTDMSfile('C:\Users\bjmarti4.NDC\Desktop\FIRST_LIGHT_CO2.tdms','GET_DATA_OPTION','getnone')

I was able to open a small test file, but when I try to open my data file is when I get the error

Top Tags Applied by Jim
cell array, cross correlation, labview, tdms, unique
Files Tagged by Jim View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Oct 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.4 Author: Jim Hokanson tdms, labview 90 27
  • 5.0
5.0 | 3 ratings
29 Nov 2009 Unique Rows for a cell array Find unique rows of a cell array containing columns with strings or scalars, or N-D matrices Author: Jim Hokanson unique, cell array 27 7
  • 5.0
5.0 | 5 ratings
08 May 2009 Coherently aligns data Aligns data according to cross-corr maxima Author: Joshua Carmichael cross correlation, plotting, array processing, signal processing, coherency analysis, align 5 0

Contact us at files@mathworks.com