obspy.signal.filter.bandpass
- bandpass(data, freqmin, freqmax, df, corners=4, zerophase=False, rp=None, rs=None, ftype='butter', axis=-1)[source]
Bandpass Filter.
Filter data from
freqmin
tofreqmax
usingcorners
corners. The filter usesscipy.signal.iirfilter()
(for design) andscipy.signal.sosfilt()
(for applying the filter).- Parameters:
data (numpy.ndarray) – Data to filter.
freqmin – Pass band low corner frequency.
freqmax – Pass band high corner frequency.
df – Sampling rate in Hz.
corners – Filter corners / order.
zerophase – If True, apply filter once forwards and once backwards. This results in twice the filter order but zero phase shift in the resulting filtered trace.
rp – For Chebyshev and elliptic filters, provides the maximum ripple in the passband. (dB)
rs – For Chebyshev and elliptic filters, provides the minimum attenuation in the stop band. (dB)
ftype –
- The type of filter
Butterworth : ‘butter’ (default)
Chebyshev I : ‘cheby1’
Chebyshev II : ‘cheby2’
Cauer/elliptic: ‘ellip’
Bessel/Thomson: ‘bessel’
axis – The axis of the input data array along which to apply the linear filter. The filter is applied to each subarray along this axis. Default is -1.
- Returns:
Filtered data.