Fourier transforms
FFT related functions
- pyvib.fft.fft(y, Fs, detrend='constant', hann=True, cons=True, debug=False)
The scaled amplitude frequency spectrum
- Parameters
y (float 1D array) – Signal you want FFT of.
Fs (float) – Sampling frequency
Detrend (string, optional) – Detrends the signal using scipy.signal.detrend - ‘constant’ to remove mean value - ‘linear’ to remove least squares fit - ‘none’ to do nothing
hann (bool, optional) – Add a hanning window if true.
cons (bool, optional) –
Whether conservative part of the spectrum should be returned:
True returns Fs/2.56
False returns Fs/2.0
- Returns
Y (float 1D array) – FFT amplitude
df (float) – Delta frequency
- pyvib.fft.rawfft(y)
Raw FFT of the signal.
- Parameters
y (float 1D array) – Signal to get spectrum of
Fs (float) – Sampling frequency in Hz
- Returns
Y (float 1D array) – Spectrum values
df (float) – Delta frequency in Hz
- pyvib.fft.rawifft(Y)
Raw inverse FFT
- Parameters
Y (float 1D array) – Spectrum to inverse
- Returns
y – Time domain signal
- Return type
float 1D array