copapy.filters.bandpass#
- copapy.filters.bandpass(a, cutoff, numtaps=None, window='hamming', fs=2.0, width=None)#
Band-pass filter (firwin FIR filter) with no delay, the input is extended with zeros beyond its edges, which affects the first and last (numtaps - 1) / 2 samples.
- Overloads:
a (
vector[Any]), cutoff (Sequence[float]), numtaps (int|None) =None, window (str) ='hamming', fs (float) =2.0, width (float|None) =None→vector[float]a (
tensor[Any]), cutoff (Sequence[float]), numtaps (int|None) =None, window (str) ='hamming', fs (float) =2.0, width (float|None) =None→tensor[float]a (
array[Any] |Sequence[float|value[Any]]), cutoff (Sequence[float]), numtaps (int|None) =None, window (str) ='hamming', fs (float) =2.0, width (float|None) =None→array[float]
- Parameters:
a (
Any) – Samples as 1D vector, tensor, array or sequencecutoff (
Sequence[float]) – Lower and upper cutoff frequency (halved amplitude) in the unit of fsnumtaps (
int|None) – Number of filter coefficients, more coefficients give steeper transitions between pass band and stop bands.window (
str) – ‘hamming’, ‘hann’, ‘blackman’ or ‘rectangular’fs (
float) – Sampling frequency, cutoff is relative to the Nyquist frequency.width (
float|None) – Width of the transition between pass band and stop band in the unit of fs, used to estimate numtaps if it is not given. The default is half the distance of the cutoff to the nearest band edge.
- Returns:
Filtered samples with the length and type of the input.