Class ncsa.horizon.coordinates.transforms.FITSProjectionCoordTransform
All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.horizon.coordinates.transforms.FITSProjectionCoordTransform
java.lang.Object
|
+----java.util.Observable
|
+----ncsa.horizon.coordinates.CoordTransform
|
+----ncsa.horizon.coordinates.transforms.FITSProjectionCoordTransform
- public class FITSProjectionCoordTransform
- extends CoordTransform
an object that projects positions from a spherical coordinate
system onto a rectilinear system.
In the documentation below, the terms "old" and "new" refer the to
two systems relative to the direction of this transform; that is,
the forward() method transforms a position in the "old" system to
a position in the new system.
This class is a Horizon wrapper around the FITSWCS.Projection
class and its various sub-classes in FITSWCS.projections.
-
name
-
-
proj
-
-
FITSProjectionCoordTransform()
-
-
FITSProjectionCoordTransform(String, double[])
-
-
FITSProjectionCoordTransform(String, double[], String[])
-
-
FITSProjectionCoordTransform(String[])
-
-
clone()
- create a copy of this Transform
-
determineConstraints(Metadata, boolean)
- make an educated guess as to the proper way to apply this transform
to a coordinate system with the specified Metadata.
-
forward(double[])
- project a position on a sphere onto a plane.
-
forward(double[], int[])
- project a position on a sphere onto a plane
-
getInNaxes()
- return the minimum number of axes that the forward transform operates
on.
-
getMaxNaxes()
- return the maximum number of axes this transform operates on
-
getMetadata(Metadata, boolean, int[])
- update the input Metadata object to reflect the changes that this
tranform makes to a coordinate position.
-
getName()
- return the axis name to be given to a transformed axis.
-
getName(int)
- return the axis name to be given to a transformed axis, or null
if the name is not updated by getMetadata().
-
getOutNaxes()
- return the minimum number of axes that results from the forward
transform.
-
reverse(double[])
- de-project a position on a plane onto a sphere.
-
reverse(double[], int[])
- de-project a position on a plane onto a sphere.
-
setName(int, String)
- set the axis name to be given to a transformed axis.
-
setName(String[])
- set the axis names to be given to each transformed axis.
-
setProjection(String, double[])
-
proj
protected Projection proj
name
protected String name[]
FITSProjectionCoordTransform
public FITSProjectionCoordTransform(String pcode,
double projparm[],
String name[]) throws IllegalArgumentException
FITSProjectionCoordTransform
public FITSProjectionCoordTransform(String pcode,
double projparm[]) throws IllegalArgumentException
FITSProjectionCoordTransform
public FITSProjectionCoordTransform(String name[])
FITSProjectionCoordTransform
public FITSProjectionCoordTransform()
setProjection
public void setProjection(String pcode,
double projparm[]) throws IllegalArgumentException
forward
public double[] forward(double position[],
int axisIndices[]) throws PositionBeyondDomainException
- project a position on a sphere onto a plane
- Parameters:
- position - an array giving the position in the system of the
sphere
- axisIndices - a 2-elementarray containing the indices of the
position array that should be used in the
tranformation. The first index should be for the
longitude axis and the second, the latitude axis.
- Overrides:
- forward in class CoordTransform
forward
public double[] forward(double position[]) throws PositionBeyondDomainException
- project a position on a sphere onto a plane. The first axis is
assumed to be the longitude axis, and the second, the latitude axis.
- Parameters:
- position - an array giving the position in the system of the
sphere
- Overrides:
- forward in class CoordTransform
reverse
public double[] reverse(double position[],
int axisIndices[]) throws PositionBeyondDomainException
- de-project a position on a plane onto a sphere.
- Parameters:
- position - an array giving the position in the coordinate system
of the plane
- axisIndices - a 2-element array containing the indices of the
position array that should be used in the
tranformation. The first index should be for the
longitude axis and the second, the latitude axis.
- Overrides:
- reverse in class CoordTransform
reverse
public double[] reverse(double position[]) throws PositionBeyondDomainException
- de-project a position on a plane onto a sphere. The first axis is
assumed to be the longitude axis, and the second, the latitude axis.
- Parameters:
- position - an array giving the position in the coordinate system
of the plane
- Overrides:
- reverse in class CoordTransform
getInNaxes
public int getInNaxes()
- return the minimum number of axes that the forward transform operates
on. This value is equal to the minimum number of axes that results
from the reverse transform. This value is often equal to the that
returned by getOutNaxes(), but is not required to.
- Overrides:
- getInNaxes in class CoordTransform
getOutNaxes
public int getOutNaxes()
- return the minimum number of axes that results from the forward
transform. This value is equal to the minimum number of axes that
the reverse transform operates on. This value is often equal to the
that returned by getInNaxes(), but is not required to.
- Overrides:
- getOutNaxes in class CoordTransform
getMaxNaxes
public int getMaxNaxes()
- return the maximum number of axes this transform operates on
determineConstraints
public CoordTransformConstraints determineConstraints(Metadata in,
boolean forwards)
- make an educated guess as to the proper way to apply this transform
to a coordinate system with the specified Metadata. This is done
by finding the first axes with types matching "longitude" and
"latitude".
- Overrides:
- determineConstraints in class CoordTransform
setName
public synchronized void setName(int axis,
String in) throws ArrayIndexOutOfBoundsException
- set the axis name to be given to a transformed axis. Note that
this name is only used by the getMetadatum() method and is applied
regardless of the value of the forward argument to that method.
- Parameters:
- axis - the index of the axis to be set (first axis has index 0)
- in - the name to give to the axis, null means use the name of
the untransformed axis
getName
public synchronized String getName(int axis) throws ArrayIndexOutOfBoundsException
- return the axis name to be given to a transformed axis, or null
if the name is not updated by getMetadata().
- Parameters:
- axis - the index of the axis (first axis has index 0)
setName
public synchronized void setName(String in[])
- set the axis names to be given to each transformed axis. Note that
these names are only used by the getMetadatum() method and are applied
regardless of the value of the forward argument to that method.
- Parameters:
- in - values to be set
getName
public synchronized String[] getName() throws ArrayIndexOutOfBoundsException
- return the axis name to be given to a transformed axis. Null values
in the output array indicate that the name for that axis will not be
updated by getMetadata().
clone
public synchronized Object clone()
- create a copy of this Transform
- Overrides:
- clone in class CoordTransform
getMetadata
public synchronized Metadata getMetadata(Metadata in,
boolean forward,
int axisIndices[])
- update the input Metadata object to reflect the changes that this
tranform makes to a coordinate position. In general, this method
will actually edit the contents of the input Metadata when changes
are necessary.
- Overrides:
- getMetadata in class CoordTransform
All Packages Class Hierarchy This Package Previous Next Index