next up previous
Next: ...Test if a WCS is a Spectral Coordinate System
Up: How To...
Previous: ...Convert Between Pixel and World Coordinates

...Test if a WCS is a Celestial Coordinate System  

The world coordinate system (WCS) currently associated with an image may often be a celestial coordinate system, but this need not necessarily be the case. For instance, instead of right ascension and declination, an image might have a WCS with axes representing wavelength and slit position, or maybe just plain old pixels.

If you have obtained a WCS calibration for an image, as in [*], in the form of a pointer WCSINFO to a FrameSet, then you may determine if the current coordinate system is a celestial one or not, as follows:

      INTEGER FRAME
      LOGICAL ISSKY

      ...

*  Obtain a pointer to the current Frame and determine if it is a
*  SkyFrame.
      FRAME = AST_GETFRAME( WCSINFO, AST__CURRENT, STATUS )
      ISSKY = AST_ISASKYFRAME( FRAME, STATUS )
      CALL AST_ANNUL( FRAME, STATUS )

This will set ISSKY to .TRUE. if the WCS is a celestial coordinate system, and to .FALSE. otherwise.



next up previous
Next: ...Test if a WCS is a Spectral Coordinate System
Up: How To...
Previous: ...Convert Between Pixel and World Coordinates

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils