
### 21 May 2012 - MLS -- Version 2.7
    - small fix in for the negative cosmic rays
    - modified the cridcalc rejection settings for spike so that those
      pixels were not excluded from the CR detection algorithm
    - removed the case dependency for the BUNIT keyword
    - changed the BUNIT keyvalue to write ELECTRONS instead of electrons
    - new option added "-r" to calwf3 to print the current verison and exit
    - Use zero read pixel value for WF3 IR ramp fitting when saturated

### 29 Mar 2012 - HAB -- Version 2.6.3
    - Fixed the IR processing flow so that an association-level trailer file
      is created even when a CRJ sub-product is not created by wf3rej.

### 27 Jan 2012 - MLS -- Version 2.6.2
    - Decreased the max number of images to combine in wf3rej back to 120
      because OPUS is still getting errors

### 23 Jan 2012 - MLS -- Version 2.6.1
    - Modified procir.c to check for the number of images, to account
      for singletons going through the pipeline with RPTCORR=PERFORM, which
      caused calwf3 to fail when trying to run wf3rej.

### 15 Dec 2011 - HAB -- Version 2.6
    - Upgraded wf3rej to properly handle input data that are in units of
      count rates.

### 09 Dec 2011 - HAB -- Version 2.5.1
    - Modified the high-level IR processing logic so that rptcorr processing
      is only applied when RPTCORR=PERFORM in the image header.

### 01 Oct 2011 - HAB -- Version 2.5
    - Fixed the cridcalc step to correctly accumulate the total integration
      time of the valid samples for each pixel in some unusual cases.
    - Increased max image combine limit in wf3rej from 120 to 250.

### 02 Aug 2011 - HAB -- Version 2.4.1
    - Updated lib/wf3info.c to have CheckGain always close the ref image before
      returning.
    - Updated wf3ir/cridcalc.c to have crrej free memory for tot_ADUs array
      before returning.

### 17 Jun 2011 - HAB -- Version 2.4
    - Updated wf3rej/wf3rej.c and calwf3/procccd.c so that they handle error
      returns from wf3rej in a way that allows for EXPSCORR processing of
      individual exposures to complete.

### 15 Mar 2011 - HAB -- Version 2.3
    - Updated CopyFFile routine to update FILENAME keyword in output file.
    - Modified zsigcorr to no longer rely on effective exposure time of zeroth
      read image.

### 01 Dec 2010 - HAB -- Version 2.2
    - Updated tabpedigree routine to not return error status when a ref
      table can't be opened, so that calling routines can issue missing
      reference file error messages before shutting down.
    - Updated the GetIRRef routine in getreffiles.c to check all IR cal
      switches and correctly handle re-entrant IR processing.
    - Updated the logic in several routines that handle processing of
      crj sub-products and their trailer files so that no attempt is made to
      produce a sub-product when all but 1 member is missing.
    - Updated IR ZSIGCORR to not skip processing of flagged pixels.

### 15 May 2010 - HAB -- Version 2.1
    - Updated the order of UVIS processing so that wf32d runs after
      crcorr (instead of before), so that final flt images have CR flags
      from crcorr.
    - Updated the order of IR processing so that nlincorr runs before
      darkcorr. This allows saturation checking to be performed on darks.
    - Added the computation of MEANDARK in IR darkcorr routine.

### 27 Apr 2010 - HAB -- wf3rej version 27-Apr-2010; version 2.1
    - Modified the wf3rej cl script and parameter parsing so that it no
      no longer stops with a syntax error if there are embedded blanks in
      the crsigmas param string.

### 08 Mar 2010 - HAB -- Version 2.0
    - Updated the UVIS and IR flatcorr routines to use the mean gain value
      when performing gain calibration for all images, including grisms.
      Amp-dependent gain offsets are now included in the grism flats.
    - Updated the lib/mkspt.c routine to not shutdown if none of the input
      spt files are present.
    - Eliminated the creation of dummy drz products.
    - Fixed the IR sampzero computation for sub-array exposures.
    - Reworked IR zsigcorr to properly flag saturated pixels in zeroth and
      first reads.
    - Upgraded IR cridcalc to properly compute output ERR values.

