Next: Automated Pipeline Processing for AXAF Ground Calibration
Previous: A Source Detection Method for ROSAT/PSPC X-Ray Images based on Wavelet Transforms
Table of Contents --- Search --- PS reprint


Astronomical Data Analysis Software and Systems V
ASP Conference Series, Vol. 101, 1996
George H. Jacoby and Jeannette Barnes, eds.

World Coordinate System Based Image Registration Tools for IRAF

L. E. Davis

National Optical Astronomy Observatories, P.O. Box 26732, Tucson, AZ 85726

Abstract:

With the rapid growth in the number of guest observer facilities and astronomical databases, the ability to automatically match sky images observed in different wavelength regimes is becoming increasingly important. In this paper we discuss the changes to the current IRAF world coordinate system required to support multiwavelength sky image matching, and describe a set of world coordinate system based image registration tools currently under development in IRAF.

1. Introduction

Solving multiwavelength sky image registration problems requires: (1) that the celestial world coordinate system (CWCS) is known, (2) that the CWCS is encoded in the image in a standard manner and, (3) that image registration tools that use the CWCS information are available. In this paper we assume that conditions (1) and (2) have been met and concentrate on (3) presenting a set of new CWCS based image registration tools for the IRAF system. Sections 2 and 3 discuss the enhancements to the IRAF mini-world coordinate system (MWCS) and MATH libraries required to support the new registration tools. Sections 4, 5, and 6 describe the existing and planned tools including tasks for, performing celestial coordinate transformations on coordinate lists and images, registering lists of images, and reprojecting lists of images. The current status of and future plans for the software are summarized in section 7. Although the focus of this paper is on registering sky images, many of the tools described here are suitable for use with any image data which has a known world coordinate system (WCS).

2. New System Support for Celestial Coordinates

All celestial coordinate i/o and computations are handled by the IRAF MWCS (Tody 1989). MWCS routines exist for reading/writing CWCS information from/to the image headers and for doing pixel to celestial coordinate and vice versa transformations. New CWCS functions can be added to MWCS by writing the appropriate function driver and entering it into the MWCS function table. As a result all the new CWCS based image registration tools are independent of the representation of the CWCS in the image header and its functional form, and automatically inherit new MWCS functionality as it becomes available.

The current IRAF MWCS system supports equatorial celestial coordinates only. MWCS support for ecliptic, galactic, and supergalactic celestial coordinates has been added to the IRAF development system.

The current IRAF MWCS system supports the TAN, SIN, ARC, and GLS projective geometries only. IRAF function drivers have been written and tested for all 25 projective geometries (AZP, TAN, SIN, STG, ARC, ZPN, ZEA, AIR, CYL, CAR, MER, CEA, COP, COD, COE, COO, BON, PCO, GLS, PAR, AIT, MOL, CSC, QSC, and TSC) proposed by Greisen & Calabretta (1995), using the WCSlib-1.0 (Calabretta 1995) routines as a template. Work is currently in progress to upgrade the new function drivers to the WCSlib-2.1 (Calabretta 1995) standard.

3. New System Support for Celestial Coordinate Transformations

The values of the standard FITS header keywords (CTYPE, CRPIX, CRVAL, CDELT/CROTA or alternatively CD) are sufficient to permit the IRAF MWCS to attach celestial coordinate values to the image pixels and vice versa (Wells, Greisen, & Harten 1981; Hanisch & Wells 1988). Additional FITS header keywords have been proposed (RADECSYS, EPOCH/EQUINOX, DATE-OBS/MJD-OBS) which fully specify the fundamental CWCS, the equinox, and the epoch of the observation (Hanisch & Wells 1988; Greisen & Calabretta 1995). MWCS is sufficient to match the CWCSs of images whose fundamental CWCSs are identical, e.g., FK5 2000.0. However many image matching problems require registering images whose fundamental CWCSs are different, e.g., FK4 1950.0 and FK5 2000.0, or FK5 2000.0 and galactic. This type of registration problem requires the software to identify the fundamental CWCS of the images, and to accurately transform the image coordinates from the fundamental CWCS of one image to that of another.

Accordingly a simple syntax for specifying the fundamental CWCS was developed, and an accompanying set of procedures for decoding this syntax, decoding the image CWCS, and performing the required coordinate transformations was written. Equatorial (FK4, FK4-NO-E, FK5, GAPPT), ecliptic, galactic, and supergalactic coordinates are supported. These procedures are layered on the IRAF IMIO and MWCS libraries and the Starlink positional astronomy library SLALIB. The IRAF IMIO and MWCS routines are used to compute the celestial coordinate values of the image pixels and the SLALIB routines are used to perform all the required celestial coordinate transformations. SLALIB has been made available to IRAF courtesy of Starlink and will be included in future versions of the IRAF MATH package.

4. New Celestial Coordinate Transformation Tasks

A new task for transforming coordinate lists from one CWCS to another SKYCTRAN has been written. SKYCTRAN supports the equatorial (FK4, FK4-NO-E, FK5, GAPPT), ecliptic, galactic, and supergalactic CWCSs, as well as the IRAF MWCS (logical, tv, physical, and world) systems. SKYCTRAN can transform from any one of the supported CWCSs to any other using a user or image CWCS as the input/output CWCS and the IRAF and SLALIB routines described in section 3. In interactive mode SKYCTRAN can accept image cursor input. Coordinate transformations can be performed in place or new lists of input and output coordinates only can be written. Typical SKYCTRAN applications include precessing coordinate lists, transforming from equatorial to galactic coordinates and vice versa, locating objects found in one image in another, and computing matched pixel coordinate grids for input to the image registration tasks.

