===== Merge 7T EEG ===== EEG summary statistics are most appropriately organized by rows of visit+channel, unlikely rows of solely visit in the more general wide-format [[grants:7t:data|merge7T]]. To avoid adding 64 columns per eeg measure and make pivoting a nightmare, 7TEEG exists in it's own longer format file: /Volumes/Hera/Projects/7TBrainMech/scripts/eeg/merge7tEEG.csv The code to combine all the files is along side the csv as ''merge7TEEG.R'' and also mirrored on github @ [[https://github.com/LabNeuroCogDevel/7TBrainMech_scripts/tree/master/eeg|7TBrainMech_scripts/eeg]] and includes a less detailed readme file. Merge 7T EEG combines all EEG data from the 7T grant on a per channel level. Thus far it is incorporating the spectral event data, FOOOF data, and SNR. Those files can be found in the following locations within ''/Volumes/Hera/Projects/7TBrainMech/scripts/eeg/Shane/Results/'' | spectral events | ''Spectral_Analysis/Spectral_events_analysis/GammaSpectralEvents_DelayandFix_channelLevel_merge7tEEG_20231110.csv''| | fooof | ''FOOOF/allSubjectsAllChannelsFooofMeasures_20230911.csv'' | | SNR | ''SNR/allSubjectsSNR.csv''| === Information about each task === * Spectral Events * Run on the delay and fixation epochs from the MGS task * Only delay has longitudinal * The trials are outlier detected for bad trials, based on 2 SDs, and then aggregated together for every channel. This is done in ''/Volumes/Hera/Projects/7TBrainMech/scripts/eeg/Shane/Rscripts/attic/DFforMerge_longSpectralEvents.R'' * The channel level data is then outlier detected in ''merge7TEEG.R'' for each subject using 2 SDs * See [[tools:spectralevents|Spectral Event Pipeline]] * FOOOF * Run during resting state * Has a eyes open and eyes closed condition * FOOOF is computed on the trial averaged data so there is no outlier detection on the individual trials * The channels are outliter detected in ''merge7TEEG.R'' for each subject using 2 SDs * See [[tools:fooof|FOOOF]] * SNR * Run during the auditory steady state task during the 40Hz condition * Matlab calculates all the SNR measures and creates an individual file for every subject * These files are taken into ''CombineSubjectDataframes.R'' which creates the ''SNR/allSubjectsSNR.csv'' that is fed into Merge7tEEG * Note: The data deals with averaged trials and therefore there is no outlier detection on the trial level * The channels are outliter detected in ''merge7TEEG.R'' for each subject using 2 SDs * See [[tools:snr|Signal to Noise Ratio (SNR)]] \\ === Included Data === * labels: channel labels * Channel information * theta, radius: cylindrical coordinates of the electrode * X, Y, Z: cartesian coordinates of the electrode * sph_theta, sph_phi, sph_radius: spherical coordinates of the electrode * ref: average, what the electrodes measures are references to. In this case, the average * Region: brain region percentages that correspond to the electrode * BA: corresponding brodmann area * SNR Measures * ERSP: Event Related Spectral Perturbation (i.e. evoked activity) * ITC: Intertrial Coherence (reflects the temporal and spatial synchronization) * Baseline Power: the power of the baseline period * Induced: induced or spontaneous activity * Spectral Event Measures * Gamma_Trial_Power_Delay, Gamma_Trial_Power_Fix: the average trial power for the gamma band in the delay or fixation epoch * Gamma_Event_Number_Delay, Gamma_Event_Number_Fix: the average number of events in the gamma band in the delay or fixation epoch * Gamma_Event_Duration_Delay, Gamma_Event_Duration_Fix: the average duration of events in the gamma band in the delay or fixation epoch * Gamma_Trial_Power_sd_Delay, Gamma_Trial_Power_sd_Fix: trial variability for trial power for the gamma band in the delay or fixation epoch * Gamma_Event_Number_sd_Delay, Gamma_Event_Number_sd_Fix: trial variability for number of events in the gamma band in the delay or fixation epoch * Gamma_Event_Duration_sd_Delay, Gamma_Event_Duration_sd_Fix: trial variability duration of events in the gamma band in the delay or fixation epoch * FOOOF Mesures * Offset_eyesClosed: aperiodic offset during the eyes closed condition * Offset_eyesOpen: aperiodic offset during the eyes open condition * Exponent_eyesClosed: aperiodic exponent during the eyes closed condition * Exponent_eyesOpen: aperiodic exponent during the eyes open condition