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
Fix ICA #36
base: master
Are you sure you want to change the base?
Fix ICA #36
Conversation
According to the comments we still don't remove EOG-related artifacts. Do you need to change later steps to add this? |
scripts/processing/06-make_epochs.py
Outdated
@@ -150,6 +150,7 @@ def run_epochs(subject_id, tsss=False): | |||
print(' Getting rejection thresholds') | |||
reject = get_rejection_threshold(epochs.copy().crop(None, reject_tmax), | |||
random_state=random_state) | |||
del reject['eog'] # Don't reject epochs based on EOG |
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.
We probably still should reject based on EOG because we don't want to use trials with blinks. At least this was what we thought before.
Actually Can you try leaving the EOG-based rejection in and see if this results in a reasonable number of trials? Or are too many rejected still? |
Let's see... |
scripts/processing/06-make_epochs.py
Outdated
@@ -166,6 +166,6 @@ def run_epochs(subject_id, tsss=False): | |||
|
|||
# Here we use fewer N_JOBS to prevent potential memory problems | |||
parallel, run_func, _ = parallel_func(run_epochs, n_jobs=max(N_JOBS // 4, 1)) | |||
parallel(run_func(subject_id) for subject_id in range(1, 20)) | |||
parallel(run_func(subject_id) for subject_id in range(6, 20)) |
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.
revert
Leaving the EOG rejection limits in gives me the following rejection rates:
|
There is some reasonable scientific basis for rejecting trials where blinks occurred in such a visual paradigm. Even if the artifacts are rejected, the visual input is not the same. I am no visual expert, though, but this did play into our EOG-related decision IIRC |
IIRC most subjects don't have a usable 3-layer BEM so EEG is not used for LCMV/dSPM. So this probably won't make a huge difference for what we show in the paper, except maybe the sensor plots. |
Marijn, can you share the html of the results once you build it?
On Fri 27 Apr 2018 at 21:44, Eric Larson ***@***.***> wrote:
IIRC most subjects don't have a usable 3-layer BEM so EEG is not used for
LCMV/dSPM. So this probably won't make a huge difference for what we show
in the paper, except maybe the sensor plots.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APHioixLt1KOMQWEVMPIiDPgmGqwEhqgks5ts3UHgaJpZM4TqaJ1>
.
--
Sent from my iPhone
|
Bwah. With the ICA properly cleaning EEG and autoreject being performed on MEG+EEG only, the rejection rates are as follows:
That's still a lot of dropped epochs. And worse yet: the grand average STC makes no sense at all. Guess it's back to the drawing board for me on this. |
I’ll need to dig into this to see what’s actually going on ...
On Mon 30 Apr 2018 at 12:40, Marijn van Vliet ***@***.***> wrote:
Bwah. With the ICA properly cleaning EEG and autoreject being performed on
MEG+EEG only, the rejection rates are as follows:
subject #rejected/#total (rejection rate)
Subject sub002: 069/887 (07.8 %)
Subject sub003: 171/882 (19.4 %)
Subject sub004: 354/889 (39.8 %)
Subject sub006: 178/883 (20.2 %)
Subject sub007: 011/885 (01.2 %)
Subject sub008: 175/882 (19.8 %)
Subject sub009: 576/889 (64.8 %)
Subject sub010: 306/885 (34.6 %)
Subject sub011: 337/884 (38.1 %)
Subject sub012: 232/888 (26.1 %)
Subject sub013: 308/883 (34.9 %)
Subject sub014: 241/887 (27.2 %)
Subject sub015: 001/883 (00.1 %)
Subject sub017: 574/883 (65.0 %)
Subject sub018: 008/882 (00.9 %)
Subject sub019: 234/885 (26.4 %)
That's still a *lot* of dropped epochs. And worse yet: the grand average
STC makes no sense at all. Guess it's back to the drawing board for me on
this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APHiol17OPJJvsx8GyH3iHkv7AQ4HEW7ks5ttuo3gaJpZM4TqaJ1>
.
--
Sent from my iPhone
|
I've played around a bit with the data. It seems the mags and EEG are just that noisy. In our Frontiers submission we've ended up setting fixed, lenient, rejection thresholds in order to retain enough data for connectivity analysis. |
you don't correct for ECG/EOG with ICA?
just EOG and big artifacts with reject?
how did you set the reject thresholds?
|
sorry for the confusion. We do apply ICA. We replaced autoreject with a fixed threshold. |
ok so I understand that for your use case autoreject was removing too much data.
|
Yes. I thought this was because ICA was not cleaning the EEG data (which it wasn't), but fixing the ICA did not resolve the issue. |
Just to be clear, this was autoreject (global), right? I think the issue might be that it does not include data augmentation, but I'll have to try it |
So there is something wrong with what ICA does currently that we could fix? If so, what is it / how did you fix it? |
68845eb
to
f64adaf
Compare
The ICA is currently not fitted to the EEG channels. This PR fixes this. |
I am afraid this will change a bit the results of our paper. I don't have time to rerun all to check if it's the case... :( |
Assuming MEG and EEG are fitted separately (?) then it should only affect the EEG sensor space estimates, as we could not do source imaging with EEG. But indeed someone will need to re-run from this step forward and upload the result to check if we want to incorporate. The review is almost done (?) so if we do change it, we should make it clear in the README that a particular commit was used for the paper figures. |
ICA is fitted jointly so I guess it will have some impact. Hopefully tiny...
|
ICA ignored the EEG channels, which means EOG artifacts where not cleaned from the EEG sensors, which means autoreject started rejecting a lot of data based on blinks in the EEG.
This should fix it. I'm re-running our conpy pipeline now (takes a while...) to see if we get decent results.