IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2013, 6:14:28 AM (13 years ago)
Author:
eugene
Message:

update PCM fitting to use the new parameter-based convergence in the LMM code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/psModules/src/objects/pmSourceFitPCM.c

    r35645 r35657  
    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;
Note: See TracChangeset for help on using the changeset viewer.