Skip to content

ndr.format.spikegadgets.read_rec_trodeChannels

  [recData, timestamps] = read_SpikeGadgets_trodeChannels(filename,NumChannels,channels,samplingRate,headerSize, s0, s1) )
  Imports channel data in matlab from the raw data file

  INPUTS
  filename-- a string containing the name of the .dat file (raw file from SD card)
  NumChannels-- the number of channels in the recording (i.e., 32,64,96...)
  channels-- the channels you want to extract (extracting all channels at
  once may overload memory) numbers 1-120 which belong to each 4 of the 30 tetrodes
  samplingRate-- the sampling rate of the recording, i.e 30000
  headerSize--the size, in int16's, of the header block of the data
  (contains DIO channels and aux analog channels). calculated from (MCUnumbytes + ECUnumbytes + 1) / 2 = 17
  s0 - the first sample number to read
  s1 - the last sample number to read

  OUTPUTS
  timestamps--the system clock when each sample was taken
  recData-- an N by M matrix with N data points and M channels (M is equal to the number of channels in the input)