We are actually working on a bench of eeg data, and we are wondering about the best way to pre-process eeg data.
Actually we are doing :
Identify bad channels
Set the average as reference
ICA to remove blink pattern
Remove non-brain channels
Our questions are :
-Why interpolating in step 2 instead of dropping bad channels ? (this must compromise the average…?)
-Why not begin by removing non-brain channels? (this must compromise the ICA and the average we are interested in…?)
What data type are you working with? I assume EEG?
In MNE, I’d suggest to add bad channels to info['bads'] and not interpolating until you really need to. This is of course to some extent a personal preference, but in my experience, interpolation is only really needed when you want to calculate e.g. a grand average and need to ensure all participants have the same set of channels.
You should not set the average reference before running ICA. I’ve seen cases where this would “smear” artifacts across all channels. So my advice is to first try to remove all artifacts (which includes use of ICA), and only after that switch to an average reference.
MNE is aware of the fact that some channels contain brain data (e.g., magnetometers, gradiometers, EEG) while others don’t (e.g., EOG, ECG) and will take this into consideration. Applying an average reference to EEG data, for example, will of course not include EOG channels in this calculation.
Just another question: Our set up is made with 129 electrodes but there is no channels listed as EOG (cf picture) even if we saw that ‘E8’ ,‘E14’, ‘E21’, ‘E25’, ‘E126’, ‘E126’, ‘E127’ ‘E128’ are the channels recording eye movements.
Would you suggest to label those channels as EOG ones from the beginning ? (in order to exclude them from the average calculation and so on)
Or would you even recommend to remove all the non-brain electrodes (including EOG but also the jaw and ear ones) before the average referencing ?
these sensors do contain brain signal too – it’s just so weak in comparison to the EOG artifacts that it’s often “hidden”.
The goal here should be, therefore, to remove those artifacts to recover the underlying brain signal.
Since you’re using ICA, you can do exactly that: use ICA to first extract the artifact-related component(s), and then remove those components from your data.
MNE can very well use EEG channels as “virtual” or “simulated” EOG channels. For example, I commonly use Fp1 and Fp2 for EOG artifact detection. All that MNE will do, then, is is run its peak finder mechanics on those channels. You don’t need to change the channel type or remove the channels from your data!
Please see this section of the ICA tutorial for more information:
First, what is the reason you’re using raw data here and not epochs? Is this resting-state data?
Secondly, why are you limiting the number of ICA components to just 15? This seems strangely low to me, considering that you appear to have more than 100 good channels.
In EEG, I would always start with a number of components that is equal to the number of good channels, minus number of interpolated channels; and reduce this number by one more if using an average reference (but since you didn’t set one before ICA, you can ignore this)
I’m surprised that
the method converges so quickly
and yet, explains almost the entire variance
with just 15 components
I’d think something is very wrong there, and the first place I’d look into is that one channel on the right side of the head.
Last question, did you high-pass filter your data before fitting ICA?
Yes it’s resting-state data collecting on patients with a severe traumatic brain injury, that’s why sometimes it’s a bad quality signal (there are artifacts due to machines, patients are moving a lot… So we have to drop some bad channels and bad epochs)
We are making epochs only at the end of the pre-processing to keep only the ones that’s look good. Do you think we should do this earlier (like before the ICA) ?
We limited the number of components to 15 because we followed the tutorial you mentioned earlier: Repairing artifacts with ICA — MNE 1.0.2 documentation
What would you recommend regarding our situation with 129 EGI system? The goal is to keep the signal as pure as possible but clean out main artifacts
We filtered our data following the tutorial cited above, so we apply: low and high pass (l_freq=1, h_freq = 55) + notch (freqs= 60)