-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Improved ICA based noise removal for reference channels #5959
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
…partially visualising these components
new function find_bads_ref identifies bad components that correlate with reference channel derived components
mne/preprocessing/ica.py
Outdated
| High pass frequency. | ||
| method : {'together', 'separate'} | ||
| Method to use to identify reference channel related components. | ||
| Defaults to "separate." See notes. |
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.
separate. -> separate
(no .)
|
could we have some improvement to the documentation at the same time? with how many subject did you evaluate this? Is this approach published? |
|
Yes, I'll work on the docs a bit. I've now looked at over 20 recordings with it. Not published, but I do think I'll try to make short article out of it. |
|
it this not a bit premature to push this first in MNE?
|
|
Perhaps; not my decision. In any case, the bug ought to be fixed. |
|
sorry I missed something. What is the bug fix here? sorry If I did not look
close enough.
… |
|
See last line of initial comment. Bug left over from #5807 |
|
ok then can we jsut have a bug fix PR here and see for the rest later after more validation? thanks |
Codecov Report
@@ Coverage Diff @@
## master #5959 +/- ##
===========================================
- Coverage 88.79% 51.41% -37.39%
===========================================
Files 401 401
Lines 72721 72720 -1
Branches 12158 12158
===========================================
- Hits 64575 37387 -27188
- Misses 5218 33214 +27996
+ Partials 2928 2119 -809 |
Continuing #5807, which enabled the use of ICA components derived from MEG reference channels to be used as a ground truth for selecting MEG data channel based ICA components for removal.
@larsoner had suggested in #5807 to instead do one ICA on both reference and data channels, and select those components whose weights lay most heavily on the reference channels. I decided against this simply to avoid having to write an algorithm for deciding what is heavy and what's not. However, after having applied both approaches to a larger set of data, it seems clear to me that this approach is markedly superior, and worth the effort. An additional advantage is that it is simpler for the user to implement. The procedure goes as follows:
mne.preprocessing.bads.find_outliers had to be modified such that it has the option to select outliers from only one tail of the z distribution. Otherwise components could conceivably be eliminated for being especially light on the reference channels, which is very much undesired.
This also fixes a bug in #5807, where ICA.labels_ got reset at every new application of a find_bads procedure. Now they accumulate across multiple applications, as they should.