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
Add support for inner core diffracted phases in taup with Kdiff #3095
Conversation
|
self.min_ray_param): | ||
if (self.current_branch < tau_model.iocb_branch - 1 or | ||
(self.current_branch == tau_model.iocb_branch - 1 | ||
and end_action != _ACTIONS["diffract"])): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, I think in all these cases my comment in the other ticket applies in the same way. Readability could be much improved by using named variables for the individual parts of the conditions. But I don't want to hassle you too much with it, if you feel it's OK to do it this way (I assume it might be like this throughout the taup code base..?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the readibility could be improved, but I'm afraid I'm not inclined to do so for this PR. What I've done here done is consistent with the existing style (e.g. see how Pdiff and Sdiff are treated in lines 555-604). Really there should be some refactoring and cleaning up of the whole complicated SeismicPhase.parse_name
method, and this should be done consistently e.g. whatever is done for Kdiff should also be done for Pdiff. But I think that's a big job, and requires careful thought.
I'm fine with the cosmetic change you made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one cosmetics comment, just let me know if you wanna keep as is, thats fine with me too I guess
What does this PR do?
This pull request adds support for inner core diffracted phases in
obspy.taup
with the notationKdiff
. An example is:A very small tweak is also made to the
plot_travel_times
function updated in #3092. It better plots the wrap-around phases at 180 and 360 degrees by plotting with separate lines. Compare the far right of the new plotwith the old one of #3092.
Why was it initiated? Any relevant Issues?
Support for inner core diffracted phases has been requested for the java version of taup, see crotwell/TauP#3 . This PR supports the PKP_Cdiff phase requested in that issue, but not the PKP_Bdiff phase. @crotwell -- can you take a look and see if you want to add
Kdiff
to the java version too?PR Checklist
master
for new features,maintenance_...
for bug fixesJust add the "build_docs" tag to this PR.
Docs will be served at docs.obspy.org/pr/{branch_name} (do not use master branch).
Please post a link to the relevant piece of documentation.
clients.fdsn
) should be tested for the PR,just add the "test_network" tag to this PR.
CHANGELOG.txt
.CONTRIBUTORS.txt
.from all the CI builds look correct. Add the "upload_plots" tag so that plotting
outputs are attached as artifacts.