Index: trunk/psphot/src/psphotSourceSize.c
===================================================================
--- trunk/psphot/src/psphotSourceSize.c	(revision 15802)
+++ trunk/psphot/src/psphotSourceSize.c	(revision 16820)
@@ -6,11 +6,25 @@
 // compares the observed flux to the model.
 
-bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe) {
+bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe, long first) {
+
+    bool status;
+
+    psTimerStart ("psphot");
+
+    float CR_NSIGMA_LIMIT = psMetadataLookupF32 (&status, recipe, "PSPHOT.CRNSIGMA.LIMIT");
+    assert (status);
 
     // loop over all source
-    for (int i = 0; i < sources->n; i++) {
+    for (int i = first; i < sources->n; i++) {
 	pmSource *source = sources->data[i];
 
+	// skip source if it was already measured
+	if (isfinite(source->crNsigma)) continue;
+
+	source->crNsigma  = -1.0;
+	source->extNsigma = -1.0;
+
 	// source must have been subtracted
+	source->crNsigma  = -3.0;
 	if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue;
 
@@ -23,4 +37,5 @@
 
 	// skip sources which are too close to a boundary
+	source->crNsigma  = -4.0;
 	if (xPeak < 1) continue;
 	if (xPeak > source->pixels->numCols - 2) continue;
@@ -29,4 +44,5 @@
 
 	// XXX for now, just skip any sources with masked pixels
+	source->crNsigma  = -5.0;
 	bool keep = true;
 	for (int iy = -1; (iy <= +1) && keep; iy++) {
@@ -97,5 +113,17 @@
 	source->extNsigma = (nEXT > 0) ? fabs(fEXT) / nEXT : 0.0;
 	// NOTE: abs needed to make the Nsigma value positive 
+
+	if (!isfinite(source->crNsigma)) {
+	  fprintf (stderr, ".");
+	  source->crNsigma = -6.0;
+	}
+
+	if (source->crNsigma > CR_NSIGMA_LIMIT) {
+	  source->mode |= PM_SOURCE_MODE_CRLIMIT;
+	}
     }
+
+    psLogMsg ("psphot.size", PS_LOG_INFO, "measure source sizes for %ld sources: %f sec\n", sources->n - first, psTimerMark ("psphot"));
+
     return true;
 }
