bundles / scipy 1.17.1 / scipy / signal / _short_time_fft / ShortTimeFFT / scale_to
function
scipy.signal._short_time_fft:ShortTimeFFT.scale_to
Signature
def scale_to ( self , scaling : Literal['magnitude', 'psd'] ) Summary
Scale window to obtain 'magnitude' or 'psd' scaling for the STFT.
Extended Summary
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 scaling property shows the current scaling. The properties fac_magnitude and fac_psd show 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_dual to create a unitary ShortTimeFFT instance.
This method is called, if the initializer parameter scale_to is set.
See also
- ShortTimeFFT
Class this method belongs to.
- fac_magnitude
Scaling factor for to a magnitude spectrum.
- fac_psd
Scaling factor for to a power spectral density spectrum.
- fft_mode
Mode of utilized FFT
- scaling
Normalization applied to the window function.
Aliases
-
scipy.signal.ShortTimeFFT.scale_to