Repository navigation
Check spike waveforms with t_start and t_stop in rawio compliance tests - #1974
ptlnextdoor wants to merge 1 commit into
Conversation
|
@ptlnextdoor, I'm trying to figure the benefit of testing this. To be honest I don't personally use Neo's waveform machinery so maybe that is my bias and I can ping some of the other maintainers who might feel stronger about the waveform side. Could you walk me through your reasoning a bit more? |
…e tests read_spike_waveforms only read with t_start=None and t_stop=None. Now it also reads one spike by forcing limits and compares it to the full read, as read_spike_times does. ExampleRawIO returned different waveforms for a spike depending on the time range, so it now keeps the waveforms of the spikes inside the range.
850b7d4 to
75157f6
Compare
|
Thanks for asking. Before this PR, the compliance test never read waveforms with The new check caught a real case in I am happy to drop the check if the maintainers prefer. |
Fixes #1960
What was missing
read_spike_timesinrawio_compliance.pyreads one spike with forcedt_startandt_stopand compares it to the full read.read_spike_waveformsonly read witht_start=Noneandt_stop=None, so the time-limited waveform path was not tested for any reader.What changed
read_spike_waveformsnow also reads the waveforms around the second spike with forced limits, in channels with more than 3 spikes. It checks that the count equals the number of spikes in that window in the full read, and that the waveforms equal the matching rows of the full read.ExampleRawIOfailed the new check: it generated waveforms from a fixed random seed for the spikes in the range only, so a spike got different waveforms depending on the range. It now generates the waveforms of all spikes and keeps those inside the range.How it was tested
masterforExampleRawIOand passes after the change.pytest neo/test/rawiotest/test_examplerawio.py neo/test/iotest/test_exampleio.py: 11 passed.black --checkis clean.gin.g-node.org(the test data host) is unreachable from my environment, so the new check is not verified against other readers. CI will show whether any other reader fails it.AI disclosure: this PR was prepared with AI assistance (Claude, Anthropic).