Repository navigation
Backlog
1 / 11 of 1 issue completedBacklog
1 / 11 of 1 issue completed
Copy link
Labels
gui-parityWindow of EEGPrep against EEGLAB's (Arno's report comments)laterParked until Arno removes the label
Description
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_editeventvals, the Edit menu item "Event values", from the Edit menu report of November 26, 2026 (EEGPrep develop df89e80 against EEGLAB develop 16cc13212, jamming under Xvfb).
- Where it stands: compared with EEGLAB, the window has different controls, wording or defaults; 5 findings of the Edit menu report to settle.
- Numerical tests: N45 to N52: 2 identical (change type, delete), 5 differ (change latency continuous and epoched: urevent; insert and append: type, latency, position, urevent, F2; sort, F3), 1 stops with an error in EEGLAB only (two field sort).
- Report and pull request: the Edit menu report issue EEGPrep versus EEGLAB, Edit menu: side-by-side captures on jamming, numerical tests and PDF and Word report #711, no pull request yet for this function; the findings summary is EEGPrep versus EEGLAB, Edit menu: side-by-side captures on jamming, numerical tests and PDF and Word report #711 (comment)
- Progress tracking: in
adelorme-assistant/project_eegprep, not here: https://github.com/adelorme-assistant/project_eegprep/blob/main/tracking/functions.md - Next step: waits for Arno's comments on the Edit menu Word file; the Edit menu is parked (
later) while he works on the File menu.
Findings of the report for this function
- F2: Insert and append: the latency is read in seconds by EEGLAB and stored as samples by EEGPrep, and the urevent goes to the end of the table.
- F3:
'sort'has no effect in EEGPrep (resorted byeeg_checkset). EEGLAB fails on a two field sort. - F14: Minor differences of structure with the same data and events (an
eventdescriptionentry forduration, urevent order, empty keys of a boundary event, the trailing empty slot ofpop_delset). - F16: The window is taller than its content, and the text of the edit boxes is left aligned (rule 7).
- F19: Button labels without the unit (
latencyforLatency (sec)),2.0for2, an extra line "Original value below".
F15, F16, F18, F21 and F24 are shared by several windows: fix them here only for this function's window, under the GUI rules of project_eegprep (rules/gui-parity.md).
Files
- Report (PDF and Word): https://github.com/adelorme-assistant/project_eegprep/tree/main/reports/edit-menu-2026-11-26
- Edit menu issue: EEGPrep versus EEGLAB, Edit menu: side-by-side captures on jamming, numerical tests and PDF and Word report #711
- Captures and numerical outputs:
/mnt/v1/arno/menu_tests/editon jamming.ucsd.edu (numerical/results.mdlists every quantity).
Sub-issues
Collapse Sub-issuesSub-issues
Loading 1 sub-issues
Metadata
Metadata
Assignees
Labels
gui-parityWindow of EEGPrep against EEGLAB's (Arno's report comments)laterParked until Arno removes the label
Activity
claude commentedon Nov 27, 2026
🤖 Plan:
pop_editeventvals)pop_editeventvals.mlater(waiting on Arno's Edit menu comments) and covers 5 findings across numerics and GUI (>100 lines), so no PR yet. Analysis below for human review.Research
All three numerical differences (F2, F3, change-latency urevent) come from the command-line path in
_apply_options, which does not follow three EEGLAB rules. EEGLAB turns insert/append intochangefieldcalls, so latency goes through seconds→samples. It puts the new urevent at the insertion point and shifts the later indices. It skipseeg_checksetaftersort.Relevant code
pop_editeventvals.py#L276-L281- insert/append; values stored rawpop_editeventvals.py#L406-L414- new urevent appended at end (F2)pop_editeventvals.py#L282-L289- sort theneeg_checkset('eventconsistency')re-sorts (F3)pop_editeventvals.py#L291-L303- urevent latency = event latency#L125-L136,#L241-L280,#L349-L398,#L474Proposed Fix
Insert/append (F2): in
_apply_options, insert an empty event, then send each value exceptureventthrough_change_field(EEGLAB L125-136). Latency is then read in seconds (ms when epoched) and duration converted. In_allocate_inserted_urevent, take the urevent of the event at or after the insertion point (urvalnum). Insert the new urevent there, keep itsepoch, and add 1 to the urevent of every later event (L241-280).Change latency → urevent (N45/N46): for continuous data, set the urevent latency to
eeg_urlatency(EEG.event, new_latency), which adds the boundary durations back. For epoched data, useurlatency(neighbor) - (latency(neighbor) - new), where the neighbor is the event before or after in the same epoch. If there is no such event, leave the urevent unchanged and log it (L356-385).Sort (F3): when the call has a
sortoption, return withouteeg_checkset, as EEGLAB does withnoeventcheck(L474). EEGLAB crashes on a two-field sort: it discards the secondary order and indexesevents(I)with the primary order. EEGPrep should keep its working two-field sort and record this as a known difference.F14: check each structural difference (the
durationeventdescription, empty keys of a boundary event) againsteeg_checksetonce 1–3 are in. Urevent order should match after step 1.GUI (F16/F19):
_display_field_labelalready returns "Latency (sec)". The report'slatencylabel likely comes from the field-description path; seeknown_differences, "Field buttons show the field description". Planned changes:2, not2.0, like EEGLAB'sreformat.max(360, 170 + 34*n)(L160).This needs the visual-parity capture loop.
Steps 1–3 come to about 60–80 lines plus tests in
tests/test_pop_editeventvals.py, covering N45–N52: latency change on continuous and epoched data, insert/append with urevent, and a single-field sort that keeps its order. They change a core function, so they need the EEGLAB reference run before merge. Step 5 is a separate GUI PR.Open questions
laterlabel is removed?suraj-ranganath commentedon Nov 28, 2026
On develop (
aa81d9ab), open Edit > Event values on the continuous tutorial dataset. Replace 1 with 5 in Event Num and press Return. The dialog closes as if Ok was pressed. With Tab, event 5 can be edited and event 1 stays intact.Have Return apply the event number and keep the editor open, as the EEGLAB field callback does. Check Return and the previous/next buttons, then save an edit to event 5 and verify that only that event changed. Repeat with Cancel and check the original values and history. This stays with the parked Edit work in #711. pop_editeventvals.m L567 · pop_editeventvals.py L134