The FrameSet class inherits properties and behaviour from the Frame class () and, in turn, from the Mapping class (). Its behaviour when used as a Mapping is particularly important.
Consider, for instance, passing a FrameSet pointer to a coordinate transformation function such as astTran2:
#define N 10 double xin[ N ], yin[ N ], xout[ N ], yout[ N ]; ... astTran2( frameset, N, xin, yin, 1, xout, yout );
The coordinate transformation applied by this FrameSet would be the one which converts between its base and current Frames. Using the FrameSet in Figure , for example, the coordinates would be multiplied by a factor of 5. If we instead requested the FrameSet's inverse transformation, we would be transforming from its current Frame to its base Frame, so our example FrameSet would then multiply by a factor of 0.2.
Whenever the choice of base and current Frames changes, the transformations which a FrameSet performs when used as a Mapping also change to reflect this. The Nin and Nout attributes may also change in consequence, because they are determined by the numbers of axes in the FrameSet's base and current Frames respectively. These numbers need not necessarily be equal, of course.
Like any Mapping, a FrameSet may also be inverted by changing the boolean sense of its Invert attribute, e.g. using astInvert (). If this is happens, the values of the FrameSet's Base and Current attributes are interchanged, along with its Nin and Nout attributes, so that its base and current Frames swap places. When used as a Mapping, the FrameSet will therefore perform the inverse transformation to that which it performed previously.
To summarise, a FrameSet may be used exactly like any other Mapping
which inter-relates the coordinate systems described by its base and
AST A Library for Handling World Coordinate Systems in Astronomy