Skip to main content
`Ctrl`+`K`
scipy.signal.ShortTimeFFT.

# scipy.signal.ShortTimeFFT.fft_mode

property ShortTimeFFT.fft_mode

  Mode of utilized FFT (‘twosided’, ‘centered’, ‘onesided’ or ‘onesided2X’).

  It can have the following values:

  ‘twosided’:

    Two-sided FFT, where values for the negative frequencies are in upper half of the array. Corresponds to `fft`.

  ‘centered’:

    Two-sided FFT with the values being ordered along monotonically increasing frequencies. Corresponds to applying `fftshift` to `fft`.

  ‘onesided’:

    Calculates only values for non-negative frequency values. Corresponds to `rfft`.

  ‘onesided2X’:

    Like onesided, but the non-zero frequencies are doubled if `scaling` is set to ‘magnitude’ or multiplied by `sqrt(2)` if set to ‘psd’. If `scaling` is `None`, setting `fft_mode` to onesided2X is not allowed. If the FFT length `mfft` is even, the last FFT value is not paired, and thus it is not scaled.

  Note that onesided and onesided2X do not work for complex-valued signals or complex-valued windows. Furthermore, the frequency values can be obtained by reading the `f` property, and the number of samples by accessing the `f_pts` property.

  See also

  `delta_f`

    Width of the frequency bins of the STFT.

  `f`

    Frequencies values of the STFT.

  `f_pts`

    Width of the frequency bins of the STFT.

  `onesided_fft`

    True if a one-sided FFT is used.

  `scaling`

    Normalization applied to the window function

  `ShortTimeFFT`

    Class this property belongs to.