NAME:
    hrcmodel
 PURPOSE: (one line)
    Generate synthetic PSF images for the HST ACS/HRC.
 DESCRIPTION:
    A generated PSF is added to the output array.  If the array is not
 defined, it is created with dimensions 1024 by 512.  Successive calls
 will add objects (PSF's) to the array.
 CATEGORY:
  CCD data processing
 CALLING SEQUENCE:
    hrcmodel, x, y, inten, filter, bmvnum, back, image
 INPUTS:
    x, y    : Position of the PSF in the output array.
    inten   : Intensity of PSF relative to TinyTim output PSF
    filter  : Filter name. May be f439w or f555w.
    bmvnum  : TinyTim Color Index (B-V) number (integer) OR a directory
 name. See HSTPSF documentation header for details.
    back    : Background to be added.
 OPTIONAL INPUT PARAMETERS:

    JITTER  : If set contains the gaussian smearing to apply to the image.
                This is in units of 1/e half width.  If not set, no smearing
                is applied.

    OBJRAD  : Radius of object in pixels.  If not set, assumed to be a point
              source.  If set and radius is greater than 0.5, then PSF is
              convolved with a circular function of this radius.  This models
              the object as a Lambert disk, crude but useful for barely
              resolved objects.

 KEYWORD PARAMETERS:
    HSTPATH : Alternate path for HST PSF's.
    NEW     : If set, clears the output array to zeros before building the
              PSF image(s).
    VERBOSE : If set, prints informational message.
 OUTPUTS:
    image  : The image array into which the PSF is placed.
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
    The Tiny Tim programs tiny1 and tiny2 are used, via the procedure HSTPSF,
 to generate a PSF at the nearest grid location to the requested
 position. (This grid is defined in hstpsf).
    From the interpolated maximum returned by hstpsf, shift amounts for x
 and y are computed.
    The PSF is shifted by these amounts.
    Finally, the resulting PSF is multiplied by the intensity parameter and
 added into the output array.
    Calls external procedures BADPAR, BOXM, HSTPSF, and SSHIFT2D.

    Note: The routine P6MODEL was used as a basis for this routine. Most
 of the code is identical to the code in P6MODEL.
 MODIFICATION HISTORY:
  2003/01/15, Created by Doug Loucks, consultant for Lowell Observatory
  2019/12/20, MWB, incorporated new routine, mkxyarr