...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 ยง3.4, in the form of a pointer “wcsinfo” to a FrameSetFrameSet, then you may determine if the current coordinate system is a celestial one or not, as follows:


\begin{terminalv}
AstFrame *frame;
int issky;
\par
...
\par
/* Obtain a pointer ...
...T );
issky = astIsASkyFrame( frame );
frame = astAnnul( frame );
\end{terminalv}

This will set “issky” to 1 if the WCS is a celestial coordinate system, and to zero otherwise.