-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix FK5 -> Galactic conversion #3107
Conversation
By the way, the angle was determined by optimization, but I think the biggest difference is from the new NGP coordinates. I don't understand why it should be |
@astrofrog - The first one makes sense to me if the goal is just consistency between the two (and it's as "right" as Reid & Brunthaler 2004, presumably, given the lack of definitive definitions.) As for why it's And as you surmised on-list, the Just so I understand, though, how did you derive the Do you want to make a PR to address this, or should I (either way is fine, just don't want us to both do the same thing...)? |
Thank you everyone for looking into this issue. I think http://arxiv.org/abs/1010.3773 looks like an approachable source of clarification, although I haven't read much into it. |
@eteq - yes I wrote a simple optimization code to minimize the discrepancy. I can turn this into a PR. |
Thanks for that @sargas - I remember seeing that at some point, but it just served to re-inforce my "Galactic is just not well-defined" perspective. I'm 100% with the point of that paper that it should be based on ICRS, but unless that happens formally I think we're better off just trying to be consistent with what other people do, and leave precision astrometry to ICRS, anyway... But it might be useful to know if their transforms from ICRS are consistent with the ones we have here. If so, that might be another "shortcut" to implement. It should be pretty straightforward to implement, so that might be a good issue for our bank of issues to point newcomers to? |
@astrofrog - Ok, cool, yeah this sounds like a fine solution then. |
…and with FK5 <-> FK4 <-> Galactic route.
I've attached code to this issue and I think it should be included in 0.4.3. Regarding that paper - since it's not accepted as far as I can tell, I would suggest that we first discuss it with other code maintainers. If we all agree to adopt this, it might push for publication of that paper/acceptance by the IAU? |
@sargas - can you confirm that this fixes the issues you were having? |
👍 |
@eteq - can you review this? |
@@ -412,7 +412,7 @@ The lowest layer in the stack is the abstract | |||
`~astropy.coordinates.UnitSphericalRepresentation` object: | |||
|
|||
>>> sc_gal.frame.data | |||
<UnitSphericalRepresentation lon=1.739010... rad, lat=-1.024675... rad> | |||
<UnitSphericalRepresentation lon=1.73900863... rad, lat=-1.02467744... rad> |
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.
Have we tried putting # doctest: +FLOAT_CMP
on this test?
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.
Done
@astrofrog - looks good to me except for the super-minor comment above and @embray's suggestion of using If you're busy/traveling and don't think you can get to this soon I can also do a manual merge and implement take care of those things myself. |
Let's see if Travis passes now with the |
Fix FK5 -> Galactic conversion
@sargas - this is now merged, so you should be able to proceed with the |
@astrofrog - Sweet, thank you. I'll make another comment on astropy/pyregion#54 when I understand enough of ds9's tcl/c/yacc code to find how they handle the angles. |
Fix FK5 -> Galactic conversion Conflicts: docs/coordinates/transforming.rst
As discussed on the list, our FK5 -> Galactic conversion is not consistent with our FK5 -> FK4 -> Galactic conversion, and is not consistent with other codes. If we set the following attributes on Galactic:
then everything works fine and we agree much better with other codes (and are self-consistent). I can't claim to understand all the details and don't have time to look into it more for now, so would be useful to have input from others more familiar with coordinate conversions?
cc @eteq