The coordinate system of the FITS file data array, will, in general,
be determined by the geometry of the instrumentation; consequently,
the direction of the axes in the FITS file will need to be
transformed to a coordinate system more natural to the physical system
being measured. The initial FITS paper (Wells, Greisen, and Harten 1981)
specifies use of the CROTA
keywords for describing how the
axes of the FITS array are rotated to yield physical coordinates but
does not define precisely how they are to be used. AIPS uses the
CROTA2 keyword to represent the angle, in decimal degrees, of the
declination or latitude axis with respect to the 2 axis of the data
array, measured in the counterclockwise direction. AIPS does not use the
CROTA1 keyword and assumes a default value of zero for the
CROTA2 keyword. The CROTA
keywords are necessary only
when the physical coordinates are rotated relative to the array
coordinates. These AIPS conventions were endorsed at the
Charlottesville meeting, have been widely used, and will be generally
understood. However, some individual FITS files may define the
CROTA
differently. Check the comments.
The CROTA
keywords cannot be applied in a straightforward way
to more than two dimensions or to cases where the axes are not
orthogonal. GC define the more general pixel coordinate (PC) matrix
P to transform between the FITS array axes
and axes in the
direction of the physical coordinate system but on the array scale
,
where the
signify that positions are with respect to the
reference point. Keywords are used to specify the elements of the PC
matrix:
PC
(floating) is an multi-indexed keyword giving the value of
the pixel coordinate matrix element
in equation 4.1.
The PC matrix technique permits considerable flexibility in transforming
between axes, including axes that are not orthogonal. Some of this
flexibility may be better left unused. In particular, it is possible to
transpose the axes when going from the pixel axes (
) to the
physical axes (
). Suppose the first two axes are
transposed, so that axis 2 in physical space corresponds to axis 1 in
pixel space and vice versa. The most rapidly varying axis is axis 1
(
in pixel space), described by the values of NAXIS1 and
CRPIX1. The corresponding physical axis is the one (
)
described by CTYPE2, CRVAL2, and CDELT2. CTYPE1
describes the first axis in physical space, which is now not the most
rapidly varying. If these concepts take some time to think through here,
imagine trying to understand them in a FITS file. Such complications
can be avoided if the tranformation is defined such that the diagonal
terms of the PC matrix predominate. Another potential application of the
PC matrix that is best unused is the ability to reverse the direction of
the axis. GC strongly recommend that the elements of the PC matrix
should be positive. Use the CDELT
keywords to reverse axis
directions.
Because the AIPS convention has been widely used, new software that
uses the PC matrix will still need to interpret files using the AIPS
conventions. Also, until FITS reading software routinely includes support
for the PC matrix, FITS files where the PC matrix represents a rotation
equivalent to that of the old CROTA
method should also include
the CROTA
keyword as well as the PC matrix. If
is
the latitude angle represented by CROTA
in the AIPS convention,
and
is the value of CDELT
, then
| (4.2) | |||
| (4.3) | |||
| (4.4) | |||
| (4.5) |
| (4.6) | |||
| (4.7) |
For a coordinate transformation following the AIPS convention, both
expressions give the same value. For more general tranformations, both
should be computed. If the difference between the two values of
obtained is within the expected precision, use the average (to reduce
the round-off errors). If the difference is larger, then the coordinate
axes are not orthogonal and the CROTA
description cannot be
used (HW).