kosciessa df1c06b55e unify code naming, add readme info about original pipeline 2 years ago
..
03_ica 1847dd8b11 add stateswitch preprocessing scripts 2 years ago
05_segmentation_raw_data df1c06b55e unify code naming, add readme info about original pipeline 2 years ago
06_automatic_artifact_correction 1847dd8b11 add stateswitch preprocessing scripts 2 years ago
.gitattributes d2ea041e95 Apply YODA dataset setup 2 years ago
01_prepare_preprocessing.m 1847dd8b11 add stateswitch preprocessing scripts 2 years ago
02_visual_inspection.m 1847dd8b11 add stateswitch preprocessing scripts 2 years ago
04_ica_labeling.m 1847dd8b11 add stateswitch preprocessing scripts 2 years ago
07_prep_data_for_analysis.m df1c06b55e unify code naming, add readme info about original pipeline 2 years ago
08_assignConditionsToData.m df1c06b55e unify code naming, add readme info about original pipeline 2 years ago
README.md df1c06b55e unify code naming, add readme info about original pipeline 2 years ago

README.md

EEG Preprocessing

Steps 1-4 create filters (e.g., from the ICA, segment labeling), which later get applied to the raw data starting in step 5.

All steps use FieldTrip and were executed within MATLAB 2020a.


01_prepare_preprocessing

  • Prepare for ICA
  • Read into FieldTrip format
  • Switch channels
  • 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

02_visual_inspection

  • Check for gross noise periods that should not be considered for ICA

03_ica

  • Conduct initial ICA1, this should be run on tardis

04_ica_labeling

  • Manual labeling of artefactual ICA components

05_segmentation_raw_data

  • Segmentation: -1500 ms relative to fixcue onset to 1500 ms after ITI onset
  • 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 o downsample: 1000Hz to 500 Hz

06_automatic_artifact_correction

  • 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 o This is a hack. Apparently, we did not always get consistent timing on each trial, such that some trials were a bit shorter. To include these trials, I cut every trial to the lowest trial length. o Interpolation to a general length may be the better option.
  • 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).

07_prep_data_for_analysis

  • 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:

08_assignConditionsToData

  • Remove additional channels
  • Load behavioral data and add information to data