WCSTools Sky World Coordinate Systems

World Coordinate System (WCS) keywords in the header of a FITS or IRAF image file define the relationship between pixel coordinates in the image and sky coordinates. The WCSTools package currently supports five ways of setting a world coordinate system from header keywords: FITS WCS (AIPS subset and FITS-WCS standard), WCSTools and Spitzer polynomial extensions to those projections, IRAF TNX and ZPX projections, Telescope coordinates, and Digitized Sky Survey plate solution.

FITS WCS

By default, Mark Calabretta's WCSLIB subroutines are used to deal with the 25 projections of the proposed FITS WCS standard. Alternatively, the eight most commonly-used projections of classic AIPS may be computed using the worldpos and worldpix subroutines written by Bill Cotton and Eric Greisen of NRAO by using the -z argument on the command line of a WCSTools program or calling setdefwcs(WCS_ALT) if using the libwcs library. A data structure, I/O software, and a few improvements have been added at SAO. Three pairs of keywords are always used. Support for the NCP projection is maintained despite its absence from the proposed standard. Eric Greisen described four of them in this memo.

Sample images for all of the projections may be obtained here.

CTYPE1 and CTYPE2 indicate the coordinate type and projection. The first four characters are RA-- and DEC-, GLON and GLAT, or ELON and ELAT, for equatorial, galactic, and ecliptic coordinates, respectively. The second four characters contain a four-character code for the projection. The presence of the CTYPE1 keyword is used to select for this WCS subset. If a CTYPEn value of LINEAR is used, units are read from the CUNITn keywords and returned by programs which return world coordinates as strings. A flag in the data structure may be set to select the AIPS subroutines.

CRPIX1 and CRPIX2 are the pixel coordinates of the reference point to which the projection and the rotation refer.

CRVAL1 and CRVAL2 give the center coordinate as right ascension and declination or longitude and latitude in decimal degrees.

