soundscapecode.filters.bandpass
- soundscapecode.filters.bandpass(data: ndarray, band: tuple, fs, steepness=0.85, stopband_atten=60)
Filter data with a bandpass filter
Parameters
- data: np.ndarray
The data to filter. Expected shape is (n,) where n is the length of the data
- passband: tuple
The pass band for the filter, in the form (start, end).
- fs: int
Sampling frequency for the data
- steepness: float
Steepness parameter for the width calculation. Defaults to 0.85.
- stopband_atten: int
Acceptable stopband attenuation in dB. Defaults to 60 dB.
Returns
- np.ndarray
The filtered data.