BUG: Fix bug with regress_artifact picking#12389
Conversation
|
... and I realized I could greatly simplify some stuff and make the dataset dual-use for mne-tools/mne-bids-pipeline#837 by BIDSifying it, so those changes are in here, too. |
drammock
left a comment
There was a problem hiding this comment.
LGTM other than my 2 comments.
mne/_fiff/pick.py
Outdated
| with info._unlock(): | ||
| info["custom_ref_applied"] = FIFF.FIFFV_MNE_CUSTOM_REF_OFF | ||
| # remove unused projectors | ||
| if info.get("projs", []): |
There was a problem hiding this comment.
I stumbled over this line, because seeing the [] in foo.get("bar", []) made me expect that the result was being assigned or iterated over. Here we're only (effectively) passing it to bool() for the duration of this one line; so I think it's clearer to default to False rather than a (falsey) empty list.
| if info.get("projs", []): | |
| if info.get("projs", False): |
tutorials/inverse/95_phantom_KIT.py
Outdated
| # Now we can figure out our epoching parameters and epoch the data, sanity checking | ||
| # some values along the way knowing how the stimulation was done. |
There was a problem hiding this comment.
seems like this text may need to be updated? Looks like the "sanity checking" is all deleted now
|
Done, marking for merge when green, thanks for the quick look @drammock ! |
EOGRegressioncheck for projections only applicable to the channels being processed. So if you want to regress MEG sensors using a reference channel for example, it shouldn't matter whether or not there is an average EEG reference projector.pick_inforemove any projectors that are no longer relevant to the data. So if you start with M/EEG data and remove all EEG channels, you should no longer have an EEG reference projector ininfo. I went back and forth on this one a bit but I think this is the most reasonable behavior.