There are three options for the scale and rotation:

  • Historically, CDELT1 and CDELT2 have been used to indicate the plate scale in degrees per pixel and CROTA2 has been used to indicate the rotation of the horizontal and vertical axes in degrees. Usually the axes rotate together and CROTA2 is used to indicate that angle in degrees. The libwcs subroutines assume if either CROTA1 or CROTA2 is non-zero, the axes are rotated together by the non-zero value, i.e. both are assumed to have the non-zero value.

    The FITS WCS standard uses a rotation matrix, CD1_1, CD1_2, CD2_1, and CD2_2 to indicate both rotation and scale, allowing a more intuitive computation if the axes are skewed. This model has been used by HST and IRAF for several years.

    The 1996 proposed FITS WCS standard used PC001001, PC001002, PC002001, and PC002002 to represent the rotation matrix but retained CDELT1 and CDELT2 for the scale. It is also read by this software, but should not be used for new WCS's.

    Refer to I: "Representations of world coordinates in FITS", Greisen, E.W. & Calabretta, M.R. (2002), Astronomy & Astrophysics, 375, 1061-1075 and II: "Representations of celestial coordinates in FITS", Calabretta. M.R., & Greisen, E.W., (2002), Astronomy & Astrophysics, 375, 1077-1122

    An image may have multiple WCS transformations in its header, and they may be dependent on each other if they follow the convention developed by Doug Mink and Steve Allen in a memo, "The WCSDEP Convention", available in PDF or Postscript format.

    IRAF TNX Projection

    The IRAF TNX projection, in which a polynomial is used to correct a tangent plane (TAN) projection, has been implemented in parallel with the standard FITS WCS projections. This cannot yet be fit by IMWCS, but all pixel to sky and sky to pixel coordinate conversions can be carried out.

    IRAF ZPX Projection

    The IRAF ZPX projection follows the the FITS conventions for a zenithal polynomial projection (ZPN) but adds an additional two-dimensional polynomial distortion term to the evaluation. It has been implemented in parallel with the standard FITS WCS projections. It cannot yet be fit by IMWCS, but all pixel to sky and sky to pixel coordinate conversions can be carried out.

    SAO Polynomial Fit

    This is simply a fit of 12 polynomial coefficients, 6 each in X and Y, equivalent to the first 6 terms used by the Digitized Sky Survey. It gives a better fit than a plane tangent projection when the optical path is more complicated than a simple tangent plane can deal with. The FITS WCS community is working out a standard polynomial model, but it does not yet exist. The 6 terms for each axis are constant, x, y, x*x, y*y, and xy.

    Spitzer Simple Imaging Polynomial (SIP)

    This convention provides a straight-forward means for storing distortion information in FITS image headers. SIP was initially developed before the launch of the Spitzer Space Telescope. Images from the Spitzer instruments are distorted by a few percent relative to a regular sky grid. This distortion, expressed as a function of pixel position, is well-represented by polynomials.

    Telescope Coordinates

    In order to get a rough idea of the position of objects on the sky without going to the trouble of fitting a world coordinate system to an image and to provide an initial guess when fitting a WCS, a nominal WCS can be created out of keywords which are usually present in a telescope image. It is reasonable (though maybe not accurate) to assume that the telescope pointing direction given by RA and DEC keywords is at the center of the image, the coordinates of which are NAXIS1/2, NAXIS2/2. This gives us CRVAL1, CRVAL2, CRPIX1, and CRPIX2. Assuming the rotation to be zero, CROTA1 and CROTA2 are set to zero.

    There is currently no standard for a plate scale keyword. libwcs uses the SECPIX or PIXSCALE keyword to set CDELT1 and CDELT2, or sets CDELT1 and CDELT2 separately using SECPIX1 and SECPIX2 or PIXSCAL1 and PIXSCAL2 by converting from arcseconds per pixel to degrees per pixel. The PLTSCALE keyword is sometimes present instead of SECPIX, but it is currently unimplemented in libwcs because it has been used as both arseconds per pixel and degrees per pixel. Because a CCD image can be closely approximated by a plane tangent projection, CTYPE1 is set to RA---TAN and CTYPE2 to DEC--TAN. The NRAO or WCSLIB subroutines can then be used for pixel to sky and sky to pixel coordinate conversion.

    Some information about the coordinate system is often omitted from file headers. An attempt has been made to adopt reasonable default values when something is missing or set strangely. The EPOCH keyword is expected to mean the equinox of the coordinates in the FITS tradition.

    
    In header:                           In wcs structure:
    
    EPOCH       EQUINOX     RADECSYS     epoch     equinox    radecsys
    1950        none        none         date-obs  1950       FK4
    2000        none        none         date-obs  2000       FK5
    date<1980   none        none         date-obs  date       FK4
    date>1980   none        none         date-obs  date       FK5
    none        none        none         date-obs  2000       FK5
    none        1950        none         date-obs  1950       FK4
    none        2000        none         date-obs  2000       FK5
    0           none        none         date-obs  1950       FK4
    0           1950        none         date-obs  1950       FK4
    0           2000        none         date-obs  2000       FK5
    

    Digitized Sky Survey Plate Solutions

    This NASA-funded collection of 1479 compressed images which cover the entire sky became a major astronomical tool as soon as it was released by the Space Telescope Science Institute. The pixel to sky coordinate transformation is a third-order polynomial with cross-terms; it uses 13 coefficient keywords per axis and additional keywords as well. libwcs uses platepos and platepix subroutines adapted from code and equations included with the 101 CDROMs which contain this data set. The plate (not image!) center is given by the keywords PLTRAH, PLTRAM, PLTRAS, PLTDECSN, PLTDECD, PLTDECM, and PLTDECS. The presence of the first of these, PLTRAH, is used as an indication that this WCS is present in an image header.

    Last updated 19 May 2014 by Jessica Mink

    Telescope Data Center [WCSTools] [SAOimage] [SAOimage WCS]