NeurodataWithoutBorders / nwb-schema

Data format specification schema for the NWB neurophysiology data format
http://nwb-schema.readthedocs.io
Other
52 stars 16 forks source link

What is the dimension "num_samples" in ElectricalSeries #571

Open ehennestad opened 5 months ago

ehennestad commented 5 months ago

From the description for ElectricalSeries:

https://github.com/NeurodataWithoutBorders/nwb-schema/blob/308c5d80d842f2e45cf25042cb12887ec8c7cbab/core/nwb.ecephys.yaml#L4-L7

It says the data can be 1D or 2D. However, the specification of the data dataset also suggests data can be 3D. https://github.com/NeurodataWithoutBorders/nwb-schema/blob/308c5d80d842f2e45cf25042cb12887ec8c7cbab/core/nwb.ecephys.yaml#L17-L26

Which is the most up to date? Also what is num_samples in this context? I could understand if it was num_electrodes but num samples is very often the same as num_timepoints so this is confusing (I am not very familiar with ephys, so excuse me if this is obvious)

CodyCBakerPhD commented 5 months ago

I believe the 3D case is for allowing the ability to write only extracted waveform snippets (each of length num_samples, as in number of frames sampled by each waveform) instead of the entire continuous voltage trace (the 2D version)

The most primary use case is the 2D version; there are other more recommended ways of writing waveform data, such as explicitly linking it to spiking events on the units table

In 3.0 I would recommend removing the 1D and 3D cases. I think we also planned at some point last year to add different types for neural ElectricalSeries and non-neural (but still voltage valued) series for things like analog and digital channels

rly commented 5 months ago

@CodyCBakerPhD is correct and I second removing the 1D and 3D cases as well as splitting neural and non-neural electrical time series into different data types.