Deconvolve instrument response.
Uses the obspy.station.response.Response object attached as Trace.stats.response to deconvolve the instrument response from the trace’s timeseries data. Raises an exception if the response is not present. Use e.g. Trace.attach_response() to attach response to trace providing obspy.station.inventory.Inventory data. Note that there are two ways to prevent overamplification while convolving the inverted instrument spectrum: One possibility is to specify a water level which represents a clipping of the inverse spectrum and limits amplification to a certain maximum cut-off value (water_level in dB). The other possibility is to taper the waveform data in the frequency domain prior to multiplying with the inverse spectrum, i.e. perform a pre-filtering in the frequency domain (specifying the four corner frequencies of the frequency taper as a tuple in pre_filt).
Note
Any additional kwargs will be passed on to obspy.station.response.Response.get_evalresp_response(), see documentation of that method for further customization (e.g. start/stop stage).
Note
Using remove_response() is equivalent to using simulate() with the identical response provided as a (dataless) SEED or RESP file and when using the same water_level and pre_filt (and options sacsim=True and pitsasim=False which influence very minor details in detrending and tapering).
Example
>>> from obspy import read
>>> st = read()
>>> tr = st[0].copy()
>>> tr.plot()
>>> # Response object is already attached to example data:
>>> print tr.stats.response
Channel Response
From M/S (Velocity in Meters Per Second) to COUNTS (Digital Counts)
Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
4 stages:
Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500.00
Stage 2: CoefficientsTypeResponseStage from V to COUNTS, ...
Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1.00
Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1.00
>>> tr.remove_response()
<...Trace object at 0x...>
>>> tr.plot()
Parameters: |
|
---|