property ShortTimeFFT.phase_shift#

If set, add linear phase phase_shift / mfft * f to each FFT slice of frequency f.

Shifting (more precisely rolling) an mfft-point FFT input by phase_shift samples results in a multiplication of the output by np.exp(2j*np.pi*q*phase_shift/mfft) at the frequency q * delta_f.

The default value 0 ensures that there is no phase shift on the zeroth slice (in which t=0 is centered). No phase shift (phase_shift is None) is equivalent to phase_shift = -mfft//2. In this case slices are not shifted before calculating the FFT.

The absolute value of phase_shift is limited to be less than mfft.

See also


Width of the frequency bins of the STFT.


Frequencies values of the STFT.


Length of input for the FFT used


Class this property belongs to.