scale_to#
- ShortTimeFFT.scale_to(scaling)[source]#
Scale window to obtain ‘magnitude’ or ‘psd’ scaling for the STFT.
The window of a ‘magnitude’ spectrum has an integral of one, i.e., unit area for non-negative windows. This ensures that absolute the values of spectrum does not change if the length of the window changes (given the input signal is stationary).
To represent the power spectral density (‘psd’) for varying length windows the area of the absolute square of the window needs to be unity.
The
scalingproperty shows the current scaling. The propertiesfac_magnitudeandfac_psdshow the scaling factors required to scale the STFT values to a magnitude or a psd spectrum.Note that a window cannot to be scaled to be unitary. Use
from_win_equals_dualto create a unitaryShortTimeFFTinstance.This method is called, if the initializer parameter
scale_tois set.See also
fac_magnitudeScaling factor for to a magnitude spectrum.
fac_psdScaling factor for to a power spectral density spectrum.
fft_modeMode of utilized FFT
scalingNormalization applied to the window function.
ShortTimeFFTClass this method belongs to.