FFT
- stride.utils.fft.magnitude_spectrum(signal, dt, db=True)[source]
Calculate magnitude spectrum of a signal.
- Parameters
signal (ndarray) – Signal or array of signals.
dt (float) – Discretisation step for the time axis.
db (bool, optional) – Whether to calculate the spectrum in decibels, defaults to True.
- Returns
1-dimensional array – Frequencies of the spectrum
ndarray – Magnitude spectrum of the signal or signals.
- stride.utils.fft.bandwidth(signal, dt, cutoff=- 10)[source]
Calculate the bandwidth of a signal at a given dB level.
- Parameters
signal (ndarray) – Signal or array of signals.
dt (float) – Discretisation step for the time axis.
cutoff (float) – dB level to calculate bandwidth.
- Returns
float – Min frequency in the BW.
float – Centre frequency in the BW.
float – Max frequency in the BW.