Trims axes from the current Frame of a FrameSet KPG1_ASTRM
If the original current Frame has too few axes, the new Frame is a copy of the original current frame with extra simple axes added to the end. These extra axes are supplied a value of AST__BAD by the Mapping which connects the original current Frame to the new current Frame.
If the original current Frame has too many axes, the user is allowed to select a subset of the original
axes using the environment parameter USEAXIS (see below). A new Frame is created by picking these
selected axes from the original current Frame. This Frame is added into the FrameSet using
a Mapping which has a forward transformation which simply drops the values for the
unselected axes. The inverse transformation (from new to old Frame) attempts to assign usable
values for the dropped axes if possible. This is only possible if the value for a dropped
axis can be determined uniquely from the value of one of the selected axes. This may be
the case for instance in a situation where (RA,wavelength) axes were selected from the
(RA,Dec,Wavelength) axes describing a 2D longslit spectrum. The missing Dec value can
probably be determined from the RA value because the relationship between RA and Dec is
determined by the position and orientation of the slit on the sky. If it is not possible to determine
the value for a dropped axis in this way, then what happens depends on whether or not
any Frames can be found in the FrameSet that are Regions having a Domain name of "
ROIn"
, where "
n"
is a positive integer. If no such Frame can be found, AST__BAD is supplied for the dropped
axis.
If the supplied current Frame has too many axes, and one or more ROI Regions are found in the
FrameSet, then a new Frame is added into the FrameSet for each ROI Region found. These new
Frames are all equivalent, containing axes from the supplied current Frame as specified by the
USEAXIS parameter, and they are all connected to the supplied current Frame via a PermMap. Each
PermMap has a forward transformation that simply drops the unwanted axis values. The inverse
transformation of each PermMap supplies suitable values for the unwanted axes. These are
determined by transforming the bounding box of the corresponding ROI Region into the original
current Frame. The Domain name of the corresponding ROI Region is stored in the Ident
attribute of the new Frame, and is also appended to the end of the Frame’
s Domain. The new
Frame corresponding to the lowest numbered ROI Region is left as the current Frame on
exit.
Various environment parameters may be used to obtain options, etc. The names of these parameters are hard-wired into this subroutine in order to ensure conformity between applications.
’
th value is the index within the original current Frame
of the axis which is to be associated with the i’
th base Frame axis by default. Only
used if no better defaults can be found by splitting the FrameSet Mapping. ’
s length should be at least twice as large as the largest pixel
dimension implied by LBND and UBND.