Stage 1 – PREP - kevmtan/EEG-ICA-pipeline GitHub Wiki
PREP is an early-stage preprocessing scheme that 1) removes line (electrical) noise 2) identifies and interpolates bad channels 3) performs "robust referencing" of EEG data to the cleaned scalp channel average (Bigdely-Shamlo et al., 2015). PREP'd EEG data acts as the "base dataset", and will be drawn upon several times.
The supplied code includes procPREP.m
, a function that imports .bdf files into EEGLAB then runs it through PREP.
This function takes subject # as its input argument. It assumes that your directory structure and filenames are based on subject numbers – if not, this can be easily changed in the code. This function creates a /PREP folder, where it saves the PREP'd .bdf data as *_PREP.set
.
Near the top of procPREP.m
are parameters to be used in PREP. These parameters are explained in a file in the PREP plugin folder: PrepPipeline/utilities/getPipelineDefaults.m
The parameter values written in the function are what I prefer for CMU Psy's BioSemi:
- The channel parameter values are optimized for our BioSemi; I don't recommend altering.
- The bad channel parameters values are more flexible, and can be changed for your needs
- I found PREP's default bad channel detection parameters to be too aggressive for our BioSemi, as they often resulted in 20–30 "bad channels"/recording
- Many of the artifacts that appear to cause bad channel detection can actually be easily removed via ICA (e.g. eye blinks, muscle noise).
- Thus, I disabled RANSAC, and made the other bad channel detection parameters more liberal, resulting in a more reasonable 0-10 bad channels/recording