NAME:
  chiprot
 PURPOSE:   (one line only)
  Find the best rotation and offset for one chip against monolith coordinates
 DESCRIPTION:
 CATEGORY:
  Astrometry
 CALLING SEQUENCE:
  chiprot,astinfo,ref,xoffset,yoffset,rotang
 INPUTS:
  astinfo - Anonymous structure that contains an astrometric description
               of a image-based coordinate system and its mapping to the
               celestial sphere.  (see mkastinfo for more information)
  ref     - Anonymous structure that contains a set of measurements of
               sources on an image with a corresponding linkage to
               celestial coordinates (ra,dec).  This structure is normally
               created by using rdref.pro.
  xoffset - Initial guess of the X offset between the coordinates in ref
               and the coordinates described in astinfo.
  xoffset - Initial guess of the Y offset between the coordinates in ref
               and the coordinates described in astinfo.
  rotang  - Initial guess of the rotation between the coordinates in ref
               and the coordinates described in astinfo.
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
 OUTPUTS:
  xoffset - Best fitting X offset
  yoffset - Best fitting Y offset
  rotang  - Best fitting rotation angle (radians)
 KEYWORD OUTPUT PARAMETERS:
  CONVERGED - Flag, if set the results are fully converged.
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written by Marc W. Buie, Southwest Research Institute, 2010/01/13
  2012/05/02, MWB, converted old astrd2xy call to astcvt
  2012/05/30, MWB, added CONVERGED output keyword