uk.ac.starlink.ast
Class CmpMap
java.lang.Object
uk.ac.starlink.ast.AstObject
uk.ac.starlink.ast.Mapping
uk.ac.starlink.ast.CmpMap
public class CmpMap
- extends Mapping
Java interface to the AST CmpMap class
- compound Mapping.
A CmpMap is a compound Mapping which allows two component
Mappings (of any class) to be connected together to form a more
complex Mapping. This connection may either be "in series"
(where the first Mapping is used to transform the coordinates of
each point and the second mapping is then applied to the
result), or "in parallel" (where one Mapping transforms the
earlier coordinates for each point and the second Mapping
simultaneously transforms the later coordinates).
Since a CmpMap is itself a Mapping, it can be used as a
component in forming further CmpMaps. Mappings of arbitrary
complexity may be built from simple individual Mappings in this
way.
Licence
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
02110-1301, USA
- See Also:
- AST CmpMap
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 |
CmpMap
public CmpMap(Mapping map1,
Mapping map2,
boolean series)
- Create a CmpMap.
This function creates a new CmpMap and optionally initialises
its attributes.
A CmpMap is a compound Mapping which allows two component
Mappings (of any class) to be connected together to form a more
complex Mapping. This connection may either be "in series"
(where the first Mapping is used to transform the coordinates of
each point and the second mapping is then applied to the
result), or "in parallel" (where one Mapping transforms the
earlier coordinates for each point and the second Mapping
simultaneously transforms the later coordinates).
Since a CmpMap is itself a Mapping, it can be used as a
component in forming further CmpMaps. Mappings of arbitrary
complexity may be built from simple individual Mappings in this
way.
Notes
- If the component Mappings are connected in series, then using
the resulting CmpMap to transform coordinates will cause the
first Mapping to be applied, followed by the second Mapping. If
the inverse CmpMap transformation is requested, the two
component Mappings will be applied in both the reverse order and
the reverse direction.
- When connecting two component Mappings in series, the number
of output coordinates generated by the first Mapping (its Nout
attribute) must equal the number of input coordinates accepted
by the second Mapping (its Nin attribute).
- If the component Mappings of a CmpMap are connected in
parallel, then the first Mapping will be used to transform the
earlier input coordinates for each point (and to produce the
earlier output coordinates) and the second Mapping will be used
simultaneously to transform the remaining input coordinates (to
produce the remaining output coordinates for each point). If the
inverse transformation is requested, each Mapping will still be
applied to the same coordinates, but in the reverse direction.
- When connecting two component Mappings in parallel, there is
no restriction on the number of input and output coordinates for
each Mapping.
- Note that the component Mappings supplied are not copied by
astCmpMap (the new CmpMap simply retains a reference to
them). They may continue to be used for other purposes, but
should not be deleted. If a CmpMap containing a copy of its
component Mappings is required, then a copy of the CmpMap should
be made using astCopy.
- A null Object pointer (AST__NULL) will be returned if this
function is invoked with the AST error status set, or if it
should fail for any reason.
- Parameters:
map1
- Pointer to the first component Mapping.map2
- Pointer to the second component Mapping.series
- If a non-zero value is given for this parameter, the two
component Mappings will be connected in series. A zero
value requests that they are connected in parallel.
- Throws:
AstException
- if an error occurred in the AST library
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.