Newer
Older
These scripts perform the preprocessing for the resting state EEG data described in Kosciessa et al. (2019, bioRxiv).
--
##### B_STSW_ImportEEG_rest
- Import EEG data
##### C_STSW_prepare_preprocessing_rest
- EEG settings:
o Referenced to avg. mastoid (A1, A2)
o downsample: 1000Hz to 250 Hz
o 4th order Butterworth 1-100 Hz BPF
o no reref for ECG
- Check for gross noise periods that should not be considered for ICA
- Check whether the correlational structure of the channels looks sensible. If not, there may have been problems with electrode placement.
##### G_STSW_segmentation_raw_data
- Segmentation: XXX
- Load raw data
- Switch channels
- EEG settings:
o Referenced to avg. mastoid (A1, A2)
o 0.2 4th order butterworth HPF
o 125 4th order butterworth LPF
o demean
o recover implicit reference: A2
- Automatic artifact correction, interpolation
- Remove blink, move, heart, ref, art & emg ICA components prior to calculation
- get artifact contaminated channels by kurtosis, low & high frequency artifacts
- get artifact contaminated channels by FASTER
- interpolate artifact contaminated channels
- equalize duration of trials to the trial with fewest samples
- get artifact contaminated epochs & exclude epochs recursively
- get channel x epoch artifacts
- Note that this does NOT yet remove anything. We only calculate the data to be removed in the next setp (I).
- Remove blink, move, heart, ref, art & emg ICA components
- Interpolate detected artifact channels
- Remove artifact-heavy trials, for subjects with missing onsets, the missing trials are included here as ‘artefactual trials’, hence correcting the EEG-behavior assignment:
Note that the channels A1 and FCz were generally exchanged in the BrainVisionRecorder. During some sessions, it was also apparent that the amplifiers had been switched. These channels have been switched based on visual inspection of the expected autocorrelation of neighboring channels. Note that this switching is only done AFTER the data are read into FieldTrip! The scripts that do the switching can be found in the directory A_scripts/helper/. C_STSW_prepare_preprocessing_rest contains the conditionals for what is switched in which subject. Visual inspection of ICAs indicated that the channel switch was successful, although outlier channels may still be slightly off.