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/pmSourceFitModel.c

    r35560 r35768  
    6262    opt->poissonErrors = true;
    6363    opt->saveCovariance = false;
     64
     65    // we default to the old algorithm
     66    opt->gainFactorMode = 0;
     67    opt->chisqConvergence = true;
    6468
    6569    return opt;
     
    241245
    242246    psMinimization *myMin = psMinimizationAlloc (options->nIter, options->minTol, options->maxTol);
     247    myMin->gainFactorMode = options->gainFactorMode;
     248    myMin->chisqConvergence = options->chisqConvergence;
    243249
    244250    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
     
    252258    }
    253259    if (options->saveCovariance) {
     260        psFree (model->covar);
    254261        model->covar = psMemIncrRefCounter(covar);
    255262    }
     
    273280    model->flags |= PM_MODEL_STATUS_FITTED;
    274281    if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
    275     if (myMin->lastDelta > myMin->minTol) model->flags |= PM_MODEL_STATUS_WEAK_FIT;
     282
     283    if (myMin->chisqConvergence) {
     284      if (myMin->lastDelta > myMin->minTol) model->flags |= PM_MODEL_STATUS_WEAK_FIT;
     285    } else {
     286      if (myMin->rParSigma > myMin->minTol*nParams) model->flags |= PM_MODEL_STATUS_WEAK_FIT;
     287    }
    276288
    277289    // get the Gauss-Newton distance for fixed model parameters
Note: See TracChangeset for help on using the changeset viewer.