Skip to content

pop_mneio, formerly pop_biosig (File > Import data > BDF, EDF and MNE-IO interface): graphical and numerical parity with EEGLAB #735

Backlog
7 of 7 issues completed

Description

@arnodelorme

EEGPrep checks each EEGLAB function on its own, in one issue, for both the window and the numbers (Arno, November 26, 2026). This issue is pop_mneio (formerly pop_biosig), File menu: Import data > From Biosemi BDF file, From EDF/EDF+/GDF files, Using the MNE-IO interface. Arno, November 26, 2026: "I want a pop_eegio and pop_mneio function instead. No pop_fileio and pop_biosig functions." The rename is #765. It stays open until the window and the numbers are both acceptably close to EEGLAB's, even when a pull request is merged or closed.

Graphics

The Help text before and after (issue 703): it now says that MNE-Python reads the file.

703_help

Earlier captures

The import window (issue 701): EEGLAB, EEGPrep before, EEGPrep after.

701

Import data > Using the BIOSIG interface (issue 703): the window is the same before and after, only the Help text changes.

703

Captured on jamming under a virtual screen (EEGLAB with getframe, EEGPrep with the Qt widget grab), and on the Mac where said.

The window: what differs from EEGLAB
  • EEGPrep shows EEGLAB's nine controls without the alternative BIOSIG method (mexSLOAD) and without memory mapping (rule 12).
  • Enable overflow detection and Force continuous data change nothing for EDF and BDF files. Arno, November 26: both checkboxes go, in EEGLAB too (the script options stay).
  • The window change of issue 701 was reverted with pull request 718 and comes back as its own pull request.
  • The menu is called MNE-IO (pull request 762, merged, rule 22), and the header says how the import works and that MNE-Python must be installed (pull request 712, merged).
The numbers: same file in both programs
  • test.bdf: the same data (largest difference 1.1e-13), sampling rate, labels and 41 events (case N12 of the File menu report).
  • test.edf: the same data (largest difference 1.3e-6 microvolt). EEGPrep kept the prefix EEG in the labels (finding F5). Fixed by issue 746 (merged as pull request 749): the 15 common labels equal EEGLAB's.
  • test.edf: EEGLAB takes the last channel (EEG O2) for an event channel, makes 55 events and removes it (finding F3). This is an EEGLAB bug, fixed in [sigproc] Do not take an EDF channel labeled EEG for an event channel eeglab#991 (merged): after it, EEGLAB returns 16 channels and no event, as EEGPrep does.
  • Import uncalibrated data gives EEGLAB's values exactly on both files (issue 701).
  • test.bdf with the channel list 1 to 3: EEGPrep returned no event. Fixed by issue 747 (merged as pull request 748): it returns the 3 channels and EEGLAB's 41 events.
  • EEGLAB itself does not apply a channel list: it returns all 16 channels without labels, and stops with an error on test.edf. Not copied, not fixed.
  • An EDF written by EEGLAB (events in a 33rd Status channel) is read as 33 channels and no event (finding F4). Not started.
  • EDF+ annotations: EEGLAB's latencies are one sample lower than EEGPrep's (finding F6). Cause not looked up.
Files

Sub-issues

Sub-issues

