GOV.nasa.gsfc.sea.util.wcstools
Class WCSTransform
java.lang.Object
|
+--GOV.nasa.gsfc.sea.util.wcstools.WCSTransform
- public class WCSTransform
- extends java.lang.Object
A port of pieces of the WCSTools library version 2.6, originally written in C.
WCSTranform is the main class. It can construct a proper transform
using a nom.tam.fits.Header object. The methods pix2wcs and wcs2pix
do the actual conversions between image pixel values and WCS coordinates.
In porting the code to Java, I attempted to change as little as possible,
hoping that this would make it easier to keep up-to-date with the C version.
This code depends on another class, GOV.nasa.gsfc.sea.util.DoublePoint,
to represent values. This is used instead of Point2D.Double for historical
reasons (pre-JDK1.2 code).
See the WCSTools page
for more information.
Original file:
libwcs/wcs.c
February 6, 1998
By Doug Mink, Harvard-Smithsonian Center for Astrophysics
This code was developed by NASA, Goddard Space Flight Center, Code 588
for the Scientist's Expert Assistant (SEA) project.
- Author:
- J. Jones / 588
Constructor Summary |
WCSTransform(double cra,
double cdec,
double secpix,
double xrpix,
double yrpix,
int nxpix,
int nypix,
double rotate,
int equinox,
double epoch,
java.lang.String proj)
Constructs a new WCSTransform. |
WCSTransform(nom.tam.fits.Header head)
Constructs a new WCSTransform using data from the specified FITS Header. |
Method Summary |
static double |
deghr(double x)
|
static double |
degrad(double x)
|
static double |
hrdeg(double x)
|
static double |
hrrad(double x)
|
boolean |
isValid()
|
DoublePoint |
pix2wcs(double xpix,
double ypix)
Converts pixel coordinates to World Coordinates. |
static double |
raddeg(double x)
|
static double |
radhr(double x)
|
DoublePoint |
wcs2pix(double xpos,
double ypos)
Converts World Coordinates to pixel coordinates. |
double |
wcsdist(double x1,
double y1,
double x2,
double y2)
|
void |
wcseq(nom.tam.fits.Header head)
|
void |
wcsfull()
|
void |
wcsshift(double rra,
double rdec,
java.lang.String coorsys)
|
void |
wcssize()
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xref
double xref
yref
double yref
xrefpix
double xrefpix
yrefpix
double yrefpix
xinc
double xinc
yinc
double yinc
rot
double rot
crot
double crot
srot
double srot
cd11
double cd11
cd12
double cd12
cd21
double cd21
cd22
double cd22
dc11
double dc11
dc12
double dc12
dc21
double dc21
dc22
double dc22
mrot
double mrot
cmrot
double cmrot
smrot
double smrot
xmpix
double xmpix
ympix
double ympix
equinox
double equinox
epoch
double epoch
nxpix
double nxpix
nypix
double nypix
plate_ra
double plate_ra
plate_dec
double plate_dec
plate_scale
double plate_scale
x_pixel_offset
double x_pixel_offset
y_pixel_offset
double y_pixel_offset
x_pixel_size
double x_pixel_size
y_pixel_size
double y_pixel_size
ppo_coeff
double[] ppo_coeff
amd_x_coeff
double[] amd_x_coeff
amd_y_coeff
double[] amd_y_coeff
xpix
double xpix
ypix
double ypix
xpos
double xpos
ypos
double ypos
pcode
int pcode
changesys
int changesys
printsys
int printsys
ndec
int ndec
degout
int degout
tabsys
int tabsys
rotmat
int rotmat
coorflip
int coorflip
offscl
int offscl
plate_fit
int plate_fit
wcson
int wcson
detector
int detector
instrument
java.lang.String instrument
c1type
java.lang.String c1type
c2type
java.lang.String c2type
ptype
java.lang.String ptype
radecsys
java.lang.String radecsys
sysout
java.lang.String sysout
center
java.lang.String center
search_format
java.lang.String search_format
fCenterRa
public double fCenterRa
fCenterDec
public double fCenterDec
fHalfWidthRa
public double fHalfWidthRa
fHalfWidthDec
public double fHalfWidthDec
fWidthDeg
public double fWidthDeg
fHeightDeg
public double fHeightDeg
WCSTransform
public WCSTransform(nom.tam.fits.Header head)
- Constructs a new WCSTransform using data from the specified FITS Header.
- Parameters:
head
- FITS Header that contains the required transform data
WCSTransform
public WCSTransform(double cra,
double cdec,
double secpix,
double xrpix,
double yrpix,
int nxpix,
int nypix,
double rotate,
int equinox,
double epoch,
java.lang.String proj)
- Constructs a new WCSTransform.
degrad
public static double degrad(double x)
raddeg
public static double raddeg(double x)
hrdeg
public static double hrdeg(double x)
deghr
public static double deghr(double x)
hrrad
public static double hrrad(double x)
radhr
public static double radhr(double x)
wcseq
public void wcseq(nom.tam.fits.Header head)
isValid
public boolean isValid()
wcsshift
public void wcsshift(double rra,
double rdec,
java.lang.String coorsys)
wcssize
public void wcssize()
wcsfull
public void wcsfull()
wcsdist
public double wcsdist(double x1,
double y1,
double x2,
double y2)
pix2wcs
public DoublePoint pix2wcs(double xpix,
double ypix)
- Converts pixel coordinates to World Coordinates.
Returns null if the WCSTransform is not valid.
wcs2pix
public DoublePoint wcs2pix(double xpos,
double ypos)
- Converts World Coordinates to pixel coordinates.
Returns null if the WCSTransform is invalid, or if the
WCS position does not fall within the image.