|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ast.AstObject
uk.ac.starlink.ast.Mapping
uk.ac.starlink.ast.SphMap
public class SphMap
Java interface to the AST SphMap class - map 3-d Cartesian to 2-d spherical coordinates. A SphMap is a Mapping which transforms points from a 3-dimensional Cartesian coordinate system into a 2-dimensional spherical coordinate system (longitude and latitude on a unit sphere centred at the origin). It works by regarding the input coordinates as position vectors and finding their intersection with the sphere surface. The inverse transformation always produces points which are a unit distance from the origin (i.e. unit vectors).
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
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uk.ac.starlink.ast.Mapping |
---|
Mapping.Interpolator, Mapping.Spreader |
Field Summary |
---|
Fields inherited from class uk.ac.starlink.ast.Mapping |
---|
LINEAR_INTERPOLATOR, LINEAR_SPREADER, NEAREST_INTERPOLATOR, NEAREST_SPREADER |
Fields inherited from class uk.ac.starlink.ast.AstObject |
---|
AST__BAD, AST__TUNULL, pointer |
Constructor Summary | |
---|---|
SphMap()
Creates a SphMap. |
Method Summary | |
---|---|
double |
getPolarLong()
Get the longitude value to assign to either pole. |
boolean |
getUnitRadius()
Get sphMap input vectors lie on a unit sphere. |
void |
setPolarLong(double polarLong)
Set the longitude value to assign to either pole. |
void |
setUnitRadius(boolean unitRadius)
Set sphMap input vectors lie on a unit sphere. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SphMap()
AstException
- if an error occurred in the AST libraryMethod Detail |
---|
public boolean getUnitRadius()
If this condition is true (indicated by setting UnitRadius non-zero), it implies that a CmpMap which is composed of a SphMap applied in the forward direction followed by a similar SphMap applied in the inverse direction may be simplified (e.g. by astSimplify) to become a UnitMap. This is because the input and output vectors will both have unit length and will therefore have the same coordinate values.
If UnitRadius is zero (the default), then although the output vector produced by the CmpMap (above) will still have unit length, the input vector may not have. This will, in general, change the coordinate values, so it prevents the pair of SphMaps being simplified.
public void setUnitRadius(boolean unitRadius)
If this condition is true (indicated by setting UnitRadius non-zero), it implies that a CmpMap which is composed of a SphMap applied in the forward direction followed by a similar SphMap applied in the inverse direction may be simplified (e.g. by astSimplify) to become a UnitMap. This is because the input and output vectors will both have unit length and will therefore have the same coordinate values.
If UnitRadius is zero (the default), then although the output vector produced by the CmpMap (above) will still have unit length, the input vector may not have. This will, in general, change the coordinate values, so it prevents the pair of SphMaps being simplified.
unitRadius
- the UnitRadius attribute of this objectpublic double getPolarLong()
public void setPolarLong(double polarLong)
polarLong
- the PolarLong attribute of this object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |