-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG, DOC: bad channels / bad spans tutorials #6575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for reporting. I encountered the same in my recent work on #6551. I will port the fix on master. |
Codecov Report
@@ Coverage Diff @@
## master #6575 +/- ##
==========================================
- Coverage 89.45% 89.41% -0.05%
==========================================
Files 416 416
Lines 74923 74934 +11
Branches 12323 12324 +1
==========================================
- Hits 67025 66999 -26
- Misses 5081 5104 +23
- Partials 2817 2831 +14 |
|
Instead of adding Sphinx-gallery should create an image from it for us automatically so we don't need to update it ourselves any time a new annotation option is added. |
|
@jasmainak can you look? |
|
@larsoner here's how that looks: you lose the window frame, which IMO is a little confusing / weird looking: I also tried it on an earlier tutorial that also had an annotations window screenshot: Still want me to go ahead with it? Maybe if we made the figure background of the annotation control window non-white it would be OK? |
| # sphinx_gallery_thumbnail_number = 2 | ||
| for pattern in (r'MEG 24..', r'EEG 05.'): | ||
| picks = mne.pick_channels_regexp(raw.ch_names, regexp=pattern) | ||
| raw.plot(order=picks, n_channels=len(picks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome ninja weaponry. But I am affraid this may be intimidating to coding novices. Can we just get the channels from the info['bads'] list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a useful feature that doesn't get introduced anywhere else, so I opted to give an expanded explanation of the regex rather than switch it to something simpler.
| # picking up a lot *more* than its neighbors — its signal is at least an order | ||
| # of magnitude greater than the other MEG channels. Regardless of what is | ||
| # causing the problems, neither are realistic reflections of the | ||
| # electrophysiological signals we expect, so it makes sense to exclude them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems something is missing or unexpected here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you mean, see if it's better now?
|
@drammock awesome work! This will be very useful for teaching. Let me know if my comments are not clear or you want to discuss. |
jasmainak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @drammock
My comments are mostly nitpicky. Otherwise it reads just fine.
| # noise covariance across sensors. Noisy channels can also interfere with | ||
| # :term:`SSP <projector>` computations, because the projectors will be | ||
| # spatially biased in the direction of the noisy channel, which can cause | ||
| # adjacent good channels to be suppressed. ICA is corrupted by noisy channels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm ... why would this be? I know it's what I heard from @dengemann but ICA doesn't maximize variance but statistical independence. So why should it be affected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand it myself; it seems to mostly be an issue when the noisy channel is a couple orders of magnitude above the other signals.
|
Comments addressed and CIs green. Here are the updated renderings:
@larsoner @agramfort @dengemann unless one of you wants to weigh in on Mainak's question about bad channels' effect on ICA (and also you think it's important to add that info in the tutorial), then this is ready for merge. |
|
oops, just noticed a missing |
|
codecov failure appears to be spurious / unrelated; ready for merge (modulo the ICA question above) |
|
@dengemann or @jasmainak feel free to merge if happy thanks heaps @drammock |
|
Awesome ! Thanks a lot @drammock :) |
* add bad channels / interpolation tutorial * add crossrefs * flesh out bad channels / bad spans tutorials * add crossref targets * remove cruft * fix url targets * better crossref name * add forgotten screenshot * fix flake * replace screenshot with spoofed keypress * address denis's comments * address mainak's comments * fix missing deepcopy


splits "artifact rejection" tutorial into separate tuts for bad channels and bad temporal spans. Also fixes messed up URLs in the preprocessing overview tutorial.