Index: trunk/psModules/src/objects/pmSourceFitPCM.c
===================================================================
--- trunk/psModules/src/objects/pmSourceFitPCM.c	(revision 35560)
+++ trunk/psModules/src/objects/pmSourceFitPCM.c	(revision 35768)
@@ -66,4 +66,6 @@
     // set up the minimization process
     psMinimization *myMin = psMinimizationAlloc (fitOptions->nIter, fitOptions->minTol, fitOptions->maxTol);
+    myMin->chisqConvergence = fitOptions->chisqConvergence;
+    myMin->gainFactorMode = fitOptions->gainFactorMode;
 
     psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
@@ -118,4 +120,10 @@
     if (!fitStatus) pcm->modelConv->flags |= PM_MODEL_STATUS_NONCONVERGE;
 
+    if (myMin->chisqConvergence) {
+      if (myMin->lastDelta > myMin->minTol) pcm->modelConv->flags |= PM_MODEL_STATUS_WEAK_FIT;
+    } else {
+      if (myMin->rParSigma > myMin->minTol*pcm->nPar) pcm->modelConv->flags |= PM_MODEL_STATUS_WEAK_FIT;
+    }
+
     // once we have fitted a model, we need to record that this model is a PCM model:
     pcm->modelConv->isPCM = true;
@@ -145,9 +153,12 @@
 bool pmSourceModelGuessPCM (pmPCMdata *pcm, pmSource *source, psImageMaskType maskVal, psImageMaskType markVal) {
 
-  if (!pcm->modelConv->modelGuess(pcm->modelConv, source, maskVal, markVal)) {
+    if (!pcm->modelConv->modelGuess(pcm->modelConv, source, maskVal, markVal)) {
 	return false;
     }
     return true;
 
+    // the following was an attempt to make analytical modifications to the shape terms based on the psf
+    // this has been replaced with a more empirical approach
+# if (0)
     // generate copy of the model
     // XXX we could modify the parameter values or even the model 
@@ -196,3 +207,4 @@
 
     return true;
+# endif
 }
