NAME:
  addpsf
 PURPOSE:   (one line only)
  Insert (add) one or more PSFs into an image
 DESCRIPTION:
 CATEGORY:
  CCD data processing
 CALLING SEQUENCE:
  addpsf,image,x,y,f,psf
 INPUTS:
  image - 2-d array to insert the PSF(s) into (MODIFIED).
  x     - PSF x position (expected to be a float)
  y     - PSF y position (expected to be a float)
  f     - Scaling factor for source (multiplied against psf)
  psf   - Normalized PSF to use
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  PSFMAX - 2-element vector that contains the x,y position of the
              peak of the input PSF.  These coordinates are in the
              native image position coordinates of the PSF.  If not
              provided it will be computed.  You can save on this
              calculation by taking care of this outside this routine.
 OUTPUTS:
  image - modified version of the image with the PSFs added
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written by Marc W. Buie, Southwest Research Institute, 2012/09/28
  2016/03/27, MWB, rewrite logic to eliminate possibility of bad array
                indexing.  If the requested location is not on the image
                nothing is added.