This documentation is for development version 0.18.dev0.

# mne.beamformer.tf_dics¶

mne.beamformer.tf_dics(epochs, forward, noise_csds, tmin, tmax, tstep, win_lengths, subtract_evoked=False, mode='fourier', freq_bins=None, frequencies=None, n_ffts=None, mt_bandwidths=None, mt_adaptive=False, mt_low_bias=True, cwt_n_cycles=7, decim=1, 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]

5D time-frequency beamforming based on DICS.

Calculate source power in time-frequency windows using a spatial filter based on the Dynamic Imaging of Coherent Sources (DICS) beamforming approach [1]. For each time window and frequency bin combination, cross-spectral density (CSD) is computed and used to create a DICS beamformer spatial filter.

Parameters: epochs : Epochs Single trial epochs. forward : dict Forward operator. noise_csds : list of instances of CrossSpectralDensity | None Noise cross-spectral density for each frequency bin. If these are specified, the DICS filters will be applied to both the signal and noise CSDs. The source power estimates for each frequency bin will be scaled by the estimated noise power (signal / noise). Specifying None will disable performing noise normalization. tmin : float Minimum time instant to consider. tmax : float Maximum time instant to consider. tstep : float Spacing between consecutive time windows, should be smaller than or equal to the shortest time window length. win_lengths : list of float Time window lengths in seconds. One time window length should be provided for each frequency bin. subtract_evoked : bool If True, subtract the averaged evoked response prior to computing the tf source grid. Defaults to False. mode : ‘fourier’ | ‘multitaper’ | ‘cwt_morlet’ Spectrum estimation mode. Defaults to ‘fourier’. freq_bins : list of tuple of float Start and end point of frequency bins of interest. Only used in ‘multitaper’ or ‘fourier’ mode. For ‘cwt_morlet’ mode, use the frequencies parameter instead. frequencies : list of float | list of list of float The frequencies to compute the source power for. If you want to compute the average power for multiple frequency bins, specify a list of lists: each list containing the frequencies for the corresponding bin. Only used in ‘cwt_morlet’ mode. In other modes, use the freq_bins parameter instead. n_ffts : list | None Length of the FFT for each frequency bin. If None (the default), the exact number of samples between tmin and tmax will be used. Only used in ‘multitaper’ or ‘fourier’ mode. mt_bandwidths : list of float The bandwidths of the multitaper windowing function in Hz. Only used in ‘multitaper’ mode. One value should be provided for each frequency bin. Defaults to None. mt_adaptive : bool Use adaptive weights to combine the tapered spectra into CSD. Only used in ‘multitaper’ mode. Defaults to False. mt_low_bias : bool Only use tapers with more than 90{‘verbose’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more).’, ‘verbose_meth’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more). Defaults to self.verbose.’, ‘picks_header’: ‘picks : str | list | slice | None’, ‘picks_base’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick ‘, ‘picks_all’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all channels.’, ‘picks_all_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels.’, ‘picks_all_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels(excluding reference MEG channels).’, ‘picks_good_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels.’, ‘picks_good_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels(excluding reference MEG channels).’, ‘picks_nostr’: ‘n picks : list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. None (default) will pick all channels.’}pectral concentration within bandwidth. Only used in ‘multitaper’ mode. Defaults to True. cwt_n_cycles: float | list of float | None Number of cycles to use when constructing Morlet wavelets. Fixed number or one per frequency. Defaults to 7. Only used in ‘cwt_morlet’ mode. decim : int | slice To reduce memory usage, decimation factor during time-frequency decomposition. Defaults to 1 (no decimation). Only used in ‘cwt_morlet’ mode. If int, uses tfr[…, ::decim]. If slice, uses tfr[…, decim]. reg : float Regularization to use for the DICS beamformer computation. Defaults to 0.05. label : Label | None Restricts the solution to a given label. Defaults to None. pick_ori : None | ‘normal’ | ‘max-power’ The source orientation to estimate source power 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. Defaults to None. rank : None | 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 Notes of make_dics(). Defaults to ‘single’. weight_norm : None | ‘unit-noise-gain’ How to normalize the beamformer weights. None means no normalization is performed. If ‘unit-noise-gain’, the unit-noise gain minimum variance beamformer will be computed (Borgiotti-Kaplan beamformer) [2]. Defaults to None. normalize_fwd : bool Whether to normalize the forward solution. Defaults to True. Note that this normalization is not required when weight normalization (weight_norm) is used. real_filter : bool If True, take only the real part of the cross-spectral-density matrices to compute real filters. Defaults to False. reduce_rank : bool If True, the rank of the forward operator will be reduced by 1 for each spatial location, prior to inversion. This may be necessary when you use a single sphere model for MEG and mode='vertex'. Defaults to False. verbose : bool, str, int, or None If not None, override default verbose level (see mne.verbose() and Logging documentation for more). stcs : list of SourceEstimate | VolSourceEstimate Source power at each time window. One SourceEstimate object is returned for each frequency bin.

Notes

Dalal et al. [1] used a synthetic aperture magnetometry beamformer (SAM) in each time-frequency window instead of DICS.

An alternative to using noise CSDs is to normalize the forward solution (normalize_fwd) or the beamformer weights (weight_norm). In this case, noise_csds may be set to None.

References

 [1] (1, 2, 3) Dalal et al. Five-dimensional neuroimaging: Localization of the time-frequency dynamics of cortical activity. NeuroImage (2008) vol. 40 (4) pp. 1686-1700
 [2] (1, 2) Sekihara & Nagarajan. Adaptive spatial filters for electromagnetic brain imaging (2008) Springer Science & Business Media