You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pop_epoch (Extract epochs): graphical and numerical parity with EEGLAB #795
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.
Window: The case comes from a scripted call. The window still needs comparison.
Numbers: Both programs reject the input before amplitude rejection. EEGPrep identifies the invalid index and valid range. EEGLAB intersects indices with matching types first and reports “empty epoch range (no epochs were found)”.
What remains: Keep the index diagnostic. Classify this pair of errors together only when all indices are out of range, a type filter is present and both programs reject. Document the order of validation.
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.
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.
🤖 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.
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.
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.
Activity
claude commentedon Nov 28, 2026
🤖 Plan:
tests/test_fuzz_harness.pytests/fuzz/harness.py, docs noteNot 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
eventindicesagainst1..Nbefore 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 reportsempty epoch range(pop_epoch.m L274, L283)._same_pop_epoch_eventindicesaccepts only the MATLAB index-exceeds error, which is the unfiltered case.Proposed Fix
Keep the EEGPrep index diagnostic. Pass
caseinto_same_failure. Count the pair as the same failure only when all three hold:typesis not empty, every index in the EEGPrep message is outside the reported1..N, and EEGLAB reportsempty 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.arnodelorme commentedon Nov 28, 2026
🤖 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.
The Mac and Windows captures are scheduled for the overnight pass. The Linux checkouts were EEGLAB 7ba2370cff and EEGPrep 2558e8eef2.
arnodelorme commentedon Nov 29, 2026
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
arnodelorme commentedon Nov 29, 2026
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
arnodelorme commentedon Dec 1, 2026
🤖 The pop_epoch dialog and native jamming captures are tracked in #931.