Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
ADXY
Use a FITS header to convert astronomical to pixel coordinates
Use an image header to compute X and Y positions, given the RA and Dec (or longitude, latitude) in decimal degrees.
ADXY, HDR ;Prompt for Ra and DEC ADXY, hdr, a, d, x, y, [ /PRINT, ALT= ]
HDR - FITS Image header containing astrometry parameters
A - Right ascension in decimal DEGREES, scalar or vector D - Declination in decimal DEGREES, scalar or vector If A and D are not supplied, user will be prompted to supply them in either decimal degrees or HR,MIN,SEC,DEG,MN,SC format.
X - row position in pixels, same number of elements as A and D Y - column position in pixels X and Y will be in standard IDL convention (first pixel is 0) and not the FITS convention (first pixel is 1). As in FITS an integral value corresponds to the center of a pixel.
/PRINT - If this keyword is set and non-zero, then results are displayed at the terminal. ALT - single character 'A' through 'Z' or ' ' specifying an alternate astrometry system present in the FITS header. The default is to use the primary astrometry or ALT = ' '. If /ALT is set, then this is equivalent to ALT = 'A'. See Section 3.3 of Greisen & Calabretta (2002, A&A, 395, 1061) for information about alternate astrometry keywords.
If less than 5 parameters are supplied, or if the /PRINT keyword is set, then the X and Y positions are displayed at the terminal. If the procedure is to be used repeatedly with the same header, then it would be faster to use AD2XY.
AD2XY, ADSTRING(), EXTAST, GETOPT(), TEN()
W. Landsman HSTX January, 1988 Use astrometry structure W. Landsman January, 1994 Changed default ADSTRING format W. Landsman September, 1995 Converted to IDL V5.0 W. Landsman September 1997 Check if latitude/longitude reversed in CTYPE keyword W. L. Feb. 2004 Added ALT keyword W. Landsman September 2004 Work for non-spherical coordinate transformation W. Landsman May 2005
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]