mne.time_frequency.compute_epochs_csd

mne.time_frequency.compute_epochs_csd(epochs, mode='multitaper', fmin=0, fmax=inf, fsum=True, tmin=None, tmax=None, n_fft=None, mt_bandwidth=None, mt_adaptive=False, mt_low_bias=True, projs=None, verbose=None)

Estimate cross-spectral density from epochs

Note: Baseline correction should be used when creating the Epochs.
Otherwise the computed cross-spectral density will be inaccurate.
Note: Results are scaled by sampling frequency for compatibility with
Matlab.
Parameters:

epochs : instance of Epochs

The epochs.

mode : str

Spectrum estimation mode can be either: ‘multitaper’ or ‘fourier’.

fmin : float

Minimum frequency of interest.

fmax : float | np.inf

Maximum frequency of interest.

fsum : bool

Sum CSD values for the frequencies of interest. Summing is performed instead of averaging so that accumulated power is comparable to power in the time domain. If True, a single CSD matrix will be returned. If False, the output will be a list of CSD matrices.

tmin : float | None

Minimum time instant to consider. If None start at first sample.

tmax : float | None

Maximum time instant to consider. If None end at last sample.

n_fft : int | None

Length of the FFT. If None the exact number of samples between tmin and tmax will be used.

mt_bandwidth : float | None

The bandwidth of the multitaper windowing function in Hz. Only used in ‘multitaper’ mode.

mt_adaptive : bool

Use adaptive weights to combine the tapered spectra into PSD. Only used in ‘multitaper’ mode.

mt_low_bias : bool

Only use tapers with more than 90% spectral concentration within bandwidth. Only used in ‘multitaper’ mode.

projs : list of Projection | None

List of projectors to use in CSD calculation, or None to indicate that the projectors from the epochs should be inherited.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose).

Returns:

csd : instance of CrossSpectralDensity

The computed cross-spectral density.