Source Analysis (Minimum Norm Estimate).
While EEGs can provide high temporal resolution, they are limited in the spatial domain. The basic goal of all source localization methods with EEG is to use measurements on a scalp to determine dipolar source locations and strengths inside the brain. There are two broad categories of source localization methods: current density estimates and beamformers. Below we discuss a few common source localization methods that could be used within each category. However we only describe in detail how to use the Minimum Norm Estimate, which is the specific source method that we used.
While EEGs can provide high temporal resolution, they are limited in the spatial domain. The basic goal of all source localization methods with EEG is to use measurements on a scalp to determine dipolar source locations and strengths inside the brain. There are two broad categories of source localization methods: current density estimates and beamformers. Below are a few common source localization methods that could be used within each category.
Current Density Estimates:
Least-squares minimum norm estimate (MNE): MNE is favored for analyzing evoked responses and for tracking the wide-spread activation over time.
Dynamical statistical parametric mapping (dSPM): Uses minimum-norm inverse maps weighted by estimates of noise at that location. The noise is obtained by applying the inverse operator to the signal covariance matrix. dSPM can localize deeper sources more accurately than standard minimum norm procedures, but the spatial resolution remains low.
Low resolution brain electromagnetic tomography (LORETA): Also uses minimum-norm inverse maps weighted by estimates of noise, however the noise is obtained by using the diagonals of the model resolution matrix.
Beamformers:
Linear constrained minimum variance (LCMV): in the time domain
Dynamic imaging of coherent sources (DICS): in the frequency domain
We describe the minimum norm estimate because it is typically used to localize evoked data. Furthermore it is more robust when compared to other source localization methods without any a-priori information. To perform the source localization, we need a head model that is created using an fMRI scan. Because fMRIs were not conducted for the participants in our study, a template MRI was used to calculate a head model using the “forward solution”. The MRI was obtained from the fieldtrip templates folder. The EEG electrode location file was adjusted to fit the head model created and the EEG data was used to construct a noise covariance matrix. The noise covariance matrix, epoched EEG data, and head model were used together to get the “inverse solution”, or source activity using the minimum norm estimate. The source data is then averaged across conditions and subjects and visualized within each stable microstate.
Specification | Description | Selected Value |
---|---|---|
MRI | Need a template MRI for the source analysis from fieldtrip. You can find this in the template folder for fieldtrip. Alternatively, it may be included in your subject | ‘standard_mri’ |
cfg.method | Method of source analysis used | 'mne' |
cfg.mne.scalesourcecov | Scale the source covariance matrix. | ‘yes’ |
cfg.grid | The grid specifies the forward model that was created. | ‘leadfield’ or whatever you named the forward model |
cfg.lambda | A regularization parameter. | 3 |
In order to get started you will need to download the Fieldtrip toolbox, get your data into a format in which fieldtrip can read the data and then run the following code:
load('Subject01_sourcemodel_15684.mat') load('vol.mat') load('elec_new.mat') load('Subject01_leadfield.mat') addpath('.../MATLAB/fieldtrip-20191028/'); ft_defaults parentfolder = 'where_ERP_files_are_located/'; savefolder = 'where_source_data_is_saved/'; fileList= dir(fullfile(parentfolder, '*.mat')); fileList(1)= [] for n = 1:length(fileList) load([parentfolder fileList(n).name]); ERPfile.elec = elec_new; cfg = []; cfg.method = 'mne'; cfg.grid = leadfield; cfg.headmodel = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 3; cfg.mne.scalesourcecov = 'yes'; sourceFC = ft_sourceanalysis(cfg,ERPfile); savename = [savefolder fileList(n).name] save(savename, 'sourceFC'); end
Averaging the source files can be done using the following script:
ft_defaults parentfolder = '/where_interpolated_source_files_are_located/' FieldtripERPdir = 'where_the_Grandaveraged_sourcedata_is_outputted/' fileList= dir(fullfile(parentfolder, '*.mat')); ni=1; for n = 1:length(fileList) FileListNew(ni).name = fileList(n).name; FileListNew(ni).bin = extractBefore(extractAfter(fileList(n).name,'bin'),'.mat'); ni=1+ni; end FileListNew(1)=[] for i = 1:4 cfg = []; cfg.keepindividual = 'yes'; avPowspectrmList = {1,length(FileListNew)}; bi=1; BinNumbers = {'1' '2' '4' '5'}; binnum= char(BinNumbers(i)); subjbin = char(FileListNew(subject).bin); if isequal(subjbin, binnum) avPowspectrmList{1,bi} = FileListNew(subject).name; bi = bi +1; end end cd(parentfolder); cfg.inputfile = avPowspectrmList; cfg.parameter = 'avg.pow'; [avgERP] = ft_sourcegrandaverage(cfg); saveName= [FieldtripERPdir 'avgsource' binnum '.mat']; save(saveName, 'avgERP', '-v7.3'); clear avgERP end
In order to plot contrasts of the averaged sources, you can use the following code. A picture below shows a screenshot of the output from the code
c1.tri = leadfield.tri; c2.tri = leadfield.tri; cfg = []; cfg.projectmom = 'yes'; sdC1 = ft_sourcedescriptives(cfg, c1); sdC2 = ft_sourcedescriptives(cfg, c2); sdDIFF = c2; sdDIFF.pow = c1.pow-c2.pow cfg = []; cfg.funparameter = 'pow'; ft_sourcemovie(cfg,sdDIFF); cfg = []; cfg.method = 'slice'; cfg.funparameter = 'pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0.0 1.2]; cfg.opacitylim = [0.0 1.2]; cfg.opacitymap = 'rampup'; ft_sourceplot(cfg, sourceDiffInt);
Once you have this data you can take get images at various orientations and time points of interest and put them together to present your results as below: