NAME:
  pamgen
 PURPOSE:   (one line only)
  Compute a pixel-area map for an astronomical image
 DESCRIPTION:
  This program will combine information from an image and its astrometric
     solution to create an image that contains the area of each pixel
     on the plane-of-the-sky in units of arcsec^2.
 CATEGORY:
  CCD data processing
 CALLING SEQUENCE:
  pamgen,root,num
 INPUTS:
  root - root of file name
  num  - Image number, file name will be root + '.' + num where num is
            formatted as a 3-digit zero-padded string.  If num is undefined
            then root is taken to be the entire file name.  A string is allowed
            and will be parsed by rangepar.pro to pull out a list of image
            numbers.
    You can provide either one or a group of images.  If num is undefined
       then root can either be scalar or vector.  If num is defined then
       root must be scalar.  If num is defined it can be either a scalar or
       vector if it is an integer.  If it is a string it can only be a scalar.
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  PATH - String, name of directory where image data are to be found.
            Default is '/net/frakir/raid/reduced/'.  'root' is added on
            to this path to form the complete directory name.  If you
            supply the path yourself you must completely specify the path.
 OUTPUTS:
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
  A file, named fitcoeff.dat, must be in PATH.  This file
    is expected to contain a fit that allows mapping from pixel (x,y) to
    sky (RA,Dec).  This file is usually generated by running ASTROM.PRO.

  For each file specified
 MODIFICATION HISTORY:
  Written by Marc W. Buie, Southwest Research Institute, 2009/10/02
  2009/12/30, MWB, modified for new fitting coefficients methodology