Repository navigation
Check spike waveforms with t_start and t_stop in rawio compliance tests - #1974
Open
ptlnextdoor wants to merge 1 commit into
Open
ptlnextdoor wants to merge 1 commit into
ptlnextdoor wants to merge 1 commit into
Conversation
…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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 one spike (the second one) with forced limits, in channels with more than 3 spikes. It checks that one waveform comes back, with the same shape per waveform, and equal to the matching waveform 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).