music.band_reject

music.band_reject(centre=0.1, bandwidth=0.05)[source]

A two-pole notch, from the article’s eq:rejeita-banda.

With R and K from eq:varAux: a = [K, -2K cos(2 pi f_c), K] and b = [1, 2R cos(2 pi f_c), -R**2].

Parameters:
centrescalar

The centre of the band to remove, as a fraction of the sample rate.

bandwidthscalar

The full width of the band between its 3 dB points, as in band_pass().

Returns:
a, bndarray

The feedforward and feedback coefficients, for iir().

Raises:
ValueError

If centre or bandwidth is outside (0, 0.5).

Parameters:
Return type:

tuple[NDArray[float64], NDArray[float64]]

See also

band_pass

the same geometry, keeping what this one discards.

Examples

>>> a, b = band_reject(centre=0.1, bandwidth=0.02)
>>> len(a), len(b)
(3, 3)