You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pop_biosig: read with the biosig Python library, installed from the extension manager #812
Linux (jamming) captures of EEGLAB and EEGPrep from the November 28 run are added below, directly visible, by the EEGPrep worker. Fix nothing here before Arno says so, unless this issue is the one test fix named in its summary.
Arno's words
Arno's feedback of November 28, 2026 on the File and Edit comparison report (EEGLAB_vs_EEGPrep_File_and_Edit.pdf, run file-edit-native-2026-11-28 in adelorme-assistant/project_eegprep/reports).
Pop_biosig in Python should use functions from the biosig Python library. Biosig need not be installed by default but It should be one of the options installed when one selects BioSig in the extension manager. Then we do pip install biosig and all the menus from BioSig become available. The behavior should be like in MATLAB. When you call the BioSig menu in the import and BioSig is not installed, it should pop up a window asking you to install BioSig.
Note that this, contrary to previous instructions I gave you, overwrites the instruction for pop_biosig.
Scope check: new reader backend, a new extension-manager install action and a GUI install prompt across several modules. That is well over 100 lines and needs design approval, and the issue says to wait for Arno. No PR opened.
Human decision on the open questions below
Research
pop_biosig currently reads EDF/BDF/GDF through pop_fileio → mne.io.read_raw_*, behind the mne extra. Its own code only adds BDF Status decoding (through openbdf/readbdf), rereferencing and history. The extension manager only shows copyable install commands and never runs pip (extension_catalog.py#L1-L5, plugin_menu.py#L831-L857). When an extra is missing, the code raises ImportError and nothing offers to install it (extras.py#L109-L167).
Reader: add a biosig extra (biosig on PyPI) and map pop_biosig to it in extras.py. pop_biosig reads with biosig.data()/biosig.header() (the Python binding of libbiosig, matching MATLAB sopen/sread) instead of going through pop_fileio/MNE. Keep the existing BDF Status decoding, reref and history code. The MNE path moves to pop_mneio (pop_mneio: new import function through MNE, an optional install like BioSig #813).
Extension manager: add a bundled "BioSig" entry whose Install button runs sys.executable -m pip install biosig in a subprocess, after showing INSTALL_TRUST_WARNING. After a successful install, the BioSig menu items are enabled without a restart (importlib.invalidate_caches()).
Missing-library prompt: in menu_actions.py, before calling pop_biosig, check importlib.util.find_spec("biosig"). If it is missing, show a Yes/No dialog like EEGLAB's plugin_askinstall, which runs the same install helper. The console keeps raising the ImportError with the install command.
Labels/docs/help: drop "(MNE-IO)" from the BioSig menu labels and file filter (EEGLAB's labels), and update resources/help/pop_biosig.md, the extras doc page and the installation docs.
Tests: read sample_data EDF/BDF with biosig, skipping when it is not installed, and compare against the existing MNE results. The prompt itself is tested at the GUI level.
Open questions
Does Arno accept EEGPrep running pip install itself? That changes the current "copyable, never executed" policy in extension_catalog.py. Does it need a confirmation step, and what happens in uv/conda environments where pip is not the right installer?
The biosig PyPI package wraps the libbiosig C library. Do wheels exist for macOS/Windows on Python 3.12+? If not, Install fails on those platforms. Is a fallback to pop_mneio acceptable there?
Should Status-channel decoding use libbiosig's own event table (EVENT.TYP/POS), which matches MATLAB pop_biosig, or keep EEGPrep's openbdf/readbdf decoding?
Earlier issue on the same function: #701 (pop_biosig window: same controls as EEGLAB without mexSLOAD and memory mapping; compare imported files), closed today as replaced by this one. Its request to compare the imported BDF and EDF files side by side still applies here.
🤖 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.
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.
Arno asked on November 29, 2026 to check the new BioSig Python release on Windows. Alois Schlögl uploaded biosig 4.0.3.post2, whose Windows wheels are now built against NumPy 2.
Windows 11 VM (x64 Python under emulation on ARM), fresh environments: biosig 4.0.3.post2 imports and reads a PhysioNet EDF (S001R01.edf, 64 channels, 9,760 samples at 160 Hz) on Python 3.11 with NumPy 2.4.6 and on Python 3.12 with NumPy 2.5.5. The sum and standard deviation of the data match MNE-Python on the Mac to 1e-14.
Control: biosig 4.0.1 on Python 3.12 with NumPy 2 fails at import ("A module that was compiled using NumPy 1.x cannot be run in NumPy 2").
Reading the compiled modules of every Windows wheel on PyPI: in 4.0.1 the cp311 and cp312 modules reference only numpy.core._multiarray_umath (NumPy 1 ABI), while the cp39, cp310 and cp313 to cp315 modules already reference numpy._core (NumPy 2 ABI). In 4.0.3.post2 all seven wheels reference numpy._core. Python 3.13 and NumPy 1.26 were not run live: the C: drive of the Windows VM is full and uv could not create those two environments. Run folder on the Mac: ~/.local/share/eeglab-eegprep-compare/windows/runs/console-6b14bdd303.
Activity
claude commentedon Nov 28, 2026
🤖 Plan:
Research
pop_biosigcurrently reads EDF/BDF/GDF throughpop_fileio→mne.io.read_raw_*, behind themneextra. Its own code only adds BDF Status decoding (throughopenbdf/readbdf), rereferencing and history. The extension manager only shows copyable install commands and never runs pip (extension_catalog.py#L1-L5,plugin_menu.py#L831-L857). When an extra is missing, the code raisesImportErrorand nothing offers to install it (extras.py#L109-L167).Relevant code
src/eegprep/functions/popfunc/pop_biosig.py#L1-L110: MNE-backed reader via pop_fileiosrc/eegprep/extras.py#L15-L72:pop_biosigmapped to themneextrasrc/eegprep/functions/guifunc/menu_actions.py#L719-L776: menu dispatch and file filter "MNE-IO files"src/eegprep/functions/guifunc/eeglab_menu.py#L44-L49: "(MNE-IO)" menu labelssrc/eegprep/functions/adminfunc/plugin_menu.py#L831: install guidance text only, no install actionProposed approach (for review)
biosigextra (biosigon PyPI) and mappop_biosigto it inextras.py.pop_biosigreads withbiosig.data()/biosig.header()(the Python binding of libbiosig, matching MATLABsopen/sread) instead of going throughpop_fileio/MNE. Keep the existing BDF Status decoding, reref and history code. The MNE path moves topop_mneio(pop_mneio: new import function through MNE, an optional install like BioSig #813).sys.executable -m pip install biosigin a subprocess, after showingINSTALL_TRUST_WARNING. After a successful install, the BioSig menu items are enabled without a restart (importlib.invalidate_caches()).menu_actions.py, before callingpop_biosig, checkimportlib.util.find_spec("biosig"). If it is missing, show a Yes/No dialog like EEGLAB'splugin_askinstall, which runs the same install helper. The console keeps raising theImportErrorwith the install command.resources/help/pop_biosig.md, the extras doc page and the installation docs.sample_dataEDF/BDF with biosig, skipping when it is not installed, and compare against the existing MNE results. The prompt itself is tested at the GUI level.Open questions
pip installitself? That changes the current "copyable, never executed" policy inextension_catalog.py. Does it need a confirmation step, and what happens in uv/conda environments where pip is not the right installer?biosigPyPI package wraps the libbiosig C library. Do wheels exist for macOS/Windows on Python 3.12+? If not, Install fails on those platforms. Is a fallback topop_mneioacceptable there?EVENT.TYP/POS), which matches MATLABpop_biosig, or keep EEGPrep'sopenbdf/readbdfdecoding?pop_biosigkeeps its name?arnodelorme commentedon Nov 29, 2026
Earlier issue on the same function: #701 (pop_biosig window: same controls as EEGLAB without mexSLOAD and memory mapping; compare imported files), closed today as replaced by this one. Its request to compare the imported BDF and EDF files side by side still applies here.
— orchestrator
arnodelorme commentedon Nov 29, 2026
🤖 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.
Pull request #857.
Editable Word report · PDF report
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.
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.
— EEGPrep worker (Codex)
arnodelorme commentedon Nov 29, 2026
Arno asked on November 29, 2026 to check the new BioSig Python release on Windows. Alois Schlögl uploaded biosig 4.0.3.post2, whose Windows wheels are now built against NumPy 2.
biosig>=4.0.2tobiosig>=4.0.3.post2, because 4.0.2 and 4.0.3 still ship NumPy 1 wheels for Python 3.11 and 3.12 on Windows.Details
Reading the compiled modules of every Windows wheel on PyPI: in 4.0.1 the cp311 and cp312 modules reference only
numpy.core._multiarray_umath(NumPy 1 ABI), while the cp39, cp310 and cp313 to cp315 modules already referencenumpy._core(NumPy 2 ABI). In 4.0.3.post2 all seven wheels referencenumpy._core. Python 3.13 and NumPy 1.26 were not run live: the C: drive of the Windows VM is full and uv could not create those two environments. Run folder on the Mac:~/.local/share/eeglab-eegprep-compare/windows/runs/console-6b14bdd303.— orchestrator