### 27 Oct 2009 - HAB -- Version 1.8.1
    - Fixed the IR CRCORR routine to assign output DQ flag values for pixels
      with all samples rejected based on the logical OR of all input flags.

### 26 Oct 2009 - HAB -- Verison 1.8
    - Updated GetCCDTab to compute the mean gain value for use in flatcorr.
    - Updated the UVIS and IR flatcorr routines to use the mean gain value
      when performing gain calibration, except for grism images, which still
      use the amp-dependent gain values.

### 14 Oct 2009 - HAB -- Version 1.7
    - Updated IR cridcalc to use "badinpdq" value from CRREJTAB as DQ
      mask value for rejecting samples, rather than hardwiring DQIGNORE
      to a constant in the code.
    - Updated the crrpar_in routine in wf3ir/refdata.c to report the value
      of badinpdq, now that it's being used in cridcalc.

### 17 Aug 2009 - HAB -- Version 1.6
    - Updated IR flatcorr to set BUNIT to "electrons" after applying gain
      correction.
    - Updated several routines to set NEXTEND to correct values for IR
      association drz, crj, and spt products.

### 24 Jun 2009 - HAB -- Version 1.5
    - Fixed a bug in the WF3REJ routine that was causing it to crash when
      processing repeat-obs associations of IR subarray images, due to the
      use of ampx/ampy values that were only valid for full-frame.

### 27 Apr 2009 - HAB -- Version 1.4.1
    - Fixed a bug in the UVIS BLEVCORR routine that was causing it to crash
      when processing some amp B/D subarray images, due to the overscan column
      limits going out of bounds on the science image array.

### 14 Apr 2009 - HAB -- Version 1.4
    - Fixed bugs in UVIS FLATCORR that was causing it to crash when applying a
      binned LFLTFILE. Also enabled use of an LFLTFILE that has the same size
      as the science image (and therefore no interpolation required).
    - Upgraded the algorithms in the resistant mean routine to use double
      precision in calculations involving the mean and standard deviation. This
      routine is used by wf3rej when skysub=mean and by the IR BLEVCORR step.
    - Fixed a bug in the IR refdata module that reads the crrejtab info, so
      that it now correctly identifies rows where IRRAMP=yes.

### 13 Mar 2009 - HAB -- Version 1.3
    - Implemented use of CRREJTAB in IR CRCORR to get rejection parameters
    - Fixed many bugs in IR CRCORR, including computation of output SAMP and
      TIME values, and also changed flagging of HIGH_CURVATURE to UNSTABLE, and
      removed ZEROSIG flags from FLT file DQ array.
    - Fixed UVIS BIASCORR to take serial virtual overscan columns into account
      when computing subarray offsets in bias ref image.

### 20 Feb 2009 - HAB -- Version 1.2a
    - Modified wf3rej/rej_loop so that SPILL pixels get tested to see if they
      qualify as a CR.

### 29 Jan 2009 - HAB -- Version 1.2
    - Modified wf3rej/rej_loop to only write CR flag values into outputs (no
      SPILL values) and to not flag pixels as CR in output crj file if there
      were 1 or more good samples for the pixel.
    - Added checking of FILETYPE and other applicable parameters such as
      DETECTOR, GAIN, FILTER for all ref files. This involved updates to
      several routines.
    - Modified wf3dq.h and all places within code where DQ macros are used to
      implement new UVIS and IR flag assignments.
    - Fixed bug in lib/trlbuf.c that was causing segv when trying to close
      a nonexistent file.
    - Added computation of PHOTFNU to UVIS photcorr step and modified syntax
      of PHOTMODE keywords to use both UVIS1 and UVIS2 for UVIS exposures, use
      CAL for UVIS exposures, and eliminate use of DN for IR.
    - Upgraded the UVIS blevcorr fitting routines to guard against the case
      where many bias row/col entries are rejected as bad.
    - Fixed IR cridcalc routine to reinstate code that was missing from the
      calnica port, which flags CRs in all samples following the hit.
    - Fixed wf3ir/dqicorr to handle missing CCDGAIN/CCDAMP columns in BPIXTAB.
    - Fixed bug in wf3ir/zsigcorr to compute correct effective exposure time
      of zeroth read subarray images.
    - Fixed bug in wf3ir/flatcorr mult_gain routine to prevent out of bounds
      array access for subarray images.

