Repository navigation
[GUI] Read BioSig files with the optional Python BioSig library - #857
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.
|
Review (Claude Fable): needs Arno
DetailsReviewed at 95e137e. The reader itself looks sound, the menu labels and the order (ask to install, then the file chooser) follow EEGLAB's Decisions for Arno
Work needed whatever you decide
Minor
Other open pull requests. A trial merge with each of the 17 other open pull requests gives no conflict caused by this branch. 845, 835, 797 and 778 conflict, and each already conflicts with develop. For the orchestrator. Commit 1a74fb9 on develop ("Expose format-specific readers in the import menu", 44 files) belongs to no pull request, and this branch is built on it. Pull request 850, on the same subject, is still open. — orchestrator review |
Needs ArnoTwo points of this pull request are yours to decide. Nothing was changed in the code for either of them. 1. The two checkboxes that came back in the BioSig window. On November 26 you answered in issue 735 that Enable overflow detection and Force continuous data leave the window, in EEGLAB too. This pull request shows both again. Enable overflow detection changes nothing for EDF and BDF files, and it is greyed for GDF files. Force continuous data, when cleared, cuts the data into epochs (
2. The MNE-IO menu now asks for nine packages. On develop the MNE-IO menu opens as soon as MNE is installed. In this pull request it first asks to install all the packages of the
— orchestrator |
|
Code reviewThis is an independent review by Codex (OpenAI, model gpt-6.1-terra) of the three commits pushed today by the orchestrator (Claude Fable), which answer Arno's request to stop BIDS import of EDF and BDF files from needing BioSig. Codex read the code only and did not run the tests. Its one blocking finding and its important finding are fixed in commit 45c9cbb. What changed in this pull request
Parity with EEGLAB (rule of pull request #860). MATLAB R2025b, EEGLAB's
The signals are identical to MATLAB, bit for bit, in the six files. Two differences from EEGLAB remain, and both are already on develop, so this change does not add them:
Against develop's reader (MNE) on the same six files: same labels, same event types and latencies. The data differ only by the storage type, since develop returned 64 bit values and EEGLAB and the new reader store 32 bit ones (largest difference 0.0078 µV on a ±262,144 µV range, 3 parts in 100 million). One annotation that runs past the end of the file keeps its full duration (50 samples, as in MATLAB) where MNE cut it to 1 sample. The scripts and the result files are in Findings of Codex and what was done
Still open on this pull request
Full text of the Codex reviewSummaryChanges needed: discontinuous recordings can lose timing, and a truncated file with an unknown record count can be accepted silently. BlockingDiscontinuous timing is lost at ImportantTruncated records are silently dropped at NitsNone. Test gaps
— orchestrator |
Arno's answers on #857 (November 28, 2026): the BioSig window loses Enable overflow detection and keeps Force continuous data. The MNE-IO menu opens once MNE imports and offers MNE alone when it is missing. The Extension Manager still installs the nine packages of mne-io, and the full extra now includes mne-io. Co-Authored-By: Claude Opus 5.5 <[email protected]>
EDF+ annotation onsets count from the header start time. Sample 1 is at the time stamp of the first data record, so the native BIDS reader now subtracts it, drops annotations outside the data and clips their duration at the end, as pop_biosig does. Found by the Gemini review. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code reviewThis is an independent review by Gemini (Google, model Gemini 4 Carbon, medium effort, through agy) of pull request 857 at commit c23dfb0, the commit that carries out Arno's two answers of November 28. The orchestrator itself runs on Claude Opus 5.5. Gemini read the whole diff against develop and did not run the tests. Arno's answers. Gemini checked that both are carried out. The Enable overflow detection checkbox and its handling are gone from the BioSig window. Force continuous data when data is stored in blocks stays, and clearing it still means One blocking finding, fixed in commit a8106d8. The new BIDS reader for EDF and BDF placed EDF+ annotations at Findings left as they are, none blocking.
Window. Captures of the BioSig window before (45c9cbb) and after this change, for an EDF or BDF file and for a GDF file, are below. They were drawn by Qt on the Mac without showing the window. The window is 30 pixels shorter, and nothing else moved. Tests on this Mac. 189 passed on the plugin menu, importer, optional extras, help, File menu and BIDS files. The failures that remain are the tests that need BioSig or defusedxml, which this Mac does not have, and they fail the same way on the previous head. Ruff and — orchestrator |
|
The orchestrator did not merge this pull request, although Arno's two answers are now carried out (commit c23dfb0) and the blocking finding of the Gemini review is fixed (commit a8106d8). One problem blocks it, and it is Arno's to decide. BioSig cannot be imported on Windows. The CI job "Test Python 3.12 on windows-latest" fails on the head a8106d8, as it did on the earlier head 95e137e. Sixteen tests that read a file with Possible ways forward for Arno. (a) On Windows, keep the BioSig menu reading through MNE until BioSig publishes a wheel built against NumPy 2. (b) Disable the BioSig menu on Windows with a message, and skip its tests there. (c) Wait for a new BioSig release before merging. The other CI jobs were still running when this was written. The installation page also says that the Windows wheel includes the native library, which is true, but it does not work with NumPy 2, and that sentence should change with whichever choice is made. — orchestrator |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A short follow-up to the comment above. On the head a8106d8, every CI job passed except "Test Python 3.12 on windows-latest", which failed only because BioSig cannot be imported under NumPy 2 on Windows. After pull request 851 was merged, the branch was brought up to date with develop (commit 6741d33), and the tests of the readers, the menus, the extras and BIDS give the same results on this Mac as before. The pull request stays unmerged until Arno chooses how BioSig should behave on Windows. — orchestrator |
|
Arno asked on November 29, 2026 for a comparison of the two EDF and BDF readers and for a native import menu, and this is now tracked separately from this pull request.
This pull request is unchanged and still waits for Arno's choice about the BioSig menu on Windows. — orchestrator |
|
Arno's choice, November 29, 2026: option (b). His words: "Yes, turn off the menu in Windows with a warning."
— orchestrator |
BioSig 4.0.2 on PyPI ships a Windows wheel built for NumPy 1, and EEGPrep needs NumPy 2. The import menu now warns and pop_biosig raises a clear error there, pointing to pop_mneio and BIDS import. Tests that read files with BioSig skip on Windows (PR 857, Arno, option b). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Arno chose option (b), so BioSig is now turned off on Windows. This is commit 00607eb, "fix: turn off BioSig on Windows". What changed. BioSig 4.0.2, the latest version on PyPI, has a Windows wheel built for NumPy 1, and EEGPrep needs NumPy 2. On Windows (
Tests and CI. On this Mac, the changed test files pass except for the BioSig file-reading tests. Those fail here only because BioSig is not installed on this Mac ("No module named 'biosig'"), the same as before this change. A run with the platform set to Windows showed the warning, opened no file dialog and left the session empty. On GitHub, every check passed on 00607eb, including "Test Python 3.12 on windows-latest" (13 min), macOS, both Ubuntu jobs, Ruff and ty, the docs build and the Pyodide job. The pull request is not merged and waits for Arno. — orchestrator |

The BioSig menu now reads EDF, BDF and GDF through Python BioSig. Choosing the menu without the library offers installation in the running environment. The same install action is available in the extension manager. BioSig and MNE each have their own menu.
All 20 BDF and EDF cases matched the MATLAB event types, event latencies and sampling rates. Signal arrays matched exactly in 18. In the remaining two, MATLAB returned all 16 channels when asked for three. Python returned the requested three. Results by file and option · Fresh GUI installation and import.
Editable Word report · PDF report
Update of November 28, 2026. BIDS import of EDF and BDF files no longer needs BioSig: a small NumPy reader (
src/eegprep/plugins/EEG_BIDS/edf_bdf.py) reads them, and gapless EDF+D too. Only an EDF+D file with real gaps still goes to MNE, with a warning. GDF and the BioSig menu keep BioSig. Against EEGLAB in MATLAB R2025b (BIOSIG 3.8.4), the data are identical on five of six test files (0 difference). On the sixth,test.edf, EEGLAB turns the last channel into events and removes it, so it returns 15 channels and the reader 16. On the two annotated EDF+ and BDF+ files the events differ: EEGLAB reads 3 of 5 annotations in the EDF+ file and none in the BDF+ file, and its latencies are one sample earlier, as on develop. The install prompt and the installation page now name the system library and its command (sudo apt install libbiosig-devon Linux,brew install biosigon macOS). The parity table, the Codex review and what was left are in the review comment. The two questions for Arno are in the Needs Arno comment.Cause and change
The earlier BioSig-labelled importer read through MNE. The replacement calls BioSig for data and metadata, preserves the BDF trigger events, and keeps channel selection, reference, time range and history explicit. Linux and macOS builds use the native BioSig library. Windows x64 Python has a wheel for the tested versions.
Verification
The final Linux reader, BIDS, menu, dialog and console suite passed 535 tests and 139 GUI subtests. One case was skipped and 83 reference cases were deselected. All 61 targeted installer, importer and Help tests passed. The native library on Ubuntu 22.04 was libbiosig 2.3.3 and the Python package was BioSig 4.0.2. On a fresh environment the GUI installed the binding and opened the BDF file into the shared console workspace (16 channels, 15,360 samples and 41 triggers). With an existing partial MNE 1.13.2 installation, one prompt added all six missing format packages and opened 32 channels × 30,504 samples; a second selector opened without prompting. Pre-commit, Ruff and ty passed. Full MATLAB reference run. The reference pins are EEGLAB d0963be9d81acc5b66e84f8d3d7c89e3ce127cc4 and eeglab_tests fec88f9ffe7c225eb1de8924db8b6a3e0d53a4d9. All 30 Help and optional-extra checks passed on the final installation-guidance change. The numerical comparisons use e965781 and the final change only edits installation guidance. GitHub has accepted the full reference run on this exact branch tip. Its counts and runtime are pending.
Decision for Arno
Honor explicit channel selection. MATLAB’s two channel-list discrepancies are tracked in the reference-side finding. In GDF, the BioSig binding can replace valid digital endpoints with NaN. The program documents this limitation and the unavailable uncalibrated GDF option. GDF endpoint finding.
Related changes are the separate MNE importer and native import menus. The earlier numerical comparison is preserved in issue #701.
Fixes #812
Part of #735