Sfoglia il codice sorgente

unify code naming, add readme info about original pipeline

kosciessa 2 anni fa
parent
commit
df1c06b55e

code/05_segmentation/G_STSW_segmentation_raw_data_180111.m → code/05_segmentation_raw_data/G_STSW_segmentation_raw_data_180111.m


code/05_segmentation/G_STSW_segmentation_raw_data_180111_START.sh → code/05_segmentation_raw_data/G_STSW_segmentation_raw_data_180111_START.sh


code/05_segmentation/G_STSW_segmentation_raw_data_180111_noTardis.m → code/05_segmentation_raw_data/G_STSW_segmentation_raw_data_180111_noTardis.m


code/05_segmentation/G_STSW_segmentation_raw_data_180111_prepare.sh → code/05_segmentation_raw_data/G_STSW_segmentation_raw_data_180111_prepare.sh


code/05_segmentation/G_STSW_segmentation_raw_data_180111_run.sh → code/05_segmentation_raw_data/G_STSW_segmentation_raw_data_180111_run.sh


code/05_segmentation/mccExcludedFiles.log → code/05_segmentation_raw_data/mccExcludedFiles.log


code/07_STSW_prep_data_for_analysis.m → code/07_prep_data_for_analysis.m


code/08_STSW_assignConditionsToData.m → code/08_assignConditionsToData.m


+ 60 - 3
code/README.md

@@ -1,3 +1,60 @@
-All custom code goes into this directory. All scripts should be written such
-that they can be executed from the root of the dataset, and are only using
-relative paths for portability.
+# **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