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=1)[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 1234 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).


The decimation factor on the time axis. To reduce memory usage.


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


The number of jobs to run in parallel (default 1). Requires the joblib package.


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.



R. G. Stockwell. Why use the S-transform? In Luigi Rodino, Bert-Wolfgang Schulze, and M. W. Wong, editors, Pseudo-Differential Operators: Partial Differential Equations and Time-Frequency Analysis, number 52 in Fields Institute Communications, pages 279–309. American Mathematical Society, Providence, RI, 2007. doi:10.1090/fic/052.


Ali Moukadem, Zied Bouguila, Djaffar Ould Abdeslam, and Alain Dieterlen. Stockwell transform optimization applied on the detection of split in heart sounds. In Proceedings of EUSIPCO-2014, 2015–2019. Lisbon, 2014. IEEE. URL:


Katherine L. Wheat, Piers L. Cornelissen, Stephen J. Frost, and Peter C. Hansen. During visual word recognition, phonology is accessed within 100 ms and may be mediated by a speech production code: evidence from magnetoencephalography. Journal of Neuroscience, 30(15):5229–5233, 2010. doi:10.1523/JNEUROSCI.4448-09.2010.


Kevin A. Jones, Bernice Porjesz, David Chorlian, Madhavi Rangaswamy, Chella Kamarajan, Ajayan Padmanabhapillai, Arthur Stimus, and Henri Begleiter. S-transform time-frequency analysis of P300 reveals deficits in individuals diagnosed with alcoholism. Clinical Neurophysiology, 117(10):2128–2143, 2006. doi:10.1016/j.clinph.2006.02.028.

Examples using mne.time_frequency.tfr_array_stockwell