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

# stft_detrend

ShortTimeFFT.stft_detrend(x, detr, p0=None, p1=None, *, k_offset=0, padding='zeros', axis=-1)

  Short-time Fourier transform with a trend being subtracted from each segment beforehand.

  If detr is set to ‘constant’, the mean is subtracted, if set to “linear”, the linear trend is removed. This is achieved by calling `scipy.signal.detrend`. If detr is a function, detr is applied to each segment. All other parameters have the same meaning as in `stft`.

  Note that due to the detrending, the original signal cannot be reconstructed by the `istft`.

  See also

  `invertible`

    Check if STFT is invertible.

  `istft`

    Inverse short-time Fourier transform.

  `stft`

    Short-time Fourier transform (without detrending).

  `scipy.signal.ShortTimeFFT`

    Class this method belongs to.