SKY2XY
Name
SKY2XY
Purpose
Converts between sky coordinates and pixel coordinates of a FITS image
using the WCSTOOLS sky2xy routine. Useful for images with WCS keywords
that are not implemented in the astronomy library (such as the TNX
convention for distortions).
Category
Astro
Calling Sequence
Result = SKY2XY(FITSFile, Ra, Dec)
Inputs
FITSFile: Name of FITS file that contains the WCS to use.
Ra: Vector of right ascensions. Assumed to be in decimal degrees unless
/STRING is set.
Dec: Vector of declinations. Assumed to be in decimal degrees unless
/STRING is set.
Keyword Parameters
STRING: If set, Ra and Dec are strings in HH:MM:SS, DD:MM:SS format.
WCSTOOLSDIR: Path to the location of the binary sky2xy files in wcstools.
Outputs
The function returns a structure with fields .X and .Y which are arrays
containing the x and y pixel values.
Notes
Requires WCSTOOLS to be installed, along with the UWashington TMPFILE
and DIR_EXIST routines.
Modification History
Written by: Jeremy Bailin
20 August 2010 Initial release
10 Feb 2011 Made WCSTOOLSDIR a keyword parameter.