VH-Lab / NDR-matlab

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

Reorg 1: rename, re-document, edit +format files #4

Closed stevevanhooser closed 3 years ago

stevevanhooser commented 3 years ago

Hi guys -

I combined the branches and reorganized things, mostly in the manner that we discussed.

The main object is now ndr.reader . I think that sounds the most intuitive.

The base class for the objects that actually read the formats is now ndr.reader.base. The readers for the various companies are called ndr.reader.company_format. (For example, ndr.reader.intan_rhd).

I also thought that we should rename some of the +format/+company files.

For example, our old function for reading CED SMR files was read_CEDSOMSMR_datafile.m. Now that we have a package organization, if that function lives in a CED package, it does not need to say CED in the name. So I rename it to read_SOMSMR_datafile.m.

There are two action items:

  1. To complete the re-organization, you guys will need to rename the functions in +ndr/+format/+company/* to remove the company name. I renamed the files for the CED and Spikegadgets files, but the documentation will still need to be updated.
  2. Check out the code and documentation of these +ndr/+format/+company files and update them so the functions that are called are now accurate. As an example, I did +ndr/+format/+ced/read_SOMSMR_datafile.m . It now lists its name as ndr.format.ced.read_SOMSMR_datafile, and the "See also" functions have the right new names. Also, that function calls ndr.format.ced.read_SOMSMR_header, so I updated the function name in the ndr.format.ced.read_SOMSMR_datafile.m code.

For this purpose, I made you all new branches (noah2, sophie2, yijia2) from the new main.

Thanks!

stevevanhooser commented 3 years ago

As an example, in read_SOMSMR_sampleinterval.m, it needs:

  1. Update of old name in documentation
  2. Update to the correct names of the "See also" functions (needs to include the package, ndr.format.ced.read_SOMSMR_datafile, for example)
  3. Call the right function on line 27 (not the one that is not in a package but ndr.format.ced.read_SOMSMR_header)
stevevanhooser commented 3 years ago

Thanks @Sophie-Greer

Some edits:

in read_SOMSMR_sampleinterval.m:

lines 2, 4, 23, 27 need to have the full function name within the packages. Change to (case sensitive)

ndr.format.ced.read_SOMSMR_xxx (where xxx is as appropriate)

similar for header reader (see if you can figure out which lines)

and read_SOMSMR_datafile.m on line 2

Thanks! Steve