Skip to content

pop_epoch (Extract epochs): graphical and numerical parity with EEGLAB #795

Backlog

Description

@suraj-ranganath

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_epoch, Extract epochs. It stays open until the window and the numbers are both acceptably close to EEGLAB's, even when a pull request is merged or closed.

Findings of the report for this function

Repro on develop (aa81d9ab): Use the ten-event crop in #687, seed 20261124. Call pop_epoch(EEG, ["sq.*"], [0.002, 0.252], eventindices=[1000000], valuelim=[50.0]). The November 27 recurrence has eight events and reports the same pair of errors.

Done when: Replay both seeds at the existing tolerances and verify the reported bounds (1 to 10 and 1 to 8). Cover a valid selection, an in-range filter with no match, an unfiltered out-of-range index and mixed valid/invalid indices. A successful MATLAB result on a mixed selection must still be reported.

Files

Activity

  1. added
    function-parity
    on Nov 28, 2026
  2. claude commented on Nov 28, 2026

    @claude
    Contributor

    🤖 Plan:

    Not covered: the MATLAB replay of seeds 20261124 and 20261127 (no MATLAB here; the nightly fuzz run checks it) and the window comparison.

    Research

    EEGPrep checks eventindices against 1..N before it filters by type (pop_epoch.py#L335-L346). EEGLAB first intersects the indices with the events that match a type. With a type filter and every index out of range, it reports empty epoch range (pop_epoch.m L274, L283). _same_pop_epoch_eventindices accepts only the MATLAB index-exceeds error, which is the unfiltered case.

    Proposed Fix

    Keep the EEGPrep index diagnostic. Pass case into _same_failure. Count the pair as the same failure only when all three hold: types is not empty, every index in the EEGPrep message is outside the reported 1..N, and EEGLAB reports empty epoch range. Mixed valid and invalid selections, where EEGLAB may succeed, are still reported. Window parity is out of scope here, so #795 stays open.

  3. arnodelorme commented on Nov 28, 2026

    @arnodelorme
    Collaborator

    🤖 Linux comparison, November 28. Both Extract epochs dialogs opened on jamming. For square events, EEG samples matched exactly for all three intervals, from −0.1 s to 0.2, 0.4, or 0.6 s. All three used valid event selections. The invalid-index diagnostic tracked here is a separate case.

    pop_epoch native GUI comparison, including the tested modes

    The Mac and Windows captures are scheduled for the overnight pass. The Linux checkouts were EEGLAB 7ba2370cff and EEGPrep 2558e8eef2.

  4. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    Collaborator

    Arno's feedback of November 29, 2026 on the seven-menu report: the edit boxes of the pop_epoch window are not vertically aligned as in EEGLAB. Listed with the other dialogs on #870, and logged only until #875, the geometry test suite, is done.

    — orchestrator

  5. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    Collaborator

    Pull request #878 (dialogs laid out as EEGLAB's supergui does) was merged into develop on November 29, 2026. pop_epoch is not on the new layout yet. Only the centered edit text changed for it; it will be checked in the full rerun on jamming.

    — orchestrator

  6. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    Collaborator

    🤖 The pop_epoch dialog and native jamming captures are tracked in #931.

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

    function-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions