Repository navigation
[pop_reref] Leave the dataset unchanged when every channel is excluded - #804
Conversation
An average reference with every channel excluded no longer raises. reref returns the samples unchanged like reref.m, and pop_reref warns and keeps the reference labels and ICA. Part of #794, fixes #686. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Claude finished @claude[bot]'s task in 44s —— View job Code review
BlockingNone. Important
Nits
Test gapsNone. The three new tests cover all three cases:
EEGLAB parity notes
I couldn't run the tests here because the runner's permissions blocked |
|
Follow-up to the review, after #776 was merged. The code needed no change. The missing evidence is now in the description. The EEGLAB reference run on this branch (46183773551) has 4,486 passed, 5 failed and 58 skipped. The 5 failures are the suite's current baseline (coregister, dipfit BEM, k-means numbering, struct near), the same as on the November 27 run of another branch, and none involves Develop was merged into the branch (no force push), and the The review is now clean and every other check passes, so I merged it with a squash, as Arno asked. — orchestrator |
An average reference with every channel excluded no longer raises. reref returns the samples unchanged, as reref.m does, and pop_reref logs a warning and keeps the reference labels and ICA, unlike EEGLAB, which relabels EEG.ref as average and drops ICA; the help and docs note the difference. An excluded explicit reference still raises.
Fixes #686
Part of #794
🤖 Generated with Claude Code
EEGLAB reference evidence
EEGLAB reference run 46183773551 on d02f609 (develop merged in), EEGLAB
d0963be9, eeglab_testsfec88f9f: 4,486 passed, 5 failed, 58 skipped, about 55 minutes (19:57 to 20:52 UTC). The 5 failures are the suite's current baseline and do not involverereforpop_reref:test_coregister_traditional_warp_matches_eeglab,test_synthetic_traditional_warp_matches_fieldtrip,test_bem_leadfield_and_multifit_match_fieldtrip,test_matlab_kmeans_numbering_matches_fixed_initial_centroidsandtest_struct_near_assertion_matches_source. The same five failed on the November 27 reference run ofagent/20261127-fix-746(45951378985).The claim that
reref.mreturns the samples unchanged when every channel is excluded was also checked directly in MATLAB R2025b with the vendored EEGLAB (420769355):reref(randn(4,50), [], 'exclude', 1:4)returns a 4 by 50 array whose largest difference from the input is 0, and with'exclude', 2:4the one remaining channel becomes 0 while channels 2 to 4 are unchanged (largest difference 0), which is what the new tests assert.