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.
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 .
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory