Repository navigation
BUG: Exclude bad channels in annotate_muscle_zscore - #14418
Open
BabaSanfour wants to merge 3 commits into
Open
BabaSanfour wants to merge 3 commits into
BabaSanfour wants to merge 3 commits into
Conversation
BabaSanfour
requested review from
agramfort,
drammock and
larsoner
as code owners
October 14, 2026 22:34
Member
Author
|
the test failure is not linked to my changes. |
CarinaFo
approved these changes
Oct 18, 2026
Contributor
There was a problem hiding this comment.
Can't think of a situation where we would want bad channels in annotate_muscle_zscore, so +1 for merge.
The default behaviour of picks and exclude is still TBD, but dipole fitting on evokeds with bad channels does not seem like a good idea, so I agree that the default there should probably be exclude.
This branch has not been deployed
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.
Reference issue
There is no existing issue for this bug but #13946 and #12402 are linked. @drammock explicitly asked for this (#11907 (comment)) during the API migration. This one was missed, I found it while working on my data. A similar fix was done here #13266
What does this fix?
mne-python/mne/preprocessing/artifact_detection.py
Line 120 in 7ab5922
raw_copy.pick_types(meg=ch_type, ref_meg=False)(defaults toexclude="bads") toraw_copy.pick(ch_type)(defaults toexclude=())Additional information
mne/gui/_dipolefit.py cov="baseline"could have a similar issue (bad channels inflate the noise estimate). It's separate, not caused by Replace inst.pick_channels() with inst.pick() #11907, and not fixed here. I could open a PR if this needs a fix.AI disclosure
Claude Opus 5.5 was used for tracing the regression to #11907 through git history and the GitHub discussion + write the test.