= Beamforming methods = ''Authors: Hui-Ling Chan, Francois Tadel, Sylvain Baillet'' The estimation of source distribution is an important step to understand the brain activity from EEG and MEG data. Dipole fitting, minimum norm estimation and beamformer are three commonly used methods. It has been proved that beamforming methods provide good spatial resolution. This tutorial will show how to apply beamforming methods to MEG data and obtain the statistic map of source activation. We are going to use the protocol '''!TutorialRaw''' created in the [[http://neuroimage.usc.edu/brainstorm/Tutorials#Processing_continuous_recordings|introduction tutorials]]. If you have not followed these tutorials yet, please do it now. <> == Introduction == Beamforming methods scan each targeted source position <> and estimate the spatial filter <>. By multiplying with the MEG recordings <>, the spatial filter <> outputs the temporal waveform <> of the dipole source at that position with the dipole orientation <> as below: <> where 'T' indicates the transpose of a matrix or vector. The beamforming spatial filter can be vector-type or scalar-type. ==== Vector-type beamformer ==== For each position <>, three orthogonal spatial filters <> are computed by applying the unit-gain constraint as well as the minimum norm and minimum variance criteria as below [Van Veen et al., 1997]: <> where <> is the covariance matrix of MEG recordings during window <>, <> is the identity matrix, <> is the gain matrix for the dipole located at position <>, and <> is the regularization parameter which compromises the minimum norm and minimum variance criteria. ==== Scalar-type beamformer ==== For each position <>, the source orientation <> is first estimated to enable the spatial filter to output the source activity with maximum power or fitting some other criteria. The dipole orientation can be obtained by exhaustive search [Vrba and Robinson, 2000] or analytical solution [Chen et al., 2006]. The estimated dipole orientation <> is then applied to calculate the spatial filter as follows [Vrba and Robinson, 2000]: <> == LCMV beamformer == LCMV stands for '''linearly-constrained minimum variance'''. LCMV beamformer is vector-type beamformer. For each position <>, this method calculates the neural activity index, which is interpreted as the estimate of source to noise variance. ==== Neural activity index ==== For each position <>, the variance of source activity during active state <> is calculated as follows: <> or <> where <> is the covariance matrix computed from MEG recordings during active state <> and <> indicates the maximum eigenvalue of the expression in braces. When the location <> is far from sensors, the elements of lead field matrix <> are small. So the elements of <> are generally large and the estimated variance for the deep source becomes large. When the location <> is close to sensors, the elements of lead field matrix <> are large. It results in small values of the elements of <> and small estimated variance for the superficial source. To reduce the effect caused by the depth of source location, the estimated source variance <> is normalized by the noise variance <> as follows: <> or <> where <> is the covariance matrix computed from MEG recordings during control state <>. The normalized variance <> is called neural activity index (NAI). ==== LCMV process ==== 1. Drag and drop all of the epochs in ''Subject01 / right / right | timeoffset (98 files)'' into ''Process1''. . 1. Click on [RUN] and select the process "'''Sources > LCMV Beamformer'''".<
><
>''' {{attachment:LCMVmaxeig.png}} ''' <
> <
> 1. With this window you can select the method you want to use to estimate the source variance and noise variance, the time window of active state, the regularization parameter, and the sensors you are going to use for this estimation. You can edit the following options:<
> <
> * '''Comment''': This field contains what is going to be displayed in the database explorer. * '''Method''': Please select ''Unconstrained (max eigenvalue)'' or ''Unconstrained (trace)''. The method ''Unconstrained (max eigenvalue) ''calculates the variances of source activity and noise by using the maximum eigenvalue. The method ''Unconstrained (trace)'' calculates the variances of source activity and noise by using trace. The method ''Cortial Constrained'' use the orientation of cortical surface as dipole orientation. Note that the method'' Cortial Constrained ''is only available when the Head Model provides the orientation for each grid location. The unconstrained methods may give more smooth results than the cortical constrained method. * '''Time window of active state''': Three parameters have to be set: ''Time range of interest'','' Active window size'', and ''Temporal resolution''. The neural activity index is computed using the variance of source activity during active state <>. ''Active window size'' defines the duration of active state. Large active window size (at least larger than the number of sensors) is recommended. The time window of active state is going to be slided in ''Time range of interest'' with the interval set to be ''Temporal resolution''. If there are multiple active state windows, the time label of the neural activity index will be set as the middle time of each active state window, that is, <> in the following figure. <
><
>''' {{attachment:slidingwindow.png||height="219",width="437"}} '''<
><
>''' ''' * '''Regularization parameter''':''' '''This value will be multiplied with the maximum eigenvalue of the covariance matrix computed from the recordings during ''Time range of interest''. The larger value of regularization parameter may give the more smooth results. * '''Sensors type''': Modalities that are used for the reconstruction. Here we only have one type of MEG sensors, so nothing to change. * Click on ''Run''. 1. Two new files are available in the database explorer.<
> <
>''' ''' * '''right: LCMV: spatial filter(Unconstr)|0.0_295.8ms''': This file saves the three orthogonal spatial filters for each dipole position. These spatial filters are normalized by the variance of noise. Note that there is one spatial filter for each dipole location if the method'' Cortically Constrained ''is used. <
><
>''' {{attachment:SpatialFilterright.png}} ''' <
><
>''' ''' * '''right: LCMV: neural activity index(Unconstr)|0.0_295.8ms''': This file saves the neural activity index for every dipole position. <
><
>''' {{attachment:NAIright2.png}} '''<
> <
> Double click on this file. Right click on anywhere of the pop-out window. From the pop-out menu, select ''Colormap:Sources > Maximum: Custom...''. Set ''Minimum'' to be '''1.2''' and ''Maximum'' to be '''2.0'''. Click ''Ok''. <
> <
>''' {{attachment:Colormaplimit.png}} ''' <
> <
> Set the time to be anytime between 0 and 295.8 ms. Then click ''Surface'' tab on the right panel of database explorer. Set ''Data options > Amplitude'' to be '''50%'''. <
><
>''' ''' {{attachment:NAIrightUnconstrained.png}} <
><
>The maps of neural activity index estimated using ''Unconstrained (trace)'' and ''Unconstrained (max eigenvalue)'' are shown in the left and right figures, respectively. Both maps display strong activations in the left sensory area.<
><
>''' ''' == Maximum constrast beamformer (MCB) == Maximum constrast beamformer (MCB) is scalar-type beamformer. For each position <>, it provides an analytical solution of dipole orientation <>, which maximizes the constrast of beamformer outputs between active state and control state as bellow: <> where <> is the covariance matrix computed from the measurements during active state and <> is the covariance matrix computed from the measurements during control state. ==== Solution of dipole orientation ==== The solution of spatial filter can be rewritten as <> where both <> and <> depend only on the dipole location <>. Then the objective function for obtaining the dipole orientation <> can be rewritten as <> where both of the 3-by-3 matrices <> and <> does not depend on the dipole orientation <>. The solution of dipole orientation <> is the eigenvector corresponding to the maximum eigenvalue of the matrix <>. ==== Statistical mapping ==== After obtaining the dipole orientation <> and the spatial filter <> for dipole position <>, the F-statistic value at time <> can be obtained using the following formula: <> where <> is the covariance matrix computed from the measurements during window <>, <> is the size of <>, and the range of <> is <> . <> is a segment of active state <>. If the number of <> is small, the peak of temporal dynamics of F-statistic value may shift. In this case, it is more appropriate to replace the covariance matrix <> with <> or <> where <> represetns the window of baseline and its size is <>. When <> is used, the F-statistic value represents the estimate of source power to noise variance. ==== MCB process ==== 1. Drag and drop all of the epochs in ''Subject01 / right / right | timeoffset (98 files)'' into ''Process1''. 1. Click on [RUN] and select the process "'''Sources > Maximum Contrast Beamformer'''". 1. With this window you can select the dipole orientation you want to use, the time window of active state, the window size you are going to use for F-statistics computation, the regularization parameter, and the sensors you are going to use for this estimation. You can edit the following options:<
> <
> * '''Comment''': This field contains what is going to be displayed in the database explorer. * '''Dipole orientation''': Please select ''Unconstrained'', which calculates the dipole orientation using the maximum constrast criterion. The method ''Cortial Constrained'' use the orientation of cortical surface as dipole orientation. Note that the method'' Cortial Constrained ''is only available when the Head Model provides the orientation for each grid location. The unconstrained methods may give more smooth results than the cortical constrained method. * '''Time windows''': Three parameters have to be set: ''Time range of active window'','' F statistic window size'', and ''Temporal resolution''. The dipole orientation and spatial filter is estimated using the variance of source activity during active state <>. ''F statistic window size'' defines the length of the window for F-statistic computation, that is, <>. The time window for computing F statistics is going to be slided in ''Time range of active state'' with the interval set to be ''Temporal resolution''. If there are more than one F statistic windows, the time label of the F statistics will be set as the middle time of each window, that is, <> in the following figure. ''' '''<
><
>''' ''' * '''Regularization parameter''':''' '''This value will be multiplied with the maximum eigenvalue of the covariance matrix computed from the recordings during ''Time range of interest''. The larger value of regularization parameter may give the more smooth results. * '''Sensors type''': Modalities that are used for the reconstruction. Here we only have one type of MEG sensors, so nothing to change. * '''Method for F statistic computation''': Modalities that are used for the reconstruction. Here we only have one type of MEG sensors, so nothing to change. * Click on ''Run''. 1. Two new files are available in the database explorer.<
> <
> == Beamformer-based correlation/coherence imaging == ==== Dynamic imaging of coherent sources (DICS) ==== [Under construction]''' ''' ==== Spatiotemporal imaging of linearly-related source components (SILSC) ==== [Under construction]''' ''' == References == 1. Van Veen BD, Van Drongelen W, Yuchtman M, Suzuki A (1997)<
>[[http://www.ncbi.nlm.nih.gov/pubmed/9282479|Localization of brain electrical activity via linearly constrained minimum variance spatial filtering]]<
>IEEE Transactions on Biomedical Engineering 44(9): 867-880. 1. Vrba J, Robinson SE (2000)<
>Differences between synthetic aperture magnetometry (SAM) and linear beamformers<
> Biomag 2000: 681-684. 1. Chen YS, Cheng CY, Hsieh JC, Chen LF (2006)<
>[[http://www.ncbi.nlm.nih.gov/pubmed/16941832|Maximum contrast beamformer for electromagnetic mapping of brain activity]]<
>IEEE Transactions on Biomedical Engineering 53(9): 1765-1774. == Feedback == <>