Skip to content

EEGPrep versus EEGLAB, File menu: side-by-side screen captures, numerical tests and PDF report #696

Backlog
0 of 17 issues completed

Description

@arnodelorme

Arno wants to start testing EEGPrep by hand, one menu at a time, and asked for a night run on his Mac that puts EEGLAB and EEGPrep side by side for each menu. This issue holds the instructions and tracks the work for the first menu, File.

Needs Arno

The File menu pull requests and before-and-after captures (reports/file-menu-prs-2026-11-26/EEGPrep_File_menu_pull_requests_before_after_2026-11-26.docx and .pdf, plus reports/pr-699/ through reports/pr-710/) are ready for your review:

  1. Two commits that reached develop without a pull request (from repo-push upstream tracking):
  2. Ten open File menu pull requests on sccn/eegprep (all CI checks passing):
  3. Remaining numerical findings from the File menu report not covered by the window comments:
    • F2: an EDF exported by EEGPrep pop_writeeeg cuts the record duration to 1.45312 seconds in the header, so readers get 128.00044 Hz instead of 128 Hz (fix: use 1-second records as in EEGLAB).
    • F3 and F4: EDF event channels (pop_biosig on test.edf where the last channel is labelled EEG O2, and reading an EEGLAB-exported EDF with a 33rd Status channel).
    • (F1 and F7 are STUDY work, parked until after the release without STUDY.)
Instructions for the night run (File menu)

Setup

  1. Work on the current develop of sccn/eegprep (update the clone with a fast-forward, or use a git worktree of origin/develop when the clone cannot be fast-forwarded) and on the current develop of EEGLAB in ~/GitHub/core_eeg/eeglab. A clone with local changes of Arno's is fast-forwarded only when that leaves them untouched, and is otherwise tested as it is: nothing is stashed, reset or discarded. Write down both commits, the MATLAB version, the Python and PySide6 versions and the macOS version: they go on the first page of the PDF.
  2. Read .agents/skills/eeglab-gui-visual-parity/SKILL.md (the MacBook path) and docs/source/user_guide/visual_parity.rst before capturing anything. Use uv run --no-sync python tools/visual_parity/capture.py --list to see the cases that already exist.
  3. Keep every output in temp/menu_tests/file/ of the clone (screenshots, scripts, numbers, the PDF, a PROGRESS.md). Nothing generated is committed.

1. Inventory of the File menu

Export the File menu tree of both programs (labels, order, separators, enabled or greyed out) in the states startup, one continuous dataset, one epoched dataset, several datasets and a STUDY, with tools/visual_parity/matlab/export_eeglab_menu_inventory.m and tools/visual_parity/export_eegprep_menu_inventory.py. Do it for EEGLAB's default menu and for the full menu (eeglab full). The PDF gets one table: item, in EEGLAB, in EEGPrep, verdict (same, missing in EEGPrep, extra in EEGPrep, different label, different order, different enabled state).

2. Screen captures, every item

Capture the open File menu itself in both programs (case file_menu; on macOS the open MATLAB menu may not capture, then say so and rely on the inventory). Then, for every item and sub-item of the File menu (the import sub-menus, import of event and epoch information, export, load, save, save as, clear, the STUDY items, preferences, history scripts, extensions, quit): call it in EEGLAB and capture what appears, then call the same item in EEGPrep and capture what appears. "What appears" is every window in turn: the file chooser, then the options dialog that follows once a real sample file is chosen, then any message or figure. Reuse the existing cases of tools/visual_parity/cases.json and write the missing ones in the output folder with the same pattern.

The MATLAB side uses the timer pattern of capture.py: a timer started before the menu callback takes the capture while the modal dialog is open, then unblocks or closes it. Use matlab -nosplash -nodesktop -r, never -batch, for windows. A real screen capture (screencapture) needs the lid open and the screen awake: hold it with caffeinate -d while capturing. When the screen cannot be captured, fall back to getframe in MATLAB and to the Qt widget grab in EEGPrep, which need no screen, and say in the PDF which method each picture used.

