Viewing Raw Data or DIO files Using Matlab


Raw Data

To look at raw data, use the ts_browseraw_graph function in Matlab. The syntax is simple:



NB: It currently only works with 2kHz, float32 files! It has not been generalized yet to other sampling frequencies and data types. Also, the functionality to use .dat files will be folded into the original ts_browseraw at some point, so ts_browseraw_graph will eventually be deprecated.


DIO files

To look at .dio.txt files, run:


It will convert time codes to seconds, automatically do the binary conversion, and display a summary of the codes found. By default, it ignores the all-zero lines. To keep them, run:

ntools_dio_view(‘my_exp.dio.txt’, 1);


COMEDI files

To look at .comedi.dat files, run:

comedi_data = ntools_load_samples(‘my_exp.comedi.dat’,’uint16′,num_channels,start_samp,stop_samp);

Plot desired channel of comedi_data. The input precision for ntools_load_samples.m should not be read out of the .comedi.hdrxml file, but manually specified as “uint16.”