Skip to content

pop_mergeset (Edit > Append datasets): graphical and numerical parity with EEGLAB #733

Backlog

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_mergeset, the Edit menu item "Append datasets", from the Edit menu report of November 26, 2026 (EEGPrep develop df89e80 against EEGLAB develop 16cc13212, jamming under Xvfb).

Findings of the report for this function
  • F5: urevent latencies of the second dataset shifted by pnts in EEGPrep only (continuous), and no boundary urevent in EEGPrep (epoched). EEG.event and data identical.
  • F6: Default indices in the window: 1 in EEGLAB, 1 2 in EEGPrep. Decision needed.
  • F14: Minor differences of structure with the same data and events (an eventdescription entry for duration, urevent order, empty keys of a boundary event, the trailing empty slot of pop_delset).
  • F21: With one dataset loaded, the refusal message is a grey system box with other wording in EEGPrep (rule 10).

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

Activity

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

    @claude
    Contributor

    🤖 Plan:

    • Fetch issue, research code, duplicate-work preflight (no open PRs for pop_mergeset)
    • Decide scope: no PR. The issue has the later label (parked until Arno comments on the Edit menu report), F6 needs a decision, and the four findings cover both GUI and numerics.

    Research

    The numerical mismatches (F5, and the urevent count 309 vs 308) come from _merge_urevents. In continuous mode it shifts the second dataset's urevent latencies by first_pnts, which EEGLAB does not do. In epoched mode it adds no boundary urevent, which EEGLAB does. _merge_events rebases event.urevent with + (0 if epoched else 1), so the epoched indices also have to change once a boundary urevent is added. F6 comes from _default_indices_text, which offers the first two datasets. F21 (the one-dataset refusal) is handled by the GUI caller rather than by an EEGLAB-style error dialog in this module.

    Relevant code

    Proposed Fix

    Once Arno removes later:

    1. F5: Copy the second dataset's urevents without shifting their latencies in continuous mode, matching EEGLAB. In epoched mode, add the boundary urevent and use +1 for every rebased event.urevent. Add a regression test on sample_data covering the urevent count and latencies (N23 to N26), then confirm with the EEGLAB reference run, since this changes a core function.
    2. F6: Decision needed: keep 1 2, which is more convenient, or use EEGLAB's 1?
    3. F14: Settle each structural difference (the eventdescription entry for duration, urevent order, the empty keys of the boundary event, and the empty slot left by pop_delset) after item 1, because some of them may disappear with it.
    4. F21: Route the one-dataset refusal through the shared EEGLAB-style error dialog under rules/gui-parity.md, limited to this window.

    Items 1 and 3 are under 100 lines, but they touch core event semantics and need human approval, so I am holding implementation until the label is removed and F6 is decided.

  3. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 The new Linux comparison, captures and verified GUI fix are in #905 and PR #904.

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