Set of inter-related coordinate systems FrameSet
Every FrameSet has a "
base"
Frame and a "
current"
Frame (which are allowed to be the same). Any
of the Frames may be nominated to hold these positions, and the choice is determined by the values of
the FrameSet’
s Base and Current attributes, which hold the indices of the relevant Frames. By default,
the first Frame added to a FrameSet is its base Frame, and the last one added is its current
Frame.
The base Frame describes the "
native"
coordinate system of whatever the FrameSet is used to
calibrate (e.g. the pixel coordinates of an image) and the current Frame describes the "
apparent"
coordinate system in which it should be viewed (e.g. displayed, etc.). Any further Frames
represent a library of alternative coordinate systems, which may be selected by making them
current.
When a FrameSet is used in a context that requires a Frame, (e.g. obtaining its Title value, or number of axes), the current Frame is used. A FrameSet may therefore be used in place of its current Frame in most situations.
When a FrameSet is used in a context that requires a Mapping, the Mapping used is the one between
its base Frame and its current Frame. Thus, a FrameSet may be used to convert "
native"
coordinates
into "
apparent"
ones, and vice versa. Like any Mapping, a FrameSet may also be inverted (see
AST_INVERT), which has the effect of interchanging its base and current Frames and hence of
reversing the Mapping between them.
Regions may be added into a FrameSet (since a Region is a type of Frame), either explicitly or as components within CmpFrames. In this case the Mapping between a pair of Frames within a FrameSet will include the masking effects produced by any Regions included in the path between the Frames.
AllVariants: List of all variant mappings stored with current Frame
Base: FrameSet base Frame index
Current: FrameSet current Frame index
Nframe: Number of Frames in a FrameSet
Variant: Name of variant mapping in use by current Frame
Every FrameSet also inherits any further attributes that belong to its current Frame, regardless of that
Frame’
s class. (For example, the Equinox attribute, defined by the SkyFrame class, is inherited by any
FrameSet which has a SkyFrame as its current Frame.) The set of attributes belonging to a FrameSet
may therefore change when a new current Frame is selected.
AST_ADDFRAME: Add a Frame to a FrameSet to define a new coordinate system
AST_ADDVARIANT: Add a variant Mapping to the current Frame
AST_GETFRAME: Obtain a pointer to a specified Frame in a FrameSet
AST_GETMAPPING: Obtain a Mapping between two Frames in a FrameSet
AST_MIRRORVARIANTS: Make the current Frame mirror variant Mappings in another Frame
AST_REMAPFRAME: Modify a Frame’
s relationship to the other Frames in a FrameSet
AST_REMOVEFRAME: Remove a Frame from a FrameSet