With previous App (Rejecting Epochs based on channel amplitude) we could get rid of so many epoch, maybe that's acceptable if you we have a visual or auditory experiment because it's easy to acquire more data um , but we used to work also with taste/olfactory data and we typically have like let two to three stimulations stimulation per minute so we have really just few trials and so few epochs, meaning we don't want to lose them all so we might be interested in ways to preserve these data and to somehow get rid of the artifact without actually having to drop these epochs. If there was a way for us to remove the blinking artifact from our epochs without having to remove the entire epochs that would be awesome. There is multiple methods to do so, one approach that is commonly used in meg but can also be applied to eeg, but it's not so common is called signal space projection (SSP). It essentially uses PCA to get a hold of the artifact and then tries to project it out or regress it out of the data. MNE has some convenience functions to automatically help us detect EOG and ECG artifacts, create ssp projectors to remove these artifacts from the data.
...
First we need to start again with the raw data because mne need the entire continuous data to work properly, we're going to use these two functionscompute_proj_ecg()
and compute_proj_eog()
as the names indicate the first one will try to find and correct for ECG artifacts, the second one will try to find and correct for EOG artifacts. We can use the magnetometers to get a pretty clear signal of the ECG if we don't have a proper ECG channel. Then we're going to combine these projectors by concatenating them to have a list of projectors and we're going to add these projectors to our epochs using add_proj
function. By default the projectors are off, so what we want to do is we want to turn these projectors on by calling the functionapply_proj
in order to have these projectors permanently applied.
Links to the App:
https://github.com/zahransa/app-SSP
https://brainlife.io/app/62b9578ff3194eded6f713f2
Inputs of the App:
Files | Format | Datatype | Description |
---|---|---|---|
Raw data | -raw.fif | Data to process |
Outputs of the App:
Files | Format | Datatype | Description |
---|---|---|---|
Raw data | -raw.fif | Cleaned data |