{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/83713794","pull_request_review_id":4532071,"id":83713794,"diff_hunk":"@@ -928,6 +928,26 @@ the TDB timescale::\n \n     >>> time_barycentre = times.tdb + ltt_bary\n \n+By default, the light travel time is calculated using the position and velocity\n+of Earth and the Sun from built-in `ERFA <https://github.com/liberfa/erfa>`_ routines,\n+but one can also use more precise calculations using the JPL ephemerides (which are derived from\n+dynamical models). An example using the JPL ephemerides is:\n+\n+.. doctest-requires:: jplephem\n+\n+    >>> ltt_bary_jpl = times.light_travel_time(ip_peg, ephemeris='jpl') # doctest: +REMOTE_DATA +IGNORE_OUTPUT\n+\n+The difference between the builtin ephemerides and the JPL ephemerides is normally\n+of the order of 1/100th of a millisecond, so the builtin ephemerides should be suitable\n+for most purposes. For more details about what ephemerides are available,\n+see :ref:`astropy-coordinates-solarsystem`.","path":"docs/time/index.rst","position":16,"original_position":16,"commit_id":"de00e2ee92d85039425a6224994e2e3f5fe44ed9","original_commit_id":"de00e2ee92d85039425a6224994e2e3f5fe44ed9","user":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"body":"Same as above.","created_at":"2016-10-17T19:18:35Z","updated_at":"2016-10-17T19:18:35Z","html_url":"https://github.com/astropy/astropy/pull/5273#discussion_r83713794","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/5273","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/83713794"},"html":{"href":"https://github.com/astropy/astropy/pull/5273#discussion_r83713794"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/5273"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/5273","id":83002667,"html_url":"https://github.com/astropy/astropy/pull/5273","diff_url":"https://github.com/astropy/astropy/pull/5273.diff","patch_url":"https://github.com/astropy/astropy/pull/5273.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/5273","number":5273,"state":"open","locked":false,"title":"Allow use of JPL ephemerides in coordinate transforms and light travel time corrections","user":{"login":"StuartLittlefair","id":4570807,"avatar_url":"https://avatars.githubusercontent.com/u/4570807?v=3","gravatar_id":"","url":"https://api.github.com/users/StuartLittlefair","html_url":"https://github.com/StuartLittlefair","followers_url":"https://api.github.com/users/StuartLittlefair/followers","following_url":"https://api.github.com/users/StuartLittlefair/following{/other_user}","gists_url":"https://api.github.com/users/StuartLittlefair/gists{/gist_id}","starred_url":"https://api.github.com/users/StuartLittlefair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StuartLittlefair/subscriptions","organizations_url":"https://api.github.com/users/StuartLittlefair/orgs","repos_url":"https://api.github.com/users/StuartLittlefair/repos","events_url":"https://api.github.com/users/StuartLittlefair/events{/privacy}","received_events_url":"https://api.github.com/users/StuartLittlefair/received_events","type":"User","site_admin":false},"body":"This PR is based upon the changes in #5231, and perhaps should include changes in #5253 and #5254 as well; I will rebase once #5231 is merged and also if #5253 and #5254 are merged before this.\r\n\r\nThis PR fixes #4942 by allowing the coordinate transformations, and the light travel time corrections which use them to respect the state of the ```solar_system_ephemeris``` context manager. ```light_travel_time``` takes an explicit ephemeris argument whilst the co-ordinate transformations don't. To set the ephemeris for coordinate transformations, one uses ```solar_system_ephemeris.set()```. The reason for this decision was that adding an ephemeris argument to the co-ordinate transforms meant adding a ```kwargs``` argument to all frame transforms when this was not really needed for most of them.\r\n\r\nWith this PR, one can use:\r\n\r\n```python\r\nfrom astropy.time import Time\r\nfrom astropy.coordinates import GCRS, solar_system_ephemeris, SkyCoord, EarthLocation\r\n\r\nippeg = SkyCoord.from_name('IP Peg')\r\nnow = Time.now()\r\ngreenwich = EarthLocation.of_site('greenwich')\r\nnow.location = greenwich\r\ngcrs_frame = GCRS(obstime=now)\r\n\r\ndt = now.light_travel_time(ippeg)  # use builtin ephemeris\r\ndt = now.light_travel_time(ippeg, ephemeris='jpl') # use jpl ephemeris\r\nnew_coo = ippeg.transform_to(gcrs_frame) # use builtin\r\n\r\nsolar_system_ephemeris.set('jpl')\r\ndt = now.light_travel_time(ippeg)  # use jpl ephemeris\r\nnew_coo = ippeg.transform_to(gcrs_frame) # use jpl ephemeris\r\n```","created_at":"2016-08-28T00:51:08Z","updated_at":"2016-10-17T19:21:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e67cbcb6283c348e60059e84639de2fd1e3bad83","assignee":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/38","html_url":"https://github.com/astropy/astropy/milestones/v1.3.0","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/38/labels","id":1761583,"number":38,"title":"v1.3.0","description":"","creator":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":71,"state":"open","created_at":"2016-05-12T04:39:02Z","updated_at":"2016-10-17T19:20:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/5273/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/5273/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/5273/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/de00e2ee92d85039425a6224994e2e3f5fe44ed9","head":{"label":"StuartLittlefair:transform_ephemeris","ref":"transform_ephemeris","sha":"de00e2ee92d85039425a6224994e2e3f5fe44ed9","user":{"login":"StuartLittlefair","id":4570807,"avatar_url":"https://avatars.githubusercontent.com/u/4570807?v=3","gravatar_id":"","url":"https://api.github.com/users/StuartLittlefair","html_url":"https://github.com/StuartLittlefair","followers_url":"https://api.github.com/users/StuartLittlefair/followers","following_url":"https://api.github.com/users/StuartLittlefair/following{/other_user}","gists_url":"https://api.github.com/users/StuartLittlefair/gists{/gist_id}","starred_url":"https://api.github.com/users/StuartLittlefair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StuartLittlefair/subscriptions","organizations_url":"https://api.github.com/users/StuartLittlefair/orgs","repos_url":"https://api.github.com/users/StuartLittlefair/repos","events_url":"https://api.github.com/users/StuartLittlefair/events{/privacy}","received_events_url":"https://api.github.com/users/StuartLittlefair/received_events","type":"User","site_admin":false},"repo":{"id":34852236,"name":"astropy","full_name":"StuartLittlefair/astropy","owner":{"login":"StuartLittlefair","id":4570807,"avatar_url":"https://avatars.githubusercontent.com/u/4570807?v=3","gravatar_id":"","url":"https://api.github.com/users/StuartLittlefair","html_url":"https://github.com/StuartLittlefair","followers_url":"https://api.github.com/users/StuartLittlefair/followers","following_url":"https://api.github.com/users/StuartLittlefair/following{/other_user}","gists_url":"https://api.github.com/users/StuartLittlefair/gists{/gist_id}","starred_url":"https://api.github.com/users/StuartLittlefair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StuartLittlefair/subscriptions","organizations_url":"https://api.github.com/users/StuartLittlefair/orgs","repos_url":"https://api.github.com/users/StuartLittlefair/repos","events_url":"https://api.github.com/users/StuartLittlefair/events{/privacy}","received_events_url":"https://api.github.com/users/StuartLittlefair/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StuartLittlefair/astropy","description":"Repository for the Astropy core package","fork":true,"url":"https://api.github.com/repos/StuartLittlefair/astropy","forks_url":"https://api.github.com/repos/StuartLittlefair/astropy/forks","keys_url":"https://api.github.com/repos/StuartLittlefair/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StuartLittlefair/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StuartLittlefair/astropy/teams","hooks_url":"https://api.github.com/repos/StuartLittlefair/astropy/hooks","issue_events_url":"https://api.github.com/repos/StuartLittlefair/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/StuartLittlefair/astropy/events","assignees_url":"https://api.github.com/repos/StuartLittlefair/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/StuartLittlefair/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/StuartLittlefair/astropy/tags","blobs_url":"https://api.github.com/repos/StuartLittlefair/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StuartLittlefair/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StuartLittlefair/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/StuartLittlefair/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StuartLittlefair/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/StuartLittlefair/astropy/languages","stargazers_url":"https://api.github.com/repos/StuartLittlefair/astropy/stargazers","contributors_url":"https://api.github.com/repos/StuartLittlefair/astropy/contributors","subscribers_url":"https://api.github.com/repos/StuartLittlefair/astropy/subscribers","subscription_url":"https://api.github.com/repos/StuartLittlefair/astropy/subscription","commits_url":"https://api.github.com/repos/StuartLittlefair/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/StuartLittlefair/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/StuartLittlefair/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/StuartLittlefair/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/StuartLittlefair/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/StuartLittlefair/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StuartLittlefair/astropy/merges","archive_url":"https://api.github.com/repos/StuartLittlefair/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StuartLittlefair/astropy/downloads","issues_url":"https://api.github.com/repos/StuartLittlefair/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/StuartLittlefair/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/StuartLittlefair/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/StuartLittlefair/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StuartLittlefair/astropy/labels{/name}","releases_url":"https://api.github.com/repos/StuartLittlefair/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/StuartLittlefair/astropy/deployments","created_at":"2015-04-30T12:02:25Z","updated_at":"2016-04-25T08:51:05Z","pushed_at":"2016-10-04T15:23:13Z","git_url":"git://github.com/StuartLittlefair/astropy.git","ssh_url":"git@github.com:StuartLittlefair/astropy.git","clone_url":"https://github.com/StuartLittlefair/astropy.git","svn_url":"https://github.com/StuartLittlefair/astropy","homepage":"www.astropy.org","size":46471,"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":"astropy:master","ref":"master","sha":"bafdbb989e5b7e73e3e7855da3b8b1d1a8a986e0","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astropy/deployments","created_at":"2011-07-21T01:33:49Z","updated_at":"2016-10-17T11:36:57Z","pushed_at":"2016-10-17T18:21:05Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":69115,"stargazers_count":999,"watchers_count":999,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":605,"mirror_url":null,"open_issues_count":810,"forks":605,"open_issues":810,"watchers":999,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/5273"},"html":{"href":"https://github.com/astropy/astropy/pull/5273"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/5273"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/5273/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/5273/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/5273/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/de00e2ee92d85039425a6224994e2e3f5fe44ed9"}}}}
{"actor":{"display_login":"mhvk"}}