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
Wiggly lines for S waves in plot ray paths (addresses issue #3042) #3047
Conversation
Also treat P and diff waves the same.
👍 totally fine =) |
Image comparison tests arent run currently anyway, it's on our TODO to bring those back. We could simply have one of the plots in the Tutorial use this new option. Maybe this one: https://docs.obspy.org/master/tutorial/code_snippets/travel_time.html#spherical-ray-paths Or this last one on the page: https://docs.obspy.org/master/tutorial/code_snippets/travel_time.html#ray-paths-for-multiple-distances Or maybe also on the taup front page: https://docs.obspy.org/master/packages/obspy.taup.html?highlight=taup#plotting (see here to change it in Tutorial and here for the taup API front page) |
Ideal would be if you rebase this on top of current master, to get rid of the merge commit and the duplication of changes. But, you'd have to fix some conflicts in the rebase manually with indentation changes involved and all, so if it's too much to ask, then it's fine too. |
On the next push to this branch you should also get the docs built and deployed (takes about 20mins), and plots in the docs can be checked here: https://docs.obspy.org/pr/ |
Totally fine, like I said, happy to have such quality contributions without much work left to do, and at the end of the day it's just git history cosmetics, so don't worry. =)
Any commit pushed to a pull request or one of our main branches directly will trigger continuous integration and our github actions (what we use for CI these days) is set up so that any PR with the "build_docs" label attached will build docs and they will get made accessible on our server at https://docs.obspy.org/pr/ I don't know exactly what's goin on, earlier I hit this button "workflows await approval" > "approve and run" so I thought all is in line (you can see github ran CI for an earlier commit), but now I get this shown to me again.. CC @trichter In any case, I'll just add you to obspy dev team, that should get rid of that thing, and you can also push branches for PRs to the main repo if you prefer (which can make it easier for other people to chime in with commits) |
Don't know either. Maybe its because, now another workflow (the docs building) needs to be started. Usually workflows need to be approved only once. |
Could be. Let's just ignore it for now, if we hit it again we can worry about it =) |
Thanks both! It says all check passed, but I can't see the documentation at https://docs.obspy.org/pr/ |
Docs deployment is working again. It was not working since 4 days, because the value of the
|
Nothing much, I'll give it a final glance in a bit, then merge. =) Looking beautiful in docs! https://docs.obspy.org/pr/improve-plot-ray-paths/tutorial/code_snippets/travel_time_body_waves.png
Euh! Thanks for finding and fixing it =) |
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.
Awesome stuff, great job on this PR! ❤️
Thanks for reviewing and merging it so quickly! |
Workflows for new contributors must be approved every time, i.e., for every new push. |
@johnrudge Thanks for getting to my issue so quickly! This is a really neat addition to obspy. |
What does this PR do?
This PR adds a flag
indicate_wave_type
(bool) to theArrivals.plot_rays()
method. When True the S waves are plotted as wiggly lines.Why was it initiated? Any relevant Issues?
This fixes #3042. The PR adds a function
split_ray_path
totaup.utils
which is needed to split the path at discontinuities so that the P and S waves can be plotted with separate line styles. Thesplit_ray_path
function figures out whether the waves are P or S by looking at their delay time. There may well be more elegant ways of splitting the ray path, but the current method seems robust.As for tests, I'm not quite sure how to test plotting features, so I've not added a test yet.
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.
Code by myself and Stuart Russell, so I've added both our names to the CONTRIBUTORS.txt.
+DOCS