21-May-2012: CALWF3 2.7: Implemented the following fixes
        860: negative cr detection, simple fix setting the fabs value
        876: overloading of bad pixel flag for spikes fixed so that the cr jump
             detection algorithm doesn't ignore them
        887: wf3rej routine cared about the case of the bunit keyword values, now
             is shouldn't
        854: add "-r" option to calwf3 to report sofware version and exit clean
        893: Use zero read pixel value for WF3 IR ramp fitting when saturated

29-Mar-2012: CALWF3 2.6.3: Implemented the following PRs:
  70922/869: Fixed the IR processing flow so that an association-level trailer
             file can still be created when a CRJ sub-product is not created
             by wf3rej for a repeat-obs association.

27-Jan-2012: CALWF3 2.6.2: Decreased max number of images to be combined in
             wf3rej from 250 to 120 because OPUS is still getting errors

24-Jan-2012: CALWF3 2.6.1: Updated procir.c to check for the number of images,
             because there were singletons coming through OPUS that had 
             RPTCORR=PERFRORM, which were failing when calwf3 tried to 
             apply wf3rej.

15-Dec-2011: CALWF3 2.6: Implemented the following PRs:
  69969/814: Updgraded wf3rej to properly handle input data that are in units
             of count rates.

09-Dec-2011: CALWF3 2.5.1: Implemented the following PRs:
  69952/807: Modified the high-level IR processing logic so that rptcorr
             processing is only applied when RPTCORR=PERFORM in the header.

01-Oct-2011: CALWF3 2.5: Implemented the following PRs:
  63555    : Increased the maximum number of images to be combined in wf3rej
             from 120 to 250.
  69230/770: Fixed the cridcalc step to correctly accumulate total integration
	     time of valid samples in some unusual circumstances.

02-Aug-2011: CALWF3 2.4.1: Implemented the following PRs:
  68983/745: Modified CheckGain in lib/wf3info.c so that it always closes the
             ref image before returning.
  68993/748: Updated the cridcalc.c crrej routine to free memory for the
             tot_ADUs array before returning.

17-Jun-2011: CALWF3 2.4: Implemented the following PRs:
  68593/722: Modified the error handling logic in calwf3 and wf3rej so that
	     EXPSCORR processing of individual exposures runs to completion in
             the event wf3rej is not able to produce a crj_tmp product.

15-Mar-2011: CALWF3 2.3: Implemented the following PRs:
  67225/646: Update the FILENAME keyword in all output files.
  67728/681: Modified IR zsigcorr to fix problems with estimated zero read
             signal in sub-array exposures.

01-Dec-2010: CALWF3 2.2: Implemented the following PRs:
  65410/578: Issue missing reference table error messages before shutting
             down when reference tables can't be found.
  66080/607: IR ZSIGCORR should not skip calculations for flagged pixels.
  66081/608: Upgraded IR calibration switch logic to allow for re-entrant
	     processing.
  66366/622: Skip wf3rej for sub-products with only 1 member present.

15-May-2010: CALWF3 2.1: Implemented the following PRs:
  65151/560: Include calculation of MEANDARK in IR darkcorr.
  64963/545: Reordered UVIS processing steps so that wf32d runs after wf3rej,
	     so that CR flags produced by wf3rej show up in wf32d flt images.
  64854/536: Reordered IR processing steps so that nlincorr and saturation
             checking get performed before dark subtraction.

27-Apr-2010: wf3rej version 27-Apr-2010; version 2.1
  64941/544: Fix parsing of wf3rej crsigmas param string to allow embedded
             blanks.

08-Mar-2010: CALWF3 2.0: Implemented the following PRs:
  63711/457: Fix the computation of IR sampzero
  64259/493: Upgraded UVIS and IR FLATCORR to use mean gain when calibrating
	     grism images.
  64260/494: Fixed wf3rej so that it doesn't crash if input spt files missing.
  64261/495: No longer produce dummy drz files, now that MultiDrizzle is active.
  64262/496: Fixed IR zsigcorr to properly catch saturated pixels in zeroth and
	     first reads.
  64630/518: Updated IR CRCORR to include read noise and Poisson noise in
	     output ERR calculation.

27-Oct-2009: CALWF3 1.8.1: Implemented the following PRs:
  63806/459: Fixed the IR CRCORR (up-the-ramp fitting) routine to properly
             set the output DQ flag values in the FLT image. Pixels that
             had all samples rejected for any reason were all being given
             a SATURATED flag value instead of the actual input flags.

26-Oct-2009: CALWF3 1.8: Implemented the following PRs:
  63788/458: Upgraded the UVIS and IR FLATCORR routines to use the mean gain
             value of all 4 amps when performing the gain calibration. This
             avoids double correction for amp-to-amp gain offsets, which are
             already included in the flatfield reference images.

14-Oct-2009: CALWF3 1.7: Implemented the following PRs:
  63556/454: Upgraded the IR CRCORR routine to use the DQ mask value from
             the CRREJTAB (badinpdq) to set which flags should be used to
             reject samples during up-the-ramp fitting.

17-Aug-2009: CALWF3 1.6: Implemented the following PRs:
  63063/435: BUNIT not set to "electrons" after IR flatcorr applied
  63286/436: NEXTEND has incorrect values for IR association drz, crj, and
             spt files.
 
24-Jun-2009: CALWF3 1.5: Implemented the following tickets:
  424: Fixed a bug in WF3REJ that was causing repeat-obs associations of IR
       subarray images to fail.

27-Apr-2009: CALWF3 1.4.1: Implemented the following tickets:
  405: Fixed a bug in the UVIS BLEVCORR step that was causing crashes due to
       incorrect overscan column limits for some B/D subarray images.

