Index: trunk/psModules/src/camera/pmReadoutStack.c
===================================================================
--- trunk/psModules/src/camera/pmReadoutStack.c	(revision 21183)
+++ trunk/psModules/src/camera/pmReadoutStack.c	(revision 21363)
@@ -12,8 +12,8 @@
 // XXX should it be an error for the image to exist?
 psImage *pmReadoutSetAnalysisImage(pmReadout *readout, // Readout containing image
-				   const char *name, // Name of image in analysis metadata
-				   int numCols, int numRows, // Expected size of image
-				   psElemType type, // Expected type of image
-				   double init // Initial value
+                                   const char *name, // Name of image in analysis metadata
+                                   int numCols, int numRows, // Expected size of image
+                                   psElemType type, // Expected type of image
+                                   double init // Initial value
     )
 {
@@ -24,5 +24,5 @@
 
     if (!psMetadataAddImage(readout->analysis, PS_LIST_TAIL, name, 0, "Analysis image from " __FILE__, image)) {
-	psAbort ("analysis image already exists");
+        psAbort ("analysis image already exists");
     }
     psImageInit(image, init);
@@ -35,5 +35,5 @@
 // XXX not sure why this should call psMemIncrRefCounter
 psImage *pmReadoutGetAnalysisImage(pmReadout *readout, // Readout containing image
-				   const char *name       // Name of image in analysis metadata
+                                   const char *name       // Name of image in analysis metadata
     )
 {
@@ -78,5 +78,5 @@
 
 // XXX for the moment, use col0, row0, numCols, numRows supplied from the outside
-bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank)
+bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool variance, psImageMaskType blank)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -92,15 +92,15 @@
 
     if (mask) {
-	// XXX is this an error?
+        // XXX is this an error?
         if (readout->mask) return false;
-	readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
-	psImageInit(readout->mask, blank);
-    }
-
-    if (weight) {
-	// XXX is this an error?
-        if (readout->weight) return false;
-	readout->weight = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-	psImageInit(readout->weight, NAN);
+        readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
+        psImageInit(readout->mask, blank);
+    }
+
+    if (variance) {
+        // XXX is this an error?
+        if (readout->variance) return false;
+        readout->variance = psImageAlloc(numCols, numRows, PS_TYPE_F32);
+        psImageInit(readout->variance, NAN);
     }
 
@@ -162,5 +162,5 @@
 
 bool pmReadoutUpdateSize(pmReadout *readout, int minCols, int minRows,
-                         int numCols, int numRows, bool mask, bool weight,
+                         int numCols, int numRows, bool mask, bool variance,
                          psImageMaskType blank)
 {
@@ -203,15 +203,15 @@
     }
 
-    if (weight) {
-        if (!readout->weight) {
-            readout->weight = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-            psImageInit(readout->weight, NAN);
-        }
-        if (readout->weight->numCols < numCols || readout->weight->numRows < numRows) {
-            psImage *newWeight = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-            psImageInit(newWeight, NAN);
-            psImageOverlaySection(newWeight, readout->weight, readout->col0, readout->row0, "=");
-            psFree(readout->weight);
-            readout->weight = newWeight;
+    if (variance) {
+        if (!readout->variance) {
+            readout->variance = psImageAlloc(numCols, numRows, PS_TYPE_F32);
+            psImageInit(readout->variance, NAN);
+        }
+        if (readout->variance->numCols < numCols || readout->variance->numRows < numRows) {
+            psImage *newVariance = psImageAlloc(numCols, numRows, PS_TYPE_F32);
+            psImageInit(newVariance, NAN);
+            psImageOverlaySection(newVariance, readout->variance, readout->col0, readout->row0, "=");
+            psFree(readout->variance);
+            readout->variance = newVariance;
         }
     }