In some cases it may be desirable to transform the image CWCS itself from one fundamental system to another. For sky geometries which are projections to the tangent plane, e.g., TAN, SIN (alpha = beta = 0.0), ARC or STG, it can be shown that any one of the fundamental CWCSs is equivalent to any other to within a shift and rotation (Greisen 1983). For this type of projection the image CWCS can be converted accurately from one fundamental system to another by transforming the reference pixel vector CRVAL and rotating the CD matrix. A new task for performing this operation, IMWCSTRAN is currently under development. IMWCSTRAN uses the IRAF MWCS library and routines in the SLALIB library to perform the transformation.

5. New WCS/CWCS Based Image Registration Tasks

Two new WCS/CWCS based image registration tasks, WREGISTER and SREGISTER, have been written. These tasks compute grids of matched pixel coordinates in the reference and input images, use the grids to compute coordinate mappings from the reference to the input images, use the coordinate mappings to compute output image grey levels by interpolating in the input image at the positions of the mapped reference pixels, optionally perform flux conservation by multiplying the interpolated pixel values by the Jacobian of the mapping function and, copy the reference image WCS/CWCS to the output images. WREGISTER assumes that the reference and input images have the same fundamental coordinate system, e.g., FK4 1950.0 or indeed any linear system, whereas SREGISTER assumes that both images have standard CWCSs, although not necessarily identical ones, e.g., FK4 1950.0 and galactic. Each of the steps in the registration process can be performed separately. For example coordinate grids can be computed with the WCSXYMATCH/SKYXYMATCH tasks, and coordinate mappings can be computed and examined interactively with the WCSMAP/SKYMAP tasks.

Matched pixel grids are used to compute the coordinate mappings because evaluation of the true mapping function for every point in the output image can be an expensive operation, particularly for sky projection functions which contain numerous trigonometric functions. The current tasks solve this problem by fitting a smooth polynomial surface to the matched pixel grid, and evaluating the smoothed surface at the position of all the reference pixels. Future versions of the resampling code will include the ability to interpolate directly in the matched pixel grid, an option already supported for high order polynomial coordinate surfaces.

6. New CWCS Based Image Projection Task

A new CWCS based image projection task IMPROJECT is currently under development. IMPROJECT will transform an image from its native projection, e.g., TAN, to a user specified projection, e.g., LINEAR, ARC, etc. For the case of a TAN to LINEAR projection curved lines of equal ra and dec in the input image would become straight lines in the output image. The existing GEOTRAN task already has the ability to perform image projections if it is supplied with a list of matched pixel coordinates by the user and the required coordinate mapping can be adequately represented by a polynomial surface. IMPROJECT will use the image and user specified CWCS, and the IRAF MWCS and SLALIB libraries to compute the required coordinate mapping.

7. Current Status and Future Plans

Some of the software described in this paper is already available as part of the IRAF add-on package IMMATCH. The new tasks will be added to IMMATCH as they are completed. Check http://iraf.noao.edu/ and the ADASS news groups for the latest status reports on the IMMATCH software.

The IRAF MWCS enhancements described here, including support for the new sky projection geometries and celestial coordinate systems other than equatorial, are part of ongoing IRAF system development, will be part of the next major release of IRAF, but are not yet available in IRAF export.

Acknowledgments:

The author would like to thank Patrick Wallace of Starlink for generously permitting the use of the SLALIB library within IRAF, and Mark Calabretta (ATNF) for making the WCSLIB-1.0 library publicly available and providing a pre-release version of WCSLIB-2.0 to the author for evaluation and testing.

References:

Calabretta, M. 1995, WCSlib Versions 1 and 2.1,
ftp://fits.cv.nrao.edu/fits/src/wcs/wcslib-[1.0/2.1].tar.gz

Greisen, E. R. 1983, Non-linear Coordinate Systems in AIPS, AIPS Memo No. 27, ftp://fits.cv.nrao.edu/fits/documents/wcs/aips27.ps

Greisen, E. R. & Calabretta, M. 1995, Representations of Celestial Coordinates in FITS, ftp://fits.cv.nrao.edu/fits/documents/wcs/wcs.all.ps

Hanisch, R. J., & Wells, D. C. 1988, World Coordinate System Representations Within the FITS Format, draft,
ftp://fits.cv.nrao.edu/fits/documents/wcs/wcs88.ps

Tody, D. C. 1989, The Mini-WCS Interface,
ftp://iraf.noao.edu/iraf/docs/mwcs.txt.Z

Wallace, P. T. 1995, Starlink User Note 67.30,
ftp://starlink-ftp.rl.ac.uk/pub/ptw/slalib/slalib_f.tar.Z

Wells, D. C., Greisen, E. W., & Harten, R. H. 1981, A&A, 44, 363


Next: Automated Pipeline Processing for AXAF Ground Calibration
Previous: A Source Detection Method for ROSAT/PSPC X-Ray Images based on Wavelet Transforms
Table of Contents --- Search --- PS reprint
Wed Jul 3 07:37:43 MST 1996