[AstroPy] Problem running pywcs example
Phil Hodge
hodge at stsci.edu
Fri Aug 20 09:10:22 EDT 2010
Peter,
> Thanks for the "sub" suggestion... however, that seems to have the side effect of reversing
> the x,y output order from new_wcs.wcs_sky2pix when the FITS header has CTYPE1="DEC--TAN"
>
> i.e., the output from new_wsc.wcs_sky2pix(ra, dec) is [ array([y]), array([x]) ] when
> CTYPE1="DEC--TAN", instead of [ array([x]), array([y]) ]
That sounds like a bug. Mike and I talked about this (the order of the
results depending on CTYPEi) yesterday. I can understand that when you
have other coordinate types (e.g. wavelength) together with celestial
coordinates, the least confusing result is that the order of the output
world coordinates be the same as CTYPEi. If you extract just the
celestial coordinates and specify the order with the sub() method,
however, you really shouldn't have to care about the order of CTYPEi in
the header; the celestial coordinates in the world coordinate vector
should agree with what you specified in sub(), and the pixel coordinates
should always be in the order [x, y]. (In my humble opinion.)
Phil
More information about the AstroPy
mailing list