Skip to content

EEGPrep versus EEGLAB, Edit menu: side-by-side captures on jamming, numerical tests and PDF and Word report #711

Backlog

Description

@arnodelorme

Arno is testing EEGPrep against EEGLAB one menu at a time. The File menu was done in #696. On November 26, 2026 he said yes to the Edit menu, with the tests moved to the Linux server jamming so they can run at any hour, and later that day asked to keep the Edit menu report for later and just reference it while he works on the File menu.

Questions and proposed fixes for when the Edit menu resumes

The Edit menu report is ready: EEGPrep_vs_EEGLAB_Edit_menu_2026-11-26.docx and the same content as PDF (32 pages), sent by email on November 26, 2026 and stored in reports/edit-menu-2026-11-26/ of project_eegprep. Summary and the 24 findings: #711 (comment)

  1. Comment the Word file, as for the File menu, and send it back or drop it in reports/edit-menu-2026-11-26/.
  2. Say which fixes to start. Proposed order: F2 and F3 (Event values: latency unit on insert and append, sort), F1 (channel ranges as text in pop_chanedit), F5 (urevent table of Append datasets), F15 and F16 (straight columns and window size, rules 7 and 9), then F9, F10 and the labels.
  3. Six decisions before any change: F4 (nose direction: rotate as EEGLAB or keep), F6 (default of Append datasets: 1 or 1 2), F7 (start time of epoched data: shift the event latencies or not), F8 and F11 (empty event box means all events or nothing), F13 (channel numbers from 0 or from 1 in pop_select), F23 (third Browse button of Dataset info).
  4. Run the short Mac pass (menu-test-mac) for native macOS graphics when ready, and decide whether the next menu (Tools) may run.
Differences from the File menu instructions (read first)

The steps below were written for the File menu night run on the Mac. For this menu: the windows are opened on jamming, not on the Mac, at any hour, with getframe and the Qt widget grab (no screencapture, no caffeinate), outputs are copied back to temp/menu_tests/edit/ of the Mac clone, items found in only one program are listed in one table and not captured further (rule 1), and the report is a PDF and a Word file with the same content (rule 14), also committed to reports/ of project_eegprep. Two changes to the report itself: differences in the titles of file choosers are not counted as wording differences (they say nothing about EEGPrep), and labels are compared as whole sentences, not as lines cut by wrapping. Say which reader each import uses.

Instructions (Edit menu), adapted from the Edit menu run of #696

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/edit/ of the clone (screenshots, scripts, numbers, the PDF, a PROGRESS.md). Nothing generated is committed.

1. Inventory of the Edit menu

Export the Edit 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 Edit menu itself in both programs (case edit_menu). Then, for every item and sub-item of the Edit menu: 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 Edit menu calls that exists in both programs, 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. 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/edit/EEGPrep_vs_EEGLAB_Edit_menu_<date>.pdf (and the same as .docx): 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 (Tools). 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 in this run: 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.

