LSST Applications g070148d5b3+33e5256705,g0d53e28543+25c8b88941,g0da5cf3356+2dd1178308,g1081da9e2a+62d12e78cb,g17e5ecfddb+7e422d6136,g1c76d35bf8+ede3a706f7,g295839609d+225697d880,g2e2c1a68ba+cc1f6f037e,g2ffcdf413f+853cd4dcde,g38293774b4+62d12e78cb,g3b44f30a73+d953f1ac34,g48ccf36440+885b902d19,g4b2f1765b6+7dedbde6d2,g5320a0a9f6+0c5d6105b6,g56b687f8c9+ede3a706f7,g5c4744a4d9+ef6ac23297,g5ffd174ac0+0c5d6105b6,g6075d09f38+66af417445,g667d525e37+2ced63db88,g670421136f+2ced63db88,g71f27ac40c+2ced63db88,g774830318a+463cbe8d1f,g7876bc68e5+1d137996f1,g7985c39107+62d12e78cb,g7fdac2220c+0fd8241c05,g96f01af41f+368e6903a7,g9ca82378b8+2ced63db88,g9d27549199+ef6ac23297,gabe93b2c52+e3573e3735,gb065e2a02a+3dfbe639da,gbc3249ced9+0c5d6105b6,gbec6a3398f+0c5d6105b6,gc9534b9d65+35b9f25267,gd01420fc67+0c5d6105b6,geee7ff78d7+a14128c129,gf63283c776+ede3a706f7,gfed783d017+0c5d6105b6,w.2022.47
LSST Data Management Base Package
|
A list of the variant Mappings associated with the current Frame. (string, read only)
This attribute gives a space separated list of the names of all the variant Mappings associated with the current Frame (see attribute Variant). If the current Frame has no variant Mappings, then the list will hold a single entry equal to the Domain name of the current Frame.
Index of base Frame, starting from 1. (int)
This attribute gives the index of the Frame which is to be regarded as the "base" Frame within a FrameSet. The default is the first Frame added to the FrameSet when it is created (this Frame always has an index of 1).
When setting a new value for this attribute, a string may be supplied instead of an integer index. In this case a search is made within the FrameSet for a Frame that has its Domain attribute value equal to the supplied string (the comparison is case-insensitive). If found, the Frame is made the base Frame. Otherwise an error is reported.
Index of current Frame, starting from 1. (int)
This attribute gives the index of the Frame which is to be regarded as the "current" Frame within a FrameSet. The default is the most recent Frame added to the FrameSet (this Frame always has an index equal to the FrameSet's NFrame attribute).
When setting a new value for this attribute, a string may be supplied instead of an integer index. In this case a search is made within the FrameSet for a Frame that has its Domain attribute value equal to the supplied string (the comparison is case-insensitive). If found, the Frame is made the current Frame. Otherwise an error is reported.
Number of Frames in a FrameSet. (int, read only)
This attribute gives the number of Frames in a FrameSet. This value will change as Frames are added or removed, but will always be at least one.
Indicates which variant of the current Frame is to be used. (string)
This attribute can be used to change the Mapping that connects the current Frame to the other Frames in the FrameSet. By default, each Frame in a FrameSet is connected to the other Frames by a single Mapping that can only be changed by using FrameSet::remapFrame. However, it is also possible to associate multiple Mappings with a Frame, each Mapping having an identifying name. If this is done, the Variant attribute can be set to indicate the name of the Mapping that is to be used with the current Frame.
A possible (if unlikely) use-case is to create a FrameSet that can be used to describe the WCS of an image formed by co-adding images of two different parts of the sky. In such an image, each pixel contains flux from two points on the sky.and so the WCS for the image should ideally contain one pixel Frame and two SkyFrames - one describing each of the two co-added images. There is nothing to prevent a FrameSet containing two explicit SkyFrames, but the problem then arises of how to distinguish between them. The two primary characteristics of a Frame that distinguishes it from other Frames are its class and its Domain attribute value. The class of a Frame cannot be changed, but we could in principle use two different Domain values to distinguish the two SkyFrames. However, in practice it is not uncommon for application software to assume that SkyFrames will have the default Domain value of "SKY". That is, instead of searching for Frames that have a class of "SkyFrame", such software searches for Frames that have a Domain of "SKY". To alleviate this problem, it is possible to add a single SkyFrame to the FrameSet, but specifying two alternate Mappings to use with the SkyFrame. Setting the Variant attribute to the name of one or the other of these alternate Mappings will cause the SkyFrame to be remapped within the FrameSet so that it uses the specified Mapping. The same facility can be used with any class of Frame, not just SkyFrames.
To use this facility, the Frame should first be added to the FrameSet in the usual manner using FrameSet::addFrame. By default, the Mapping supplied to FrameSet::addFrame is assigned a name equal to the Domain name of the Frame. To assign a different name to it, call FrameSet::renameVariant. The FrameSet::addVariant method should then be called repeatedly to add each required extra Mapping to the current Frame, supplying a unique name for each one.
Each Frame in a FrameSet can have its own set of variant Mappings. To control the Mappings in use with a specific Frame, you need first to make it the current Frame in the FrameSet.
The FrameSet::mirrorVariants function allows the effects of variant Mappings associated with a nominated Frame to be propagated to other Frames in the FrameSet.
Once this has been done, setting a new value for the Variant attribute of a FrameSet will cause the current Frame in the FrameSet to be remapped to use the specified variant Mapping. An error will be reported if the current Frame has no variant Mapping with the supplied name.
Getting the value of the Variant attribute will return the name of the variant Mapping currently in use with the current Frame. If the Frame has no variant Mappings, the value will default to the Domain name of the current Frame.
Clearing the Variant attribute will have the effect of removing all variant Mappings (except for the currently selected Mapping) from the current Frame.
Testing the Variant attribute will return a non-zero value if the current Frame contains any variant Mappings, and zero otherwise.
A complete list of the names associated with all the available variant Mappings in the current Frame can be obtained from the AllVariants attribute.
If a Frame with variant Mappings is remapped using FrameSet::remapFrame, the currently selected variant Mapping is used by FrameSet::remapFrame and the other variant Mappings are removed from the Frame.