ButterBandpass#
Description#
Digital band-pass Butterworth IIR filter. Produces a 2N-order filter from the order-N analog prototype via the lp2bp transformation.
\[
\text{ButterBandpass}(N, W_{\text{low}}, W_{\text{high}})
\]
order(int, \(\ge 1\)): order of the analog prototype. Effective digital order is2 * order.low_cutoff,high_cutoff(floats in \((0, 1)\), withlow < high): pass band as fractions of the Nyquist frequency.
Bit-exact match to scipy.signal.butter(order, [low, high], btype='bandpass') + scipy.signal.lfilter. Verified to ~1e-9 in tests/test_signal.py.
NaN handling#
Policy: ignore. A NaN in any input at index t causes the function to skip that step: output at t is NaN and internal state is unchanged. Subsequent finite samples are processed as if step t had not occurred.
Examples#
Description#
from screamer import ButterBandpass
bp = ButterBandpass(order=4, low_cutoff=0.1, high_cutoff=0.3)
out = bp(signal)