3. Same capabilities

For each item present in both, compare the two dialogs control by control: title, labels, order, default values, enabled state, the Help button, what Cancel does, and the command line written to the history (eegh in EEGLAB, the returned command in EEGPrep) after the same choices. Each difference becomes a numbered finding with a severity (blocks the user, wrong result, cosmetic) and the screenshot that shows it. Font rendering and native widget style are not findings.

4. Numerical tests

For each function the File menu calls that exists in both programs (loading and saving a dataset, each data importer, import of events and of epoch information, each exporter, loading and saving a STUDY), run the same call with the same arguments on the same real sample file in MATLAB and in Python, and compare the two results field by field: the data (largest absolute and relative difference), sampling rate, numbers of channels, points and trials, xmin, xmax, times, the events (count, type, latency, duration), the channel locations (labels and coordinates) and the ICA fields when present. Also test the round trip both ways: a file saved by EEGPrep loaded in EEGLAB, and a file saved by EEGLAB loaded in EEGPrep. State the tolerance next to each number: integers, strings and counts must be identical, floating-point data read from a file is expected identical, and anything larger than 1e-12 relative is reported with its cause when it can be found. Real files only (the sample_data of both repositories and ~/GitHub/core_eeg/eeglab_testcases), no generated or mock data. Work on copies in the output folder.

5. The PDF and the report

One PDF, temp/menu_tests/file/EEGPrep_vs_EEGLAB_File_menu_<date>.pdf: a first page with the date, the versions and a summary in plain words (how many items, how many identical, how many missing, how many with differences, how many numerical tests passed); the inventory table; one section per menu item with the two captures side by side and the differences under them; the numerical table; the numbered findings; and a last section "What to do next" with the items Arno should try by hand first, the fixes proposed in order, and the next menu (Edit). Email it to Arno as an attachment and post a short comment here with the same summary and the findings. No new issue and no code change tonight: fixes are proposed, and start when Arno says which.

Care

  • Never change Arno's own EEGLAB preferences, plugins or files: open Preferences and the extension manager, capture, then cancel. Save and export only into the output folder. Never write into a sample_data folder.
  • Close only the MATLAB and Python processes this run started (keep their process numbers). A MATLAB session Arno left open is not touched.
  • Capture windows only, never the whole screen: other windows of Arno's may be open, and nothing of them may reach a picture, the PDF or this issue.
  • Never answer a macOS permission prompt. When one blocks the capture, use the fallback above and report it.
  • A run is stopped after one hour and the next one resumes: update PROGRESS.md after every item.

Sub-issues

Sub-issues

0 of 17 Issues completed
Loading 17 sub-issues

