Go up one levelGo to Previous Go to Next

World Coordinates Support

The world coordinates support in this library based in part on Doug Mink's wcssubs package. a C library that is also used by saoimage 1 . The C library is not accessed directly by applications, but through the C++ class WCS . This class is designed so that various implementations are also possible. Class WCS is a reference counted class that manages a pointer to a class derived from the abstract base class WSCRep . SAOWCS is a subclass of WCSRep that is based on the wcssubs package. Other subclasses can be defined that are based on other libraries. 2

Another class, called WorldCoords , is not based on the wcssubs package, but is used to represent and do operations on world coordinates, without reference to a particular image. The SAOWCS class takes a FITS header and is then capable of converting between image and world coordinates, while the WorldCoords class just represents a world coordinate value (a, d). Another class WorldOrImageCoords , represents, as the name implies, either world or image coordinates, depending on the value of a flag. The table below gives an overview of the classes dealing with world coordinates.

Class

Description

WorldCoords

Represents a world coordinate point (a, d, equinox ) .

ImageCoords

Represents an image coordinate point (x, y).

WorldOrImageCoords

Represents either world or image coordinates, depending on the value of a flag. Used as a place holder when it is not clear ahead of time whether or not world coordinate information will be available.

HMS

Represents a value in hours (or degrees), minutes, and seconds.

WCS

Reference counted interface class for managing world coordinates.

WCSRep

Abstract base class for WCS implementations.

SAOWCS

Based on Doug Mink's wcssubs package and used to convert between world and image coordinates, given a FITS image header and/or the necessary information.

In addition to the C++ classes listed above, a simple Tcl command, wcs , is provided to convert between hh:mm:ss +dd:mm:ss format and double degrees in Tcl applications. A lot more could be done in this area, if it is needed. Currently the rtd and skycat applications, which are based on this package, provide many of the features found in the WCS class as part of a Tcl interface.

See also Representing World and Image Pixel Coordinates in the User's Guide .


1. The source code for the wcssubs package can be found at:
ftp://cfa-ftp.harvard.edu/pub/gsc/WCSTools/ .

2. The GAIA plugin implements a subclass of WCSRep that is based on the Starbase library. The sources can be found under ftp://ftp.eso.org/pub/archive/skycat/plugins


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory