Repository navigation
Fix pop_selectevent empty epoch guard - #955
Merged
Merged
Conversation
|
I'll analyze this and get back to you. |
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:developat5c27fc095bc43216ffccdb027f7c40477edf3e2f.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, andtest_test_pop_comperp. The first also exercises overlapping epochs.Run the new tests from the repository root:
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.