ADXY
Name
ADXY
Purpose
Use a FITS header to convert astronomical to pixel coordinates
Explanation
Use an image header to compute X and Y positions, given the
RA and Dec (or longitude, latitude) in decimal degrees.
Calling Sequence
ADXY, HDR ;Prompt for Ra and DEC
ADXY, hdr, a, d, x, y, [ /PRINT, ALT= ]
Inputs
HDR - FITS Image header containing astrometry parameters
Optional Inputs
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.
Optional Output
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.
Optional Keyword Input
/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.
Operational Notes
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.
Procedures Called
AD2XY, ADSTRING(), EXTAST, GETOPT(), TEN()
Revision History
W. Landsman HSTX January, 1988
Use astrometry structure W. Landsman January, 1994
Changed default ADSTRING format W. Landsman September, 1995
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
More informative error message if astrometry missing W.L. Feb 2008
Cosmetic updates W.L. July 2011