- Timestamp:
- Feb 28, 2011, 2:44:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceFitSet.c
r30705 r30763 39 39 #include "pmSourceDiffStats.h" 40 40 #include "pmSource.h" 41 #include "pmSourcePhotometry.h" 41 42 42 43 #include "pmSourceFitModel.h" … … 299 300 const psVector *dparam, const psVector *param, const psImage *covar, 300 301 pmSource *source, psMinimization *myMin, int nPix, 301 bool fitStatus, bool saveCovariance)302 bool fitStatus, pmSourceFitOptions *options, psImageMaskType maskVal) 302 303 { 303 304 PS_ASSERT_PTR_NON_NULL(set, false); … … 322 323 psTrace ("psModules.objects", 4, "%f +/- %f", param->data.F32[n], dparam->data.F32[n]); 323 324 } 324 if ( saveCovariance) {325 if (options->saveCovariance) { 325 326 // we only save the covar matrix for this object with itself (ignore cross terms between objects) 326 327 model->covar = psImageAlloc(model->params->n, model->params->n, PS_TYPE_F32); … … 336 337 // save the resulting chisq, nDOF, nIter 337 338 // these are not unique for any one source 338 model->chisq = myMin->value; 339 model->nIter = myMin->iter; 340 model->nDOF = nPix - model->params->n; 339 if (options->poissonErrors) { 340 model->chisq = myMin->value; 341 model->nPix = nPix; 342 model->nDOF = nPix - model->params->n; 343 model->chisqNorm = model->chisq / model->nDOF; 344 } else { 345 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal, options->covarFactor, model->params->n); 346 } 347 model->nIter = myMin->iter; 341 348 342 349 // set the model success or failure status … … 592 599 } 593 600 594 pmSourceFitSetValues (thisSet, dparams, params, covar, source, myMin, y->n, fitStatus, options ->saveCovariance);601 pmSourceFitSetValues (thisSet, dparams, params, covar, source, myMin, y->n, fitStatus, options, maskVal); 595 602 psTrace ("psModules.objects", 5, "onPic: %d, fitStatus: %d, nIter: %d, chisq: %f, nPix: %ld\n", onPic, fitStatus, myMin->iter, myMin->value, y->n); 596 603
Note:
See TracChangeset
for help on using the changeset viewer.