14-Apr-2009: CALWF3 1.4: Implemented the following tickets:
  325: Fixed UVIS FLATCORR to prevent crashes when using binned LFLTFILE.
  391: Upgraded resistant mean algorithm to use double-precision calculations.
  392: Fixed bugs in IR refdata routine that loads crrejtab info.

13-Mar-2009: CALWF3 1.3: Implemented the following tickets:
  352: Implemented use of CRREJTAB in IR CRCORR to retreive CR rejection
       threshold, instead of having it hardwired in the code.
  365: Fixed logic in IR CRCORR to correctly identify pixels that are saturated
       in first read to then use value of zero read.
  376: Fixed IR CRCORR routine to compute output values for pixels with only
       one good sample.
  377: Fixed computation of output SAMP and TIME values in IR CRCORR routine.
  378: Fixed UVIS BIASCORR routine to take serial virtual overscan columns into
       account when computing subarray offsets in bias reference image
  381: Change IR CRCORR to no longer set ZEROSIG in FLT file DQ array, and
       use UNSTABLE DQ value to mark high curvature pixels.

20-Feb-2009: CALWF3 1.2a: Implemented the following PRs/Tickets:
  62005/348: WF3REJ routine fixed to properly flag all rejected pixels

29-Jan-2009: CALWF3 1.2:  Implemented the following PRs/Tickets:
  61138/281: UVIS PHOTCORR upgraded to compute PHOTFNU value
  61164/282: Fixed bug causing IRAF segv for missing input file
  61347/310: IR ZSIGCORR fixed to compute proper samptime for subarray zero read
  61425/311: IR CRIDCALC fixed to propagate CR flags to following samples
  61428/312: IR FLATCORR gain multiplication fixed to handle subarrays
  61436/313: IR DQICORR upgraded to for optional CCDGAIN,CCDAMP cols in BPIXTAB
  61497/315: PHOTMODE now uses UVIS1,UVIS2,CAL keywords; no DN for IR
  61608/316: Upgrades to verify that reference files are appropriate
  61698/321: UVIS BLEVCORR fixed to properly handle rejected overscan rows/cols
  61741/323: Update to DQ flag assignments
  61819/327: Fixed/modified the behavior of CR & SPILL flagging in wf3rej

 10-Oct-2008: CALWF3 1.1   Updated wf3ccd/blevcorr to reject outliers from the
			   parallel overscan fit, as is done for the serial fit.
			   Fixed calwf3/procccd so that it finishes EXPSCORR 
			   processing and deletes blv_tmp's afterwards.
			   Fixed wf32d/doflat so that gain conversion only gets
			   applied once.
			   Convert IR data to electrons in flatcorr step.
			   Added skysub="mean" capability to wf3rej.

 11-Sep-2008: CALWF3 1.0   Updated wf3ir/nlincorr to use third-order coeffs.
			   Also updated wf3ir/blevcorr to use robust mean of all
			   ref pixels for each readout, rather than
			   quad-by-quad corrections.

 28-Aug-2008: CALWF3 0.99  Change dummy drizzle product file name suffix from
                           "dth" to "drz". Fixed IR gain and readnoise values
			   used in wf3rej. Upgraded IR noiscalc to use separate
			   gain & readnoise values for each amp quadrant. Enable
			   processing of exptime=0 images in wf3rej. Fix use of
			   amp-dependent readnoise values in wf3rej.

 21-Jul-2008: CALWF3 0.95  Updated IR cridcalc routine to use new CR methods
                           developed by the NICMOS group as implemented in
                           new version of calnica.

 19-Jun-2008: CALWF3 0.9   Fix problems with missing association products,
			   including IR crj's from RPT-OBS and dummy dth
			   products.

 21-Dec-2007: CALWF3 0.8   Fix additional issues discovered during SMGT data
                           processing, and reassignment of ZEROSIG DQ value.

 09-May-2007: CALWF3 0.7   Fix various issues discovered during SMGT data
			   processing.

 01-Aug-2006: CALWF3 0.61  Fix handling of readnoise values in UVIS
			   blevcorr step; enhancement to IR blevcorr to
			   handle transposed IR images; avoid divide by
			   zero in IR array math routines.

 17-Jul-2006: CALWF3 0.6   Fix handling of flagged pixels in UVIS overscan;
			   fix handling of DQ flags read from BPIXTAB to
			   account for presence of serial virtual overscan 
			   columns; fix minor memory allocation bugs; handle
			   null ref file names; don't update ASN_STAT in asn 
			   tables; only populate asn sub-products if inputs 
			   available.

 08-Nov-2005: CALWF3 0.5   Allow proper handling of UVIS binned images; fix
			   handling of IR ref pixel regions; fix calculation
			   of nlin file pixel indexes; fix IR noise computation.

 14-Feb-2005: CALWF3 0.4   Fix handling of IR overscan (reference pixel)
                           regions; fix another memory allocation bug in 
                           wf3rej.
 
 20-Feb-2004: CALWF3 0.3   Fix handling of binned science images; implement
			   new ATODSATURATE DQ flag; upgrade to 2-stage 
			   clipping in bias fitting; make CCDAMP and CCDGAIN
			   optional in BPIXTAB; fix memory allocation bug in
			   wf3rej routine.

 28-Oct-2003: CALWF3 0.2   Upgrades to: UVIS bias fitting; UVIS subarray
			   overscan handling; commanded gain as float type;
			   UVIS RPT-OBS handled same as CR-SPLIT; fixes to
			   IR zsigcorr and nlincorr.

 26-Nov-2002: CALWF3 0.1   First version installed in stlocal and OPUS.

