Repository navigation
[GUI] Import recordings with the optional MNE readers - #842
Conversation
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Claude finished @arnodelorme's task in 1m 54s —— View job Code review
BlockingNone. Important
Nits
Test gapsNone. The new tests cover mixed channel units, a non-zero EEGLAB parity notes
Also checked: the annotation latency change ( |
| ) | ||
|
|
||
| OPTIONAL_READERS = { | ||
| "biosig": ("BioSig", ("biosig>=4.0.2",)), |
There was a problem hiding this comment.
Important. Nothing on this branch imports the biosig package that this entry installs. pop_biosig and pop_fileio(dataformat="biosig") both read through MNE (
eegprep/src/eegprep/functions/popfunc/pop_fileio.py
Lines 184 to 190 in db5cff9
pop_biosig menu item, not to this package.
Fix: remove the "biosig" entry here (and the BioSig paragraph in plugin_menu.md and extensions.rst) until a reader actually imports biosig, or merge this after #812 if that PR adds the consumer.
|
|
||
| Select BioSig and choose Install reader to install the optional file reader in | ||
| the current Python environment. A missing native libbiosig library must be | ||
| installed using your operating system’s package manager. |
There was a problem hiding this comment.
Important. The new paragraph contradicts the sentence right above it ("EEGPrep … never downloads, … installs … from this manager"). It also contradicts EXTERNAL_PLUGIN_NOTICE (
eegprep/src/eegprep/functions/adminfunc/plugin_menu.py
Lines 36 to 39 in db5cff9
format_plugin_menu still prints, and the docstring at L271 ("never execute them"). This is a statement about trust and security, so users need it to be accurate. The paragraph also names only BioSig, but the manager now lists MNE-IO too.
Fix: narrow the existing statements to third-party extensions, e.g. "never installs third-party extension code; Install reader runs pip in the current interpreter only for EEGPrep's built-in optional readers (MNE-IO)". Then update EXTERNAL_PLUGIN_NOTICE to match.
The MNE-IO menu now opens pop_mneio, which reads a file or recording folder through MNE. Both the import menu and the extension manager can install the optional readers into the running EEGPrep environment. The imported dataset and command appear in the GUI and console.
Maximum signal differences relative to MATLAB on common channels were 2.13 × 10⁻¹⁶ for SET, 3.38 × 10⁻⁸ for EDF and 3.73 × 10⁻⁸ for BDF. All 154 SET event types matched. The largest SET latency difference was 0.0000633 sample. MNE preserved BDF’s Status channel and supplied zero annotations. MATLAB BioSig decoded 41 events.
Editable Word report · PDF report
Cause and change
The MNE-labelled menu called pop_biosig. The new importer uses mne.io.read_raw, converts voltage channels to microvolts, preserves stimulus codes, and reports annotation times from the actual first sample. The install dialog and manager use the same installer as #812.
Verification
278 reader, extension, console and menu tests passed, with 7 reference cases deselected. A second run of the Qt dialogs and affected readers passed 189 tests, with 4 reference cases deselected. Pre-commit, Ruff and ty passed. A fresh Linux environment installed MNE 1.13.2 from the GUI and opened a 32-channel recording with 30,504 samples and 154 events. The reference pins are EEGLAB d0963be9d81acc5b66e84f8d3d7c89e3ce127cc4 and eeglab_tests fec88f9ffe7c225eb1de8924db8b6a3e0d53a4d9. Full MATLAB reference workflow. The reference workflow uses db5cff9. The only subsequent change at GitHub’s recorded merge commit 5b94122 is a comment explaining MNE event indexing. The installer follow-up also handles environments with MNE present and some format packages missing. Five of the seven reference groups passed. The STUDY group had 340 passed, 27 skipped, 3 deselected and one failure in 17 min 15 s. The assertion on empty structures is already tracked on develop by #685 and #691. The core group is still running. The standalone installation job independently reproduced the MNE Help-marker mismatch. #857 and #850 both include its tested correction.
Decision for Arno
This reader preserves MNE’s annotations and its native Status channel. Choose BioSig for decoded BioSemi event codes. Conversion of electrode coordinates from an MNE montage is tracked in #840. The coordinate work has a separate proposed change.
GitHub marked this PR merged at 18:56 Pacific when the orchestrator’s repo-push job advanced develop. The complete feature diff remains visible here. The optional BioSig reader is tracked in #812 and native format menus in #850.
Fixes #813
Part of #735
Also addresses #838 with the same conversion as #841.
Fixes #839