mne.time_frequency.csd_multitaper#
- mne.time_frequency.csd_multitaper(epochs, fmin=0, fmax=inf, tmin=None, tmax=None, picks=None, n_fft=None, bandwidth=None, adaptive=False, low_bias=True, projs=None, n_jobs=None, *, verbose=None)[source]#
Estimate cross-spectral density from epochs using a multitaper method.
- Parameters:
- epochsinstance of
Epochs
The epochs to compute the CSD for.
- fmin
float
|None
Minimum frequency of interest, in Hertz.
- fmax
float
|numpy.inf
Maximum frequency of interest, in Hertz.
- tmin
float
Minimum time instant to consider, in seconds. If
None
start at first sample.- tmax
float
|None
Maximum time instant to consider, in seconds. If
None
end at last sample.- picks
str
| array_like |slice
|None
Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g.,
['meg', 'eeg']
) will pick channels of those types, channel name strings (e.g.,['MEG0111', 'MEG2623']
will pick the given channels. Can also be the string values'all'
to pick all channels, or'data'
to pick data channels. None (default) will pick good data channels (excluding reference MEG channels). Note that channels ininfo['bads']
will be included if their names or indices are explicitly provided.- n_fft
int
|None
Length of the FFT. If
None
, the exact number of samples betweentmin
andtmax
will be used.- bandwidth
float
|None
The bandwidth of the multitaper windowing function in Hz.
- adaptivebool
Use adaptive weights to combine the tapered spectra into PSD.
- low_biasbool
Only use tapers with more than 90% spectral concentration within bandwidth.
- projs
list
ofProjection
|None
List of projectors to store in the CSD object. Defaults to
None
, which means the projectors defined in the Epochs object will by copied.- n_jobs
int
|None
The number of jobs to run in parallel. If
-1
, it is set to the number of CPU cores. Requires thejoblib
package.None
(default) is a marker for ‘unset’ that will be interpreted asn_jobs=1
(sequential execution) unless the call is performed under ajoblib.parallel_config
context manager that sets another value forn_jobs
.- verbosebool |
str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- epochsinstance of
- Returns:
- csdinstance of
CrossSpectralDensity
The computed cross-spectral density.
- csdinstance of
Examples using mne.time_frequency.csd_multitaper
#
Compute a cross-spectral density (CSD) matrix