Index: trunk/psModules/src/camera/pmFPAMaskWeight.h
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.h	(revision 21183)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.h	(revision 21363)
@@ -5,6 +5,6 @@
  * @author Eugene Magnier, IfA
  *
- * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- * @date $Date: 2009-01-27 06:39:38 $
+ * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-02-06 02:31:24 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -47,13 +47,13 @@
 
 
-/// Set a temporary readout weight map using CELL.GAIN and CELL.READNOISE
+/// Set a temporary readout variance map using CELL.GAIN and CELL.READNOISE
 ///
-/// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain
-/// (CELL.GAIN) and read noise (CELL.READNOISE).  The weight map that is produced within the readout is
-/// temporary --- it is not added to the HDU.  This is intended for when the user is iterating using
-/// pmReadoutReadNext, in which case the HDU can't be generated.
-bool pmReadoutSetWeight(pmReadout *readout, ///< Readout for which to set weight
-                        bool poisson    ///< Use poisson weights (in addition to read noise)?
-                       );
+/// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise
+/// (CELL.READNOISE).  The weight map that is produced within the readout is temporary --- it is not added to
+/// the HDU.  This is intended for when the user is iterating using pmReadoutReadNext, in which case the HDU
+/// can't be generated.
+bool pmReadoutSetVariance(pmReadout *readout, ///< Readout for which to set variance
+                          bool poisson    ///< Include poisson variance (in addition to read noise)?
+    );
 
 /// Generate a readout mask (suitable for output) using CELL.SATURATION and CELL.BAD
@@ -66,35 +66,35 @@
     );
 
-/// Generate a weight map (suitable for output) using CELL.GAIN and CELL.READNOISE
+/// Generate a variance map (suitable for output) using CELL.GAIN and CELL.READNOISE
 ///
-/// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain
-/// (CELL.GAIN) and read noise (CELL.READNOISE).  The weight map that is produced within the readout is
-/// suitable for output (complete with HDU entry).  This is intended for most operations.
-bool pmReadoutGenerateWeight(pmReadout *readout, ///< Readout for which to generate weight
-                             bool poisson    ///< Use poisson weights (in addition to read noise)?
-                            );
+/// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise
+/// (CELL.READNOISE).  The variance map that is produced within the readout is suitable for output (complete
+/// with HDU entry).  This is intended for most operations.
+bool pmReadoutGenerateVariance(pmReadout *readout, ///< Readout for which to generate variance
+                               bool poisson    ///< Include poisson variance (in addition to read noise)?
+    );
 
-/// Generate mask and weight map for a readout
+/// Generate mask and variance map for a readout
 ///
-/// Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout
-bool pmReadoutGenerateMaskWeight(pmReadout *readout, ///< Readout for which to generate mask and weights
-                                 psImageMaskType sat, ///< Mask value to give saturated pixels
-                                 psImageMaskType bad, ///< Mask value to give bad (low) pixels
-                                 bool poisson ///< Use poisson weights (in addition to read noise)?
-                                );
+/// Calls pmReadoutGenerateMask and pmReadoutGenerateVariance for the readout
+bool pmReadoutGenerateMaskVariance(pmReadout *readout, ///< Readout for which to generate mask and variance
+                                   psImageMaskType sat, ///< Mask value to give saturated pixels
+                                   psImageMaskType bad, ///< Mask value to give bad (low) pixels
+                                   bool poisson ///< Include poisson variance (in addition to read noise)?
+    );
 
-/// Generate mask and weight maps for all readouts within a cell
+/// Generate mask and variance maps for all readouts within a cell
 ///
-/// Calls pmReadoutGenerateMaskWeight for each readout within the cell.
-bool pmCellGenerateMaskWeight(pmCell *cell, ///< Cell for which to generate mask and weights
-                              psImageMaskType sat, ///< Mask value to give saturated pixels
-                              psImageMaskType bad, ///< Mask value to give bad (low) pixels
-                              bool poisson ///< Use poisson weights (in addition to read noise)?
-                             );
+/// Calls pmReadoutGenerateMaskVariance for each readout within the cell.
+bool pmCellGenerateMaskVariance(pmCell *cell, ///< Cell for which to generate mask and variance
+                                psImageMaskType sat, ///< Mask value to give saturated pixels
+                                psImageMaskType bad, ///< Mask value to give bad (low) pixels
+                                bool poisson ///< Include poisson variance (in addition to read noise)?
+    );
 
-/// Renormalise the weight map to match the actual pixel variance
+/// Renormalise the variance map to match the actual pixel variance
 ///
-/// The weight (variance) map is adjusted so that the mean matches the actual pixel variance in the image
-bool pmReadoutWeightRenormPixels(
+/// The variance map is adjusted so that the mean matches the actual pixel variance in the image
+bool pmReadoutVarianceRenormPixels(
     const pmReadout *readout,           ///< Readout to normalise
     psImageMaskType maskVal,                 ///< Value to mask
@@ -104,11 +104,11 @@
     );
 
-/// Renormalise the weight map to match the actual photometry variance
+/// Renormalise the variance map to match the actual photometry variance
 ///
-/// The weight (variance) map is adjusted so that the actual significance of fake sources matches the
+/// The variance map is adjusted so that the actual significance of fake sources matches the
 /// guestimated significance
-bool pmReadoutWeightRenormPhot(
+bool pmReadoutVarianceRenormPhot(
     const pmReadout *readout,           ///< Readout to normalise
-    psImageMaskType maskVal,                 ///< Value to mask
+    psImageMaskType maskVal,            ///< Value to mask
     int num,                            ///< Number of instances to measure over the image
     float width,                        ///< Photometry width
@@ -118,14 +118,14 @@
     );
 
-/// Renormalise the weight map to match the actual variance
+/// Renormalise the variance map to match the actual variance
 ///
 /// The variance in the image is measured in patches, and the variance map is adjusted so that the mean for
 /// that patch corresponds.
-bool pmReadoutWeightRenorm(const pmReadout *readout, // Readout to normalise
-                           psImageMaskType maskVal, // Value to mask
-                           psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
-                           psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
-                           int width,   // Width of patch (pixels)
-                           psRandom *rng // Random number generator (for sub-sampling images)
+bool pmReadoutVarianceRenorm(const pmReadout *readout, // Readout to normalise
+                             psImageMaskType maskVal, // Value to mask
+                             psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
+                             psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
+                             int width,   // Width of patch (pixels)
+                             psRandom *rng // Random number generator (for sub-sampling images)
     );
 
@@ -133,5 +133,5 @@
 ///
 /// Since unmasked non-finite pixels can occur (e.g., by out-of-range in quantisation), it is sometimes
-/// necessary to mask them explicitly.  Non-finite pixels in the image or weight have their mask OR-ed with
+/// necessary to mask them explicitly.  Non-finite pixels in the image or variance have their mask OR-ed with
 /// the provided value.
 bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask
@@ -139,9 +139,9 @@
     );
 
-/// Apply a mask to the image and weight map
+/// Apply a mask to the image and variance map
 ///
 /// Unfortunately, image subtraction may result in a bi-modal image in masked areas, which can upset image
 /// statistics (very important for quantising images so that a product can be written out!).  This function
-/// sets masked areas to NAN in the image and weight.
+/// sets masked areas to NAN in the image and variance.
 bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask
                         psImageMaskType maskVal ///< Mask value for which to apply mask
