next up previous 264
Next: Selecting Frame Axes
Up: Representing Coordinate Systems (Frames)
Previous: Reading Formatted Axis Values


Permuting Frame Axes

Once a Frame has been created, it is not possible to change the number of axes it contains, but it is possible to change the order in which these axes occur. To do so, an integer permutation array is filled with the numbers of the axes so as to specify the new order, e.g:

int perm[ 2 ] = { 2, 1 };

In this case, the axes of a 2-dimensional Frame could be interchanged by passing this permutation array to the astPermAxes function. That is, an ($x_1,x_2$) coordinate system would be changed into an ($x_2,x_1$) coordinate system by:

astPermAxes( frame, perm );

If the axes are permuted more than once, the effects are cumulative. You are, of course, not restricted to Frames with only two axes.


next up previous 264
Next: Selecting Frame Axes
Up: Representing Coordinate Systems (Frames)
Previous: Reading Formatted Axis Values

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
7th December 2012
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2012 Science \& Technology Facilities Council