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
tofft
.- ‘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 bysqrt(2)
if set to ‘psd’. Ifscaling
isNone
, settingfft_mode
to onesided2X is not allowed. If the FFT lengthmfft
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 thef_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.