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
Interpolate them
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:
Iām concerned the ICA decomposition didnāt work well with your particular data.
Components 000, 001, 002, 004, and potentially also 005, 006, 009, 011, 012, 013, and 014 seem to have captured very similar artifacts. I wouldnāt trust this result, itās rather unexpected.
How exactly did you pre-process the data you fed into ICA? How did you fit ICA?
Is that one channel in the right frontal/temporal (?) area maybe broken and should be marked as bad?
Weāll need much more information to be of help at this point.
The name of signal we are working on at this point is āeeg_cropped_removedā because we cropped the begining and/or the end if needed + we removed bad channels
Then following your advice we apply the ICA before averaging:
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)