Index: /trunk/psModules/src/imcombine/pmStack.c
===================================================================
--- /trunk/psModules/src/imcombine/pmStack.c	(revision 19486)
+++ /trunk/psModules/src/imcombine/pmStack.c	(revision 19487)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-09-11 03:37:58 $
+ *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-09-11 20:52:16 $
  *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
  *
@@ -30,5 +30,5 @@
 #define PIXEL_LIST_BUFFER 100           // Number of entries to add to pixel list at a time
 #define PIXEL_MAP_BUFFER 2              // Number of entries to add to pixel map at a time
-
+//#define VARIANCE_FACTORS                // Use variance factors when calculating the variances?
 #define NUM_DIRECT_STDEV 5              // For less than this number of values, measure stdev directly
 
@@ -312,6 +312,10 @@
               // Use variance to check that the two are consistent
               float diff = pixelData->data.F32[0] - pixelData->data.F32[1];
+#if VARIANCE_FACTORS
               float sigma2 = pixelVariances->data.F32[0] * varFactors->data.F32[pixelSources->data.U16[0]] +
                   pixelVariances->data.F32[1] * varFactors->data.F32[pixelSources->data.U16[1]];
+#else
+              float sigma2 = pixelVariances->data.F32[0] + pixelVariances->data.F32[1];
+#endif
               if (PS_SQR(diff) > PS_SQR(rej) * sigma2) {
                   // Not consistent: mark both for inspection
@@ -342,5 +346,9 @@
                   float rej2 = PS_SQR(rej); // Rejection level squared
                   for (int i = 0; i < num; i++) {
+#if VARIANCE_FACTORS
                       pixelVariances->data.F32[i] *= rej2 * varFactors->data.F32[pixelSources->data.U16[i]];
+#else
+                      pixelVariances->data.F32[i] *= rej2;
+#endif
                   }
               }