Activity

  1. added
    menu-test
    on Nov 26, 2026
  2. claude commented on Nov 26, 2026

    @claude
    Contributor

    🤖 Plan:

    • Read issue, AGENTS.md, fix-issue and pull-request skills
    • Actionability check for this automation runner
    • Open a PR: not applicable

    Status: no PR, nothing run here. This issue is a manual QA run for Arno's Mac, and it says "No new issue and no code change tonight". This runner cannot do it:

    • It is Linux CI (uname: Linux, Azure), with no MATLAB, no Octave and no screencapture, so the EEGLAB side of steps 1 to 4 cannot run.
    • ~/GitHub/core_eeg/eeglab and ~/GitHub/core_eeg/eeglab_testcases do not exist here.
    • It cannot email the PDF to Arno.

    The tooling the run needs is on develop: tools/visual_parity/capture.py, cases.json, export_eegprep_menu_inventory.py, matlab/export_eeglab_menu_inventory.m.

    Needed to go ahead: run it from the scheduled night job on the Mac that has MATLAB and the EEGLAB checkout, not from issue automation. If you only want the EEGPrep half here (the EEGPrep File menu inventory and Qt widget-grab captures, with no MATLAB comparison and no email), say so and I will post that summary in this comment.

  3. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno asked tonight that this test wait until after midnight, so the run that started at 10:01 PM on November 25, 2026 (run 91565, a manual trigger outside the night schedule) was stopped at 10:13 PM, together with the MATLAB capture it had opened.

    • The menu-test label stays on, so the scheduled slot at 12:30 AM on November 26 resumes the test, with 2:30 AM and 4:30 AM as backups.
    • The progress file temp/menu_tests/PROGRESS-696.md records what was done (setup, inventory) and where the capture was interrupted.

    — orchestrator

  4. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 Night test of the File menu: the PDF is ready (November 26, 2026, 12:30 am to 12:50 am PST)

    What was compared. EEGPrep develop at df89e80 against EEGLAB develop at 16cc13212 (8ac485f65 for the part done at 10 pm: items 1 to 7, four inventory states and the numerical tests), MATLAB R2025b Update 2, Python 3.11.13, PySide6 6.11.0, macOS 26.6. Every File menu item was called in both programs, each window was captured (getframe in MATLAB, widget grab in Qt) and each dialog was compared control by control. The same calls then ran on the same real sample files in both programs.

    The menu. EEGLAB has 79 items, EEGPrep has 50, and all 50 exist in EEGLAB. 29 EEGLAB items are missing in EEGPrep (mostly import and export plugins). Of the 50 common items, 48 have the same label, place and enabled state in the five states, and 2 differ by label or place.

    The windows. Of the 50 common items, 3 are identical control for control, 26 have the same controls with another wording, 20 have different controls or behave differently, and 1 (Quit) was not called.

    The numbers. 32 tests: 10 identical on every quantity, 8 differ only by single precision or by the 0-based component channel index, 2 show the expected 16 bit loss of EDF, 10 show a real difference, 2 could not run. Per quantity, 506 of 593 are within tolerance (1e-12 relative for floating point, exact for integers, strings and counts). Loading and saving datasets is identical in both directions, and so are BDF import and the text exports.

    Look at these three first.

    1. A STUDY saved by EEGPrep does not load in EEGLAB (F1).
    2. EDF files: wrong sampling rate in the exported file, marker-channel events not read, label prefix kept (F2 to F6).
    3. pop_loadstudy leaves NaN in the cluster sets of the test STUDY (F7).

    Findings (severity in brackets)

    1. F1 [blocks the user] A STUDY saved by EEGPrep pop_savestudy stops EEGLAB pop_loadstudy in std_checkset line 276 (brace indexing on STUDY.design.variable.value). The other direction is identical on 32 quantities. Fix: write that field as a cell array.
    2. F2 [wrong result] pop_writeeeg EDF: the record duration 186/128 = 1.453125 s is cut to 1.45312 in the header, so readers get 128.00044 Hz in place of 128 Hz. Fix: records with an exact duration (1 s as EEGLAB).
    3. F3 [wrong result] pop_biosig on test.edf: EEGLAB turns the last channel into 55 events and removes it. EEGPrep keeps 16 channels and no event, also with importevent and rmeventchan on. The channel is labelled EEG O2, so the rule has to be decided first.
    4. F4 [wrong result] An EDF written by EEGLAB (events in a 33rd Status channel) is read by EEGPrep as 33 channels and 0 event: 154 events lost.
    5. F5 [wrong result] EDF labels: EEGLAB gives Fp1, EEGPrep EEG Fp1 (pop_biosig, pop_fileio).
    6. F6 [wrong result] EDF+ annotations: EEGLAB latencies are one sample lower than EEGPrep on the same file. Cause not looked up.
    7. F7 [wrong result] pop_loadstudy on teststudy2: cluster sets differ for 186 of 284 values (NaN in EEGPrep).
    8. F8 [wrong result] Clear study / Clear all writes nothing in the EEGPrep history. EEGLAB writes the clearing command.
    9. F9 [wrong result] pop_loadcnt on the truncated test.cnt: 25608 samples in EEGLAB, 25605 in EEGPrep, last block ordered differently. A complete .cnt file is needed to conclude.
    10. F10 [blocks the user] Manage extensions: nothing can be installed or removed from the EEGPrep window, and its catalog holds 0 entries.
    11. F11 [blocks the user] Preferences: 20 options in EEGLAB, 11 in EEGPrep of which 4 greyed out. No precision option.
    12. F12 [blocks the user] FILE-IO interface: no "file or folder" question, so folder formats cannot be chosen.
    13. F13 [blocks the user] Edit BIDS event info: no Add BIDS field and Remove BIDS field buttons.
    14. F14 [cosmetic] pop_biosig dialog: four EEGLAB checkboxes absent, one added.
    15. F15 [cosmetic] pop_loadcnt dialog: no free key, val field, no memory mapping, another title.
    16. F16 [cosmetic] pop_loadbv: interval and channel fields not filled from the header, another title, menu label without .ahdr.
    17. F17 [cosmetic] pop_importdata: Auto detect as first choice, comments as an edit field, note line absent.
    18. F18 [cosmetic] No Help button in pop_export and pop_taskinfo. No Show template button in pop_taskinfo.
    19. F19 [cosmetic] Edit BIDS participant info: EEGLAB shows an error then pop_editset, EEGPrep opens a participant dialog.
    20. F20 [cosmetic] Validate BIDS dataset: web page in EEGLAB, folder chooser in EEGPrep.
    21. F21 [cosmetic] Data to EDF/BDF/GDF: save chooser first in EEGLAB, options dialog first in EEGPrep.
    22. F22 [cosmetic] Save current study without a file name: error in EEGLAB, Save as chooser in EEGPrep (better).
    23. F23 [cosmetic] Create study dialogs: no paging in EEGPrep, another sequence for Browse for datasets, subject filled with S1.
    24. F24 [cosmetic] File chooser titles: function names in EEGLAB, general titles in EEGPrep (21 items).
    25. F25 [cosmetic] Label wording in pop_importepoch, pop_importevent, pop_studyerp and two error messages. Order of the Brain Vision items in the menu.
    26. F26 [cosmetic] History wording of pop_biosig, pop_loadcnt and Resave.
    27. F27 [cosmetic] Conventions by design: 0-based icachansind in memory, single precision, no visible field in BrainVision events.

    Limits of this run. No real screen capture was made (the pictures have no native title bar and no native file chooser). The history command was compared for six items. pop_importepoch was not tested for lack of a real epoch information file. No code was changed and no issue was opened.

    Files. The PDF (32 pages) is temp/menu_tests/file/EEGPrep_vs_EEGLAB_File_menu_2026-11-26.pdf in the clone on Arno's Mac, with the scripts, pictures and numbers next to it. It is not attached here because it shows local paths and preferences. The PDF was emailed to Arno at 8:41 AM on November 26, 2026, and the menu-test label was then removed.

  5. added
    needs-arno
    and removed
    menu-test
    on Nov 26, 2026
  6. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Done: File menu night test finished: the PDF report (32 pages, 27 findings) was emailed to Arno at 8:41 AM on November 26, 2026, the summary is in the issue comment, the label menu-test was replaced by needs-arno. No window was opened this morning. Waiting for Arno: which fixes to start and whether the Edit menu may run next night.

    — eegprep, reported with orch done

  7. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno asked on November 26, 2026 for an editable Word copy of the File menu report and for a test of whether these menu tests can run on the lab's Linux server instead of his laptop, so they no longer have to wait for the night.

    • Word copy: made from the same report (same text, tables and pictures, 81 pages because the pictures are larger) and emailed to Arno.
    • Linux server test: it works. MATLAB R2025b and a virtual screen (Xvfb, unpacked in the user folder, no administrator rights needed) let getframe capture the EEGLAB main window and a blocking pop_resample dialog. EEGPrep (develop df89e80, PySide6 6.12, Python 3.12) captures its main window and File menu with the Qt widget grab, with or without the virtual screen. Same EEGLAB (16cc132) and EEGPrep commits as last night.
    • Not done yet: the night scripts still use Mac paths and would need a small port; nothing was changed in the job until Arno decides.
    Details of the server test

    Without a screen, MATLAB refuses getframe and exportgraphics leaves out every button and text box, so EEGLAB dialogs need the virtual screen. With it, the EEGLAB start, dataset load, main window capture and dialog capture took 12 seconds. The pictures use Linux fonts and widgets in both programs, so the side-by-side comparison stays fair, but anything specific to the Mac (native menu bar, macOS file chooser, Retina scaling) would no longer be seen. The server's GPU is not needed.

    — orchestrator

  8. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno commented the Word copy of this report on November 26, 2026. Each of his bracketed comments is now its own issue, with one pull request each, before and after captures in a Word file and a PDF:

    Two comments need no pull request: "only process common menus" became rule 1 of the EEGPrep GUI rules, and the Neuroscan CNT window was accepted as it is ("Here, the discrepancy is fine"). The rules, his annotated copy and the reports are kept in adelorme-assistant/project_eegprep: https://github.com/adelorme-assistant/project_eegprep/blob/main/rules/gui-parity.md

    The menu tests now run on jamming at any hour (label menu-test), with a short night pass on the Mac for the native graphics (label menu-test-mac).

    — orchestrator

  9. added
    needs-arno
    and removed
    needs-arno
    on Nov 26, 2026
  10. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno asked on November 26, 2026 to keep the Edit menu report (#711) for later, reference it for future work, and focus right now on the File menu.

    — orchestrator

  11. 12 remaining items

  12. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Following Arno's email instruction of November 26, 2026 at 11:46 PM PST:

    — orchestrator

  13. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 State of the File menu on November 27, 7:45 AM (eegprep worker, after the merges of the night):

  14. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Done: File menu, one issue per function: function issues 735 to 745 created with captures and linked under 696, progress table written in project_eegprep, and the fixes Arno approved delivered as small pull requests (EDF labels, BDF events with a channel list, checked boxes, disabled lists, Preferences blue panel, pop_importdata, pop_importepoch wording, EEG-IO and MNE-IO menus, and in EEGLAB the test.edf event bug and pop_chanevent). Most were merged overnight by the orchestrator on Arno's instruction. Open this morning: 766 (develop fails the format check, one line, merge first), 755 (disabled list box), sccn/eeglab 993 (pop_importepoch alignment after the revert). Report (Word and PDF, 15 pages) emailed to Arno at 7:45 AM on November 27. Not done: the pop_biosig window of 701 without the two dropped checkboxes, the rename 765, the MATLAB v6.5 preference, the Mac pass (screen locked).

    Pull request: #766

    — eegprep, reported with orch done

  15. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Done: Arno's four points on develop 11743a2 have pull requests ready, each reviewed and checked on jamming and with the Mac style: 768 (Load existing dataset failed after a dataset with an empty name), 770 and sccn/eeglab 993 (pop_importepoch, one edit column), 773, 774 and sccn/eeglab 996 (pop_chanevent blank rows, note, even checkbox rows on the Mac), 776 (pop_importdata takes the height of its content). The automatic agent opened the EEGPrep ones, I corrected 768, 770 and 776 on their branches and opened no second one. Merge 766 first: develop still fails the format check, so Ruff and ty fails on all of them. New function issue 777 for pop_loadset. Report (Word and PDF, 10 pages) emailed to Arno at 11:22 AM. Not verified: his real window on the Mac, and which nameless file he had loaded.

    Pull request: #768

    — eegprep, reported with orch done

  16. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Done: Three pull requests are open and none is merged. 778 fixes the test that fails on develop on every platform (issue 779): a dialog could be drawn with the cached style sheet of an earlier dialog, and the unpolish call of 755 is ignored by Qt on a fresh dialog. Its test jobs pass on macOS, Windows and Ubuntu. Merge it first. 776 (pop_importdata) is now 430 pixels high, between 480 and 385, with real Mac windows and jamming captures in a folded comment, and develop merged in. 770 (pop_importepoch, with sccn/eeglab 993) has the same real Mac and jamming captures. On 770 and 776 the only failing test is the develop one. After 778 is merged they need develop merged in once more to show green. Links: #778 #776 #770 sccn/eeglab#993

    Pull request: #778

    — eegprep, reported with orch done

  17. arnodelorme commented on Nov 28, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 Mac pass of the File menu, native graphics (November 28, 2026, 00:30 PST. EEGLAB develop 7ba2370cf, EEGPrep develop f615c5b, MATLAB R2025b Update 2, PySide6 6.12.0, macOS 26.6)

    Seven windows common to both programs were captured as real macOS windows, EEGLAB next to EEGPrep: the main window, pop_importdata (with orch gui-compare), pop_importepoch, pop_chanevent, pop_export, pop_importevent, pop_editoptions, plus the file chooser of Load existing dataset. The section "8. Native Mac graphics" is added to the Word file and the PDF of the File menu report (38 pages now), in reports/file-menu-2026-11-26 of adelorme-assistant/project_eegprep.

    New on the Mac, not in the Linux report

    • M1, menu bar: EEGLAB keeps File, Edit, Tools... inside its window. EEGPrep puts them in the macOS menu bar at the top of the screen, so its window has no menu row. On Linux both are inside the window. Proposed: keep them inside the window as EEGLAB does (native_menu_bar in guifunc/main_window.py). Arno decides.
    • M2, file chooser: both programs open the same native macOS panel. The file type box reads (*.SET*, *.set) in EEGLAB and EEGPrep/EEGLAB datasets (*.se… in EEGPrep, cut by macOS. A shorter name would fit. Cosmetic.

    Mac side of what is already known

    • Buttons are rounded and 32 pixels high in EEGLAB, flat and about 20 pixels high in EEGPrep.
    • Rows are 36 pixels apart in EEGLAB, 23 (checkboxes) to 30 (edit boxes) in EEGPrep, so the EEGPrep dialogs are 71 to 83 percent as high and up to 10 percent wider. This belongs to the row height work (rule 26).

    Holds on the Mac

    Not done

    • The open File menu was not captured: it sits in the menu bar of the whole screen.
    • orch gui-compare pop_importdata --platform mac captured both windows and ran its imports, then its last check (reading the title by character recognition) failed on the grey title of the unfocused EEGPrep window, so it wrote no report of its own. The check needs a fix in the driver, not in EEGPrep.
  18. arnodelorme commented on Nov 28, 2026

    @arnodelorme
    CollaboratorAuthor

    Done: Mac pass of the File menu done on November 28 at 00:30: seven common windows and the file chooser captured natively, section 8 Native Mac graphics added to the Word file and the PDF of the File menu report (commit 8c42628 in project_eegprep, not pushed), emailed to Arno. Two differences are new on the Mac: EEGPrep menus sit in the macOS menu bar while EEGLAB keeps them in its window (Arno decides), and the file type text of the file chooser is cut. Buttons and row spacing differ as expected from the row height work. The gui-compare driver failed on its last title check after capturing and running 10 of 10 identical imports.

    — eegprep, reported with orch done

  19. removed
    menu-test-mac
    on Nov 28, 2026
  20. added
    maybe-done
    on Dec 2, 2026
  21. arnodelorme commented on Dec 2, 2026

    @arnodelorme
    CollaboratorAuthor

    Looks done in part: the pull requests this issue asked you to review are all merged. The ten File menu pull requests (#712 to #717 and #719 to #722) and the revert #718 were merged on November 27, 2026, and the EEGLAB revert sccn/eeglab#988 was merged the same day. Two points I could not confirm as settled. The first is the EDF record duration finding F2 (128.00044 Hz instead of 128 Hz after pop_writeeeg): the report of November 27 names fixes for the EDF labels and the BDF events, not this one. The second is your decision on the Mac menu bar (point M1 of the Mac pass of November 28, 2026: keep the menus inside the window as EEGLAB does, or in the macOS menu bar). The File menu work now continues in the function issues #735 to #745. Close it?

    — orchestrator

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

    maybe-doneneeds-arno

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions