next previous
Up: Representations of celestial coordinates


Subsections

   
6 Support for the AIPS convention

A large number of FITS images have been written using the AIPS coordinate convention and a substantial body of software exists to interpret it. Consequently, the AIPS convention has acquired the status of a de facto standard and FITS interpreters will need to support it indefinitely in order to obey the maxim "once FITS always FITS''. Translations between the old and new system are therefore required.

6.1 Interpreting old headers

In the AIPS convention, CROTA i assigned to the latitude axis was used to define a bulk rotation of the image plane. Since this rotation was applied after CDELT i the translation to the current formalism follows from

 
$\displaystyle {
\left(
\begin{array}{cc}
\hbox{{\tt CDELT1}} & 0 \\
0 & \hbox{...
...t PC1\_2}} \\
\hbox{{\tt PC2\_1}} & \hbox{{\tt PC2\_2}}
\end{array}\right) =
}$
$\displaystyle \hspace{70pt}
\left(
\begin{array}{rr}
\cos\rho & -\sin\rho \\
\...
...y}{cc}
\hbox{{\tt CDELT1}} & 0 \\
0 & \hbox{{\tt CDELT2}}
\end{array}\right) ,$

where we have used subscript 1 for the longitude axis, 2 for latitude, and written $\rho$ for the value of CROTA2. Equation (186), which includes the added constraint of preserving CDELT i in the translation, is readily solved for the elements of the PC i_ja matrix

 \begin{displaymath}\left(
\begin{array}{cc}
\hbox{{\tt PC1\_1}} & \hbox{{\tt P...
...
\frac{1}{\lambda} \sin\rho & \cos\rho
\end{array} \right) ,
\end{displaymath} (187)

where

\begin{displaymath}\lambda = \hbox{{\tt CDELT2}} / \hbox{{\tt CDELT1}} .
\end{displaymath} (188)

Note that Eq. (187) defines a rotation if and only if $\lambda = \pm 1$, which is often the case. In fact, the operations of scaling and rotation are commutative if and only if the scaling is isotropic, i.e. $\lambda = +1$; for $\lambda = -1$ the direction of the rotation is reversed. However, whatever the value of $\lambda$, the interpretation of Eq. (186) as that of a scale followed by a rotation is preserved.

The translation for CD i_ja is simpler, effectively because the CDELT i have an implied value of unity and the constraint on preserving them in the translation is dropped:

 
$\displaystyle \left(
\begin{array}{cc}
\hbox{{\tt CD1\_1}} & \hbox{{\tt CD1\_2}...
...box{{\tt CDELT1}}~\sin\rho & \hbox{{\tt CDELT2}}~\cos\rho
\end{array} \right) .$ (189)

The expressions in Hanisch & Wells (1988) and Geldzahler & Schlesinger (1997) yield the same results as Eq. (189) for the usual left-handed sky coordinates and right-handed pixel coordinates, but can lead to an incorrect interpretation (namely, possible sign errors for the off-diagonal elements) for other configurations of the coordinate systems. The Hanisch & Wells draft and the coordinate portions of Geldzahler & Schlesinger are superseded by this paper.

6.1.1 SIN

The SIN projection defined by Greisen (1983) is here generalized by the addition of projection parameters. However, these parameters assume default values which reduce to the simple orthographic projection of the AIPS convention. Therefore no translation is required.

   
6.1.2 NCP

The "north-celestial-pole'' projection defined by Greisen (1983) is a special case of the new generalized SIN projection. The old header cards

\begin{eqnarray*}\hbox{{\tt CTYPE1}} & = & \hbox{{\tt 'RA---NCP'}} , \\
\hbox{{\tt CTYPE2}} & = & \hbox{{\tt 'DEC--NCP'}} ,
\end{eqnarray*}


should be translated to the current formalism as

\begin{eqnarray*}\hbox{{\tt CTYPE1}} & = & \hbox{{\tt 'RA---SIN'}} , \\
\hbox{...
...PV2\_1}} & = & 0 , \\
\hbox{{\tt PV2\_2}} & = & \cot\delta_0 .
\end{eqnarray*}


6.1.3 TAN, ARC and STG

The TAN, ARC and STG projections defined by Greisen (1983, 1986) are directly equivalent to those defined here and no translation is required.

   
6.1.4 AIT, GLS and MER

Special care is required in interpreting the AIT (Hammer-Aitoff), GLS (Sanson-Flamsteed), and MER (Mercator) projections in the AIPS convention as defined by Greisen (1986). As explained in Sect. 7.1, the AIPS convention cannot represent oblique celestial coordinate graticules such as the one shown in Fig. 2. CRVAL i for these projections in AIPS does not correspond to the celestial coordinates $(\alpha _0,\delta _0)$ of the reference point, as understood in this formalism, unless they are both zero in which case no translation is required.

A translation into the new formalism exists for non-zero CRVAL i but only if CROTA i is zero. It consists of setting CRVAL i to zero and adjusting CRPIX j and CDELT i accordingly in the AIPS header whereupon the above situation is obtained. The corrections to CRPIX j are obtained by computing the pixel coordinates of $(\alpha,\delta) = (0,0)$ within the AIPS convention. For AIT and MER (but not GLS), CDELT i must also be corrected for the scaling factors $f_\alpha$ and $f_\delta$incorporated into the AIPS projection equations.

Of the three projections only GLS is known to have been used with non-zero CRVAL i. Consequently we have renamed it as SFL as a warning that translation is required.

6.2 Supporting old interpreters

As mentioned in Sect. 6, FITS interpreters will need to recognize the AIPS convention virtually forever. It stands to reason, therefore, that if modern FITS-writers wish to assist older FITS interpreters they may continue to write older style headers, assuming of course that it is possible to express the coordinate system in the AIPS convention.

Modern FITS-writers must not attempt to help older interpreters by including CROTA i together with the new keyword values (assuming the combination of CDELT i and PC i_ja matrix, or CD i_ja matrix, is amenable to such translation). We make this requirement primarily to minimize confusion.

Assuming that a header has been developed using the present formalism the following test may be applied to determine whether the combination of CDELT ia and PC i_ja matrix represents a scale followed by a rotation as in Eq. (186). Firstly write

 
$\displaystyle \left(
\begin{array}{cc}
\hbox{{\tt CD1\_1}} & \hbox{{\tt CD1\_2}...
...\tt PC1\_2}} \\
\hbox{{\tt PC2\_1}} & \hbox{{\tt PC2\_2}}
\end{array}\right) ,$ (190)

where 1 is the longitude coordinate and 2 the latitude coordinate, then evaluate $\rho_{\rm a}$ and $\rho_{\rm b}$ as
$\displaystyle \rho_{\rm a}$=$\displaystyle \left\{
\begin{array}{ll}
\arg~(\hphantom{-}\hbox{{\tt CD1\_1}}, ...
...D2\_1}})
& \quad\mbox{if \quad $\hbox{{\tt CD2\_1}} < 0$ }
\end{array}\right. ,$
$\displaystyle \rho_{\rm b}$=$\displaystyle \left\{
\begin{array}{ll}
\arg~( - \hbox{{\tt CD2\_2}}, \hphantom...
...1\_2}})
& \quad \mbox{if \quad $\hbox{{\tt CD1\_2}} < 0$ }
\end{array}\right. .$ (191)