7 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. added
    function-parity
    on Nov 27, 2026
  2. claude commented on Nov 27, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    The window items wait on Arno and are already in flight. The numeric items all come from one design: pop_biosig passes the file to pop_fileio (MNE-Python), then handles only BioSemi Status channels itself. So EDF labels, EDF events and EDF+ annotation latencies come from MNE plus the generic MNE→EEG conversion, not from BIOSIG's rules.

    Relevant code

    Proposed split (one sub-issue and PR each)

    1. F5, EDF labels keep EEG . Strip the EDF signal-type prefix in pop_biosig after pop_fileio, matching EEGLAB's label cleanup. Needs the exact EEGLAB rule (which prefixes, only when followed by a space) read from pop_biosig.m; the vendored src/eegprep/eeglab/ checkout is empty in this runner, so it was not checked here. Small, testable on test.edf.
    2. F6, EDF+ annotation latency off by one. EEGPrep uses onset*srate + 1, which is the correct 1-based latency; EEGLAB being one sample lower suggests BIOSIG's EVENT.POS is used without the 1-based shift. One MATLAB run printing EEG.event(1).latency next to the raw onset settles which side is right. If EEGPrep changes, do it in pop_biosig, not _eeg_mne.py, which every MNE-based importer shares.
    3. Events with a channel list. _import_bdf_status_channel returns early when channels excludes Status, so no events. EEGLAB reads events from the header regardless of channel selection. Fix: decode Status from the file (_blockrange_status_events already reads it via openbdf) whenever the file has a Status signal, not only when it was loaded.
    4. F4, EDF written by EEGLAB with a 33rd Status channel. _is_biosemi rejects it because the file is EDF. Decision needed: decode Status in an EDF like BDF (as EEGLAB does)? If yes, reuse the same decoder with 16-bit words.
    5. F3, EEGLAB bug on test.edf (O2 taken as event channel). Do not copy; record the divergence in docs/source/ and in the parity test.
    6. Menu name MNE-IO, two no-op checkboxes. Waits on Arno and Revert pop_biosig dialog commit pushed to develop without review #718.

    Open questions: (a) item 2: fix on our side or EEGLAB's? (b) item 4: yes or no? (c) items 1 to 4 as separate PRs (preferred, each under 100 lines with one regression test) or one?

  3. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno's answer (email of November 26, 2026), on the two checkboxes "Enable overflow detection" and "Force continuous data": "Yes, this should be dropped in EEGLAB as well."

    • Both checkboxes leave the EEGPrep window and the window of EEGLAB's pop_biosig.m. One sub-issue and one small pull request on each side, with the captures before and after.
    • In EEGLAB the script options 'overflow' and 'blockepoch' keep working, so that no script breaks. Only the two checkboxes go.
    • One correction to what Arno was told. The overflow checkbox is not without effect in EEGLAB in general: see below. He is told in the reply to his email, in case he prefers to keep that one in EEGLAB.
    What the two checkboxes do in EEGLAB's code (read, not run)
    • Force continuous data: no effect by construction. Checked, no option is passed and the default is 'blockepoch','off' (pop_biosig.m line 217). Unchecked, the window passes 'blockepoch','off' (line 187). Both give the same call.
    • Enable overflow detection: checked, OVERFLOWDETECTION:OFF is no longer sent to BIOSIG (pop_biosig.m lines 334 to 336), and BIOSIG then replaces the samples at the limits of the recording range with NaN (sopen.m line 188, sread.m lines 1523 to 1540 of Biosig 3.8.4). It changes nothing on test.edf and test.bdf only when these files hold no saturated sample, which is what the test showed. MNE-Python has no such switch, so nothing is lost in EEGPrep.

    — orchestrator

  4. changed the title [-]pop_biosig (File > Import data > BDF, EDF and BIOSIG interface): graphical and numerical parity with EEGLAB[/-] [+]pop_mneio, formerly pop_biosig (File > Import data > BDF, EDF and MNE-IO interface): graphical and numerical parity with EEGLAB[/+] on Nov 27, 2026
  5. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Renamed after Arno's answer of November 26, 2026: "I want a pop_eegio and pop_mneio function instead. No pop_fileio and pop_biosig functions." The rename itself, with no alias for the old name, is #765. The summary above still uses the old name until the eegprep worker brings it up to date.

    — orchestrator

  6. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 pop_mneio: place annotations relative to the first imported sample. #838

    — EEGPrep worker (Codex)

  7. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 pop_mneio: import recordings with both EEG and EOG without changing trigger units. #839

    — EEGPrep worker (Codex)

  8. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 pop_mneio: preserve electrode coordinates from the MNE montage. #840

    — EEGPrep worker (Codex)

  9. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 pop_biosig: track MATLAB ignoring a three-channel request on the EEGLAB test files. #854

    — EEGPrep worker (Codex)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    function-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions