salvus.project.tools.processing.signal_processing.bandpass
A Butterworth bandpass filter.
Functions
butterworth_bandpass_filter()
butterworth_bandpass_filter()def butterworth_bandpass_filter(
data: numpy.ndarray,
min_frequency: float,
max_frequency: float,
sampling_rate_in_hertz: float,
corners: int,
zerophase: bool,
) -> numpy.ndarray: ...Butterworth bandpass filter implementing by using SciPy’s second order filter sections.
Caches the filter coefficients so quite efficient for repeated calls for similar data.
Parameters
datanumpy.ndarray — 1-D data array to be filtered.min_frequencyfloat — The minimum frequency of the filter.max_frequencyfloat — The maximum frequency of the filter.sampling_rate_in_hertzfloat — The sampling rate in Hz of the data.cornersint — The filter order/number of corners.zerophasebool — If True, apply it twice (forward + backwards) resulting in acausal but zero phase shift filter.
Returns numpy.ndarray