### 10 Oct 2008 - HAB -- Version 1.1
    - Modified wf3ccd/blevcorr to reject outliers from parallel overscan
      values using new cleanDriftFit routine. Also optimized clipping 
      thresholds for both serial and parallel fits. Modifications to doblev.c,
      blevfit.c, and blevdrift.c.
    - Modified calwf3/procccd.c to fix EXPSCORR handling and save_tmp settings
      for deleting blv_tmp's after EXPSCORR is done.
    - Modified wf32d/doflat.c so that gain conversion only gets applied once
      in calls to divFlat for PFLT and DFLT applications.
    - Upgraded wf3ir/flatcorr.c to convert data to units of electrons by
      multiplying by the gain after flat field has been applied.
    - Added capabilities to wf3rej/rej_sky.c to compute "mean" sky value, using
      resistant mean method.

### 11 Sep 2008 - HAB -- Version 1.0
    - Modified wf3ir/nlincorr algorithms to use third-order coeff arrays,
      which involved changes to wf3info.h (for NlinData struct), refdata.c,
      and nlincorr.c.
    - Modified wf3ir/blevcorr to use new resistant-mean calculation of ref
      pix statistics and to perform correction globally for each readout, 
      rather than quad-by-quad. Uses new statistics module "resistmean.c".

### 28 Aug 2008 - HAB -- Version 0.99
    - Changed dummy drizzle product file name suffix from "dth" to "drz" in
      several modules (calwf3/wf3init.c, calwf3/wf3table.c, lib/findroot.c,
      lib/mkspt.c).
    - Updated get_nsegn gain routine (lib/detnsegn.c) to properly handle IR
      gain and readnoise values for use in wf3rej.
    - Updated wf3ir/noiscalc to use separate gain & readnoise values for each
      amp quadrant.
    - Fixed bug in wf3rej/rej_do.c that was not allowing a group of
      exptime=0 images (e.g. biases) to process.
    - Fixed bug in wf3rej/rej_init.c that was causing amp A readnoise value to
      be used for all image quadrants.

### 21 Jul 2008 - MS  -- Version 0.95
    - Ported new CR rejection methods from calnica to wf3ir/cridcalc.c.

### 19 Jun 2008 - HAB -- Version 0.9
    - Added capability to calwf3/procir.c to combine IR Repeat-Obs images
      into a crj product.
    - Added capability to calwf3/wf3dth.c to create dummy dth products, until
      MultiDrizzle becomes available in WFC3 pipeline.
    - Various updates to wf3rej routines to properly handle WFC3 IR images.

### 21 Dec 2007 - HAB -- Version 0.8
    - Reassigned ZEROSIG DQ value from 4096 to 64, in order to make 4096
      available for MultiDrizzle CR's (for consistency with ACS).
    - Use upgraded FirstLast routine in lib/dodqi.c to fix indexing problems
      associated with binned images.
    - Upgraded lib/mkspt.c to correctly handle structure of WFC3 SPT files,
      most noteably the SNAP1 extension.
    - Modified wf3ir/blevcorr.c to remove the swapping of quad indexes for old
      images, because all old images have been reprocessed and rotated to
      proper orientation.
    - Upgraded wf3rej/rej_init.c, rej_loop.c and rej_sky.c to prevent crashing
      of getShortLine routine on input null DQ arrays.

### 09 May 2007 - HAB -- Version 0.7

### 01 Aug 2006 - HAB -- Version 0.61
    - Modified wf3ccd/doblev.c to select correct readnoise value when
      processing one- or two-amp readouts, and to convert the readnoise
      value to units of DN's to match science image units.
    - Modified wf3ir/blevcorr.c to swap the quad indexes around for
      images processed before and after the date on which OPUS started
      transposing IR raw images.
    - Upgraded wf3ir/math.c adiv and adiv_noref routines to avoid
      divide by zero errors.
    - Switched wf3ir/flatcorr.c routine from multiplying by (inverse)
      flat to dividing by flat.

