Index: /branches/eam_branches/ipp-20100823/psphot/src/psphot.h
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphot.h	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphot.h	(revision 29347)
@@ -167,5 +167,5 @@
 
 // used by psphotFindDetections
-psImage        *psphotSignificanceImage (pmReadout *readout, psMetadata *recipe, const int pass, psImageMaskType maskVal);
+psImage        *psphotSignificanceImage (pmReadout *readout, psMetadata *recipe, psImageMaskType maskVal);
 psArray        *psphotFindPeaks (psImage *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int nMax);
 bool            psphotFindFootprints (pmDetections *detections, psImage *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int pass, psImageMaskType maskVal);
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotExtendedSourceFits.c	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotExtendedSourceFits.c	(revision 29347)
@@ -85,4 +85,6 @@
         return true;
     }
+
+    psphotInitRadiusEXT (recipe, readout);
 
     // validate the model entries
@@ -167,9 +169,15 @@
             PS_ARRAY_ADD_SCALAR(job->args, 0, PS_TYPE_S32); // this is used as a return value for NplainPass
 
-            if (!psThreadJobAddPending(job)) {
+            if (false && !psThreadJobAddPending(job)) {
                 psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
 		psFree(AnalysisRegion);
                 return false;
-            }
+            } else {
+		if (!psphotExtendedSourceFits_Threaded(job)) {
+		    psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
+		    psFree(AnalysisRegion);
+		    return false;
+		}
+	    }
         }
 
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotFindDetections.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotFindDetections.c	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotFindDetections.c	(revision 29347)
@@ -85,5 +85,5 @@
 
     // generate the smoothed significance image
-    psImage *significance = psphotSignificanceImage (readout, recipe, pass, maskVal);
+    psImage *significance = psphotSignificanceImage (readout, recipe, maskVal);
 
     // display the significance image
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotSignificanceImage.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotSignificanceImage.c	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotSignificanceImage.c	(revision 29347)
@@ -4,5 +4,5 @@
 // (S/N)^2.  If FWMH_X,Y have been recorded, use them, otherwise use PEAKS_SMOOTH_SIGMA for the
 // smoothing kernel.
-psImage *psphotSignificanceImage (pmReadout *readout, psMetadata *recipe, const int pass, psImageMaskType maskVal) {
+psImage *psphotSignificanceImage (pmReadout *readout, psMetadata *recipe, psImageMaskType maskVal) {
 
     float SIGMA_SMTH, NSIGMA_SMTH;
@@ -67,4 +67,5 @@
     // XXX change these to recipe value checks
     if (psTraceGetLevel("psphot") > 5) {
+	static int pass = 0;
         char name[64];
         sprintf (name, "imsmooth.v%d.fits", pass);
@@ -72,4 +73,5 @@
         sprintf (name, "wtsmooth.v%d.fits", pass);
         psphotSaveImage(NULL, smooth_wt, name);
+	pass ++;
     }
 
@@ -108,6 +110,8 @@
     if (psTraceGetLevel("psphot") > 5) {
         char name[64];
+	static int pass = 0;
         sprintf (name, "snsmooth.v%d.fits", pass);
         psphotSaveImage (NULL, smooth_im, name);
+	pass ++;
     }
 
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29347)
@@ -413,5 +413,8 @@
 	// ** CRs are reliably flagged by a combination on Mminor < X && mag (or flux) > Y
 
-	Mminor = 0.5*(Mxx + Myy) - 0.5*sqrt(PS_SQR(Mxx - Myy) + 4.0*PS_SQR(Mxy));
+	float Mminor = 0.5*(Mxx + Myy) - 0.5*sqrt(PS_SQR(Mxx - Myy) + 4.0*PS_SQR(Mxy));
+	if ((Mminor < 1.0) && (apMag < -8.0)) {
+	    fprintf (stderr, "likely CR @ %f,%f\n", source->peak->xf, source->peak->yf);
+	}
 
 	// XXX do I need to find the Mminor, Mmajor distribution?
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceStats.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceStats.c	(revision 29346)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceStats.c	(revision 29347)
@@ -45,4 +45,12 @@
     pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
     psAssert (readout, "missing readout?");
+
+    if (psTraceGetLevel("psphot") > 5) {
+	static int pass = 0;
+        char name[64];
+        sprintf (name, "srstats.v%d.fits", pass);
+        psphotSaveImage(NULL, readout->image, name);
+	pass ++;
+    }
 
     pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
