Class FITSWCS.projections.CODProjection
All Packages Class Hierarchy This Package Previous Next Index
Class FITSWCS.projections.CODProjection
java.lang.Object
|
+----FITSWCS.Projection
|
+----FITSWCS.projections.CODProjection
- public class CODProjection
- extends Projection
This class provides support for the conic equidistant
projection (COD) used by the FITS "World Coordinate System" (WCS)
convention.
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.Z
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.
Accuracy
Closure to a precision of at least 1.0-10 degree of longitude and latitude
has been verified for typical projection parameters on the 1 degree grid
of native longitude and latitude (to within 5 degrees of any latitude
where the projection may diverge).
Notwithstanding this, absolutely no claim is made for the accuracy or
reliability of these routines. They are supplied as is, with no warranty
of fitness for any purpose.
COPYRIGHT NOTICE
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).
-
CODProjection(double, double)
- Create an CODProjection object with a given oblateness
-
CODProjection(double, double, double)
- Create an CODProjection object
-
CODProjection(double, double[])
- Create an CODProjection object
-
CODProjection(double[])
- Create an CODProjection object
-
CODProjection()
- Create an empty Projection object; a call to setProjParm() must
be made to avoid throwing UnsetProjectionParameterException
-
fwd(double, double)
- Compute (x,y) coordinates in the plane of projection from native
spherical coordinates (phi,theta).
-
fwd(double[])
- same as fwd(phitheta[0], phitheta[1])
-
rev(double, double)
- Compute native spherical coordinates (phi,theta) from the
(x,y) coordinates in the plane of projection.
-
setProjParm(double[])
- set the projection parameters
-
setR0(double)
- set the sphere radius
CODProjection
public CODProjection(double sigma,
double delta) throws BadProjectionParameterException
- Create an CODProjection object with a given oblateness
- Parameters:
- sigma - the average of the latitudes of the standard parallels,
in degrees
- delta - half the difference in the latitudes of the standard
parallels, in degrees
- Throws: BadProjectionParameterException
- if mu = 0 or if
mu + lambda = 0;
CODProjection
public CODProjection(double r0,
double sigma,
double delta) throws BadProjectionParameterException
- Create an CODProjection object
- Parameters:
- r0 - sphere radius
- sigma - the average of the latitudes of the standard parallels,
in degrees
- delta - half the difference in the latitudes of the standard
parallels, in degrees
- Throws: BadProjectionParameterException
- if mu = 0 or if
mu + lambda = 0;
CODProjection
public CODProjection(double r0,
double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException
- Create an CODProjection object
- Parameters:
- r0 - sphere radius
- p - projection parameters, where p[1] the average and p[2]
is the difference in the standard latitudes
- Throws: ArrayIndexOutOfBoundsException
- if p.length < 3;
- Throws: BadProjectionParameterException
- if p[1] = 0 or if
p[1] + p[2] = 0;
CODProjection
public CODProjection(double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException
- Create an CODProjection object
- Parameters:
- p - projection parameters, where p[1] is mu, the distance of
point of projection from the centre of the generating
sphere, and p[2] is lambda, the radius of the cylinder of
projection, both in units of r0
- Throws: ArrayIndexOutOfBoundsException
- if p.length < 2;
- Throws: BadProjectionParameterException
- if p[1] = 0 or if
p[1] + p[2] = 0;
CODProjection
public CODProjection()
- Create an empty Projection object; a call to setProjParm() must
be made to avoid throwing UnsetProjectionParameterException
fwd
public double[] fwd(double phi,
double theta)
- Compute (x,y) coordinates in the plane of projection from native
spherical coordinates (phi,theta).
- Returns:
- double[] a two-element array containing x,y
- Overrides:
- fwd in class Projection
fwd
public double[] fwd(double phitheta[])
- same as fwd(phitheta[0], phitheta[1])
- Overrides:
- fwd in class Projection
rev
public double[] rev(double x,
double y) throws PixelBeyondProjectionException
- Compute native spherical coordinates (phi,theta) from the
(x,y) coordinates in the plane of projection.
- Returns:
- double[] a two-element array containing phi,theta
- Overrides:
- rev in class Projection
setR0
public void setR0(double r0)
- set the sphere radius
- Overrides:
- setR0 in class Projection
setProjParm
public void setProjParm(double p[]) throws ArrayIndexOutOfBoundsException, BadProjectionParameterException
- set the projection parameters
- Parameters:
- p - array of projection parameters; a null value cause no updates
to be made.
- Throws: ArrayIndexOutOfBoundsException
- if p.length < 2 (parameters
left unchanged);
- Throws: BadProjectionParameterException
- if p[1] = 0 or if
p[1] + p[2] = 0;
(parameters left in invalid state);
- Overrides:
- setProjParm in class Projection
All Packages Class Hierarchy This Package Previous Next Index