next up previous 264
Next: Using a FrameSet as a Mapping
Up: Coordinate System Networks (FrameSets)
Previous: The Base and Current Frames


Referring to the Base and Current Frames

It is often necessary to refer to the base and current Frames ([*]) within a FrameSet, but it can be cumbersome having to obtain their indices from the Base and Current attributes on each occasion. To make this easier, two macros, AST__BASE and AST__CURRENT, are defined in the ``ast.h'' header file and may be used to represent the indices of the base and current Frames respectively. They may be used whenever a Frame index is required.

For example, when adding a new Frame to a FrameSet ([*]), you could use the following to indicate that the new Frame is related to the existing current Frame, whatever its index happens to be:

AstFrame *frame;
AstMapping *mapping;

...

astAddFrame( frameset, AST__CURRENT, mapping, frame );

Of course, the Frame you added would then become the new current Frame.


next up previous 264
Next: Using a FrameSet as a Mapping
Up: Coordinate System Networks (FrameSets)
Previous: The Base and Current Frames

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

Copyright (C) 2009 Science \& Technology Facilities Council