Package astLib :: Module astWCS :: Class WCS
[show private | hide private]
[frames | no frames]

Class WCS


This class provides methods for accessing information from the World Coordinate System (WCS) contained in the header of a FITS image. Conversions between pixel and WCS coordinates can also be performed.

To create a WCS object from a FITS file called "test.fits", where the image data is contained in extension 0, simply:

WCS=astWCS.WCS("test.fits", 0)
Method Summary
  __init__(self, imageFileName, extensionName)
Creates a WCS object using the information in the header of the specified .fits image.
astWCS.WCS object copy(self)
Copies the WCS object to a new object.
list getCentreWCSCoords(self)
Returns the RA and dec coordinates (in decimal degrees) at the centre of the WCS.
float getEpoch(self)
Returns the epoch of the WCS.
float getEquinox(self)
Returns the equinox of the WCS.
list getFullSizeSkyDeg(self)
Returns the width, height of the image according to the WCS in decimal degrees on the sky (i.e., with the projection taken into account).
list getHalfSizeDeg(self)
Returns the half-width, half-height of the image according to the WCS in RA and dec degrees.
float getPixelSizeDeg(self)
Returns the pixel scale (in degrees) of the WCS.
float getRotationDeg(self)
Returns the rotation angle in degrees around the axis, North through East.
int isFlipped(self)
Returns 1 if image is reflected around axis, otherwise returns 0.
list pix2wcs(self, x, y)
Returns the WCS coordinates corresponding to the input pixel coordinates.
  updateFromHeader(self)
Updates the WCS object using information from WCS.header.
list wcs2pix(self, RADeg, decDeg)
Returns the pixel coordinates corresponding to the input WCS coordinates (given in decimal degrees).

Method Details

__init__(self, imageFileName, extensionName)
(Constructor)

Creates a WCS object using the information in the header of the specified .fits image.
Parameters:
imageFileName - filename of input .fits image
           (type=string)
extensionName - name or number of .fits extension in which image data is stored
           (type=int or string)

Note: The meta data in the image header of imageFileName is stored in WCS.header as a PyFITS.header object.

copy(self)

Copies the WCS object to a new object.
Returns:
WCS object
           (type=astWCS.WCS object)

getCentreWCSCoords(self)

Returns the RA and dec coordinates (in decimal degrees) at the centre of the WCS.
Returns:
coordinates in decimal degrees in format [RADeg, decDeg]
           (type=list)

getEpoch(self)

Returns the epoch of the WCS.
Returns:
epoch of the WCS
           (type=float)

getEquinox(self)

Returns the equinox of the WCS.
Returns:
equinox of the WCS
           (type=float)

getFullSizeSkyDeg(self)

Returns the width, height of the image according to the WCS in decimal degrees on the sky (i.e., with the projection taken into account).
Returns:
width and height of image in decimal degrees on the sky in format [width, height]
           (type=list)

getHalfSizeDeg(self)

Returns the half-width, half-height of the image according to the WCS in RA and dec degrees.
Returns:
half-width and half-height of image in R.A., dec. decimal degrees in format [half-width, half-height]
           (type=list)

getPixelSizeDeg(self)

Returns the pixel scale (in degrees) of the WCS.
Returns:
pixel size in decimal degrees
           (type=float)

getRotationDeg(self)

Returns the rotation angle in degrees around the axis, North through East.
Returns:
rotation angle in degrees
           (type=float)

isFlipped(self)

Returns 1 if image is reflected around axis, otherwise returns 0.
Returns:
1 if image is flipped, 0 otherwise
           (type=int)

pix2wcs(self, x, y)

Returns the WCS coordinates corresponding to the input pixel coordinates.
Returns:
WCS coordinates in format [RADeg, decDeg]
           (type=list)

updateFromHeader(self)

Updates the WCS object using information from WCS.header. This routine should be called whenever changes are made to WCS keywords in WCS.header.

wcs2pix(self, RADeg, decDeg)

Returns the pixel coordinates corresponding to the input WCS coordinates (given in decimal degrees).
Returns:
pixel coordinates in format [x, y]
           (type=list)

Generated by Epydoc 2.1 on Sun Oct 7 17:29:52 2007 http://epydoc.sf.net