Changeset 31153 for trunk/psModules/src/objects/pmSourceFitPCM.c
- Timestamp:
- Apr 4, 2011, 1:04:41 PM (15 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/objects/pmSourceFitPCM.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
- Property svn:ignore
-
old new 28 28 ChangeLog 29 29 psmodules-*.tar.* 30 a.out.dSYM
-
- Property svn:ignore
-
trunk/psModules/src/objects/pmSourceFitPCM.c
r30621 r31153 38 38 #include "pmSourceDiffStats.h" 39 39 #include "pmSource.h" 40 #include "pmSourcePhotometry.h" 40 41 #include "pmSourceFitModel.h" 41 42 #include "pmPCMdata.h" … … 70 71 psTrace ("psModules.objects", 4, "%f +/- %f", params->data.F32[i], dparams->data.F32[i]); 71 72 } 73 if (fitOptions->saveCovariance) { 74 psFree(pcm->modelConv->covar); 75 pcm->modelConv->covar = psMemIncrRefCounter(covar); 76 } 72 77 psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value); 73 78 … … 79 84 } 80 85 } 86 pcm->modelConv->nIter = myMin->iter; 87 pcm->modelConv->nPar = pcm->nPar; 81 88 82 89 // save the resulting chisq, nDOF, nIter 83 pcm->modelConv->chisq = myMin->value; 84 pcm->modelConv->nIter = myMin->iter; 85 pcm->modelConv->nPix = pcm->nPix; 86 pcm->modelConv->nDOF = pcm->nDOF; 87 pcm->modelConv->chisqNorm = pcm->modelConv->chisq / pcm->modelConv->nDOF; 90 if (fitOptions->poissonErrors) { 91 pcm->modelConv->chisq = myMin->value; 92 pcm->modelConv->nPix = pcm->nPix; 93 pcm->modelConv->nDOF = pcm->nDOF; 94 pcm->modelConv->chisqNorm = pcm->modelConv->chisq / pcm->modelConv->nDOF; 95 } else { 96 // xxx this is wrong because it does not convolve with the psf 97 pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal); 98 } 99 100 // set the model success or failure status 88 101 pcm->modelConv->flags |= PM_MODEL_STATUS_FITTED; 89 102 if (!fitStatus) pcm->modelConv->flags |= PM_MODEL_STATUS_NONCONVERGE;
Note:
See TracChangeset
for help on using the changeset viewer.
