idlastro / FITS Astrometry and Calibration: SIP_EVAL

[Source code]

NAME
SIP_EVAL
PURPOSE
Compute distorted coordinates given SIP (simple imaging polynomial) 
coefficients.
EXPLANATION
See http://fits.gsfc.nasa.gov/registry/sip.html for the SIP convention
The coefficients are passed via common block.    This is because this
routine is called by the intrinisc BROYDEN() function in AD2XY, and 
common blocks are the only way to pass parameters to the user supplied 
function in BROYDEN().  
CALLING SEQUENCE
res = SIP_EVAL(xy)   
INPUTS
xy - 2 elements vector giving the undistorted X,Y position  
OUTPUTS
res - 2 element vector giving the distorted position 
COMMON BLOCKS
common broyden_coeff,xcoeff,ycoeff
XCOEFF, YCOEFF are both nxn arrays giving the SIP coefficient for an
n x n polynomial.
REVISION HISTORY
Written   W. Landsman                  Dec 2013