Compute Time-Frequency Representation (TFR) using Morlet wavelets. Same computation as `~mne.time_frequency.tfr_morlet`, but operates on :class:`NumPy arrays ` instead of `~mne.Epochs` objects. Parameters ---------- data : array of shape (n_epochs, n_channels, n_
(
data,
sfreq,
freqs,
n_cycles=7.0,
zero_mean=True,
use_fft=True,
decim=1,
output="complex",
n_jobs=None,
*,
verbose=None,
)
| 943 | |
| 944 | @verbose |
| 945 | def tfr_array_morlet( |
| 946 | data, |
| 947 | sfreq, |
| 948 | freqs, |
| 949 | n_cycles=7.0, |
| 950 | zero_mean=True, |
| 951 | use_fft=True, |
| 952 | decim=1, |
| 953 | output="complex", |
| 954 | n_jobs=None, |
| 955 | *, |
| 956 | verbose=None, |
| 957 | ): |
| 958 | """Compute Time-Frequency Representation (TFR) using Morlet wavelets. |
| 959 | |
| 960 | Same computation as `~mne.time_frequency.tfr_morlet`, but operates on |
| 961 | :class:`NumPy arrays <numpy.ndarray>` instead of `~mne.Epochs` objects. |
| 962 | |
| 963 | Parameters |
| 964 | ---------- |
| 965 | data : array of shape (n_epochs, n_channels, n_times) |
| 966 | The epochs. |
| 967 | sfreq : float | int |
| 968 | Sampling frequency of the data. |
| 969 | %(freqs_tfr_array)s |
| 970 | %(n_cycles_tfr)s |
| 971 | zero_mean : bool | None |
| 972 | If True, make sure the wavelets have a mean of zero. default False. |
| 973 | |
| 974 | .. versionchanged:: 1.8 |
| 975 | The default will change from ``zero_mean=False`` in 1.6 to ``True`` in |
| 976 | 1.8. |
| 977 | |
| 978 | use_fft : bool |
| 979 | Use the FFT for convolutions or not. default True. |
| 980 | %(decim_tfr)s |
| 981 | output : str, default ``'complex'`` |
| 982 | |
| 983 | * ``'complex'`` : single trial complex. |
| 984 | * ``'power'`` : single trial power. |
| 985 | * ``'phase'`` : single trial phase. |
| 986 | * ``'avg_power'`` : average of single trial power. |
| 987 | * ``'itc'`` : inter-trial coherence. |
| 988 | * ``'avg_power_itc'`` : average of single trial power and inter-trial |
| 989 | coherence across trials. |
| 990 | %(n_jobs)s |
| 991 | The number of epochs to process at the same time. The parallelization |
| 992 | is implemented across channels. Default 1. |
| 993 | %(verbose)s |
| 994 | |
| 995 | Returns |
| 996 | ------- |
| 997 | out : array |
| 998 | Time frequency transform of ``data``. |
| 999 | |
| 1000 | - if ``output in ('complex', 'phase', 'power')``, array of shape |
| 1001 | ``(n_epochs, n_chans, n_freqs, n_times)`` |
| 1002 | - else, array of shape ``(n_chans, n_freqs, n_times)`` |
no test coverage detected