VH-Lab / NDR-matlab

Neuroscience Data Readers - A Matlab conglomerative library for reading neuroscience data files
1 stars 1 forks source link

ndr.reader.spikegadgets_rec needs new functions #35

Closed stevevanhooser closed 3 years ago

stevevanhooser commented 3 years ago

In the branch reader improve, there is a new read function that makes reading data from ndr.reader even easier. Most users will probably just call the read version.

It requires two helper functions in each subclass of ndr.reader.base: canbereadtogether and daqchannels2internalchannels. These functions need to be overriden in each subclass (intan_rhd, ced_smr, _spikegadgets_rec). Please see the ndr.reader.base class for the inputs and outputs (https://github.com/VH-Lab/NDR-matlab/blob/reader_improve/%2Bndr/%2Breader/base.m).

The base class version of canbereadtogether does check to make sure that the sample rates are all the same (a requirement of canbereadtogether), so you probably want to call the base class version in your overriden version (check that the base class version passes and then add more requirements depending upon your file type). You can read how to do this here: https://www.mathworks.com/help/matlab/matlab_oop/calling-superclass-methods-on-subclass-objects.html

Thanks! Steve