Closed stevevanhooser closed 3 years ago
Look at all of the functions in ndr.reader
and see if there are simpler names
Here are the new function names I propose:
base:
ced_smr
intan_rhd
somecompany_someformat
spikegadgets_rec
Ok, I've taken another look at this and here are the functions that should keep their names across all classes (thanks, Steve, for the help): t0_t1 getchannelsepoch readchannels_epochsamples readevents_epochsamples readevents_epochsamples_native samplerate filenamefromepochfiles
read(channelType, channelNames_Numbers, 't0', -Inf, 't1', Inf,'useTime',1 ) % %. Step 1: decode the channel names and channel types %. Step 2: if it is something that needs to be read with readchannels_epochsamples, then it calls that %. if it is something that needs to be read with readevents_epochsamples, then it calls that
I will write a function prototype, ask NDR developers to write the channel decoders for their own reader
Method names have been pretty confusing for me too. When I was implementing their Python analogues I initially renamed them to more understandable names (and then went back to NDR names for consistency).
E.g.:
ndr_reader_base_obj --> self // It can be short, people know what `self`/`obj` means when it goes as the first argument in a method
t0_t1 --> get_t0_t1_of_epoch()
getchannelsepoch --> get_channels_of_epoch()
readchannels_epochsamples --> read_samples()
readevents_epochsamples --> read_events()
samplerate --> get_sample_rate()
daqchannels2internalchannels
was also confusing, it's not immediately clear what's a daq channel name and what's an internal channel name, especially since some readers don't directly follow the distinction. convert_channels_from_device_to_ndr_format()
?
I would probably also rename some arguments:
channelnumber --> channels // And require it to consistently be a cell array?
epochfiles --> files // Sometimes there is more than one epoch in a file
Not urgent, just a couple of thoughts.
readchannels_epochsamples => readsamples read_epochevents => readevents?
or just read('samples', ...) read('events',...)
For discussion...