[AstroPy] Determining when world and pixel axes are independent

Phil Hodge hodge at stsci.edu
Mon Jan 13 14:18:56 EST 2014


Consider the case of celestial coordinates with the center of the image 
close to either the north or south pole, but with the declination axis 
aligned with the image Y axis.  You will need both right ascension and 
declination to calculate an X coordinate in the image, or both X and Y 
to calculate either right ascension or declination.  So you can't just 
look at the off-diagonal elements of the PC matrix.

You could take pixel coordinates [1, 0, ...], [0, 1, ...], etc., and 
transform each of them to world coordinates.  If the world coordinates 
have non-zero elements in more than one world coordinate vector, the 
axes are not independent.

Phil

On 01/13/2014 02:11 PM, Thomas Robitaille wrote:
> I have the same question. Just brainstorming here since I don't know
> the final answer, but I guess there are (as you said) two things going
> on here - one being the fact that certain projections can couple
> coordinates (such as RA/Dec) in some projections (e.g. TAN), and the
> other being rotations of coordinate systems relative to the pixel
> axes. For the latter, I *guess* one could look at the non-diagonal
> elements of the PC matrix:
>
>      >>> w = WCS(...)
>      >>> w.wcs.get_pc()
>      array([[ 1.,  0.,  0.],
>             [ 0.,  1.,  0.],
>             [ 0.,  0.,  1.]])
>
> in the above case, there is no rotation. But for axes 1 and 2 the
> projection is not -CAR:
>
>      In [9]: w.wcs.ctype
>      Out[9]: ['RA---SFL', 'DEC--SFL', 'VOPT']
>
> so axes 1 and 2 are linked (but axis 3 is independent). Maybe the
> solution to find if an axes is independent of the others is:
>
> - check that the non-diagonal elements for that axis are zero
> - check that the projection for that axis is not a spherical
> projection, unless it's -CAR in which case it's also fine
>
> What do others think? Is this robust? Or are there projections that
> are not the usual spherical projections that might link axes? Does one
> need to also check that there are no distortion coefficients in
> addition to the above criteria?
>
> Cheers,
> Tom
>
>
> On 13 January 2014 19:58, Chris Beaumont <beaumont at hawaii.edu> wrote:
>> Hi,
>>
>> Given a WCS object, I'd like to know which pixel and world axes are
>> independent of each other. For example:
>>
>>   * X/Y are generally NOT orthogonal to RA or DEC in the tan projection (to
>> compute RA or DEC, you need both X and Y)
>>   * X is independent to DEC in cartesian projection, UNLESS something like
>> cd2_1 or crota are nonzero
>> * the velocity axis in a spectral data cube is usually orthogonal to the
>> spatial axes (you can translate between Z and V without knowledge of X and
>> Y).
>>
>> I'm sure there are lots of corner cases here. Is there any way I can
>> introspect a WCS object to generally determine if a given world and pixel
>> axis are independent of each other?
>>
>> Thanks,
>> Chris
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy




More information about the AstroPy mailing list