This repository contains all scripts developed for the analysis of Magnetoencephalography (MEG) data for Duecker et al., 2021, J Neurosci.
- (a1) semi-automatic artefact rejection
- (a2) Independent Component analysis & component suppression
- (a3) estimating source models and leadfield matrix for Linearly Constrained Minimum Variance (LCMV) beamformer (van Veen et al., 1997)
- (c) separate cleaned data into conditions (tagging frequencies) based on signal in photodiode
- (e) Identify individual gamma frequency: Time-Frequency analysis of power for the moving grating (without flicker) interval
- (f) Gamma oscillations and flicker response: Time-Frequency analysis of power for all trials in flicker&grating (in code "entrainment") condtion
- (g) Response to invisible flicker: TF analysis of power for all trials in flicker (in code "resonance") condition
-
(h) time frequency analysis of coherence between MEG sensors of interest and photodiode signal
-
(i) plot average power and coherence as a function of frequency for both conditions
- (k1) estimate spatial filter based on the covariance matrix over all data (including all conditions)
- (k2) project flicker response and gamma oscillations into source space (40,000 virtual channels are broken up into small subsets)
- (k3) concatenate subsets of virtual channels & plot results
- (k4) project flicker&grating interval into source space and contrast to grating only interval to isolate flicker response
- (n) calculate phase difference between MEG sensors and photodiode
- (n2) algorithm to find plateaus
- statistics: ANOVA on power at IGF before and during flicker, for flicker frequencies above and below IGF
- Linear Model fit to power and coherence as a function of frequency
- PCA_MNI: principal component analysis of peak MNI coordinates of gamma oscillations and flicker response in conditions "flicker" and "flicker&grating"; comparison of coordinates along first principal component