Index: branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h
===================================================================
--- branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h	(revision 30900)
+++ branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h	(revision 30902)
@@ -85,5 +85,6 @@
 				 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance
 				 const float min_threshold, // minimum permitted coll height
-				 const float max_threshold // maximum permitted coll height
+				 const float max_threshold,// maximum permitted coll height
+				 const bool isWeightVar // the input weight may be variance (sigma^2) or S/N (1/sigma)
     );
 
Index: branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c
===================================================================
--- branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c	(revision 30900)
+++ branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c	(revision 30902)
@@ -39,5 +39,7 @@
                                  const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance
                                  const float min_threshold, // minimum permitted coll height
-                                 const float max_threshold) { // maximum permitted coll height
+                                 const float max_threshold,
+				 const bool isWeightVar
+    ) { // maximum permitted coll height
     assert (img != NULL); assert (img->type.type == PS_TYPE_F32);
     assert (weight != NULL); assert (weight->type.type == PS_TYPE_F32);
@@ -98,8 +100,16 @@
         // float threshold = subImg->data.F32[y][x] - nsigma_delta*stdev;
 
-        const float stdev = sqrt(subWt->data.F32[y][x]);
-        const float flux = subImg->data.F32[y][x];
-        const float fStdev = fabs(stdev/flux);
-        const float stdev_pad = fabs(flux * hypot(fStdev, fPadding));
+	float stdev = 0.0;
+        float flux = 0.0;
+	if (isWeightVar) {
+	    flux = subImg->data.F32[y][x];
+	    stdev = sqrt(subWt->data.F32[y][x]);
+	} else {
+	    flux = subImg->data.F32[y][x];
+	    stdev = flux / sqrt(subWt->data.F32[y][x]); // should be 1/sqrt(subWT)
+	}
+	const float fStdev = fabs(stdev/flux);
+	const float stdev_pad = fabs(flux * hypot(fStdev, fPadding));
+
         // if flux is negative, careful with fStdev
 
@@ -124,4 +134,5 @@
 	}
 
+	// XXX can we / should we use pmFootprintsFind() if the starting footprint is too large?
 	// init peakFootprint here?
         pmFootprintsFindAtPoint(peakFootprint, peakFPSpans, subImg, subMask, threshold, brightPeaks, peak->y, peak->x);