If $\rho_{\rm a} = \rho_{\rm b}$ to within reasonable precision (Geldzahler & Schlesinger 1997), then compute

\begin{displaymath}\rho = (\rho_{\rm a} + \rho_{\rm b}) / 2
\end{displaymath} (192)

as the best estimate of the rotation angle, the older keywords are
 
$\displaystyle \hbox{{\tt CDELT1}}$ = $\displaystyle \hbox{{\tt CD1\_1}} / \cos\rho ,$  
$\displaystyle \hbox{{\tt CDELT2}}$ = $\displaystyle \hbox{{\tt CD2\_2}} / \cos\rho ,$ (193)
$\displaystyle \hbox{{\tt CROTA2}}$ = $\displaystyle \rho .$  

Note that the translated values of CDELT i in Eqs. (193) may differ from the starting values in Eq. (190).

Solutions for CROTA2 come in pairs separated by $180\hbox{$^\circ$ }$. The above formulæ give the solution which falls in the half-open interval $[0,180\hbox{$^\circ$ })$. The other solution is obtained by subtracting $180\hbox{$^\circ$ }$ from CROTA2 and negating CDELT1 and CDELT2. While each solution is equally valid, if one makes $\hbox{{\tt CDELT1}} < 0$ and $\hbox{{\tt CDELT2}} > 0$ then it would normally be the one chosen.

Of course, the projection must be one of those supported by the AIPS convention, which only recognizes SIN, NCP, TAN, ARC, STG, AIT, GLS and MER. Of these, we strongly recommend that the AIPS version of AIT, GLS, and MER not be written because of the problems described in Sect. 6.1.4. It is interesting to note that a translation does exist for the slant orthographic (SIN) projection defined in Sect. 5.1.5 to the simple orthographic projection of AIPS. However, we advise against such translation because of the likelihood of creating confusion and so we do not define it here. The exception is where the SIN projection may be translated as NCP as defined in Sect. 6.1.2.


next previous
Up: Representations of celestial coordinates

Copyright ESO 2002