Skip to content

Conversation

@eteq
Copy link
Member

@eteq eteq commented Oct 20, 2015

This is an adjustment to the coordinates transformation graph that was inspired by (but not directly related to) #4254 . Basically, while working on that, I realized that the transformations since v0.4 included a rather illogical transform chain, which I think was originally just a workaround because we didn't have it all implemented yet. If you look at Fig 2 of sofa's precession/nutation guide (or the simpler version in Fig 1 of the astrometry guide, which I've put at the bottom of this issue), you'll see how the IAU2000 transform chain is supposed to work.

Right now we don't do all of these steps because ERFA lets us jump over some of them in a single step. But if you want to go from GCRS to AltAz, right now there's an extra transform than necessary: GCRS->ITRS->CIRS->AltAz ... worse yet, the CIRS->AltAz transform internally goes through ITRS, so it's completely wasted computation.

This PR removes the GCRS<->ITRS transformation and replaces it with a GCRS<->CIRS transformation. That serves to make the whole thing more linear where relevant, and also reduces the wasted computation going from GCRS<->AltAz

cc @mhvk @adrn @astrofrog

One logistical question - I'm not sure if this is something we should backport to v1.1.x vs. leaving as new in v1.2. It's not clear whether you call this a bug or a feature - it's a performance enhancement but also fixing something that was originally (in v0.4) intended as a temporary measure to get stuff up-and-running quickly. So it's sort of just changing the behavior to what was originally intended. @astrofrog or @embray have any thoughts here?

transforms

@eteq eteq added this to the v1.2.0 milestone Oct 20, 2015
@mhvk
Copy link
Contributor

mhvk commented Oct 21, 2015

Looks good. I restarted the python 3.4 travis build which for some reason couldn't find jinja2 (though it had been installed).

@mhvk
Copy link
Contributor

mhvk commented Oct 21, 2015

As for versions, I'd be in favour of putting it in 1.1 still, and could see the argument for backporting to 1.0 together with #4254.

@mhvk
Copy link
Contributor

mhvk commented Oct 21, 2015

The travis build now keeps failing (twice) on hdf5; see https://travis-ci.org/astropy/astropy/jobs/86514064

It may be that another restart will just resolve it, but thought I'd let people know before doing it.

@astrofrog
Copy link
Member

@mhvk - known issue with the conda package, will be fixed today - ContinuumIO/anaconda-issues#486

@eteq
Copy link
Member Author

eteq commented Oct 21, 2015

Oops, forgot to push up the changelog entry, which I pushed up now as a second ci-skip commit.

@astrofrog, what do you think re: 1.1 or 1.0.x?

@eteq eteq force-pushed the change-gcrs-itrs-cirs branch from 3675d1b to 16f1483 Compare October 22, 2015 15:26
@eteq
Copy link
Member Author

eteq commented Oct 22, 2015

Had to rebase due to #4238 (although, ironically, the typo being fixed is actually deleted by this commit...)

@eteq eteq modified the milestones: v1.1.0, v1.2.0 Oct 23, 2015
@astrofrog
Copy link
Member

@eteq - in my opinion we can backport all the way back to 1.0.x provided that we have adequate numerical tests that will ensure no regression.

@astrofrog
Copy link
Member

But since it's not really critical, we can just include in 1.1 and not 1.0.x

@eteq
Copy link
Member Author

eteq commented Oct 23, 2015

Alright, I will go ahead and merge this now and backport to 1.1 but not 1.0.x .

Basically, I suspect the tests are not exhaustive enough to ensure that this does not cause a substantive change for this part of the transformation graph - there are tests that cover this, but they're primarily "end-to-end" tests that pass through these frames rather than specifically checking related cases.

Moreover, this is actually a subtansive conceptual change in how this part of the transform graph works. Nominally that's part of the API, but it depends on whether we think the API is set more by what the transform graph looks like or instead by what we think it should look like...

I'm hoping we can get some more tests in that might cover some of this (e.g., #4269), so we may end up wanting to backport this for 1.0.7 if those seem to cover it.

eteq added a commit that referenced this pull request Oct 23, 2015
Change ordering of GCRS/ITRS transforms to make more sense
@eteq eteq merged commit cd58f74 into astropy:master Oct 23, 2015
@eteq eteq deleted the change-gcrs-itrs-cirs branch October 23, 2015 20:22
@eteq
Copy link
Member Author

eteq commented Oct 23, 2015

Oops, my bad: I just realized this is now in the wrong part of the changelog for going into 1.1 . Will fix directly in master.

eteq added a commit that referenced this pull request Nov 9, 2015
Change ordering of GCRS/ITRS transforms to make more sense
@eteq
Copy link
Member Author

eteq commented Nov 9, 2015

backported to v1.1.x in e9b2cca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants