'''Snuffling to fiddle with an ObsPy stream.'''
tr.stats.delta for tr in self.obspy_stream_orig) else: fmin = 0.001 fmax = 1000.
sn.Param( 'Highpass', 'highpass_corner', None, fmin, fmax, low_is_none=True)) sn.Param( 'Lowpass', 'lowpass_corner', None, fmin, fmax, high_is_none=True))
try: obspy_stream = self.obspy_stream_orig.copy() if None not in (self.highpass_corner, self.lowpass_corner): obspy_stream.filter( 'bandpass', freqmin=self.highpass_corner, freqmax=self.lowpass_corner)
elif self.lowpass_corner is not None: obspy_stream.filter( 'lowpass', freq=self.lowpass_corner)
elif self.highpass_corner is not None: obspy_stream.filter( 'highpass', freq=self.highpass_corner)
self.cleanup() pyrocko_traces = oc.to_pyrocko_traces(obspy_stream) self.add_traces(pyrocko_traces) self.obspy_stream = obspy_stream
except Exception: raise # logged by caller
|