Skip to content

Keep the last Plexon signal block when a read reaches its end - #1971

Open
evadiva3 wants to merge 5 commits into
NeuralEnsemble:masterfrom
evadiva3:fix/neo-2-plexon-last-block-read-as-zeros
Open

evadiva3 wants to merge 5 commits into
NeuralEnsemble:masterfrom
evadiva3:fix/neo-2-plexon-last-block-read-as-zeros

Conversation

@evadiva3

@evadiva3 evadiva3 commented Nov 17, 2026 •

Copy link
Copy Markdown

A read ending exactly at the end of the last Plexon signal block can return zeros for that block. When the right border is zero, data[:-border] becomes data[:0]. Only trim the right border when it is positive.

The regression now uses the existing plexon/File_plexon_3.plx recording instead of synthetic blocks. It checks reads of the final block against its stored samples, including a read ending one sample earlier. It uses the parsed block start to keep this test independent of the offset correction in #1980.

The real-recording regression fails without the fix and passes with it. It was run directly against a downloaded copy of the fixture; the Datalad download setup was not run locally. Black and Flake8 pass for the updated test file.

AI assistance: OpenAI Codex helped prepare the test, verify the failure and fix, run checks, and update this description.

@evadiva3

Copy link
Copy Markdown
Author

The documentation retry has finished: build 36000315 fails in the unchanged doc/source/rawio.rst example-data download. urllib.request.urlretrieve receives HTTP Error 403: Forbidden while retrieving the GIN example recordings, and the IPython Sphinx directive then aborts the build.

The earlier build was terminated by Read the Docs' time limit. The same-base documentation retry for #1972 now passes. No documentation, download, or build configuration was changed in this PR.

Could someone with access to the Read the Docs project or the GIN dataset check the example-data download from the builder?

@zm711

zm711 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@evadiva3 as I said on another of your PRs, we would want a test written for real data (you're welcome to supply a small test dataset) so that we have a way to reproduce the problem.

@evadiva3

Copy link
Copy Markdown
Author

Thanks, I've replaced the synthetic test with one using File_plexon_3.plx. It checks reads ending at the final block's boundary against the stored samples and fails without the fix. The test uses the parsed block start so it stays independent of the offset fix in #1980.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants