next up previous 264
Next: ShiftMap - Add a constant value to each coordinate
Up: AST Class Descriptions
Previous: Region - Represents a region within a coordinate system


SelectorMap - A Mapping that locates positions within one of a set of alternate Regions

Description:
A SelectorMap is a Mapping that identifies which Region contains a given input position.

A SelectorMap encapsulates a number of Regions that all have the same number of axes and represent the same coordinate Frame. The number of inputs (Nin attribute) of the SelectorMap equals the number of axes spanned by one of the encapsulated Region. All SelectorMaps have only a single output. SelectorMaps do not define an inverse transformation.

For each input position, the forward transformation of a SelectorMap searches through the encapsulated Regions (in the order supplied when the SelectorMap was created) until a Region is found which contains the input position. The index associated with this Region is returned as the SelectorMap output value (the index value is the position of the Region within the list of Regions supplied when the SelectorMap was created, starting at 1 for the first Region). If an input position is not contained within any Region, a value of zero is returned by the forward transformation.

If a compound Mapping contains a SelectorMap in series with its own inverse, the combination of the two adjacent SelectorMaps will be replaced by a UnitMap when the compound Mapping is simplified using astSimplify.

In practice, SelectorMaps are often used in conjunction with SwitchMaps.

Constructor Function:
astSelectorMap
Inheritance
The SelectorMap class inherits from the Mapping class.
Attributes
The SelectorMap class does not define any new attributes beyond those which are applicable to all Mappings.
Functions
The SelectorMap class does not define any new functions beyond those which are applicable to all Mappings.


next up previous 264
Next: ShiftMap - Add a constant value to each coordinate
Up: AST Class Descriptions
Previous: Region - Represents a region within a coordinate system

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
25th February 2013
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2014 Science \& Technology Facilities Council