Skip to content

ndr.format.ced.read_SOMSMR_datafile

  ndr.format.ced.read_SOMSMR_datafile Reads samples from a CED SOM/SMR file 

   [DATA,TOTAL_SAMPLES,TOTAL_TIME,BLOCKINFO,TIME] = ndr.format.ced.read_SOMSMR_datafile(FILENAME,
      HEADER, CHANNEL_NUMBER, T0, T1);

   Inputs:
   Reads data from the Cambridge Electronic Design .SOM or .SMR file FILENAME.
   The file HEADER information can be provided in HEADER.  If HEADER
   is empty, then it will be read from the file.  CHANNEL_NUMBER is the
   the channel number for which to return data (ranging from 1 to the number
   to return data; it corresponds to the channel number in the Spike2 .SMR file 
   (that is, in the Sampling Configuration that was used on Spike2).
   T0 is the time to start reading (the beginning of the recording is 0) and T1 is
   the time to stop reading. If T0 is negative, we will start with time 0.
   If T1 is INF, we will use the end time of the whole file.

   Outputs:
     DATA - each column contains samples from an individual channel; if more than
        one channel has been requested, DATA will have more than one column.
     TOTAL_SAMPLES - The total number of (amplifier or digital) samples estimated to be
        in the file.
     TOTAL_TIME - An estimate of the total duration of the time series data in the
        recorded file, in seconds.
     BLOCKINFO - the output of SONGETBLOCKHEADERS that describes the file blocks
     TIME - a vector corresponding to the time of each sample read

   Note: at this time, we can only read single channels at a time. If CHANNEL_NUMBER is an array,
   there will be an error. If the user need this functionality, please submit an ISSUE on GitHub
   (http://github.com/VH-Lab/NDR-matlab).

   See also: ndr.format.ced.read_SOMSMR_header, ndr.format.ced.read_SOMSMR_sampleinterval