Skip to content

ndr.format.intan.read_Intan_RHD2000_datafile

  READ_INTAN_RHD2000_DATAFILE - Read samples from an Intan data file

   [DATA,TOTAL_SAMPLES,TOTAL_TIME,BLOCKINFO] = READ_INTAN_RHD2000_DATAFILE(FILENAME,
      HEADER, CHANNEL_TYPE, CHANNEL_NUMBERS, T0, T1);

   Inputs:
   Reads data from the Intan Technologies .rhd 2000 file FILENAME.
   The file HEADER information can be provided in HEADER.  If HEADER
   is empty, then it will be read from the file. CHANNEL_TYPE is the
   type of channel to be read (use table below). CHANNEL_NUMBERS are the
   the channel numbers for which to return data (randing from 1 to the number
   of channels of that type sampled). CHANNEL_NUMBERS are from 1...N where
   N is the number of channels ENABLED in the recording. 1 is the first channel
   enabled, 2 is the 2nd channel enabled, etc. One can examine the header file to
   see its correspondance with Intan bank and channel indexes (e.g., the first channel, 1, may be
   'amp-A-000'). 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.

   CHANNEL_TYPE values:
   Value:                      | Meaning:
   --------------------------------------------------------------------------
   'time', 'timestamps', or 1  | read timestamps of samples
   'amp', 'amplifier' or 2     | read amplifier channels
   'aux', 'aux_in', or 3       | read auxiliary input channels
   'supply', or 4              | read supply voltages
   'temp', or 5                | read temperature sensor
   'adc', or 6                 | read analog to digital converter signals
   'din', 'digital_in', or 7   | read digital input (a single channel of 16 bit values)
   'dout', 'digital_out', or 8 | read digital output signal (a single channel)

   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.

   Notes: (1) The Intan RHD2000 board has its own clock. Asking this function
   to read at time T0=0 will read the first sample in the file. This time
   might correspond to some other time on the Intan board.  Reading the
   'time' channel will indicate the time of the sample on the board's clock.
   (2) This function performs no filtering. Even if the user had checked
   for the RHD2000 software to use a 60Hz notch or a high-pass filter,
   this function returns the raw data. 

   See also: READ_INTAN_RHD2000_HEADER

   2014-12-08 SDV - wrote it and tested it