[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FITS header values
Arne pointed out that we really should adhere to the new
FITS header conventions, rather than say "fooey." I can't
justify any other course of action, in all seriousness.
Okay, what does that mean?
The new FITS WCS conventions are described in a set of 3
papers by Calabretta and Griesen. The one most relevant to
our purposes is (yet to be?) published in Astronomy and Astrophysics.
One can find a preprint at
http://fits.gsfc.nasa.gov/documents.html#WCS
click on the link to "Paper III."
Keep this in mind: FITS readers are required to support
all old formats, forever, so if we continue to use the keywords
we've discussed over the past few days, our images should
in theory be supported for years.
Here are the changes between "old WCS" and "new WCS"
old WCS: used CDELT1, CDELT2 to indicate change in
coordinate value per pixels along axis 1, 2
used CROTA1, CROTA2 to indicate a small rotation
between the pixel axes and coordinate axes
new WCS: uses a matrix of coefficients to convert pixel values
to coordinate values in a single step:
( Dec ) ( CD1_1 CD1_2 ) ( col )
( ) = ( ) x (
( RA ) ( CD2_1 CD2_2 ) ( row )
this matrix equation allows for BOTH scaling and rotation,
in a single step.
So, if in the old system we used a header like this:
CTYPE1 = 'DEC--TAN' / first axis (column) is Declination
CRVAL1 = 0.0 / Dec of this middle pixel, in degrees
CRPIX1 = 1016 / middle pixel of array in col direction
CDELT1 = 0.002126 / moving forward one column increases the
/ Dec by 7.65 arcsec = 0.002126 deg
CTYPE2 = 'RA---TAN' / first axis (column) is Right Ascension
CRVAL2 = 129.0 / RA of this middle pixel, in degrees
CRPIX2 = 1015 / middle pixel of array in row direction
CDELT2 = -0.002126 / moving forward one column decreases the
/ RA by 7.65 arcsec = 0.002126 deg
then in the new system, as long as the pixel axes are aligned with the
(RA, Dec) axes, we would write
CTYPE1 = 'DEC--TAN' / first axis (column) is Declination
/ (still the same)
CRVAL1 = 0.0 / Dec of middle pixel, in degrees
/ (still the same)
CRPIX1 = 1016 / middle pixel of array in col direction
/ (still the same)
CD1_1 = 0.002126 / element (1,1) of a matrix which converts
/ (row, col) to (RA, Dec)
/ units are still degrees per pixel
CTYPE2 = 'RA---TAN' / first axis (column) is Right Ascension
/ (still the same)
CRPIX2 = 1015 / middle pixel of array in row direction
/ (still the same)
CRVAL2 = 129.0 / RA of this middle pixel, in
/ (still the same)
CD2_2 = -0.002126 / element (2,2) of a matrix which converts
/ (row, col) to (RA, Dec)
/ units are still degrees per pixel
Now, if we assume that the CCD coordinates are in fact aligned pretty
well with the celestial coordinates, then all the off-diagonal terms
in the matrix, CD1_2 and CD2_1, should be zero. And the FITS
convention is that any matrix element which is not specified in the
header is set to zero.
Okay, I've just tried using these keywords in an actual Mark IV
image from Tom, and the "DS9" FITS viewer does interpret them
correctly. Rah.
Arne wrote:
> One problem with Michael's definition of CDELT2
> (the RA increment). This would then change at every
> new declination setting.
The FITS WCS conventions involve projections and de-projections
from planar to spherical coordinates. The values placed in the
headers are interpreted as the conversion values which would be
used at the origin of the coordinate system (that is, at RA = 0
and Dec = 0, on the celestial equator). The FITS reader/viewer
is obliged to perform all necessary conversions, deprojections,
and spherical geometry for the image in question.
As evidence for this statement, one might look at Table 2
in the Calabretta and Greisen paper mentioned above, which
shows CD1_1 = 0.003, meaning 10.8 arcsec per pixel in RA,
and CD2_2 = 0.003, also meaning 10.8 arcsec pixel, in Dec,
for (RA = 46 degrees, Dec = +64 degrees).
Michael Richmond