-
Notifications
You must be signed in to change notification settings - Fork 32
Description
The add_icephys_recordings() function assumes that every Neo signal channel corresponds to a response signal and automatically creates a corresponding stimulus from the raw protocol data. In add_icephys_recordings(), the code loops over all neo channels and treats each as a response, then pairs it with stimulus data indexed by the same channel number from protocol[0][segment][ei].
For the Khaliq lab data that I have, the first channel represents the Voltage response and the second signal represents the current (a monitor signal). When using add_icephys_recordings with this configuration two errors occur: (1) The monitor current is stored using the wrong NWB data type (CurrentClampSeries, a response type instead of CurrentClampStimulusSeries, the stimulus type), and (2) The code creates a paired stimulus from an inactive/empty DAC protocol, resulting in a CurrentClampStimulusSeries filled with zeros that has no experimental meaning.
The interface should provide a way for users to explicitly specify what each ADC channels represents. This would allow correct data type assignment (response series vs. stimulus series) and proper stimulus-response pairing. We could also potentially improve the automatic detection heuristics by analyzing channel units and matching them to active DAC configurations, though this may not cover all cases and user-specified mapping would be more reliable.