mne.time_frequency.tfr_array_stockwell(data, sfreq, fmin=None, fmax=None, n_fft=None, width=1.0, decim=1, return_itc=False, n_jobs=None, *, verbose=None)[source]#

Compute power and intertrial coherence using Stockwell (S) transform.

Same computation as tfr_stockwell, but operates on NumPy arrays instead of Epochs objects.

See [1][2][3][4] for more information.

datandarray, shape (n_epochs, n_channels, n_times)

The signal to transform.


The sampling frequency.

fminNone, float

The minimum frequency to include. If None defaults to the minimum fft frequency greater than zero.

fmaxNone, float

The maximum frequency to include. If None defaults to the maximum fft.

n_fftint | None

The length of the windows used for FFT. If None, it defaults to the next power of 2 larger than the signal length.


The width of the Gaussian window. If < 1, increased temporal resolution, if > 1, increased frequency resolution. Defaults to 1. (classical S-Transform).

decimint | slice

Decimation factor, applied after time-frequency decomposition.

  • if int, returns tfr[..., ::decim] (keep only every Nth sample along the time axis).

  • if slice, returns tfr[..., decim] (keep only the specified slice along the time axis).


Decimation is done after convolutions and may create aliasing artifacts.


Return intertrial coherence (ITC) as well as averaged power.

n_jobsint | None

The number of jobs to run in parallel. If -1, it is set to the number of CPU cores. Requires the joblib package. None (default) is a marker for ‘unset’ that will be interpreted as n_jobs=1 (sequential execution) unless the call is performed under a joblib.parallel_config context manager that sets another value for n_jobs.

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.


The multitaper power of the Stockwell transformed data. The last two dimensions are frequency and time.


The intertrial coherence. Only returned if return_itc is True.


The frequencies.