This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.
ICA
First we need to load the raw data again, as we know now to get to our epochs we loaded the raw data we applied a certain set of filters, then we cut the raw data into epochs. Now it has been shown that ICA works best if we apply a high pass filter with a higher cut-off frequency, more like one hertz this increases ICA performance. If we have epochs processed with a different filter, we don't really want to feed them into the ICA we would like to produce a new set of epochs with filters applied that are of advantage to the ICA algorithm and to do that we have to start with the raw data again, we're going then to apply a filter this time it's a band pass with the lower cutoff at one hertz and the height at 40 hertz (filter App), then create epochs (epochs app), this new epochs should be the input of the which will then feed into ICA. To run ICA we will use the mne.preprocessing.ICA
object.
The user can enter the components_to_exclude or the App can provide them. We create ecg epochs, mne already has a convenience function for that it's called mne.preprocessing.create_ecg_epochs
we feed in the raw data (the raw data before filtering). So what's going to happen is that mne is going to try to figure out where the heart beats are, it's going to extract these events and then based on these events it's going to produce epochs, then mne used classification algorithm that tries to find ecg artifacts in our ICA (on other word we're going to ask mne to look into our ecg epochs and try to find the components that are actually related to the ecg activity in these epochs.Then we're going to do the exact same thing with eog. Once we have all of these components: the ecg components and the eog components that explain the respective artifacts we're just going to concatenate them and we're going to add them to ica.exclude
which is the list of components indices we intend to exclude as soon as we apply ica to clean our data. So we ran ica on the epochs we produced specifically for ica but now that we have discovered which components are related to artifacts and we want to remove these these artifacts from our data so we actually apply ica to the data we are analyzing while conducting our study by ica.apply
.