Activity

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

    @claude
    Contributor

    🤖 Plan:

    • Read issue, AGENTS.md, fix-issue and pull-request skills
    • Decide scope: no PR
    • Note problems in the instructions

    Research

    This is not a code issue. It asks for a manual parity run: MATLAB R2025b and Xvfb captures on jamming, a PDF/Word report, and an email to Arno. It also says "No new issue and no code change in this run". This CI agent has no MATLAB, no jamming access and no EEGLAB checkout (src/eegprep/eeglab/ is empty here), so it cannot run this. The scheduled eegprep-menu-test job (label menu-test) should handle it. No PR opened, and no overlapping open PRs found.

    Relevant code

    Problems in the instructions (fix before the run)

    1. Steps 2 and 4 list File menu items (import sub-menus, load/save/clear, STUDY, preferences, history scripts, extensions, quit), copied from EEGPrep versus EEGLAB, File menu: side-by-side screen captures, numerical tests and PDF report #696. The Edit menu items are: Dataset info (pop_editset), Event fields (pop_editeventfield, full menu only), Event values (pop_editeventvals), Adjust event latencies (pop_adjustevents, full menu only), About this dataset (pop_comments), Channel locations (pop_chanedit), Select data (pop_select), Select data using events (pop_rmdat), Select epochs or events (pop_selectevent), Copy current dataset (pop_copyset), Append datasets (pop_mergeset), Delete dataset(s) from memory (pop_delset).
    2. Step 4 numerical tests should compare the output EEG of those functions (for example pop_select, pop_rmdat, pop_selectevent, pop_mergeset, pop_adjustevents, pop_chanedit, pop_editeventvals) instead of importers and exporters.
    3. Setup step 1 and the Care section still describe the Mac (~/GitHub/core_eeg/eeglab, macOS version, caffeinate/screencapture). The collapsed note overrides this only in part.

    Ready for the menu-test job once item 1 is fixed.

  3. added
    menu-test
    on Nov 26, 2026
  4. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 Edit menu test done on jamming (November 26, 2026, 12:30 to 12:55 pm PST). Report: EEGPrep_vs_EEGLAB_Edit_menu_2026-11-26.pdf (32 pages) and the same content as .docx, emailed to Arno and stored in reports/edit-menu-2026-11-26/ of project_eegprep. No code change, no new issue.

    What was compared: EEGPrep develop df89e80 against EEGLAB develop 16cc13212, MATLAB R2025b Update 7, Python 3.12.13, PySide6 6.12.0, on jamming.ucsd.edu under Xvfb (getframe for EEGLAB, Qt widget grab for EEGPrep). The pictures show the Linux look; the Mac pass adds the native ones.

    • Menu: 12 items in each program, all 12 common, none missing, none extra. Same labels, order, separator lines and enabled states in the five states, default and full menu.
    • Windows: 1 identical (Copy current dataset), 1 same controls with layout differences only (Select data), 7 with different controls, wording or defaults, 3 that behave differently on Ok (Adjust event latencies, About this dataset, Select data using events).
    • Numerical tests: 70 cases over the 12 functions. 35 identical on every quantity, 30 differ on at least one, 5 stop with an error (2 in both, 2 in EEGPrep only, 1 in EEGLAB only). 2780 of 2841 quantities identical or within 1e-12 relative. Data samples identical in every case.
    • History: with the same values typed in both programs, 4 of 6 items write the same line (blanks aside).

    Look at first: F2 (inserted events land at the wrong time), F1 (channel ranges as text refused by pop_chanedit), F15 and F16 (columns not straight, rules 7 and 9).

    Findings (severity: B blocks the user, W wrong or different result, C cosmetic)

    # Sev. Finding
    F1 B pop_chanedit 'settype' and 'setref' with a range as text ('1:10'), the form EEGLAB writes in its history, raise ValueError in EEGPrep. With numbers, 'setref' leaves EEG.ref at common (EEGLAB: Cz).
    F2 W pop_editeventvals insert and append: latency read in seconds by EEGLAB, stored as samples by EEGPrep. The urevent goes to the end of the table.
    F3 W pop_editeventvals 'sort' has no effect in EEGPrep (resorted by eeg_checkset). EEGLAB fails on a two field sort.
    F4 W pop_chanedit 'nosedir': EEGLAB rotates the coordinates and stores +X, EEGPrep stores +Y and does not rotate. Decision needed.
    F5 W pop_mergeset: urevent latencies of the second dataset shifted by pnts in EEGPrep only (continuous). No boundary urevent in EEGPrep (epoched). EEG.event and data identical.
    F6 W Append datasets, default indices: 1 in EEGLAB, 1 2 in EEGPrep. Decision needed.
    F7 W pop_editset 'xmin' on epoched data: EEGPrep shifts event latencies, EEGLAB does not (pop_editset.m line 339 writes into EEG, not EEGOUT). Decision needed.
    F8 W Adjust event latencies: with an empty event box EEGLAB does nothing ("Not enough parameters selected") although the label says "all by default". EEGPrep shifts all events. EEGLAB has no Help button. MATLAB side.
    F9 W About this dataset: EEGPrep reflows the comments (21 lines become 6) and SAVE with no edit writes a pop_comments line with the reflowed text. concat gives different line breaks.
    F10 W Event fields, epoched data: EEGPrep lists the epoch field with a Delete box, EEGLAB hides it.
    F11 W Select data using events, Ok with an empty event box: nothing in EEGLAB, pop_rmdat(EEG, [], [-1 1], 0) in EEGPrep. Cause not read.
    F12 W Channel locations, values shown: sph_radius 1 where the file has none, urchan index 0 where the file stores 1, -0, five digits. Extra edit box for Reference.
    F13 W pop_select channel numbers count from 0 in EEGPrep (calls and history line), trials, points and events from 1. Documented in the docstring. Decision needed.
    F14 W Minor differences of structure with the same data and events: eventdescription entry for duration, leading blanks of the latency description, urevent order after a latency edit, trailing empty slot of pop_delset, empty keys of a boundary event, topo2all in EEGLAB.
    F15 C Edit boxes and checkboxes do not line up vertically (Channel locations, Select data, Event fields, Select epochs or events). Rule 9.
    F16 C Windows taller than their content, text of edit boxes left aligned. Rule 7.
    F17 C Channel locations: three buttons lose their & (Qt shortcut mark) and their capital letter.
    F18 C A ticked checkbox is drawn as a tick with no box. To check on the Mac.
    F19 C Event values: button labels without the unit (latency for Latency (sec)), 2.0 for 2, extra line "Original value below".
    F20 C Select epochs or events: field buttons show the field name, not its description.
    F21 C Messages with one dataset (Append, Delete): grey system box and other wording in EEGPrep. Rule 10.
    F22 C About this dataset: other title, EEGLAB window pale with large buttons.
    F23 C Dataset info: third Browse button (ICA sphere) in EEGPrep only. Decision needed.
    F24 C History: no eeg_store line in EEGPrep after an edit in place, pop_newset shown or not after Select epochs or events and Delete dataset(s), two invalid lines written by EEGLAB on Ok with nothing typed.

    Not done: the open menu of MATLAB could not be captured (inventory table instead), and the sub-windows behind the buttons of the dialogs were not opened.

    Next: the Mac pass (label menu-test-mac) adds the native pictures. Arno comments the Word file and says which fixes to start. Next menu: Tools.

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

    @arnodelorme
    CollaboratorAuthor

    Done: Edit menu test on jamming is complete: report (PDF 32 pages and Word) emailed to Arno, summarized with 24 findings in #711 (comment), Needs Arno section added, reports committed in project_eegprep (36ab00a, not pushed), labels switched to menu-test-mac and needs-arno. Menu identical (12 of 12 items), 70 numerical cases (35 pass, 30 differ, 5 errors), data samples identical. No code change. The Mac pass adds the native pictures next.

    — eegprep, reported with orch done

  7. added
    later
    and removed
    needs-arno
    menu-test-mac
    on Nov 26, 2026
  8. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno asked on November 26, 2026 to keep the Edit menu report for later and just reference it while he works on the File menu.

    — orchestrator

  9. arnodelorme commented on Nov 27, 2026

    @arnodelorme
    CollaboratorAuthor

    Arno asked on November 26, 2026 that each EEGLAB function get its own issue in sccn/eegprep, graphical and numerical, with the progress tracked in adelorme-assistant/project_eegprep. The 12 functions of this Edit menu report now each have one, labeled gui-parity and later like this issue, with their findings and numerical cases:

    Progress table: https://github.com/adelorme-assistant/project_eegprep/blob/main/tracking/functions.md

    — 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

    gui-paritylater

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions