Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ZRT Receiver Function Calculation #4

Closed
santisoler opened this issue Mar 5, 2018 · 4 comments
Closed

Bug in ZRT Receiver Function Calculation #4

santisoler opened this issue Mar 5, 2018 · 4 comments

Comments

@santisoler
Copy link

Applying a RF calculation using the ZRT coordinate system gives wrong result.

For example, the following code computes the RF for a ZRT rotation on the first set of the example stream loaded with rf_read():

from rf import read_rf, rfstats

stream = read_rf()
stream = stream[:3]
rfstats(stream)

stream.detrend()

stream.filter("bandpass", freqmin=0.01, freqmax=1)

stream.rf(rotate="NE->RT", method='P')
stream.select(component="R").plot(type='relative',
                                  reftime=stream[0].stats.onset)

We expect something like what Ammon (1991) shows in this Figure:
ammon1991

But instead, we get the following RF in the radial direction:
figure_1

@trichter
Copy link
Owner

trichter commented Mar 5, 2018

Thank you for reporting this bug!

rf uses the rotate method from ObsPy. (this convention)
Because the Q component in the LQT system points towards the source, the receiver function must be multiplied by -1 to get the correct result. This "correction" is wrongly applied for the R component in the ZRT system. The peak therefore becomes negative.

I am unsure about the T component. I assume that the multiplication with -1 is not correct, too.

@trichter
Copy link
Owner

trichter commented Mar 6, 2018

This should be solved now. I published a new version on PyPi.

@trichter
Copy link
Owner

trichter commented Mar 6, 2018

By the way you can use

stream.select(component="R").plot_rf()

to plot the receiver functions aligned with the onset.

@santisoler
Copy link
Author

Thanks @trichter !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants