LorenFrankLab / rec_to_nwb

Data Migration REC -> NWB 2.0 Service
Other
2 stars 8 forks source link

More columns are assigned to spatial series than are allowed by NWB 2.5 and above. #45

Closed edeno closed 1 year ago

edeno commented 1 year ago

These store things like camera frame count.

rly commented 1 year ago

The tracked LED position data creates an NWB best practice violation: SpatialSeries should have 1 column (x), 2 columns (x, y), or 3 columns (x, y, z). The generated NWB files currently have four columns xloc, yloc, xloc2, yloc2 representing the positions of the two LEDs on the animal's headstage, one on the front and one on the back so that head direction can be determined.

After rec_to_nwb was created, NWB clarified that a SpatialSeries is intended to store the position coordinates of a single object. If there are multiple objects, their positions should be stored in separate SpatialSeries objects. This makes the data more machine-readable, e.g., for creating widgets that plot the position of an animal over time.

I suggest creating two SpatialSeries objects, one for each LED. Currently the SpatialSeries objects are named "series_0", "series_1", etc. It looks like there is one for each epoch. We could name the new SpatialSeries objects "series0_led0" and "series0_led1". Or we could name them just "led0" and "led1" and concatenate the position data from multiple epochs into one SpatialSeries object per LED.

This error will cause dandi validation / upload to fail.

edeno commented 1 year ago

Fixed by #51