Index: trunk/psModules/src/imcombine/pmSubtractionParams.c
===================================================================
--- trunk/psModules/src/imcombine/pmSubtractionParams.c	(revision 18287)
+++ trunk/psModules/src/imcombine/pmSubtractionParams.c	(revision 21363)
@@ -71,5 +71,5 @@
                             double *sumII, // Sum of I(x)^2/sigma(x)^2
                             double *sumIC, // Sum of I(x)conv(x)/sigma(x)^2
-                            const pmSubtractionStamp *stamp, // Stamp with weight
+                            const pmSubtractionStamp *stamp, // Stamp with variance
                             const psKernel *target, // Target stamp
                             int kernelIndex, // Index for kernel component
@@ -78,10 +78,10 @@
     )
 {
-    psKernel *weight = stamp->weight;   // Weight, sigma(x)^2
+    psKernel *variance = stamp->variance;   // Variance, sigma(x)^2
     psKernel *convolution = selectConvolution(stamp, kernelIndex, mode); // Convolution of interest
 
     for (int y = -footprint; y <= footprint; y++) {
         psF32 *in = &target->kernel[y][-footprint]; // Dereference input
-        psF32 *wt = &weight->kernel[y][-footprint]; // Dereference weight
+        psF32 *wt = &variance->kernel[y][-footprint]; // Dereference variance
         psF32 *conv = &convolution->kernel[y][-footprint]; // Dereference convolution
         for (int x = -footprint; x <= footprint; x++, in++, wt++, conv++) {
@@ -98,5 +98,5 @@
 static void accumulateConvolutions(double *sumC, // Sum of conv(x)/sigma(x)^2
                                    double *sumCC, // Sum of conv(x)^2/sigma(x)^2
-                                   const pmSubtractionStamp *stamp, // Stamp with input and weight
+                                   const pmSubtractionStamp *stamp, // Stamp with input and variance
                                    int kernelIndex, // Index for kernel component
                                    int footprint, // Size of region of interest
@@ -104,9 +104,9 @@
     )
 {
-    psKernel *weight = stamp->weight;   // Weight, sigma(x)^2
+    psKernel *variance = stamp->variance;   // Variance, sigma(x)^2
     psKernel *convolution = selectConvolution(stamp, kernelIndex, mode); // Convolution of interest
 
     for (int y = -footprint; y <= footprint; y++) {
-        psF32 *wt = &weight->kernel[y][-footprint]; // Dereference weight
+        psF32 *wt = &variance->kernel[y][-footprint]; // Dereference variance
         psF32 *conv = &convolution->kernel[y][-footprint]; // Dereference convolution
         for (int x = -footprint; x <= footprint; x++, wt++, conv++) {
@@ -120,5 +120,5 @@
 
 static double accumulateChi2(const psKernel *target, // Target stamp
-                             pmSubtractionStamp *stamp, // Stamp with weight
+                             pmSubtractionStamp *stamp, // Stamp with variance
                              int kernelIndex, // Index for kernel component
                              double coeff, // Coefficient of convolution
@@ -129,10 +129,10 @@
 {
     double chi2 = 0.0;
-    psKernel *weight = stamp->weight;   // Weight, sigma(x)^2
+    psKernel *variance = stamp->variance;   // Variance, sigma(x)^2
     psKernel *convolution = selectConvolution(stamp, kernelIndex, mode); // Convolution of interest
 
     for (int y = -footprint; y <= footprint; y++) {
         psF32 *in = &target->kernel[y][-footprint]; // Dereference input
-        psF32 *wt = &weight->kernel[y][-footprint]; // Dereference weight
+        psF32 *wt = &variance->kernel[y][-footprint]; // Dereference variance
         psF32 *conv = &convolution->kernel[y][-footprint]; // Dereference convolution
         for (int x = -footprint; x <= footprint; x++, in++, wt++, conv++) {
@@ -146,10 +146,10 @@
 // Return the initial value of chi^2
 static double initialChi2(const psKernel *target, // Target stamp
-                          const pmSubtractionStamp *stamp, // Stamp with weight
+                          const pmSubtractionStamp *stamp, // Stamp with variance
                           int footprint, // Size of convolution
                           pmSubtractionMode mode // Mode of subtraction
     )
 {
-    psKernel *weight = stamp->weight;   // Weight map
+    psKernel *variance = stamp->variance;   // Variance map
     psKernel *source;                   // Source stamp
     switch (mode) {
@@ -167,5 +167,5 @@
     for (int y = -footprint; y <= footprint; y++) {
         psF32 *in = &target->kernel[y][-footprint]; // Dereference input
-        psF32 *wt = &weight->kernel[y][-footprint]; // Dereference weight
+        psF32 *wt = &variance->kernel[y][-footprint]; // Dereference variance
         psF32 *ref = &source->kernel[y][-footprint]; // Derference reference
         for (int x = -footprint; x <= footprint; x++, in++, wt++, ref++) {
@@ -180,5 +180,5 @@
 // Subtract a convolution from the input
 static void subtractConvolution(psKernel *target, // Target stamp
-                                const pmSubtractionStamp *stamp, // Stamp with weight
+                                const pmSubtractionStamp *stamp, // Stamp with variance
                                 int kernelIndex, // Index for kernel component
                                 float coeff, // Coefficient of subtraction
@@ -288,7 +288,7 @@
 
         // This sum is invariant to the kernel
-        psKernel *weight = stamp->weight; // Weight map for stamp
+        psKernel *variance = stamp->variance; // Variance map for stamp
         for (int v = -footprint; v <= footprint; v++) {
-            psF32 *wt = &weight->kernel[v][-footprint]; // Dereference weight map
+            psF32 *wt = &variance->kernel[v][-footprint]; // Dereference variance map
             for (int u = -footprint; u <= footprint; u++, wt++) {
                 sum1 += 1.0 / *wt;
