Skip to content

pop_biosig window: same controls as EEGLAB without mexSLOAD and memory mapping; compare imported files #701

Not planned

Description

@arnodelorme

Arno commented the File menu report of #696 (EEGPrep versus EEGLAB, side-by-side captures) on November 26, 2026; this issue is one of his comments, with one pull request to address it.

  • Window: 3.3 Import data > From Biosemi BDF file (BIOSIG toolbox) (findings F3 to F6, F14, F24, F26)
  • What to do: Give the EEGPrep dialog the controls of EEGLAB's pop_biosig dialog in the same order and wording, except "Import using alternative BIOSIG method (mexSLOAD)" and "Import as memory mapped file", which are left out and explained in the function header. Then import the same BDF and EDF files in both programs and compare the datasets side by side (data, sampling rate, channel labels, events).
  • Done when: a pull request on a branch agent/issue-<n> of develop, with captures before and after the change next to EEGLAB's, in a Word file and the same content as a PDF (rule 14), linked from the pull request. Arno merges.
  • Rules: 5 and 12 of the EEGPrep GUI rules: https://github.com/adelorme-assistant/project_eegprep/blob/main/rules/gui-parity.md
Arno's comment, in his words

Yes, here MATLAB and Python should coincide. However, some Python menus are not necessary. For example, the max s load menu is not necessary. Similarly, the import memory map file is not necessary, as this is not implemented in Python. However, the other checkboxes are needed. Also, the two files should be compared side by side for import to make sure that the function works.

From his annotated copy of the report: https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/file-menu-2026-11-26/EEGPrep_vs_EEGLAB_File_menu_2026-11-26_Arno-comments.docx

How to test

The windows are opened on jamming (MATLAB R2025b and EEGPrep under Xvfb, /mnt/v1/arno/menutest_probe shows how), never on Arno's Mac in the daytime. Capture EEGLAB's window, EEGPrep's before and EEGPrep's after; put the three side by side. Run the tests of the functions touched (pytest) before opening the pull request.

Activity

  1. added
    gui-parity
    on Nov 26, 2026
  2. claude commented on Nov 26, 2026

    @claude
    Contributor

    🤖 Plan:

    • Fetch issue, read pop_biosig.py and EEGLAB pop_biosig.m / biosig2eeglab.m (pinned commit d0963be9)
    • Duplicate-work preflight: no open PR touches pop_biosig; pop_biosig menu: say which Python reader EEGPrep uses (MNE-Python, not the BIOSIG toolbox) #703 (menu label wording) is separate
    • Scope check: not opening a PR. This needs reader work for three options that have no Python implementation yet, so it goes past a small GUI fix. The required deliverables (MATLAB captures on jamming, Word/PDF report, a MATLAB-side BDF/EDF import comparison) also cannot be made in this CI sandbox, which has no MATLAB or Xvfb host.
    • Human decision on the open questions below, then implement

    Research

    Compared with EEGLAB, the EEGPrep dialog is missing three checkboxes ("Force continuous data when data is stored in blocks", "Enable overflow detection", "Import uncalibrated data"). It also adds one that EEGLAB's dialog does not have ("Remove marker channel"), shows "Import as memory mapped file", which Arno asked to drop, and shortens two labels. The missing checkboxes are missing because the MNE-based reader path has no overflow, uncalibrated, or blockepoch behaviour: known_differences lists them as not applicable.

    Relevant code

    EEGLAB control order, minus the two exclusions:

    # EEGLAB control EEGPrep now
    1 Channel list (default all): same
    2 Data range (in seconds) to read (default all [0 <NRec>]) ...(default all): no NRec, because the header is not read before the dialog
    3 Reference chan(s) indices - recommended for BIOSEMI same
    4 Event mode import (see bdf2biosig_events function help) drops "function"
    5 ☑ Extract event from marker channel same
    6 ☑ Force continuous data when data is stored in blocks missing
    7 memory mapped (excluded) present, should be removed
    8 ☐ Enable overflow detection missing
    9 ☐ Import uncalibrated data missing
    10 ☑ Import EDF+ annotations (try also mexSLOAD below) Import EDF+ annotations, extra Remove marker channel above it
    11 mexSLOAD (excluded) absent

    Proposed Fix

    1. Dialog (pop_biosig_dialog_spec): use rows 1-6 and 8-10 above with EEGLAB's wording and geometry {[3 1]×4, 1×5}. Remove "Import as memory mapped file" and "Remove marker channel" from the GUI; rmeventchan stays a command-line key (EEGLAB has no checkbox for it either). Decode the GUI the way EEGLAB does: add a key to the history only when the value differs from the default, and pass refoptions {'keepref','off'} when there is more than one reference.
    2. Header and help: add a short note to the pop_biosig docstring and to resources/help/pop_biosig.md saying that importmex and memorymapped are not offered (no mexSLOAD in Python; data is read into memory). Whether the memorymapped key and its MemmapData path stay is open question 3.
    3. New options (this is the part that makes the work bigger than a small fix):
      • uncalibrated='on': return digital values, (phys - offset) / cal. For BDF/EDF this can come from readbdf. MNE does not expose digital values directly.
      • overflow='on': set samples equal to the header's digital min or max to NaN (BIOSIG OVERFLOWDETECTION). This needs DigMin/DigMax from openbdf.
      • blockepoch: see open question 1.
    4. Tests (written first): tests/test_stream9_gui_importers.py for dialog tags/order/defaults, and a small BDF fixture in tests/test_stream9_readers.py for overflow → NaN and uncalibrated → integer digital values.
    5. Import comparison (data, srate, labels, events) of the same BDF and EDF in EEGLAB and EEGPrep: this needs MATLAB with BIOSIG on jamming, so a human has to run it, together with the before/after captures and the Word/PDF.

    Open questions

    1. blockepoch behaves oddly in EEGLAB. When the box is checked, no key is passed and the finputcheck default 'off' applies, which sets NRec=1. When it is unchecked, 'blockepoch','off' is passed, which also sets NRec=1. So from the GUI the box has no effect, and only the command line 'blockepoch','on' gives trials = NRec. Should EEGPrep copy the GUI no-op, or implement the command-line meaning (one epoch per data record)?
    2. Should overflow and uncalibrated apply to GDF too (MNE path, no digital access), or should they be limited to EDF/BDF and fail clearly for GDF?
    3. Should the memorymapped key and its MemmapData path be removed from the API, or kept only for the command line?
    4. Should row 2 read the header before the dialog to show [0 <NRec>]? That needs the file before inputgui, which pop_biosig already receives.
  3. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Problem to know about before anything else: the commit of this issue (6eab931, 'feat: match EEGLAB pop_biosig dialog options') is on develop without a pull request. It was pushed at 12:44 PST by the automatic job repo-push, because my local branch agent/issue-701 had origin/develop as its upstream (my mistake when creating the worktree). Nothing was forced. The upstream is corrected, so it cannot happen again on my branches. Alert 1027 gives Arno the choices: keep it, revert it through a pull request I am preparing, or reset develop himself. The same happened to sccn/eeglab develop with the two-line change of issue 704 (3d3ad9aa3).

  4. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    The revert is ready if Arno wants it: #718 (Revert pop_biosig dialog commit pushed to develop without review). Merging it puts develop back exactly on df89e80; closing it keeps the commit. After his decision I open the normal pull request of this issue (a branch that carries the change again if 718 is merged).

  5. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Update: pull request 698 was merged into develop at 13:30 PST on top of the stray commit, so develop must not be reset. The revert #718 still applies cleanly and removes only the change of this issue (alert 1029 says the same to Arno).

  6. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Result of this issue, in the report https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/pr-701/issue-701_before_after.pdf (Word file next to it): the window has EEGLAB's nine controls without mexSLOAD and memory mapping, and the same BDF and EDF files were imported in both programs. The BDF file matches (data within 0.00003 microvolt, same 41 events). Uncalibrated import now matches EEGLAB exactly (difference 0) on both files. Answers to the open questions of the plan above: overflow detection is switched off by BIOSIG for EDF and BDF, so it changes nothing in either program; Force continuous has no effect from EEGLAB's window either; blockepoch on from the command line raises a clear error in EEGPrep for now. Two findings not changed here: EDF labels keep the prefix EEG in EEGPrep, and a channel list loses the BDF events. No normal pull request exists yet because the commit is on develop by mistake; revert: #718.

  7. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Progress from the eegprep claude session "eegprep" (turn ended, 2026-11-26 14:47; posted by the orchestrator):

    Ten pull requests are open with their captures and reports, the email is sent and orch done is called. One thing went wrong and needs your decision: two of my commits reached develop without a pull request.

    The mistake

  8. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Progress from the eegprep claude session "eegprep" (turn ended, 2026-11-27 07:19; posted by the orchestrator):

    The structure and the fixes are delivered, but this session was paused from about 5:10 PM to 7:10 AM, so the email went out only this morning at 7:45. During the night you answered the four questions, and the orchestrator merged most pull requests on your instruction. I merged nothing.

    Open now, in the order to merge

    Pull request What Note
    eegprep #766 One blank line in a BDF test file develop fails the format check s
  9. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Progress from the eegprep claude session "eegprep" (turn ended, 2026-11-27 11:23; posted by the orchestrator):

    The four points have pull requests ready, each checked on jamming and with the Mac style. Nothing is merged, and the email with the before and after report (Word and PDF, 10 pages) went out at 11:22.

    Merge #766 first. develop still fails the format check, so the lint check fails on every pull request below and their tests are skipped on GitHub. I ran each one's tests on jamming instead.

    The automatic agent opened a pull request for each issue within minutes, so I reviewed those and opene

  10. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Progress from the eegprep claude session "eegprep" (turn ended, 2026-11-27 13:56; posted by the orchestrator):

    Three pull requests are open and ready, none merged. Merge #778 first: it fixes the one test that fails on develop on every platform and makes every other pull request look red.

    Pull request What State
    #778 Fix for the failing test on develop (issue #779) Tests pass on macOS, Windows and Ubuntu 3.12. The Ubuntu 3.13 job was still running when I reported.
    #776 `pop_import
  11. arnodelorme commented on Nov 28, 2026

    @arnodelorme
    CollaboratorAuthor

    Progress from the eegprep claude session "eegprep" (waiting for dialog open, 2026-11-27 16:14; posted by the orchestrator):

    The status and the report are ready. I am waiting for the test jobs of #776 (started 15:55) so the email states the real check result, then I send it and copy the status into issues 775 and 769.

  12. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    Closed as replaced: Arno's instruction of November 28, 2026 on pop_biosig (#812, read with the biosig Python library, installed from the extension manager) overrides this one, as he wrote himself. The new work goes on #812, which now links back here.

    — orchestrator

  13. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 pop_biosig: report valid GDF extrema lost to the Python binding’s overflow handling. #847

    — EEGPrep worker (Codex)

  14. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 The new pop_biosig GUI finding is tracked in #1043. PR #1042 includes the captures and numerical measurements.

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

    gui-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions