{"action":"created","comment":{"url":"https://api.github.com/repos/obspy/obspy/pulls/comments/44229358","id":44229358,"diff_hunk":"@@ -107,6 +112,64 @@ def test_p_iasp91_manual(self):\n         self.assertAlmostEqual(p_arrival.purist_distance, 35.00, 2)\n         self.assertEqual(p_arrival.purist_name, \"P\")\n \n+    @unittest.skipIf(not geobase.HAS_GEOGRAPHICLIB,\n+                     'Module geographiclib is not installed')\n+    def test_p_iasp91_geo_manual(self):\n+        \"\"\"\n+        Manual test for P phase in IASP91 given geographical input.\n+\n+        This version of the test is used when geographiclib is installed\n+        \"\"\"\n+        m = TauPyModel(model=\"iasp91\")\n+        arrivals = m.get_travel_times_geo(source_depth_in_km=10.0,\n+                                          source_latitude_in_deg=20.0,\n+                                          source_longitude_in_deg=33.0,\n+                                          station_latitude_in_deg=55.0,\n+                                          station_longitude_in_deg=33.0,\n+                                          phase_list=[\"P\"])\n+        self.assertEqual(len(arrivals), 1)\n+        p_arrival = arrivals[0]\n+\n+        self.assertEqual(p_arrival.name, \"P\")\n+        self.assertAlmostEqual(p_arrival.time, 412.43, 2)\n+        self.assertAlmostEqual(p_arrival.ray_param_sec_degree, 8.612, 3)\n+        self.assertAlmostEqual(p_arrival.takeoff_angle, 26.74, 2)\n+        self.assertAlmostEqual(p_arrival.incident_angle, 26.69, 2)\n+        self.assertAlmostEqual(p_arrival.purist_distance, 35.00, 2)\n+        self.assertEqual(p_arrival.purist_name, \"P\")\n+\n+    def test_p_iasp91_geo_fallback_manual(self):\n+        \"\"\"\n+        Manual test for P phase in IASP91 given geographical input.\n+\n+        This version of the test checks that things still work when\n+        geographiclib is not installed.\n+        \"\"\"\n+        has_geographiclib_real = geobase.HAS_GEOGRAPHICLIB\n+        geobase.HAS_GEOGRAPHICLIB = False\n+        taup_geo.HAS_GEOGRAPHICLIB = False\n+        tau.HAS_GEOGRAPHICLIB = False","path":"obspy/taup/tests/test_tau.py","position":null,"original_position":52,"commit_id":"de43839b757707db6000d2bb52e0024ce8391193","original_commit_id":"b715d0e00b2c78e4d939a938d73bafedfcc896e6","user":{"login":"andreww","id":19102,"avatar_url":"https://avatars.githubusercontent.com/u/19102?v=3","gravatar_id":"","url":"https://api.github.com/users/andreww","html_url":"https://github.com/andreww","followers_url":"https://api.github.com/users/andreww/followers","following_url":"https://api.github.com/users/andreww/following{/other_user}","gists_url":"https://api.github.com/users/andreww/gists{/gist_id}","starred_url":"https://api.github.com/users/andreww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreww/subscriptions","organizations_url":"https://api.github.com/users/andreww/orgs","repos_url":"https://api.github.com/users/andreww/repos","events_url":"https://api.github.com/users/andreww/events{/privacy}","received_events_url":"https://api.github.com/users/andreww/received_events","type":"User","site_admin":false},"body":"Is the current approach, introduced in ba935f496fa3bc26 something you can live with? I'm struggling to think of a cleaner alternative.","created_at":"2015-11-08T19:51:40Z","updated_at":"2015-11-08T19:51:40Z","html_url":"https://github.com/obspy/obspy/pull/1164#discussion_r44229358","pull_request_url":"https://api.github.com/repos/obspy/obspy/pulls/1164","_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments/44229358"},"html":{"href":"https://github.com/obspy/obspy/pull/1164#discussion_r44229358"},"pull_request":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1164"}}},"pull_request":{"url":"https://api.github.com/repos/obspy/obspy/pulls/1164","id":49360030,"html_url":"https://github.com/obspy/obspy/pull/1164","diff_url":"https://github.com/obspy/obspy/pull/1164.diff","patch_url":"https://github.com/obspy/obspy/pull/1164.patch","issue_url":"https://api.github.com/repos/obspy/obspy/issues/1164","number":1164,"state":"open","locked":false,"title":"Add get_..._geo to taup","user":{"login":"andreww","id":19102,"avatar_url":"https://avatars.githubusercontent.com/u/19102?v=3","gravatar_id":"","url":"https://api.github.com/users/andreww","html_url":"https://github.com/andreww","followers_url":"https://api.github.com/users/andreww/followers","following_url":"https://api.github.com/users/andreww/following{/other_user}","gists_url":"https://api.github.com/users/andreww/gists{/gist_id}","starred_url":"https://api.github.com/users/andreww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreww/subscriptions","organizations_url":"https://api.github.com/users/andreww/orgs","repos_url":"https://api.github.com/users/andreww/repos","events_url":"https://api.github.com/users/andreww/events{/privacy}","received_events_url":"https://api.github.com/users/andreww/received_events","type":"User","site_admin":false},"body":"It can be useful to know the location (latitude and longitude) of points on a raypath, e.g. to plot CMB bounce points for PcP. This adds two new methods to TauPyModel which take the location of the source and recever, and decorate the path with locations.\r\n\r\nIn order to allow this we add three new methods to the TauPyModel:\r\n\r\n* get_travel_times_geo: this is simply a wrapper around get_travel_times, but it takes the event location and station position (latitude and longitude) instead of the source-station distance in degrees.\r\n\r\n* get_pierce_points_geo: this also takes the event location and station position, but also adds the latitude and longitude to all pierce_points in the returnd Arrivals object. These can be used to plot peice points on a map with the basemap plugin to matplotlib, for example.\r\n\r\n* get_get_ray_paths_geo: this works like get_pierce_points_geo, but decorates the ray path with location information. This can be used for simple tomographic corrections, for example.\r\n\r\nThree simple tests are added. These are derived from three existing tests for the methods that\r\ntake an angular distance between the source and receiver. We need to add tests for the locations\r\nalong paths and at peirce points too.\r\n\r\nA new attribute, flatteningOfEarth, has been added to the TauModel class, and this is respected by the new methods. This is always set to 0.0 (which makes the calculations operate on a sphere) but opens up the possibility of considering an elliptical Earth (or Mars) model. However, the effect of changing the value will only result in a change in the an angular distance between the source and receiver (for fixed latitude and longitude). This results in a small change in trave time compared to the effect of distorting the layers and raypath, so there is not much point in using this unless we want to implement the ellipticity correction (e.g. Dziewonski and Gilbert, 1975).","created_at":"2015-10-31T22:10:15Z","updated_at":"2015-11-08T19:51:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0210244179516df55935bc3f4624041b3948245f","assignee":null,"milestone":{"url":"https://api.github.com/repos/obspy/obspy/milestones/8","html_url":"https://github.com/obspy/obspy/milestones/0.11.0","labels_url":"https://api.github.com/repos/obspy/obspy/milestones/8/labels","id":725009,"number":8,"title":"0.11.0","description":"","creator":{"login":"barsch","id":602450,"avatar_url":"https://avatars.githubusercontent.com/u/602450?v=3","gravatar_id":"","url":"https://api.github.com/users/barsch","html_url":"https://github.com/barsch","followers_url":"https://api.github.com/users/barsch/followers","following_url":"https://api.github.com/users/barsch/following{/other_user}","gists_url":"https://api.github.com/users/barsch/gists{/gist_id}","starred_url":"https://api.github.com/users/barsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsch/subscriptions","organizations_url":"https://api.github.com/users/barsch/orgs","repos_url":"https://api.github.com/users/barsch/repos","events_url":"https://api.github.com/users/barsch/events{/privacy}","received_events_url":"https://api.github.com/users/barsch/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":42,"state":"open","created_at":"2014-07-18T08:42:03Z","updated_at":"2015-11-03T19:33:27Z","due_on":"2015-11-10T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/obspy/obspy/pulls/1164/commits","review_comments_url":"https://api.github.com/repos/obspy/obspy/pulls/1164/comments","review_comment_url":"https://api.github.com/repos/obspy/obspy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1164/comments","statuses_url":"https://api.github.com/repos/obspy/obspy/statuses/de43839b757707db6000d2bb52e0024ce8391193","head":{"label":"andreww:taup_geog","ref":"taup_geog","sha":"de43839b757707db6000d2bb52e0024ce8391193","user":{"login":"andreww","id":19102,"avatar_url":"https://avatars.githubusercontent.com/u/19102?v=3","gravatar_id":"","url":"https://api.github.com/users/andreww","html_url":"https://github.com/andreww","followers_url":"https://api.github.com/users/andreww/followers","following_url":"https://api.github.com/users/andreww/following{/other_user}","gists_url":"https://api.github.com/users/andreww/gists{/gist_id}","starred_url":"https://api.github.com/users/andreww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreww/subscriptions","organizations_url":"https://api.github.com/users/andreww/orgs","repos_url":"https://api.github.com/users/andreww/repos","events_url":"https://api.github.com/users/andreww/events{/privacy}","received_events_url":"https://api.github.com/users/andreww/received_events","type":"User","site_admin":false},"repo":{"id":44862307,"name":"obspy","full_name":"andreww/obspy","owner":{"login":"andreww","id":19102,"avatar_url":"https://avatars.githubusercontent.com/u/19102?v=3","gravatar_id":"","url":"https://api.github.com/users/andreww","html_url":"https://github.com/andreww","followers_url":"https://api.github.com/users/andreww/followers","following_url":"https://api.github.com/users/andreww/following{/other_user}","gists_url":"https://api.github.com/users/andreww/gists{/gist_id}","starred_url":"https://api.github.com/users/andreww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreww/subscriptions","organizations_url":"https://api.github.com/users/andreww/orgs","repos_url":"https://api.github.com/users/andreww/repos","events_url":"https://api.github.com/users/andreww/events{/privacy}","received_events_url":"https://api.github.com/users/andreww/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreww/obspy","description":"ObsPy: A Python Toolbox for seismology/seismological observatories.","fork":true,"url":"https://api.github.com/repos/andreww/obspy","forks_url":"https://api.github.com/repos/andreww/obspy/forks","keys_url":"https://api.github.com/repos/andreww/obspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreww/obspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreww/obspy/teams","hooks_url":"https://api.github.com/repos/andreww/obspy/hooks","issue_events_url":"https://api.github.com/repos/andreww/obspy/issues/events{/number}","events_url":"https://api.github.com/repos/andreww/obspy/events","assignees_url":"https://api.github.com/repos/andreww/obspy/assignees{/user}","branches_url":"https://api.github.com/repos/andreww/obspy/branches{/branch}","tags_url":"https://api.github.com/repos/andreww/obspy/tags","blobs_url":"https://api.github.com/repos/andreww/obspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreww/obspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreww/obspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreww/obspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreww/obspy/statuses/{sha}","languages_url":"https://api.github.com/repos/andreww/obspy/languages","stargazers_url":"https://api.github.com/repos/andreww/obspy/stargazers","contributors_url":"https://api.github.com/repos/andreww/obspy/contributors","subscribers_url":"https://api.github.com/repos/andreww/obspy/subscribers","subscription_url":"https://api.github.com/repos/andreww/obspy/subscription","commits_url":"https://api.github.com/repos/andreww/obspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreww/obspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreww/obspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreww/obspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreww/obspy/contents/{+path}","compare_url":"https://api.github.com/repos/andreww/obspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreww/obspy/merges","archive_url":"https://api.github.com/repos/andreww/obspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreww/obspy/downloads","issues_url":"https://api.github.com/repos/andreww/obspy/issues{/number}","pulls_url":"https://api.github.com/repos/andreww/obspy/pulls{/number}","milestones_url":"https://api.github.com/repos/andreww/obspy/milestones{/number}","notifications_url":"https://api.github.com/repos/andreww/obspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreww/obspy/labels{/name}","releases_url":"https://api.github.com/repos/andreww/obspy/releases{/id}","created_at":"2015-10-24T10:55:45Z","updated_at":"2015-10-24T10:55:55Z","pushed_at":"2015-11-08T19:48:58Z","git_url":"git://github.com/andreww/obspy.git","ssh_url":"git@github.com:andreww/obspy.git","clone_url":"https://github.com/andreww/obspy.git","svn_url":"https://github.com/andreww/obspy","homepage":"http://www.obspy.org","size":66735,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"obspy:master","ref":"master","sha":"967ce706531fd0b92088ed1491a12e781e3c93cd","user":{"login":"obspy","id":1701221,"avatar_url":"https://avatars.githubusercontent.com/u/1701221?v=3","gravatar_id":"","url":"https://api.github.com/users/obspy","html_url":"https://github.com/obspy","followers_url":"https://api.github.com/users/obspy/followers","following_url":"https://api.github.com/users/obspy/following{/other_user}","gists_url":"https://api.github.com/users/obspy/gists{/gist_id}","starred_url":"https://api.github.com/users/obspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obspy/subscriptions","organizations_url":"https://api.github.com/users/obspy/orgs","repos_url":"https://api.github.com/users/obspy/repos","events_url":"https://api.github.com/users/obspy/events{/privacy}","received_events_url":"https://api.github.com/users/obspy/received_events","type":"Organization","site_admin":false},"repo":{"id":5731348,"name":"obspy","full_name":"obspy/obspy","owner":{"login":"obspy","id":1701221,"avatar_url":"https://avatars.githubusercontent.com/u/1701221?v=3","gravatar_id":"","url":"https://api.github.com/users/obspy","html_url":"https://github.com/obspy","followers_url":"https://api.github.com/users/obspy/followers","following_url":"https://api.github.com/users/obspy/following{/other_user}","gists_url":"https://api.github.com/users/obspy/gists{/gist_id}","starred_url":"https://api.github.com/users/obspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obspy/subscriptions","organizations_url":"https://api.github.com/users/obspy/orgs","repos_url":"https://api.github.com/users/obspy/repos","events_url":"https://api.github.com/users/obspy/events{/privacy}","received_events_url":"https://api.github.com/users/obspy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/obspy/obspy","description":"ObsPy: A Python Toolbox for seismology/seismological observatories.","fork":false,"url":"https://api.github.com/repos/obspy/obspy","forks_url":"https://api.github.com/repos/obspy/obspy/forks","keys_url":"https://api.github.com/repos/obspy/obspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obspy/obspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obspy/obspy/teams","hooks_url":"https://api.github.com/repos/obspy/obspy/hooks","issue_events_url":"https://api.github.com/repos/obspy/obspy/issues/events{/number}","events_url":"https://api.github.com/repos/obspy/obspy/events","assignees_url":"https://api.github.com/repos/obspy/obspy/assignees{/user}","branches_url":"https://api.github.com/repos/obspy/obspy/branches{/branch}","tags_url":"https://api.github.com/repos/obspy/obspy/tags","blobs_url":"https://api.github.com/repos/obspy/obspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obspy/obspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obspy/obspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/obspy/obspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obspy/obspy/statuses/{sha}","languages_url":"https://api.github.com/repos/obspy/obspy/languages","stargazers_url":"https://api.github.com/repos/obspy/obspy/stargazers","contributors_url":"https://api.github.com/repos/obspy/obspy/contributors","subscribers_url":"https://api.github.com/repos/obspy/obspy/subscribers","subscription_url":"https://api.github.com/repos/obspy/obspy/subscription","commits_url":"https://api.github.com/repos/obspy/obspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/obspy/obspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/obspy/obspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/obspy/obspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/obspy/obspy/contents/{+path}","compare_url":"https://api.github.com/repos/obspy/obspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obspy/obspy/merges","archive_url":"https://api.github.com/repos/obspy/obspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obspy/obspy/downloads","issues_url":"https://api.github.com/repos/obspy/obspy/issues{/number}","pulls_url":"https://api.github.com/repos/obspy/obspy/pulls{/number}","milestones_url":"https://api.github.com/repos/obspy/obspy/milestones{/number}","notifications_url":"https://api.github.com/repos/obspy/obspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obspy/obspy/labels{/name}","releases_url":"https://api.github.com/repos/obspy/obspy/releases{/id}","created_at":"2012-09-08T19:17:46Z","updated_at":"2015-11-08T07:43:54Z","pushed_at":"2015-11-08T19:48:58Z","git_url":"git://github.com/obspy/obspy.git","ssh_url":"git@github.com:obspy/obspy.git","clone_url":"https://github.com/obspy/obspy.git","svn_url":"https://github.com/obspy/obspy","homepage":"http://www.obspy.org","size":148233,"stargazers_count":163,"watchers_count":163,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":103,"forks":118,"open_issues":103,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1164"},"html":{"href":"https://github.com/obspy/obspy/pull/1164"},"issue":{"href":"https://api.github.com/repos/obspy/obspy/issues/1164"},"comments":{"href":"https://api.github.com/repos/obspy/obspy/issues/1164/comments"},"review_comments":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1164/comments"},"review_comment":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1164/commits"},"statuses":{"href":"https://api.github.com/repos/obspy/obspy/statuses/de43839b757707db6000d2bb52e0024ce8391193"}}}}