Hello,
I tried to use your rf python code to compute the S receiver functions to decipher the Moho and LAB beneath my study region. I downloaded your code and installed all the necessary packages and it is working well. Moreover, I have one doubt regarding the onset time because every time it is taking P as the onset time while using the stream.trim2 after storing the S travel time in “a” variable of SAC header. I am unable to find out where I have to change to consider S time as the onset time while using the trim2 command, therefore, I request you to help me to solve this issue. And while using the multitaper deconvolution, following error is showing.
I am running the following code:
from matplotlib import pyplot as plt
from rf import read_rf
from rf import rfstats
stream = read_rf('DATA/PCH/S/CUT/*.SAC')
rfstats(stream)
stream.filter('bandpass', freqmin=0.03, freqmax=0.5)
stream.trim2(-25, 75, 'onset')
rf_mult = stream.copy().rf(method='S', deconvolve='multitaper', rotate='ZNE->LQT').moveout(phase='Sp')
Error:
>>> stream.copy().rf(method='S', deconvolve='multitaper', rotate='ZNE->LQT', winsrc='Sp').moveout(phase='Sp')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<decorator-gen-54>", line 2, in rf
File "/home/omsai/.local/lib/python3.8/site-packages/rf/util.py", line 243, in _add_processing_info
stream = _func_(*args, **kwargs)
File "/home/omsai/.local/lib/python3.8/site-packages/rf/rfstream.py", line 335, in rf
stream3c.deconvolve(method=deconvolve,
File "/home/omsai/.local/lib/python3.8/site-packages/rf/rfstream.py", line 253, in deconvolve
rsp = deconvolve(self, *args, **kwargs)
File "<decorator-gen-53>", line 2, in deconvolve
File "/home/omsai/.local/lib/python3.8/site-packages/rf/util.py", line 243, in _add_processing_info
stream = _func_(*args, **kwargs)
File "/home/omsai/.local/lib/python3.8/site-packages/rf/deconvolve.py", line 123, in deconvolve
src.trim(onset + winsrc[0], onset + winsrc[1], pad=True, fill_value=0.)
File "/usr/local/lib/python3.8/dist-packages/obspy/core/utcdatetime.py", line 1011, in __add__
return UTCDateTime(ns=self._ns + int(round(value * 1e9)))
TypeError: can't multiply sequence by non-int of type 'float'