Index: trunk/psModules/src/objects/pmSourceFitPCM.c
===================================================================
--- trunk/psModules/src/objects/pmSourceFitPCM.c	(revision 31153)
+++ trunk/psModules/src/objects/pmSourceFitPCM.c	(revision 32347)
@@ -48,6 +48,10 @@
 // convolved model image.
 
+# define TIMING 0
+
 bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize) {
     
+    if (TIMING) { psTimerStart ("pmSourceFitPCM"); }
+
     psVector *params  = pcm->modelConv->params;
     psVector *dparams  = pcm->modelConv->dparams;
@@ -64,5 +68,10 @@
     psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
 
+    float t1, t2, t3, t4, t5;
+    if (TIMING) { t1 = psTimerMark ("pmSourceFitPCM"); }
+
     bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm);
+    if (TIMING) { t2 = psTimerMark ("pmSourceFitPCM"); }
+
     for (int i = 0; i < dparams->n; i++) {
         if ((pcm->constraint->paramMask != NULL) && pcm->constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i])
@@ -76,4 +85,5 @@
     }
     psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);
+    if (TIMING) { t3 = psTimerMark ("pmSourceFitPCM"); }
 
     // renormalize output model image (generated by fitting process)
@@ -97,4 +107,5 @@
 	pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal);
     }
+    if (TIMING) { t4 = psTimerMark ("pmSourceFitPCM"); }
 
     // set the model success or failure status
@@ -114,4 +125,9 @@
 
     source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed?
+    if (TIMING) { t5 = psTimerMark ("pmSourceFitPCM"); }
+
+     if (TIMING) {
+ 	fprintf (stderr, "nIter: %2d, npix: %5d, t1: %6.4f, t2: %6.4f, t3: %6.4f, t4: %6.4f, t5: %6.4f\n", myMin->iter, pcm->nPix, t1, t2, t3, t4, t5);
+     }
 
     psFree(myMin);
@@ -121,4 +137,5 @@
 }
 
+// XXX deprecate this function or merge with the empirical model
 bool pmSourceModelGuessPCM (pmPCMdata *pcm, pmSource *source, psImageMaskType maskVal, psImageMaskType markVal) {
 
