mne.time_frequency.stft#

mne.time_frequency.stft(x, wsize, tstep=None, verbose=None)[source]#

STFT Short-Term Fourier Transform using a sine window.

The transformation is designed to be a tight frame that can be perfectly inverted. It only returns the positive frequencies.

Parameters
xarray, shape (n_signals, n_times)

Containing multi-channels signal.

wsizeint

Length of the STFT window in samples (must be a multiple of 4).

tstepint

Step between successive windows in samples (must be a multiple of 2, a divider of wsize and smaller than wsize/2) (default: wsize/2).

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns
Xarray, shape (n_signals, wsize // 2 + 1, n_step)

STFT coefficients for positive frequencies with n_step = ceil(T / tstep).

See also

istft
stftfreq