vispy.util.fourier module#
- vispy.util.fourier.fft_freqs(n_fft, fs)#
Return frequencies for DFT
- Parameters:
- n_fftint
Number of points in the FFT.
- fsfloat
The sampling rate.
- vispy.util.fourier.stft(x, n_fft=1024, step=512, fs=6.283185307179586, window='hann')#
Compute the STFT
- Parameters:
- xarray-like
1D signal to operate on.
If len(x) < n_fft
, x will be zero-padded to lengthn_fft
.- n_fftint
Number of FFT points. Much faster for powers of two.
- stepint | None
Step size between calculations. If None,
n_fft // 2
will be used.- fsfloat
The sample rate of the data.
- windowstr | None
Window function to use. Can be
'hann'
for Hann window, or None for no windowing.
- Returns:
- stftndarray
Spectrogram of the data, shape (n_freqs, n_steps).
See also