astro/
xy2sky.pro
top source xy2sky
Astro
result = xy2sky(fitsfile, x, y, string=string, wcstoolsdir=wcstoolsdir)
Converts between pixel coordinates of a FITS image and sky coordinates using the WCSTOOLS xy2sky routine. Useful for images with WCS keywords that are not implemented in the astronomy library (such as the TNX convention for distortions).
Return value
The function returns a structure with fields .RA and .DEC which are arrays containing the RA and Dec values in decimal degrees (or in strings, if /STRING is set). NOTES: Requires WCSTOOLS to be installed, along with the UWashington TMPFILE and DIR_EXIST routines.
Parameters
- fitsfile in
Name of FITS file that contains the WCS to use.
- x in
Vector of x coordinates.
- y in
Vector of y coordinates.
Keywords
- string in
Output strings of HH:MM:SS and DD:MM:SS format.
- wcstoolsdir in
Path to the location of the binary xy2sky in wcstools.
Author information
- History:
Written by: Jeremy Bailin 20 August 2010 Initial release 10 Feb 2011 Made WCSTOOLSDIR a keyword parameter.
File attributes
| Modification date: | Thu Feb 10 11:08:24 2011 |
| Lines: | 67 |
![[attach.png]](../idldoc-resources/attach.png)