public class SelectorMap
- extends Mapping
Java interface to the AST SelectorMap class
- a Mapping that locates positions within one of a set of alternate
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
In practice, SelectorMaps are often used in conjunction with SwitchMaps.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public Licence as
published by the Free Software Foundation; either version 2 of
the Licence, or (at your option) any later version.
This program is distributed in the hope that it will be
useful,but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public Licence for more details.
You should have received a copy of the GNU General Public Licence
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street,Fifth Floor, Boston, MA
- See Also:
- AST SelectorMap
|Methods inherited from class uk.ac.starlink.ast.Mapping
decompose, getInvert, getNin, getNout, getReport, getTranForward, getTranInverse, invert, linearApprox, mapBox, mapSplit, rate, rebin, rebinD, rebinF, rebinI, resample, resampleB, resampleD, resampleF, resampleI, resampleL, resampleS, setInvert, setReport, simplify, tran1, tran2, tranGrid, tranN, tranP
|Methods inherited from class uk.ac.starlink.ast.AstObject
annul, clear, copy, delete, equals, finalize, getAstConstantI, getB, getC, getD, getF, getI, getID, getIdent, getL, getNobject, getObjSize, getRefCount, hashCode, isThreaded, reportVersions, sameObject, set, setB, setC, setD, setF, setI, setID, setIdent, setL, show, test, tune
public SelectorMap(Region regs,
- Creates a SelectorMap.
regs - An array of pointers to the Regions. All the supplied Regions must
relate to the same coordinate Frame. The number of axes in this
coordinate Frame defines the number of inputs for the SelectorMap.
badval - The value to be returned by the forward transformation of the
SelectorMap for any input positions that have a bad (AST__BAD)
value on any axis.
AstException - if an error occurred in the AST library
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.