idlastro / FITS Astrometry and Calibration: XYXY

[Source code]

NAME
XYXY
PURPOSE
To use a pair of headers to convert X/Y positions from one frame
to another.
CALLING SEQUENCE
XYXY, hdra, hdrb, xa, ya, [ xb, yb ]
INPUTS
hdra - The header containing the plate solution describing the
       frame of reference being converted FROM.
hdra - The header containing the plate solution describing the
       frame of reference being converted TO.
xa   - A scalar or vector containing the x coordinate(s) to convert.
ya   - A scalar or vector containing the y coordinate(s) to convert.
       Must have the same number of elements as 'xa'.
OUTPUTS
xb   - The converted x coordinate(s).  If this parameter is not
       specified, it is returned through 'xa'.
yb   - The converted y coordinate(s).  If this parameter is not
       specified, it is returned through 'ya'.
PROCEDURE
The procedures 'xyad' and 'adxy' are used to perform the 
onversion.     The equinoxes of each header are checked with
get_equinox" to make sure that they are identical, and "precess"
s used if they are not.   HEULER used if the headers have a different
oordinate system (e.g. Celestial, Galactic, Ecliptic)
ote that all X,Y coordinates are in the IDL convention (starting with
,0) and not the FITS convention (first pixel is 1,1)
PROCEDURES USED
GET_EQUINOX(), EXTAST, XYAD, ADXY, PRECESS, HEULER
MODIFICATION HISTORY
Written by Michael R. Greason, Hughes-STX, 13 April 1992.
Updated to use ASTROMETRY structures.  J.D.Offenberg, HSTX, Jan 1993
Converted to IDL V5.0   W. Landsman   September 1997
heck coordinate system   J. Ballet/ W. Landsman  April 2004