IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2013, 3:30:23 PM (13 years ago)
Author:
eugene
Message:

add threading for pmPSFtryFitEXT and pmPSFtryFitPSF; pass chisq conv options to pmSourceFitModel

File:
1 edited

Legend:

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

    r35628 r35639  
    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);
     
    274280    model->flags |= PM_MODEL_STATUS_FITTED;
    275281    if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
    276     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    }
    277288
    278289    // get the Gauss-Newton distance for fixed model parameters
Note: See TracChangeset for help on using the changeset viewer.