Index: trunk/psphot/src/psphotEvalPSF.c
===================================================================
--- trunk/psphot/src/psphotEvalPSF.c	(revision 5772)
+++ trunk/psphot/src/psphotEvalPSF.c	(revision 5802)
@@ -94,5 +94,5 @@
 
     // if the object has a fitted peak below 0, the fit did not converge cleanly
-    if (model->params->data.F32[1] < 0) {
+    if (model->params->data.F32[1] <= 0) {
 	source->mode |= PM_SOURCE_FAIL;
 	return false;
@@ -125,10 +125,11 @@
     if (keep) return true;
 
-    // this source is not a star, unflag as PSFSTAR
-    // XXX : if this object was used to build the PSF, this flag should
-    //       be set even if the object is not a star...
+    // this source is not a star, warn if it was a PSFSTAR
     if (source->mode & PM_SOURCE_PSFSTAR) {
-	source->mode &= ~PM_SOURCE_PSFSTAR;
-	psLogMsg ("psphot", 5, "PSFSTAR demoted based on fit quality\n");
+	psphotSaveImage (NULL, source->pixels, "failpx.fits");
+	psphotSaveImage (NULL, source->mask, "failmk.fits");
+	psphotSaveImage (NULL, source->weight, "failwt.fits");
+	psLogMsg ("psphot", 5, "PSFSTAR demoted based on fit quality   (%f, %f  :  %f %f %f %f)\n", 
+		  model->params->data.F32[2], model->params->data.F32[3], nSx, nSy, SN, Chi);
     }
 
