NAME:
  plastext
 PURPOSE:
  Batch mode extraction of PLAST asteroid lists.
 DESCRIPTION:
 CATEGORY:
  Astrometry
 CALLING SEQUENCE:
  plastext,root,startnum,finnum
 INPUTS:
  startnum - First frame number to process
  finnum   - Last frame number to process
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:

  DIGITS   - Number of digits in suffix of file name, default=3

  EXTLIST  - If image is a multi-extension FITS image, this list will
                force the reduction of only the extension numbers listed.
                The default is to do all the extensions, one at a time.

  FULL     - Flag, if set, causes this program to call the original 'plast'
                program.  The original is much slower but can be more accurate
                since it does full formal orbit calculations with integration
                for every step.  Warning, the speed difference is more than
                a factor of 100 and the differential gain is likely to be
                imperceptibly small.

  KEYLIST  - Name of a file containing a correspondence list. This list
                associates a set of standard names with the actual keyword
                names found in a FITS file header. If this keyword is
                omitted, a default list is used, as if a file with the
                following contents had been supplied:
                   AIRMASS   K  AIRMASS
                *  DATE      K  DATE-OBS
                *  DATETMPL  T  DD-MM-YYYY
                   EXPDELTA  V  0.0
                   EXPTIME   K  EXPTIME
                   FILTER    K  FILTERS
                   FILENAME  K  CCDFNAME
                *  OBJECT    K  OBJECT
                *  UT        K  UT 
                *  RA        K  RA
                *  DEC       K  DEC
                *  EPOCH     K  EPOCH
                The middle column is a flag. It may be K, for Keyword,
                T, for Template, or V, for Value. If it is V, the contents
                of the third field on that line should make sense for the
                name in the first field.  Only those fields marked with '*'
                are actually used by this program.

  MAGLIM   - Limiting (faint) magnitude for asteroid extraction (default=30.0)

  PATH     - String, this is the name of the directory where the data are
                stored.  The actual data directory used is PATH+'/'+root.
                The default is '' (blank) and the file would be root.NNN
                which would permit putting a leading path on the root.

  PSCALE   - Scalar number, this is the scale of the image in arcsec/pixel.
                If not specified, then this program will look for the
                ASTROM information file, astrom.inf, in the current directory
                for the plate scale.  If the file does not exist, then you
                will be prompted to provide the plate scale directly.

  SCRIPT   - String, if provided is the file name to save a script to.
                If set will suppress the actual call to plast to
                generate the asteroid lists.  Instead, all the calls
                to plast will be saved to this file.

 OUTPUTS:
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  97/11/24, MWB, cloned from REFEXT.PRO
  98/03/25, MWB, add EXTLIST keyword and group extension support
  2000/02/05, MWB, minor mod to add .fits tag support.
  2002/08/23, MWB, added support for new plast program.
  2002/10/23, MWB, changed headfits call to fits_read for group data.
  2014/01/13, MWB, added DIGITS keyword