If you’re using conda
(as suggested in the MNE installation instructions), you can install picard
via
conda install -c conda-forge python-picard
Alternatively, you can install it via pip
:
pip install python-picard
To remove eye blinks, you’ll want to follow the following approach:
- epoch your data and run
ica.fit()
on your epochs to get the components - go back to your raw data, identify eye blinks and create epochs around the blink events. MNE-Python can do this automatically for you using
mne.preprocessing.create_eog_epochs()
- using the
ICA
fit you created in the first step, runica.find_bads_eog()
on the EOG epochs. This will return a list of ICs that appear to be related to ocular activity - You can review the effects of excluding those components by adding them to
ica.exclude
and runningica.plot_overlay()
on the averaged EOG epochs, i.e.,ica.plot_overlay(eog_epochs.average())
- Run
ica.apply()
on your epochs to remove ocular artifacts.
If you’re brave & curious, you can have a look at how we’re handling it in the MNE Study Template; but be warned, the code is slightly more complex than what I’ve explained above.