next up previous contents index
Next: Region of Interest Up: MIRIAD Subroutine Library Previous: Image Data Sets

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

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

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.


next up previous contents index
Next: Region of Interest Up: MIRIAD Subroutine Library Previous: Image Data Sets


Last generated by rsault@atnf.csiro.au on 14 Mar 1996