NeurodataWithoutBorders / nwb-schema

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

EventDetection not appropriate for modern probes #555

Open bendichter opened 1 year ago

bendichter commented 1 year ago

The EventDetection class in the ecephys module is meant to store the detected unsorted spike times, e.g. threshold crossings of an ElectricalSeries. This type of object is rarely if ever used because users generally prefer to store the raw and/or output of spike sorting, and have little use to store intermediate values in the spike sorting pipeline. Nevertheless, I was attempting to write a section of our ecephys tutorial for the type to increase our neurodata type coverage in the documentation. Upon doing so I realized there were some oddities in this ndtype.

First of all, it requires both the source_idx of the spike in the source ElectricalSeries and the timestamp, which is redundant.

Second, it does not contain information about which electrode(s) detected the spike. This might be acceptable with probes that have a small number of electrodes, such as tetrodes, but for modern probes like Neuropixels that have 100+ channels, I think this is of limited utility without indicating which electrodes are involved in the spike.

I'm not sure how to proceed here. Has anyone seen people actually use this type? Should we fix it or deprecate it?

CodyCBakerPhD commented 1 year ago

Has anyone seen people actually use this type?

One way to help answer this question, which can be used for justification of its removal, would be to scan all files on the DANDI archive to see if any of them contain a single object of this type

If not, I say deprecate. We use the Units table for spike thresholding all the time, with the caveat that we usually put it under a processing module instead of the outer level