IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:02:53 PM (15 years ago)
Author:
eugene
Message:
  • add concept of saddlePoints to peaks (not actually used in the end)
  • add tmp flags to mark sources for analysis or not in psphotStack
  • autocode the pmSourceIO_CMF_PS1_* functions
  • use 1D gauss approx for convolution in PCM fitting
  • added pmSourceExtFitPars (not actually used)
  • in model guess, use 1st radial moments to define size (if it exists)
  • include PSF_INST_MAG, AP_MAG, KRON_MAG in xfit output
  • fix the position for extended source fits (avoid instability)
  • Sersic-like models (incl. Exp and Dev) use Reff, not sigma; conversion tools need to respect this
  • only use a single pass on the centroid (unwindowed, but limited to 1.5 sigma radius) - this avoids moving the centroid because of nearby neighbors
  • use symmetrical averaging (geometric mean) to calculated 1st radial moment (and avoid neighbor biases), do not use symm. averaging for the flux
  • fix the integration of the sersic, pgauss, and related model functions.
  • fix the central pixel to have the full flux for sersic-like models (interpolated value)
Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        55*.la
        66*.lo
         7pmSourceIO_CMF_PS1_V1.c
         8pmSourceIO_CMF_PS1_V2.c
         9pmSourceIO_CMF_PS1_V3.c
  • trunk/psModules/src/objects/pmSourceFitPCM.c

    r31153 r32347  
    4848// convolved model image.
    4949
     50# define TIMING 0
     51
    5052bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize) {
    5153   
     54    if (TIMING) { psTimerStart ("pmSourceFitPCM"); }
     55
    5256    psVector *params  = pcm->modelConv->params;
    5357    psVector *dparams  = pcm->modelConv->dparams;
     
    6468    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
    6569
     70    float t1, t2, t3, t4, t5;
     71    if (TIMING) { t1 = psTimerMark ("pmSourceFitPCM"); }
     72
    6673    bool fitStatus = pmPCM_MinimizeChisq (myMin, covar, params, source, pcm);
     74    if (TIMING) { t2 = psTimerMark ("pmSourceFitPCM"); }
     75
    6776    for (int i = 0; i < dparams->n; i++) {
    6877        if ((pcm->constraint->paramMask != NULL) && pcm->constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i])
     
    7685    }
    7786    psTrace ("psphot", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);
     87    if (TIMING) { t3 = psTimerMark ("pmSourceFitPCM"); }
    7888
    7989    // renormalize output model image (generated by fitting process)
     
    97107        pmSourceChisqUnsubtracted (source, pcm->modelConv, maskVal);
    98108    }
     109    if (TIMING) { t4 = psTimerMark ("pmSourceFitPCM"); }
    99110
    100111    // set the model success or failure status
     
    114125
    115126    source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed?
     127    if (TIMING) { t5 = psTimerMark ("pmSourceFitPCM"); }
     128
     129     if (TIMING) {
     130        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);
     131     }
    116132
    117133    psFree(myMin);
     
    121137}
    122138
     139// XXX deprecate this function or merge with the empirical model
    123140bool pmSourceModelGuessPCM (pmPCMdata *pcm, pmSource *source, psImageMaskType maskVal, psImageMaskType markVal) {
    124141
Note: See TracChangeset for help on using the changeset viewer.