Mondaic
This API reference is not for the latest stable Salvus version.

salvus.project.tools.processing.signal_processing.bandpass

A Butterworth bandpass filter.

Functions

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
  • data numpy.ndarray — 1-D data array to be filtered.
  • min_frequency float — The minimum frequency of the filter.
  • max_frequency float — The maximum frequency of the filter.
  • sampling_rate_in_hertz float — The sampling rate in Hz of the data.
  • corners int — The filter order/number of corners.
  • zerophase bool — If True, apply it twice (forward + backwards) resulting in acausal but zero phase shift filter.
Returns numpy.ndarray