mne.time_frequency.psd_multitaper#
- mne.time_frequency.psd_multitaper(inst, fmin=0, fmax=inf, tmin=None, tmax=None, bandwidth=None, adaptive=False, low_bias=True, normalization='length', picks=None, proj=False, n_jobs=None, reject_by_annotation=False, *, verbose=None)[source]#
Warning
DEPRECATED: Function
psd_multitaper()
is deprecated; for Raw/Epochs/Evoked instances usespectrum = instance.compute_psd(method="multitaper")
instead, followed byspectrum.get_data(return_freqs=True)
.Compute the power spectral density (PSD) using multitapers.
Calculates spectral density for orthogonal tapers, then averages them together for each channel/epoch. See [1] for a description of the tapers and [2] for the general method.
- Parameters:
- instinstance of
Epochs
orRaw
orEvoked
The data for PSD calculation.
- fmin, fmax
float
The lower- and upper-bound on frequencies of interest. Default is
fmin=0, fmax=np.inf
(spans all frequencies present in the data).- tmin, tmax
float
|None
First and last times to include, in seconds.
None
uses the first or last time present in the data. Default istmin=None, tmax=None
(all times).- bandwidth
float
The bandwidth of the multi taper windowing function in Hz. The default value is a window half-bandwidth of 4.
- adaptive
bool
Use adaptive weights to combine the tapered spectra into PSD (slow, use n_jobs >> 1 to speed up computation).
- low_bias
bool
Only use tapers with more than 90% spectral concentration within bandwidth.
- normalization‘full’ | ‘length’
Normalization strategy. If “full”, the PSD will be normalized by the sampling rate as well as the length of the signal (as in Nitime). Default is
'length'
.- 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.- proj
bool
Whether to apply SSP projection vectors before spectral estimation. Default is
False
.- 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_backend()
context manager that sets another value forn_jobs
.- reject_by_annotation
bool
Whether to omit bad segments from the data before fitting. If
True
(default), annotated segments whose description begins with'bad'
are omitted. IfFalse
, no rejection based on annotations is performed.Has no effect if
inst
is not amne.io.Raw
object.- verbose
bool
|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.
- instinstance of
- Returns:
See also
Notes
New in version 0.12.0.
References
Examples using mne.time_frequency.psd_multitaper
#
The Spectrum and EpochsSpectrum classes: frequency-domain data
Frequency and time-frequency sensor analysis