- Timestamp:
- Aug 3, 2011, 10:32:41 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceFitPCM.c
r31926 r31992 48 48 // convolved model image. 49 49 50 # define TIMING 0 51 50 52 bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize) { 51 53 52 psTimerStart ("pmSourceFitPCM");54 if (TIMING) { psTimerStart ("pmSourceFitPCM"); } 53 55 54 56 psVector *params = pcm->modelConv->params; … … 66 68 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 67 69 68 float t1 = psTimerMark ("pmSourceFitPCM"); 70 float t1, t2, t3, t4, t5; 71 if (TIMING) { t1 = psTimerMark ("pmSourceFitPCM"); } 69 72 70 73 bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm); 71 float t2 = psTimerMark ("pmSourceFitPCM");74 if (TIMING) { t2 = psTimerMark ("pmSourceFitPCM"); } 72 75 73 76 for (int i = 0; i < dparams->n; i++) { … … 82 85 } 83 86 psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); 84 float t3 = psTimerMark ("pmSourceFitPCM");87 if (TIMING) { t3 = psTimerMark ("pmSourceFitPCM"); } 85 88 86 89 // renormalize output model image (generated by fitting process) … … 104 107 pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal); 105 108 } 106 float t4 = psTimerMark ("pmSourceFitPCM");109 if (TIMING) { t4 = psTimerMark ("pmSourceFitPCM"); } 107 110 108 111 // set the model success or failure status … … 122 125 123 126 source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed? 124 float t5 = psTimerMark ("pmSourceFitPCM");127 if (TIMING) { t5 = psTimerMark ("pmSourceFitPCM"); } 125 128 126 if (0) {127 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);128 }129 if (TIMING) { 130 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); 131 } 129 132 130 133 psFree(myMin);
Note:
See TracChangeset
for help on using the changeset viewer.
