{"action":"created","issue":{"url":"https://api.github.com/repos/obspy/obspy/issues/1877","repository_url":"https://api.github.com/repos/obspy/obspy","labels_url":"https://api.github.com/repos/obspy/obspy/issues/1877/labels{/name}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1877/comments","events_url":"https://api.github.com/repos/obspy/obspy/issues/1877/events","html_url":"https://github.com/obspy/obspy/pull/1877","id":255774485,"number":1877,"title":"taup: added a time plot -- analogue to the existing ray path plot","user":{"login":"kaspervanwijk","id":5093854,"avatar_url":"https://avatars1.githubusercontent.com/u/5093854?v=4","gravatar_id":"","url":"https://api.github.com/users/kaspervanwijk","html_url":"https://github.com/kaspervanwijk","followers_url":"https://api.github.com/users/kaspervanwijk/followers","following_url":"https://api.github.com/users/kaspervanwijk/following{/other_user}","gists_url":"https://api.github.com/users/kaspervanwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspervanwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspervanwijk/subscriptions","organizations_url":"https://api.github.com/users/kaspervanwijk/orgs","repos_url":"https://api.github.com/users/kaspervanwijk/repos","events_url":"https://api.github.com/users/kaspervanwijk/events{/privacy}","received_events_url":"https://api.github.com/users/kaspervanwijk/received_events","type":"User","site_admin":false},"labels":[{"id":50255192,"url":"https://api.github.com/repos/obspy/obspy/labels/.imaging","name":".imaging","color":"0b02e1","default":false},{"id":37943216,"url":"https://api.github.com/repos/obspy/obspy/labels/.taup","name":".taup","color":"0b02e1","default":false},{"id":13498872,"url":"https://api.github.com/repos/obspy/obspy/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/obspy/obspy/milestones/12","html_url":"https://github.com/obspy/obspy/milestone/12","labels_url":"https://api.github.com/repos/obspy/obspy/milestones/12/labels","id":1383698,"number":12,"title":"1.1.0","description":"","creator":{"login":"megies","id":1842780,"avatar_url":"https://avatars1.githubusercontent.com/u/1842780?v=4","gravatar_id":"","url":"https://api.github.com/users/megies","html_url":"https://github.com/megies","followers_url":"https://api.github.com/users/megies/followers","following_url":"https://api.github.com/users/megies/following{/other_user}","gists_url":"https://api.github.com/users/megies/gists{/gist_id}","starred_url":"https://api.github.com/users/megies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megies/subscriptions","organizations_url":"https://api.github.com/users/megies/orgs","repos_url":"https://api.github.com/users/megies/repos","events_url":"https://api.github.com/users/megies/events{/privacy}","received_events_url":"https://api.github.com/users/megies/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":202,"state":"open","created_at":"2015-10-29T15:40:55Z","updated_at":"2017-09-27T06:48:52Z","due_on":"2017-04-01T07:00:00Z","closed_at":null},"comments":40,"created_at":"2017-09-06T23:48:44Z","updated_at":"2017-09-27T08:17:09Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/obspy/obspy/pulls/1877","html_url":"https://github.com/obspy/obspy/pull/1877","diff_url":"https://github.com/obspy/obspy/pull/1877.diff","patch_url":"https://github.com/obspy/obspy/pull/1877.patch"},"body":"### What does this PR do?\r\n\r\ncreate a method on the arrivals object for a travel time plot, analogue to the ray path plot method. It replaces the old (and removed `travelTimePlot` function, see https://docs.obspy.org/archive/1.0.3/tutorial/code_snippets/travel_time.html#travel-time-plot)\r\n \r\n### Why was it initiated?  Any relevant Issues?\r\n\r\nFixes #1501 \r\n\r\n### PR Checklist\r\n- [x] This PR is not directly related to an existing issue (which has no PR yet).\r\n- [x] All tests still pass.\r\n- [x] Any new features or fixed regressions are be covered via new tests.\r\n- [x] Any new or changed features have are fully documented.\r\n- [x] Significant changes have been added to `CHANGELOG.txt` .\r\n- [x] First time contributors have added your name to `CONTRIBUTORS.txt` .\r\n\r\n### Todos\r\n- [x] add convenience wrapper function\r\n- [x] add example usage to convenience wrapper function docstring (with example plot)\r\n- [x] add image test\r\n- [x] add example plot to gallery\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom obspy.taup import TauPyModel\r\n\r\n# set the velocity model you want to use:\r\nmodel = TauPyModel(model='iasp91')\r\n\r\n# set epicentral distances, the phases you want, and a source depth:\r\nDISTANCES=range(0,100,1)\r\nPHASES = ['S','P']\r\nsourcedepth=5\r\n\r\nplt.figure(figsize=(10, 10))\r\nax = plt.subplot(111)\r\n\r\n# plot arrival times for all arrivals in arrivals object:\r\nfor distance in DISTANCES:\r\n    arrivals = model.get_ray_paths(sourcedepth, distance, phase_list=PHASES)\r\n    if not len(arrivals):\r\n        print('No arrival time for:', PHASES, distance)\r\n        continue\r\n    arrivals.timeplot(PHASES,show=False,ax=ax)\r\nax.set_xlim(DISTANCES[0],DISTANCES[-1])\r\nplt.show()\r\n```"},"comment":{"url":"https://api.github.com/repos/obspy/obspy/issues/comments/332445821","html_url":"https://github.com/obspy/obspy/pull/1877#issuecomment-332445821","issue_url":"https://api.github.com/repos/obspy/obspy/issues/1877","id":332445821,"user":{"login":"megies","id":1842780,"avatar_url":"https://avatars1.githubusercontent.com/u/1842780?v=4","gravatar_id":"","url":"https://api.github.com/users/megies","html_url":"https://github.com/megies","followers_url":"https://api.github.com/users/megies/followers","following_url":"https://api.github.com/users/megies/following{/other_user}","gists_url":"https://api.github.com/users/megies/gists{/gist_id}","starred_url":"https://api.github.com/users/megies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megies/subscriptions","organizations_url":"https://api.github.com/users/megies/orgs","repos_url":"https://api.github.com/users/megies/repos","events_url":"https://api.github.com/users/megies/events{/privacy}","received_events_url":"https://api.github.com/users/megies/received_events","type":"User","site_admin":false},"created_at":"2017-09-27T08:17:09Z","updated_at":"2017-09-27T08:17:09Z","author_association":"OWNER","body":"There's still some broken paths in the docs build, looks like, please check all the changed paged..\r\n\r\nE.g. http://docs.obspy.org/pull-requests/1877/tutorial/code_snippets/ray_path.html#ray-path-plot"}}
{"actor":{"display_login":"megies"}}