IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 3, 2013, 2:37:22 PM (13 years ago)
Author:
eugene
Message:

deprecate KiiOpen,KiiClose (now KapaOpen,etc); major rework of psEllipse translations : use common functions pmModelAxesToParams and pmModelParamsToAxes ; use new convergence method in pmPCM_MinimizeChisq; add convergence crerition options to psMinimization; threaded versions of pmPSFtryFitEXT and pmPSFtryFitPSF

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

  • trunk/psModules/src/objects/pmSourceFitPCM.c

    r35560 r35768  
    6666    // set up the minimization process
    6767    psMinimization *myMin = psMinimizationAlloc (fitOptions->nIter, fitOptions->minTol, fitOptions->maxTol);
     68    myMin->chisqConvergence = fitOptions->chisqConvergence;
     69    myMin->gainFactorMode = fitOptions->gainFactorMode;
    6870
    6971    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
     
    118120    if (!fitStatus) pcm->modelConv->flags |= PM_MODEL_STATUS_NONCONVERGE;
    119121
     122    if (myMin->chisqConvergence) {
     123      if (myMin->lastDelta > myMin->minTol) pcm->modelConv->flags |= PM_MODEL_STATUS_WEAK_FIT;
     124    } else {
     125      if (myMin->rParSigma > myMin->minTol*pcm->nPar) pcm->modelConv->flags |= PM_MODEL_STATUS_WEAK_FIT;
     126    }
     127
    120128    // once we have fitted a model, we need to record that this model is a PCM model:
    121129    pcm->modelConv->isPCM = true;
     
    145153bool pmSourceModelGuessPCM (pmPCMdata *pcm, pmSource *source, psImageMaskType maskVal, psImageMaskType markVal) {
    146154
    147   if (!pcm->modelConv->modelGuess(pcm->modelConv, source, maskVal, markVal)) {
     155    if (!pcm->modelConv->modelGuess(pcm->modelConv, source, maskVal, markVal)) {
    148156        return false;
    149157    }
    150158    return true;
    151159
     160    // the following was an attempt to make analytical modifications to the shape terms based on the psf
     161    // this has been replaced with a more empirical approach
     162# if (0)
    152163    // generate copy of the model
    153164    // XXX we could modify the parameter values or even the model
     
    196207
    197208    return true;
     209# endif
    198210}
Note: See TracChangeset for help on using the changeset viewer.