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.


Variable Index

 o name
 o proj

Constructor Index

 o FITSProjectionCoordTransform()
 o FITSProjectionCoordTransform(String, double[])
 o FITSProjectionCoordTransform(String, double[], String[])
 o FITSProjectionCoordTransform(String[])

Method Index

 o clone()
create a copy of this Transform
 o determineConstraints(Metadata, boolean)
make an educated guess as to the proper way to apply this transform to a coordinate system with the specified Metadata.
 o forward(double[])
project a position on a sphere onto a plane.
 o forward(double[], int[])
project a position on a sphere onto a plane
 o getInNaxes()
return the minimum number of axes that the forward transform operates on.
 o getMaxNaxes()
return the maximum number of axes this transform operates on
 o getMetadata(Metadata, boolean, int[])
update the input Metadata object to reflect the changes that this tranform makes to a coordinate position.
 o getName()
return the axis name to be given to a transformed axis.
 o getName(int)
return the axis name to be given to a transformed axis, or null if the name is not updated by getMetadata().
 o getOutNaxes()
return the minimum number of axes that results from the forward transform.
 o reverse(double[])
de-project a position on a plane onto a sphere.
 o reverse(double[], int[])
de-project a position on a plane onto a sphere.
 o setName(int, String)
set the axis name to be given to a transformed axis.
 o setName(String[])
set the axis names to be given to each transformed axis.
 o setProjection(String, double[])

Variables

 o proj
  protected Projection proj
 o name
  protected String name[]

Constructors

 o FITSProjectionCoordTransform
  public FITSProjectionCoordTransform(String pcode,
                                      double projparm[],
                                      String name[]) throws IllegalArgumentException
 o FITSProjectionCoordTransform
  public FITSProjectionCoordTransform(String pcode,
                                      double projparm[]) throws IllegalArgumentException
 o FITSProjectionCoordTransform
  public FITSProjectionCoordTransform(String name[])
 o FITSProjectionCoordTransform
  public FITSProjectionCoordTransform()

Methods

 o setProjection
  public void setProjection(String pcode,
                            double projparm[]) throws IllegalArgumentException
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o getMaxNaxes
  public int getMaxNaxes()
return the maximum number of axes this transform operates on
 o 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
 o 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
 o 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)
 o 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
 o 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().
 o clone
  public synchronized Object clone()
create a copy of this Transform
Overrides:
clone in class CoordTransform
 o 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