IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 22, 2011, 5:08:37 PM (15 years ago)
Author:
eugene
Message:

allow pcm fitting with a 1d gauss instead of full convolution

File:
1 edited

Legend:

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

    r31153 r31926  
    5050bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize) {
    5151   
     52    psTimerStart ("pmSourceFitPCM");
     53
    5254    psVector *params  = pcm->modelConv->params;
    5355    psVector *dparams  = pcm->modelConv->dparams;
     
    6466    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
    6567
     68    float t1 = psTimerMark ("pmSourceFitPCM");
     69
    6670    bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm);
     71    float t2 = psTimerMark ("pmSourceFitPCM");
     72
    6773    for (int i = 0; i < dparams->n; i++) {
    6874        if ((pcm->constraint->paramMask != NULL) && pcm->constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i])
     
    7682    }
    7783    psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);
     84    float t3 = psTimerMark ("pmSourceFitPCM");
    7885
    7986    // renormalize output model image (generated by fitting process)
     
    97104        pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal);
    98105    }
     106    float t4 = psTimerMark ("pmSourceFitPCM");
    99107
    100108    // set the model success or failure status
     
    114122
    115123    source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed?
     124    float t5 = psTimerMark ("pmSourceFitPCM");
     125
     126    if (0) {
     127        fprintf (stderr, "nIter: %2d, npix: %5d, t1: %6.4f, t2: %6.4f, t3: %6.4f, t4: %6.4f, t5: %6.4f\n", myMin->iter, pcm->nPix, t1, t2, t3, t4, t5);
     128    }
    116129
    117130    psFree(myMin);
Note: See TracChangeset for help on using the changeset viewer.