===== EEG Preprocessing Pipeline for 7T/BrainMechR01 ===== Concurrent EOG and high-impedance EEG was recorded with a Biosemi ActiveTwo with Actiview software (Minimitter, Bend, OR) 64-channel EEG system, in accordance with the international 10–20 system (Neymotin et al., 2020), located in an electromagnetically shielded room while participants performed the MGS task (described above). The task stimuli were presented on a computer 80 cm from the subject, and head position was maintained using a chin rest. Initial data were sampled at 512 Hz and down sampled to 150 Hz during preprocessing. Data were referenced to external electrodes corresponding to the mastoids due to their proximity to the scalp and low signal recording. An initial bandpass filter was set to 0.5–75 Hz. We used a revised version of an established protocol ([[https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline|Makoto Pipeline]]) for preprocessing compatible with EEGLAB (Delorme and Makeig, 2004). This protocol removes flatline channels (maximum tolerated flatline duration: 8 s), low-frequency drifts, noisy channels (defined as more than 5 standard deviations from the average channel signal), large amplitude artifacts, and incomplete segments of data (Jung et al., 2000; Hipp and Siegel, 2013). Deleted channels were replaced with interpolated data from surrounding electrodes. Continuous signals were divided into epochs, time-locked to stimulus onset (∼1–3 s). Data epochs were cleaned with an amplitude threshold of −500 to 500µV to exclude eye blinks. The resulting data were referenced to the average of all electrodes. As a final preprocessing step, independent component analysis (ICA) was performed to identify eye-blink artifacts and remove their contribution to the data. We confirm that gamma bursts are not present due to eye movement by plotting the spectrograms from the EOG channels. === Instructions to run preprocessing on 7T EEG data=== Please refer to the [[https://github.com/LabNeuroCogDevel/7T_EEG/tree/main/Functions/preprocessing | LNCD Github Repository]] \\ Note: you need the hera function for the pipeline to run * run_preprocessing_pipeline.m * remark.m function pulls the raw data from the database and remarks the trigger vales to single digits corresponding to the appropriate epoch * preprocessing_pipeline.m * Loads in the desired subject * Loads in the file containing the coordinates of the cap electrodes * Checks to see if the subject has already been preprocessed. If yes, skips and moves on to the next * file_locs.m will load in all the path and file names * References the data to the electrodes corresponding to the mastoids * Filters out the data below 0.5 Hz (low frequency drifts) and 70 Hz * Resample the data to 150 Hz (all tasks besides SNR) or 512 Hz (for SNR task) * Removes external channels * Imports channel coordinates into the EEG file * Bad channel rejection * See clean_rawdata.m EEGLAB plugin * Interpolate missing channels * See pop_interp.m * Reference data to average for ICA * runICAs for eye movement * Remove bad epochs via epochclean.m * Uses pop_epoch.m * Move channel locations if subject used a 128 channel cap so that the coordinates are the same as the 64 channel cap * See homogenizeChanLoc.m * Filter out the 60 Hz artifact \\ ==== Historical ==== * Initial pipeline help from Alethia in ''/Volumes/Hera/Projects/7TBrainMech/scripts/eeg/Alethia'' * Taken over by Shane ''/Volumes/Hera/Projects/7TBrainMech/scripts/eeg/Shane'' ====Backlinks ==== {{backlinks>.}}