Skip to content

Fix pop_selectevent empty epoch guard - #955

Merged
arnodelorme merged 2 commits into
developfrom
codex/selectevent-empty-guard
Sep 8, 2026
Merged

arnodelorme merged 2 commits into
developfrom
codex/selectevent-empty-guard

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Restore the missing isempty(Iepoch) condition in the epoched event selection guard. erroronempty='on' should reject an empty selection, not every selection that deletes epochs.

Add eight deterministic regressions covering selected sample values, epoch and event consistency, empty selections with errors enabled and disabled, inverted epoch selection, event deletion, explicit options, and dataset arrays.

Verification

MATLAB R2025b on Apple silicon, starting from sccn/eeglab:develop at 5c27fc095bc43216ffccdb027f7c40477edf3e2f.

The regression suite produced 4 passes and 4 failures before the implementation change, then 8 passes and no failures afterward.

All three previously failing EEGLAB test callers pass with the fix: test_demo_selectevent_glitch, test_test_pop_selectevent, and test_test_pop_comperp. The first also exercises overlapping epochs.

Run the new tests from the repository root:

results = runtests('tests/test_pop_selectevent.m');
assertSuccess(results);

This is problem 2 of the requested local test repair. No plugin changes, statistical algorithm changes, or data files are included.

The new regressions are wired into the existing MATLAB CI job when its license token is available. Octave smoke testing passed. In the current run, the MATLAB execution steps were skipped because the token was unavailable, so the local MATLAB results above are the execution evidence.

Companion PRs: sccn/eeglab_tests#13, #956 and LIMO-EEG-Toolbox/limo_tools#239.

@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown

Claude Code is working…

I'll analyze this and get back to you.

View job run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant