Index: trunk/psModules/src/imcombine/pmSubtractionMatch.c
===================================================================
--- trunk/psModules/src/imcombine/pmSubtractionMatch.c	(revision 21247)
+++ trunk/psModules/src/imcombine/pmSubtractionMatch.c	(revision 21363)
@@ -60,5 +60,5 @@
                       const pmReadout *ro2, // Readout 2
                       const psImage *subMask, // Mask for subtraction, or NULL
-                      psImage *weight,  // Weight map
+                      psImage *variance,  // Variance map
                       const psRegion *region, // Region of interest, or NULL
                       float threshold,  // Threshold for stamp finding
@@ -80,5 +80,5 @@
 
     psTrace("psModules.imcombine", 3, "Extracting stamps...\n");
-    if (!pmSubtractionStampsExtract(*stamps, ro1->image, ro2 ? ro2->image : NULL, weight, size)) {
+    if (!pmSubtractionStampsExtract(*stamps, ro1->image, ro2 ? ro2->image : NULL, variance, size)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to extract stamps.");
         return false;
@@ -111,7 +111,7 @@
             conv1->mask = NULL;
         }
-        if (conv1->weight) {
-            psFree(conv1->weight);
-            conv1->weight = NULL;
+        if (conv1->variance) {
+            psFree(conv1->variance);
+            conv1->variance = NULL;
         }
     }
@@ -126,7 +126,7 @@
             conv2->mask = NULL;
         }
-        if (conv2->weight) {
-            psFree(conv2->weight);
-            conv2->weight = NULL;
+        if (conv2->variance) {
+            psFree(conv2->variance);
+            conv2->variance = NULL;
         }
     }
@@ -191,15 +191,15 @@
     }
 
-    // Where does our weight map come from?
-    // Getting the weight exactly right is not necessary --- it's just used for weighting.
-    psImage *weight = NULL;             // Weight image to use
-    if (ro1->weight && ro2->weight) {
-        weight = (psImage*)psBinaryOp(NULL, ro1->weight, "+", ro2->weight);
-    } else if (ro1->weight) {
-        weight = psMemIncrRefCounter(ro1->weight);
-    } else if (ro2->weight) {
-        weight = psMemIncrRefCounter(ro2->weight);
+    // Where does our variance map come from?
+    // Getting the variance exactly right is not necessary --- it's just used for weighting.
+    psImage *variance = NULL;             // Variance image to use
+    if (ro1->variance && ro2->variance) {
+        variance = (psImage*)psBinaryOp(NULL, ro1->variance, "+", ro2->variance);
+    } else if (ro1->variance) {
+        variance = psMemIncrRefCounter(ro1->variance);
+    } else if (ro2->variance) {
+        variance = psMemIncrRefCounter(ro2->variance);
     } else {
-        weight = (psImage*)psBinaryOp(NULL, ro1->image, "+", ro2->image);
+        variance = (psImage*)psBinaryOp(NULL, ro1->image, "+", ro2->image);
     }
 
@@ -274,5 +274,5 @@
             // We get the stamps here; we will also attempt to get stamps at the first iteration, but it
             // doesn't matter.
-            if (!getStamps(&stamps, ro1, ro2, subMask, weight, NULL, threshold, stampSpacing,
+            if (!getStamps(&stamps, ro1, ro2, subMask, variance, NULL, threshold, stampSpacing,
                            size, footprint, subMode)) {
                 goto MATCH_ERROR;
@@ -336,5 +336,5 @@
                 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Iteration %d.", k);
 
-                if (!getStamps(&stamps, ro1, ro2, subMask, weight, region, threshold, stampSpacing,
+                if (!getStamps(&stamps, ro1, ro2, subMask, variance, region, threshold, stampSpacing,
                                size, footprint, subMode)) {
                     goto MATCH_ERROR;
@@ -439,8 +439,8 @@
     psFree(subMask);
     subMask = NULL;
-    psFree(weight);
-    weight = NULL;
-
-    if (!pmSubtractionBorder(conv1->image, conv1->weight, conv1->mask, size, maskBad)) {
+    psFree(variance);
+    variance = NULL;
+
+    if (!pmSubtractionBorder(conv1->image, conv1->variance, conv1->mask, size, maskBad)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to set border of convolved image.");
         goto MATCH_ERROR;
@@ -482,5 +482,5 @@
     psFree(kernels);
     psFree(stamps);
-    psFree(weight);
+    psFree(variance);
     psFree(rng);
     return false;
