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 and pop_fileio: EDF channel labels keep the prefix EEG (EEGLAB removes it) #746
On the same EDF file, EEGLAB returns the labels Fp1, Fp2, ... and EEGPrep returns EEG Fp1, EEG Fp2, ... (finding F5 of the File menu report). The channel location lookup can then fail in EEGPrep.
Cause: EEGLAB removes the prefix in eeg_checkchanlocs.m (line 220), which every import runs. EEGPrep has the same rule in eeg_checkchanlocs.py but the MNE readers of pop_fileio (EDF, BDF, GDF, EGI) never call it.
Fix: call it after an MNE read. A few lines, with a test on test.edf, the file EEGLAB was run on.
Arno (November 26, 2026): "Yes, fix. When you do the issue and the pull request, make it simple though. And minimal code changes."
EEGLAB's rule
When a label contains EEG and fewer than 30 labels are a number once EEG is removed (so EEG001 to EEG064 are left alone), the strings EEG-, EEG and EEG are removed from every label.
Failing test: EDF with EEG Fp1/EEG-Fp2 labels imported via pop_fileio and pop_biosig returns Fp1, Fp2 (tests/test_stream9_readers.py)
Fix: mne_raw_to_eeg (src/eegprep/functions/popfunc/_file_io.py) runs eeg_checkchanlocs on the channel list, covering EDF/BDF/GDF (pop_biosig goes through pop_fileio) and pop_mffimport
pre-commit + importer tests pass locally; user guide note added
EEGLAB reference run (core import path change, needs human approval)
Research:_clean_labels in src/eegprep/functions/adminfunc/eeg_checkchanlocs.py#L194-L211 ports EEGLAB eeg_checkchanlocs.m L220, but mne_raw_to_eeg built chanlocs from raw.ch_names without calling it.
Activity
claude commentedon Nov 27, 2026
🤖 Plan:
EEG Fp1/EEG-Fp2labels imported viapop_fileioandpop_biosigreturnsFp1,Fp2(tests/test_stream9_readers.py)mne_raw_to_eeg(src/eegprep/functions/popfunc/_file_io.py) runseeg_checkchanlocson the channel list, covering EDF/BDF/GDF (pop_biosiggoes throughpop_fileio) andpop_mffimportResearch:
_clean_labelsinsrc/eegprep/functions/adminfunc/eeg_checkchanlocs.py#L194-L211ports EEGLABeeg_checkchanlocs.mL220, butmne_raw_to_eegbuilt chanlocs fromraw.ch_nameswithout calling it.docs: changelog entry for #746
[IO] Strip EEG channel label prefix on EDF/BDF/GDF import (sccn#749)