Repository navigation
Conversation
zm711
reviewed
Nov 20, 2026
zm711
left a comment
Contributor
There was a problem hiding this comment.
Thanks @evadiva3. I believe that @h-mayorquin has more experience with plexon so I'll leave him to also give this a read. In general we do not allow for generated file regression tests as the goal of the library is to be tested on real data. It would be better for you to write a test based on plexon/File_plexon_3.plx.
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.
Closes #1976.
The Plexon reader calculates each analog block's start from the current block's sample count. When consecutive blocks have different sizes, this shifts their offsets and can return the wrong signal samples. Accumulate the preceding block's sample count instead.
The regression writes a small PLX file with blocks of 100, 200, and 50 samples, parses it through
PlexonRawIO, and checks both block starts and a public chunk read across a boundary. It fails before the fix ([0, 200, 250]instead of[0, 100, 300]) and passes after.I also checked the existing public recording
plexon/File_plexon_3.plx. Its signal channel contains 5,007 blocks with sample counts of 120 and 86. The original parser puts the final block start 34 samples early. With the fix, all starts match the preceding payload lengths, and a chunk near the end matches the raw stored samples exactly. The chunk ends inside the final block so this check is independent of the end-of-block issue in #1971.Validation on Python 3.13.15:
pytest neo/test/rawiotest/test_plexonrawio.py neo/test/coretest: 652 passed, 13 skipped, 1 warning. External-data tests skip without their dataset harness; the generated-file regression runs independently.plexonrawio.pyas the unchanged base, with no new findings; the test file is clean.OpenAI Codex assisted with investigation, the implementation and regression, real-recording validation, test execution, and this description.