All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----FITSWCS.CelestialTransform
The FITSWCS package was translated from the WCSLIB C library This original library was written in support for coordinate systems used by astronomical data stored in FITS format. For more information on these coordinate systems, refer to the paper by Greisen and Calabretta at:
ftp://fits.cv.nrao.edu/fits/documents/wcs/wcs.all.ps.ZCoordinate System Reference Parameters
This class can be instantiated by passing to the constructor an array of four double values representing the coordinate system reference data. The first two elements should be set to the celestial longitude and latitude (usually right ascension and declination) of the reference point of the projection.
The two values are the native longitude and latitude of the pole of the celestial coordinate system and correspond to the FITS keywords LONGPOLE and LATPOLE.
LONGPOLE defaults to 0 degrees if the celestial latitude of the reference point of the projection is greater than the native latitude, otherwise 180 degrees. (This is the condition for the celestial latitude to increase in the same direction as the native latitude at the reference point.) ref[2] may be set to 999.0 to indicate that the correct default should be substituted.
In some circumstances the latitude of the native pole may be determined by the first three values only to within a sign and LATPOLE is used to choose between the two solutions. LATPOLE is set in ref[3] and the solution closest to this value is used to reset ref[3]. It is therefore legitimate, for example, to set ref[3] to 999.0 to choose the more northerly solution - the default if the LATPOLE card is omitted from the FITS header. For the special case where the reference point of the projection is at native latitude zero, its celestial latitude is zero, and LONGPOLE = +/- 90 then the native latitude of the pole is not determined by the first three reference values and LATPOLE specifies it completely.
Nomenclature
In WCSLIB the "forward" direction is from (lng,lat) celestial coordinates to (x,y) coordinates in the plane of projection. This accords with the notion that spherical projections are a projection of the sphere onto a plane, the "reverse" direction is therefore that of deprojection from plane to sphere.
Unfortunately, this is opposite to what is generally understood to be the forward direction for FITS, namely that of transforming pixel coordinates to world coordinates. However, the ordering of function argument lists should make it clear what is intended.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library 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 Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Correspondence concerning WCSLIB may be directed to:
Internet email: mcalabre@atnf.csiro.au
Postal address: Dr. Mark Calabretta,
Australia Telescope National Facility,
P.O. Box 76,
Epping, NSW, 2121,
AUSTRALIA
Correspondence concerning the Java implementation may be directed
to Raymond L. Plante (rplante@ncsa.uiuc.edu).
protected String pcode
protected double ref[]
protected double euler[]
protected Projection prj
public CelestialTransform(String pcode,
double ref[],
double r0,
double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException, UnsupportedProjectionException, BadReferenceParameterException
public CelestialTransform(String pcode,
double ref[],
double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException, UnsupportedProjectionException, BadReferenceParameterException
public CelestialTransform(String pcode,
double reflong,
double reflat,
double longpole,
double latpole,
double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException, UnsupportedProjectionException, BadReferenceParameterException
public double[] fwd(double lng,
double lat) throws InvalidCelestialTransformException
public double[] rev(double x,
double y) throws InvalidCelestialTransformException
public String getProjectionCode()
public Projection getProjection()
public double[] getRefParm()
public double[] getEuler()
All Packages Class Hierarchy This Package Previous Next Index