[AstroPy] Determining when world and pixel axes are independent

Thomas Robitaille thomas.robitaille at gmail.com
Mon Jan 13 14:46:24 EST 2014


Hi Phil and Perry,

On 13 January 2014 20:24, Perry Greenfield <stsci.perry at gmail.com> wrote:
>
> On Jan 13, 2014, at 2: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?
>
> No, it is not robust. Phil basically explains why. If the WCS involves expressions that use more than one axis, there presumably is coupling between more than one axis. Many of the intrinsic projections have intrinsic coupling (e.g. TAN).

Just to clarify, I think we are agreeing here - I mentioned:

"- check that the projection for that axis is not a spherical
projection, unless it's -CAR in which case it's also fine"

In the example you and Phil gave, if the non-diagonal elements are
zero but the projection is TAN, this violates the rule above. My point
was that if any of the the diagonal elements are non-zero, or if the
projection is one of the projections of a sphere, i.e. any projections
from paper 2, (except CAR), then this means the axes are coupled, but
should one be ok if all non-diagonal elements are zero *and* the
projection is CAR or a projection that is not one of the spherical
projections (but could be e.g. a spectral projection convention). Is
this correct?

Cheers,
Tom

>
>
> Perry
>



More information about the AstroPy mailing list