As well as adding individual Frames to a FrameSet
(), it is also possible to add complete sets of
inter-related Frames which are contained within another
FrameSet. This, of course, corresponds to the process of merging two
FrameSets (see Figure below).
This process is performed by adding one FrameSet to another using AST_ADDFRAME, in much the same manner as when adding a new Frame to an existing FrameSet (
Figure: Two FrameSets in the process of being merged using AST_ADDFRAME. FrameSet B is being added to FrameSet A by supplying a new Mapping which inter-relates a nominated Frame in A (here number 1) and the current Frame of B. In the merged FrameSet, the Frames contributed by B will be re-numbered to become Frames 4, 5 and 6. The base Frame will remain unchanged, but the current Frame of B becomes the new current Frame. Note that FrameSet B itself is not altered by this process.
INTEGER MAPPING
...
CALL AST_ADDFRAME( FRAMESETA, 1, MAPPING, FRAMESETB, STATUS )
The Frames acquired by FRAMESETA from the FrameSet being added (FRAMESETB) are re-numbered so that they retain their original order and follow on consecutively after the Frames that were already present, whose indices remain unchanged. The base Frame of FRAMESETA remains unchanged, but the current Frame of FRAMESETB becomes its new current Frame. All the inter-relationships between Frames in both FrameSets remain in place and are preserved in the merged FrameSet.
Note that while this process modifies the first FrameSet (FRAMESETA), it leaves the original contents of the one being added (FRAMESETB) unchanged.
AST A Library for Handling World Coordinate Systems in Astronomy