Image Coordinate System

Miriad defines and stores image coordinate system information in a similar fashion to AIPS and FITS. Most cubes will have coordinates along its three axis of RA, DEC and velocity. The item ctype gives the type of coordinate along a particular axis, whereas crval, crpix and cdelt give the value of the coordinate at the reference pixel, the value of the reference pixel, and the increment between pixels, respectively. Unlike AIPS and FITS, RA and DEC are given in radians, and velocity is given in km/sec. RA and DEC will generally need to be converted to hours,minutes,seconds, or degrees,minutes,seconds, before being presented to the user.


Table 2.8: Image Coordinate System
Ctype Crval Crpix Cdelt Equation
RA--xxx $\alpha_0$ $i_0$ $\Delta\alpha$ $\alpha=\alpha_0+\Delta\alpha/\cos(\delta_0)(i-i_0)$
DEC-xxx $\delta_0$ $i_0$ $\Delta\delta$ $\delta=\delta_0+\Delta\delta(i-i_0)$
VELO-xxx $v_0$ $i_0$ $\Delta v$ $v=v_0+\Delta v(i-i_0)$
Others $x_0$ $i_0$ $\Delta x$ $x=x_0+\Delta x(i-i_0)$


Table 2.8 gives quite approximate formulae for converting from pixel number to an astronomical coordinate. For more accurate formulae, see AIPS Memo No. 27, ``Non-linear Coordinate Systems in AIPS'' (Eric Greisen).

For example, the following code fragment calculates RA, DEC and velocity.

Table 2.9: Coordinate System Code Example
\begin{table}\begin{verbatim}character ctype1*8,ctype2*8,ctype3*8
double pre...
... + cdelt2 *(j-crpix2)
v = crval3 + cdelt3 *(k-crpix3)\end{verbatim}
\end{table}


This code fragment checks that the axis are in the order RA, DEC then velocity (i.e. the normal ordering) and aborts if they are not. Smarter code would allow them in any order, and would probably treat any unrecognized ctype as a linear coordinate system. It uses default values (if values of crval, crpix and cdelt are missing) of 0, 1 and 1. Probably better default values could be chosen, though if ctype is an item, then we can be fairly certain that the other parameters will also be present.

Miriad manager
2011-08-19