mne.time_frequency.tfr_morlet#
- mne.time_frequency.tfr_morlet(inst, freqs, n_cycles, use_fft=False, return_itc=True, decim=1, n_jobs=None, picks=None, zero_mean=True, average=True, output='power', verbose=None)[source]#
Compute Time-Frequency Representation (TFR) using Morlet wavelets.
Same computation as
tfr_array_morlet
, but operates onEpochs
objects instead ofNumPy arrays
.- Parameters:
- inst
Epochs
|Evoked
The epochs or evoked object.
- freqs
ndarray
, shape (n_freqs,) The frequencies in Hz.
- n_cycles
float
|ndarray
, shape (n_freqs,) The number of cycles globally or for each frequency.
- use_fft
bool
, defaultFalse
The fft based convolution or not.
- return_itc
bool
, defaultTrue
Return inter-trial coherence (ITC) as well as averaged power. Must be
False
for evoked data.- decim
int
|slice
, default 1 To reduce memory usage, decimation factor after time-frequency decomposition. If
int
, returns tfr[…, ::decim]. Ifslice
, returns tfr[…, decim].Note
Decimation may create aliasing artifacts.
- 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
.- picksarray_like of
int
|None
, defaultNone
The indices of the channels to decompose. If None, all available good data channels are decomposed.
- zero_mean
bool
, defaultTrue
Make sure the wavelet has a mean of zero.
New in version 0.13.0.
- average
bool
, defaultTrue
If
False
return anEpochsTFR
containing separate TFRs for each epoch. IfTrue
return anAverageTFR
containing the average of all TFRs across epochs.Note
Using
average=True
is functionally equivalent to usingaverage=False
followed byEpochsTFR.average()
, but is more memory efficient.New in version 0.13.0.
- output
str
Can be “power” (default) or “complex”. If “complex”, then average must be False.
New in version 0.15.0.
- 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.
- inst
- Returns:
- power
AverageTFR
|EpochsTFR
The averaged or single-trial power.
- itc
AverageTFR
|EpochsTFR
The inter-trial coherence (ITC). Only returned if return_itc is True.
- power
Examples using mne.time_frequency.tfr_morlet
#
Overview of MEG/EEG analysis with MNE-Python
Frequency and time-frequency sensor analysis
Non-parametric 1 sample cluster statistic on single trial power
Non-parametric between conditions cluster statistic on single trial power
Mass-univariate twoway repeated measures ANOVA on single trial power
Spatiotemporal permutation F-test on full sensor data
Time-frequency on simulated data (Multitaper vs. Morlet vs. Stockwell vs. Hilbert)