You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, and the case above is rather artificial since the conversion to ICRS is not necessary.
However, I do have a use case where the conversion to ICRS first is quite necessary. It's not that information is lost: the obstime is the crucial piece of information and that is stored in the ICRS SkyCoord. It's just that it's being ignored; I suspect that there's an assumption of obstime=Time('J2000') or similar for all ICRS SkyCoords.
But essentially I think the snippet above should work if all was operating as expected.
transforms the icrs_coord to an altaz (Earth-centered) frame and computes the separation, whilst
moon.separation(icrs_coord)
transforms the moon to the ICRS frame and computes the separation.
In other words, both calculate the angular separation between two coordinates, but from different points of view. Whilst this is a bit counter-intuitive the code does the correct thing I think.
Activity
adrn commentedon Jul 18, 2016
Hm. I suspect this is because information about the (GCRS) moon frame is lost when you get an ICRS frame for the moon, e.g.,
one_deg_away.icrsIf you instead do (with the
SkyCoord):StuartLittlefair commentedon Jul 18, 2016
Indeed, and the case above is rather artificial since the conversion to ICRS is not necessary.
However, I do have a use case where the conversion to ICRS first is quite necessary. It's not that information is lost: the
obstimeis the crucial piece of information and that is stored in the ICRSSkyCoord. It's just that it's being ignored; I suspect that there's an assumption ofobstime=Time('J2000')or similar for all ICRSSkyCoords.But essentially I think the snippet above should work if all was operating as expected.
StuartLittlefair commentedon Jul 28, 2016
I'm closing this issue. There are two things going on here. The first is that I ignored the distance and should have written
The second is that
transforms the
icrs_coordto an altaz (Earth-centered) frame and computes the separation, whilsttransforms the moon to the
ICRSframe and computes the separation.In other words, both calculate the angular separation between two coordinates, but from different points of view. Whilst this is a bit counter-intuitive the code does the correct thing I think.