obspy.core.stream.Stream.filter
- Stream.filter(type, **options)[source]
Filter the data of all traces in the Stream.
- Parameters
type (str) – String that specifies which filter is applied (e.g.
"bandpass"
). See the Supported Filter section below for further details.options – Necessary keyword arguments for the respective filter that will be passed on. (e.g.
freqmin=1.0
,freqmax=20.0
for"bandpass"
)
Note
This operation is performed in place on the actual data arrays. The raw data is not accessible anymore afterwards. To keep your original data, use
copy()
to create a copy of your stream object. This also makes an entry with information on the applied processing instats.processing
of every trace.Supported Filter
'bandpass'
Butterworth-Bandpass (uses
obspy.signal.filter.bandpass()
).'bandstop'
Butterworth-Bandstop (uses
obspy.signal.filter.bandstop()
).'lowpass'
Butterworth-Lowpass (uses
obspy.signal.filter.lowpass()
).'highpass'
Butterworth-Highpass (uses
obspy.signal.filter.highpass()
).'lowpass_cheby_2'
Cheby2-Lowpass (uses
obspy.signal.filter.lowpass_cheby_2()
).'lowpass_fir'
(experimental)FIR-Lowpass (uses
obspy.signal.filter.lowpass_fir()
).'remez_fir'
(experimental)Minimax optimal bandpass using Remez algorithm (uses
obspy.signal.filter.remez_fir()
).
Example
>>> from obspy import read >>> st = read() >>> st.filter("highpass", freq=1.0) <...Stream object at 0x...> >>> st.plot()