WCSTools: Putting Image World Coordinate Systems to Use, Douglas J. Mink (1996), presented at the Sixth Annual Conference on Astronomical Data Analysis Software and Systems (ADASS 96) in Charlottesvile, Virginia in September 1996, published in Astronomical Data Analysis Software and Systems VI, A.S.P. Conference Series, Vol. 125, 1997, Gareth Hunt and H. E. Payne, eds., p. 249. |
Individual astronomers have used a variety of methods to match image stars with reference catalogs to set world coordinate systems for small sets of images. All widely-known methods required extensive user interaction until Elwood Downey reported (Downey and Mutel 1996) that the University of Iowa Automated Telescope Facility was automatically adding world coordinate system information to the header of each image it took. Steps were taken immediately to apply his program, SETWCS, to data from telescopes used by astronomers at the Center for Astrophysics. As the Iowa software was adapted to deal with more types of images, a whole suite of portable utilities and subroutines was developed to set and use image world coordinate systems.
While its overall structure was maintained, the program was modified extensively to handle all FITS image data types, access IRAF .imh (OIF) files as well as FITS files, use a standard WCS library, and handle a variety of reference catalogs. In addition to the HST Guide Star Catalog, the USNO A1.0 Catalog (Monet 1996) and user-generated reference catalogs in Starbase format (Roll 1996) may be used. Image stars are now sorted by integrated rather than peak flux. Instead of matching stars using a grid of possible offsets, each possible set of offsets between reference and image stars is checked and the most common offset is used as an initial value for the fit. The WCS fit has been expanded to include plate scale and rotation angle, and many fixed parameters, such as tolerance for reference/image position matches can now be changed on the command line.
In one-third to one-half of the 10' x 10' images we used for testing,
there were too few Guide Stars to fit a world coordinate system.
Figure 1 shows such an image with only 2 HST Guide
Stars, positioned according to a nominal WCS based on the telescope
pointing direction and an assumed plate scale. To deal with this situation,
the star-finding code in IMWCS was broken out into a new program, IMSTAR,
which catalogs stars with positions from images with a known WCS, such as
those created from the Digitized Sky Survey (DSS). The DSS thus
serves as a giant catalog, the depth of which can be varied as needed by
altering the parameters used by IMSTAR. To make it easier to obtain DSS
images covering the same region as a telescope image, a new program, IMSIZE,
was written. It translates pointing information from the telescope image to
the format needed by the DSS GETIMAGE program to extract an image covering the
correct region.
Figure 2 shows the same image as Figure 1 after it was
processed by IMWCS. The positions of the stars extracted from a DSS
image of the same region of the sky are plotted as circles. Where it is
available, the USNO A1.0 catalog, with 491,848,883 sources, can be used
directly, instead of the extracted DSS catalog, to fit a WCS with similar
accuracy.
Several image manipulation programs were also developed. EDHEAD edits the header of a FITS or IRAF image using any Unix text editor. IMHEAD lists the entire header of a FITS or IRAF image. GETHEAD and SETHEAD print and change, respectively, specified FITS or IRAF header parameters. I2F converts an IRAF .imh file to FITS. For all of these programs, the IRAF file may be of either binary byte order (Sun/HP or IBM PC/Dec).
Further information about this software and how to obtain it may be found on the World Wide Web at http://tdc-www.harvard.edu/software/wcstools.
I am grateful to Elwood Downey for proving that this project was possible and for sharing his code. Scott Kenyon patiently tested the WCS fitting program on hundreds of images until it worked all of the time. He also provided the image used as an illustration in this paper. Allan Brighton of ESO tested the WCS translation code on many kinds of images, enabling me to make it as general as possible.