Creating a CmpFrame

A very common use for a CmpFrameCmpFrame within astronomy is to represent a “spectral cube”. This is a 3-dimensional FrameFrame in which one of the axes represents position within a spectrum, and the other two axes represent position on the sky (or some other spatial domain such as the focal plane of a telescope). As an example, we create such a CmpFrame in which axes 1 and 2 represent Right Ascension and Declination (ICRS), and axis 3 represents wavelength (these are the default coordinate Systems represented by a SkyFrameSkyFrame and a SpecFrameSpecFrame respectively):


\begin{terminalv}
AstSkyFrame *skyframe;
AstSpecFrame *specframe;
AstCmpFrame *c...
...me( '''' );
cmpframe = astCmpFrame( skyframe, specframe, '''' );
\end{terminalv}

If it was desired to make RA and Dec correspond to axes 1 and 3, with axis 2 being the spectral axis, then the axes of the CmpFrame created above would need to be permuted as follows:


\begin{terminalv}
int perm[ 3 ];
...
\par
perm[ 0 ] = 0;
perm[ 1 ] = 2;
perm[ 2 ] = 1;
astPermAxes( cmpframe, perm );
\end{terminalv}