********************************************************************************
                                    NUSTAR
********************************************************************************

NuSTARDAS v1.5.1:

Major changes introduced in this version:

- numkarf: 1) addition of the new input parameters 'pilowarf' and
  'pihigharf' to define the energy range used to calculate the box
  ARF weights for the 'addarf' internal run (extended sources case);
  2) addition of the new input parameter 'flatflag' to apply a flat
  spatial counts distribution to calculate the box ARF weights for
  the 'addarf' internal run (extended sources case).

- numkrmf: bug fix for addrmf execution when CALDB in remote mode
  is used.

- nuproducts: addition of the new input parameters 'pilowarf',
  'pihigharf' and 'flatflagarf' to support the numkarf changes.

- nupipeline: 1) addition of the new input parameters 'pilowarf',
  'pihigharf' and 'flatflagarf' to support the numkarf changes;
  2) handling of the cases 'createexpomap=yes' and/or 'exitstage=3'
  when the '01' cleaned event file is empty.

Summary of changes:

- numkarf:

  When observing extended sources it's often the case that the
  high-energy photons have a different spatial distribution than
  the low-energy photons.  Prior to this patch, the ARF generator
  used the spatial distribution for all photons over the allowed
  NuSTAR energy range (1.6-165 keV) to determine the box ARF
  weights. The new keywords (pilowarf and pighigharf) can be used
  to set a specific energy range (e.g above >40 keV or 5-7 keV).
  Recall that the conversion between energy and PI is :
  PI = (keV - 1.6) / 0.04 channels.

  Additionally, we have added the option to use a "flat" spatial
  distribution over the source region (e.g. if the intrinsic source
  distribution is unknown) which equally weights all boxes in the
  source region when generating the ARF.

- nupipeline / nuproducts :

  Added feed through keywords to support the above changes to numkarf.

  Also improved handling of cases when high level (Stage 3)
  science products are being produced but the SCIENCE data mode
  file is empty. This commonly occurs during SLEW sequence IDs and
  previously the pipeline would exit with an error.