Changeset 32347 for trunk/psModules/src/objects/pmSourceFitPCM.c
- Timestamp:
- Sep 6, 2011, 1:02:53 PM (15 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pmSourceFitPCM.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects
- Property svn:ignore
-
old new 5 5 *.la 6 6 *.lo 7 pmSourceIO_CMF_PS1_V1.c 8 pmSourceIO_CMF_PS1_V2.c 9 pmSourceIO_CMF_PS1_V3.c
-
- Property svn:ignore
-
trunk/psModules/src/objects/pmSourceFitPCM.c
r31153 r32347 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 54 if (TIMING) { psTimerStart ("pmSourceFitPCM"); } 55 52 56 psVector *params = pcm->modelConv->params; 53 57 psVector *dparams = pcm->modelConv->dparams; … … 64 68 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 65 69 70 float t1, t2, t3, t4, t5; 71 if (TIMING) { t1 = psTimerMark ("pmSourceFitPCM"); } 72 66 73 bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm); 74 if (TIMING) { t2 = psTimerMark ("pmSourceFitPCM"); } 75 67 76 for (int i = 0; i < dparams->n; i++) { 68 77 if ((pcm->constraint->paramMask != NULL) && pcm->constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) … … 76 85 } 77 86 psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); 87 if (TIMING) { t3 = psTimerMark ("pmSourceFitPCM"); } 78 88 79 89 // renormalize output model image (generated by fitting process) … … 97 107 pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal); 98 108 } 109 if (TIMING) { t4 = psTimerMark ("pmSourceFitPCM"); } 99 110 100 111 // set the model success or failure status … … 114 125 115 126 source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed? 127 if (TIMING) { t5 = psTimerMark ("pmSourceFitPCM"); } 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 } 116 132 117 133 psFree(myMin); … … 121 137 } 122 138 139 // XXX deprecate this function or merge with the empirical model 123 140 bool pmSourceModelGuessPCM (pmPCMdata *pcm, pmSource *source, psImageMaskType maskVal, psImageMaskType markVal) { 124 141
Note:
See TracChangeset
for help on using the changeset viewer.
