Source: GitHub
Signature¶
def sdynpy.signal_processing.sdynpy_harmonic.digital_tracking_filter_generator(dt, cutoff_frequency_ratio=0.15, filter_order=2, phase_estimate=None, amplitude_estimate=None, plot_results=False)Computes amplitudes and phases using a digital tracking filter
Parameters¶
dt : float The time step of the signal
cutoff_frequency_ratio : float The cutoff frequency of the low-pass filter compared to the lowest frequency sine tone in each block. Default is 0.15.
filter_order : float The filter order of the low-pass butterworth filter. Default is 2.
phase_estimate : float An estimate of the initial phase to seed the low-pass filter.
amplitude_estimate : float An estimate of the initial amplitude to seed the low-pass filter.
plot_results : bool If True, will plot the data at multiple steps for diagnostics
Yields¶
amplitude : np.ndarray The amplitude at each time step
phase : np.ndarray The phase at each time step
Sends¶
xi : iterable The next block of the signal to be filtered fi : iterable The frequencies at the time steps in xi argsi : iterable The argument to a cosine function at the time steps in xi