- Timestamp:
- Jul 22, 2011, 5:08:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceFitPCM.c
r31153 r31926 50 50 bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize) { 51 51 52 psTimerStart ("pmSourceFitPCM"); 53 52 54 psVector *params = pcm->modelConv->params; 53 55 psVector *dparams = pcm->modelConv->dparams; … … 64 66 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 65 67 68 float t1 = psTimerMark ("pmSourceFitPCM"); 69 66 70 bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm); 71 float t2 = psTimerMark ("pmSourceFitPCM"); 72 67 73 for (int i = 0; i < dparams->n; i++) { 68 74 if ((pcm->constraint->paramMask != NULL) && pcm->constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) … … 76 82 } 77 83 psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); 84 float t3 = psTimerMark ("pmSourceFitPCM"); 78 85 79 86 // renormalize output model image (generated by fitting process) … … 97 104 pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal); 98 105 } 106 float t4 = psTimerMark ("pmSourceFitPCM"); 99 107 100 108 // set the model success or failure status … … 114 122 115 123 source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed? 124 float t5 = psTimerMark ("pmSourceFitPCM"); 125 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 } 116 129 117 130 psFree(myMin);
Note:
See TracChangeset
for help on using the changeset viewer.
