Index: /branches/eam_branch_20080324/psphot/src/psphotSourceSize.c
===================================================================
--- /branches/eam_branch_20080324/psphot/src/psphotSourceSize.c	(revision 17337)
+++ /branches/eam_branch_20080324/psphot/src/psphotSourceSize.c	(revision 17338)
@@ -29,9 +29,5 @@
 	if (isfinite(source->crNsigma)) continue;
 
-	source->crNsigma  = -1.0;
-	source->extNsigma = 0.0;
-
 	// source must have been subtracted
-	source->crNsigma  = -3.0;
 	if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue;
 
@@ -40,9 +36,17 @@
 	psU8 **mask    = source->maskObj->data.U8;
 
+	// check for extendedness: measure the delta flux significance at the 1 sigma contour
+	source->extNsigma = psphotModelContour (source->pixels, source->weight, source->maskObj, source->modelPSF, 1.0);
+
+	// XXX prevent a source from being both CR and EXT?
+	if (source->extNsigma > EXT_NSIGMA_LIMIT) {
+	  source->mode |= PM_SOURCE_MODE_EXT_LIMIT;
+	}
+
 	int xPeak = source->peak->xf - source->pixels->col0 + 0.5;
 	int yPeak = source->peak->yf - source->pixels->row0 + 0.5;
 
-	// skip sources which are too close to a boundary
-	source->crNsigma  = -4.0;
+	// XXX for now, skip sources which are too close to a boundary
+	// XXX raise a flag?
 	if (xPeak < 1) continue;
 	if (xPeak > source->pixels->numCols - 2) continue;
@@ -51,5 +55,5 @@
 
 	// XXX for now, just skip any sources with masked pixels
-	source->crNsigma  = -5.0;
+	// XXX raise a flag?
 	bool keep = true;
 	for (int iy = -1; (iy <= +1) && keep; iy++) {
@@ -59,12 +63,4 @@
 	}
 	if (!keep) continue;
-
-	// measure the flux at the 1 sigma contour
-	// XXX prevent a source from being both CR and EXT?
-	source->extNsigma = psphotModelContour (source->pixels, source->weight, source->maskObj, source->modelPSF, 1.0);
-
-	if (source->extNsigma > EXT_NSIGMA_LIMIT) {
-	  source->mode |= PM_SOURCE_MODE_EXT_LIMIT;
-	}
 
 	// XXX need to deal with edge peaks... and mask
