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.

x : 2d array of size n_signals x T

containing multi-channels signal

wsize : int

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

tstep : int

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

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

X : 3d array of shape [n_signals, wsize / 2 + 1, n_step]

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

See also

istft, stftfreq


X = stft(x, wsize) X = stft(x, wsize, tstep)