IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2011, 1:04:41 PM (15 years ago)
Author:
eugene
Message:

updates to pmPeak to better distinguish peak flux versions; updates to visualization; add bits for substantial suspect masking; consolidate assignment of source position and flux based on peak, moments, etc; improve footprint culling process; fix PSF_QF and PSF_QF_PERFECT calculations; fix source model chisq values

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

    • Property svn:ignore
      •  

        old new  
        2828ChangeLog
        2929psmodules-*.tar.*
         30a.out.dSYM
  • trunk/psModules/src/objects/pmSourceFitModel.c

    r29004 r31153  
    4040#include "pmSourceDiffStats.h"
    4141#include "pmSource.h"
     42#include "pmSourcePhotometry.h"
    4243#include "pmSourceFitModel.h"
    4344
     
    5960    opt->maxChisqDOF = NAN;
    6061    opt->poissonErrors = true;
     62    opt->saveCovariance = false;
    6163
    6264    return opt;
     
    231233        psTrace ("psModules.objects", 4, "%f +/- %f", params->data.F32[i], dparams->data.F32[i]);
    232234    }
     235    if (options->saveCovariance) {
     236        model->covar = psMemIncrRefCounter(covar);
     237    }
     238    model->nIter = myMin->iter;
     239    model->nPar = nParams;
     240
    233241    psTrace ("psModules.objects", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);
    234242
    235243    // save the resulting chisq, nDOF, nIter
    236     model->chisq = myMin->value;
    237     model->nIter = myMin->iter;
    238     model->nPix  = y->n;
    239     model->nDOF  = y->n - nParams;
    240     model->chisqNorm = model->chisq / model->nDOF;
     244    // NOTE: if (!options->poissonErrors) chisq will be wrong : recalculate
     245    if (options->poissonErrors) {
     246        model->chisq = myMin->value;
     247        model->nPix  = y->n;
     248        model->nDOF  = y->n - model->nPar;
     249        model->chisqNorm = model->chisq / model->nDOF;
     250    } else {
     251        pmSourceChisqUnsubtracted (source, model, maskVal);
     252    }
     253
     254    // set the model success or failure status
    241255    model->flags |= PM_MODEL_STATUS_FITTED;
    242256    if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
Note: See TracChangeset for help on using the changeset viewer.