### 17 Jul 2006 - HAB -- Version 0.6
    - Modified wf3ccd/blevdrift.c VMedianY routine to fix bug in logic used
      to reject flagged pixels in computation of bias in parallel overscan.
    - Modified wf3ccd/findblev.c FindBlev routine to fix bugs in logic used
      to reject flagged pixels in computation of bias in serial overscan.
    - Modified lib/dodqi.c to properly handle WFC3 binned images, as well as
      account for the presence of serial virtual overscan in raw image space.
    - CALACS-derived changes:
    - Removed use of "updateAsnStat" routine in calwf3/calwf3.c, because
      only OPUS should update the ASN_STAT keyword in the asn table.
    - Fixed problem printing list of wf3rej input file names in 
      calwf3/procccd.c.
    - Added check for null ("") ref file names in calwf3/refexist.c.
    - Fixed memory allocation problem in calwf3/wf3dth.c/InitDthTrl routine
      for string variable that holds list of trailer file names.
    - Modified calwf3/wf3table.c getAsnTable routine to only populate
      sub-products in at least one input exists for that product.
    - Modified lib/mkoutname.c to free local memory on error returns.

### 08 Nov 2005 - HAB -- Version 0.5
    - Modified wf32d/do2d.c OscnTrimmed routine to make it compatible with
      WFC3 binned images.
    - Modified wf3ir/blevcorr.c to fix bug in calculation of loop limits
      for reference pixel regions for quads 3 and 4.
    - Modified wf3ir/nonlincorr.c and wf3ir/zsigcorr.c to fix bug in 
      calculation of nlin ref image pixel indexes.
    - Modified wf3ir/noiscalc.c to fix bug in noise computation.

### 15 Feb 2005 - HAB -- Version 0.4
    - Modified wf3ccd/findover.c routine to select oscntab row based on
      image size (nx,ny) instead of binning when processing IR images.
    - Modified wf3ir/blevcorr.c routine to use biassect values from oscntab
      to set limits for reference pixel region analysis, instead of using
      image trim values.
    - Fixed memory reallocation problem in wf3rej/wf3rej.c InitRejTrl routine, 
      which was causing routine to crash on very large number of input images.

### 20 Feb 2004 - HAB -- Version 0.3
    - (OPR 50441)
    - Fixed use of amp boundaries in 'donoise.c' to take into account 
      presence of WFC3 serial virtual overscan columns.
    - Fixed 'getccdtab.c', 'getgrp.c', and 'getkeys.c' routines to properly
      handle binned science images.
    - CALACS-derived changes:
    - Fixed memory allocation bug in wf3rej/rej_loop.c to handle image sizes
      not evenly divisible by 8.
    - Removed SCALENSE from the computation of the error image in WF3REJ.
    - Implemented A-TO-D saturation flagging in 'dodqi.c' as an additional
      flag for saturation.
    - Implemented 2-stage clipping in computation of bias value from overscan
      columns in 'doblev.c'. First stage will be limited to 3*sigma or
      3*sqrt(mean), whichever is less, while second stage will be limited
      to 3*readnoise.
    - Modified 'dodqi.c' to reduce CCDAMP and CCDGAIN from being required
      columns in the BPIXTAB to being optional.
      
### 28 Oct 2003 - HAB -- Version 0.2
    - (OPR 49720)
    - Changed all handling of commanded gain values (ccdgain) from int to
      float data type in all applicable routines.
    - Fixes to UVIS subarray overscan handling, including the use of serial
      physical overscan regions (instead of serial virtual, which doesn't
      exist for subarrays), and the proper trimming of overscan region(s) for
      output images.
    - UVIS processing handles RPT-OBS images exactly the same as CR-SPLITs
      (i.e. sends them to WF3Rej instead of WF3Sum).
    - IR processing loads DARK and NLIN switch and ref file info for use
      by ZSIGCORR (in case ZSIG is performed without DARK or NLIN). Also
      changed ZSIG and NLIN steps to use just 1 node array (saturation level)
      from NLIN ref file (no more node that specifies lower bound for nlin
      correction like NICMOS does).
    - CALACS changes: Implement use of EXPSCORR switch; Added sigma clipping
      to bias fitting; Added processing msgs for reporting bias fit slope and
      intercept; Fixed use of default bias levels for each amp as retrieved
      from CCDTAB; WF3Rej made robust for handling input images that have
      EXPTIME=0.

### 26 Nov 2002 - HAB -- Version 0.1
    - (OPR 46253)
    - First version installed in stlocal$testwf3 and delivered to OPUS.

