# mne.beamformer.make_dics¶

mne.beamformer.make_dics(info, forward, csd, reg=0.05, label=None, pick_ori=None, rank=None, inversion='single', weight_norm=None, normalize_fwd=True, real_filter=False, reduce_rank=False, verbose=None)[source]

Compute a Dynamic Imaging of Coherent Sources (DICS) spatial filter.

This is a beamformer filter that can be used to estimate the source power at a specific frequency range 1. It does this by constructing a spatial filter for each source point. The computation of these filters is very similar to those of the LCMV beamformer (make_lcmv()), but instead of operating on a covariance matrix, the CSD matrix is used. When applying these filters to a CSD matrix (see apply_dics_csd()), the source power can be estimated for each source point.

Parameters
infoinstance of Info

Measurement info, e.g. epochs.info.

forwardinstance of Forward

Forward operator.

csdinstance of CrossSpectralDensity

The data cross-spectral density (CSD) matrices. A source estimate is performed for each frequency or frequency-bin defined in the CSD object.

regfloat

The regularization to apply to the cross-spectral density before computing the inverse.

label

Restricts the solution to a given label.

pick_oriNone | ‘normal’ | ‘max-power’

The source orientation to compute the filter for:

None :

orientations are pooled (Default)

‘normal’ :

filters are computed for the orientation tangential to the cortical surface

‘max-power’ :

filters are computer for the orientation that maximizes spectral power.

rankNone | int | ‘full’

This controls the effective rank of the covariance matrix when computing the inverse. The rank can be set explicitly by specifying an integer value. If None, the rank will be automatically estimated. Since applying regularization will always make the covariance matrix full rank, the rank is estimated before regularization in this case. If ‘full’, the rank will be estimated after regularization and hence will mean using the full rank, unless reg=0 is used. The default is None.

New in version 0.17.

inversion‘single’ | ‘matrix’

This determines how the beamformer deals with source spaces in “free” orientation. Such source spaces define three orthogonal dipoles at each source point. When inversion='single', each dipole is considered as an individual source and the corresponding spatial filter is computed for each dipole separately. When inversion='matrix', all three dipoles at a source vertex are considered as a group and the spatial filters are computed jointly using a matrix inversion. While inversion='single' is more stable, inversion='matrix' is more precise. See section 5 of 2. Defaults to ‘single’.

weight_norm‘unit-noise-gain’ | ‘nai’ | None

If ‘unit-noise-gain’, the unit-noise gain minimum variance beamformer will be computed (Borgiotti-Kaplan beamformer) 3. If ‘nai’, the Neural Activity Index 4 will be computed. Defaults to None, in which case no normalization is performed.

normalize_fwdbool

Whether to normalize the forward solution. Defaults to True. Note that this normalization is not required when weight normalization (weight_norm) is used.

real_filterbool

If True, take only the real part of the cross-spectral-density matrices to compute real filters. Defaults to False.

reduce_rankbool

If True, the rank of the denominator of the beamformer formula (i.e., during pseudo-inversion) will be reduced by one for each spatial location. Setting reduce_rank=True is typically necessary if you use a single sphere model with MEG data.

Changed in version 0.20: Support for reducing rank in all modes (previously only supported pick='max_power' with weight normalization).

verbose

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns
filtersinstance of Beamformer

Dictionary containing filter weights from DICS beamformer. Contains the following keys:

‘weights’ndarray, shape (n_frequencies, n_weights)

For each frequency, the filter weights of the beamformer.

‘csd’instance of CrossSpectralDensity

The data cross-spectral density matrices used to compute the beamformer.

‘ch_names’list of str

Channels used to compute the beamformer.

‘proj’ndarray, shape (n_channels, n_channels)

Projections used to compute the beamformer.

‘vertices’list of ndarray

Vertices for which the filter weights were computed.

‘inversion’‘single’ | ‘matrix’

Whether the spatial filters were computed for each dipole separately or jointly for all dipoles at each vertex using a matrix inversion.

‘weight_norm’None | ‘unit-noise-gain’

The normalization of the weights.

‘normalize_fwd’bool

Whether the forward solution was normalized

‘n_orient’int

Number of source orientations defined in the forward model.

‘subject’str

The subject ID.

‘src_type’str

Type of source space.

Notes

The original reference is 1. See 2 for a tutorial style paper on the topic.

The DICS beamformer is very similar to the LCMV (make_lcmv()) beamformer and many of the parameters are shared. However, make_dics() and make_lcmv() currently have different defaults for these parameters, which were settled on separately through extensive practical use case testing (but not necessarily exhaustive parameter space searching), and it remains to be seen how functionally interchangeable they could be.

The default setting reproduce the DICS beamformer as described in 2:

inversion='single', weight_norm=None, normalize_fwd=True


To use the make_lcmv() defaults, use:

inversion='matrix', weight_norm='unit-gain', normalize_fwd=False


For more information about real_filter, see the supplemental information from 5.

References

1(1,2)

Joachim Groß, Jan Kujala, Matti S. Hämäläinen, Lars Timmermann, Alfons Schnitzler, and Riitta Salmelin. Dynamic imaging of coherent sources: studying neural interactions in the human brain. Proceedings of the National Academy of Sciences, 98(2):694–699, 2001. doi:10.1073/pnas.98.2.694.

2(1,2,3)

Marijn van Vliet, Mia Liljeström, Susanna Aro, Riitta Salmelin, and Jan Kujala. Analysis of functional connectivity and oscillatory power using DICS: from raw MEG data to group-level statistics in Python. bioRxiv, 2018. doi:10.1101/245530.

3

Kensuke Sekihara and Srikantan S. Nagarajan. Adaptive Spatial Filters for Electromagnetic Brain Imaging. Series in Biomedical Engineering. Springer, Berlin; Heidelberg, 2008. ISBN 978-3-540-79369-4 978-3-540-79370-0. doi:10.1007/978-3-540-79370-0.

4

Barry D. Van Veen, Wim van Drongelen, Moshe Yuchtman, and Akifumi Suzuki. Localization of brain electrical activity via linearly constrained minimum variance spatial filtering. IEEE Transactions on Biomedical Engineering, 44(9):867–880, 1997. doi:10.1109/10.623056.

5

Joerg F. Hipp, Andreas K. Engel, and Markus Siegel. Oscillatory synchronization in large-scale cortical networks predicts perception. Neuron, 69(2):387–396, 2011. doi:10.1016/j.neuron.2010.12.027.