I’ve recently been playing with MNE code to preprocess EEG data obtained from a 21-channel NeXus-32F setup.
I am able to run the code well, and get the packages working. However, I notice that the noisy components aren’t being excluded despite using and applying ICA. As a result, my plot on the preprocessed data has a y-axis of (-20 - 40 microVolts) which is very large for EEG signal!
Can anyone please suggest how I could better clean my data?
I’ve also printed ica.exclude which == [0]. Perhaps, this is why ICA was not being applied because there was nothing index to be excluded. Alternatively, I also read somewhere on this forum that having a <32 channel EEG dataset is not ideal to run ICA. I’m still reading into this atm but open to any suggestions.
First, after fitting you plot the components and then the properties individually. This will open as many property windows as fitted components. Instead, you can do ica.plot_components(inst=segment_ica) and now the topographic maps are interactive. If you click on one, it will open the property figure.
You can also look at the time series, especially if you are interested in eye-movement-related components, they are usually very easy to spot and label on the time series: ica.plot_sources(inst=segment_ica). Again, this plot is interactive. If you click on the name of an IC, it will open the property figure.
ica.exclude = [0] means that the first component has been labeled as “noise” and will be excluded when the ICA is applied. This is the step missing from your screenshot ica.apply(segment_ica). Only after this last step.
21 channels is definitely low, but if you limit your exclusion of components to eye-movement and heartbeat-related components, you should be fine because those components are usually very well captured by an ICA and will not capture small brain activities.
Also, could you share the output of print (segment_ica), print (segment_ica.info), and print (reject)?
Mathieu
P.S: Please post code snippets as formatted code (Ctrl + E, or the appropriate button in the edit bar) instead of screenshots.