IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

thread add/sub noise, thread model background, pass chisq conv options to LMM fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/psphot/src/psphotSourceFits.c

    r35630 r35640  
    33// given a source with an existing modelPSF, attempt a full PSF fit, subtract if successful
    44
     5static int NfitBlend = 0;
     6
    57static int NfitPSF = 0;
    6 static int NfitBlend = 0;
     8static int NfitIterPSF = 0;
     9
    710static int NfitDBL = 0;
     11static int NfitIterDBL = 0;
     12static int NfitPixDBL = 0;
     13
    814static int NfitEXT = 0;
     15static int NfitIterEXT = 0;
     16static int NfitPixEXT = 0;
     17
    918static int NfitPCM = 0;
     19static int NfitIterPCM = 0;
     20static int NfitPixPCM = 0;
    1021
    1122bool psphotFitInit (int nThreads) {
     
    1728bool psphotFitSummary () {
    1829
    19     psLogMsg ("psphot.pspsf", PS_LOG_INFO, "fitted %5d psf, %5d blend, %5d ext, %5d dbl : %6.2f sec\n",
    20               NfitPSF, NfitBlend, NfitEXT, NfitDBL, psTimerMark ("psphot.fits"));
     30    psLogMsg ("psphot.pspsf", PS_LOG_INFO, "fitted %5d psf (%d iter), %5d blend: %5d ext (%d iter, %d pix), %5d dbl (%d iter, %d pix) : %6.2f sec\n",
     31              NfitPSF, NfitIterPSF, NfitBlend, NfitEXT, NfitIterEXT, NfitPixEXT, NfitDBL, NfitIterDBL, NfitPixDBL, psTimerMark ("psphot.fits"));
     32    return true;
     33}
     34
     35bool psphotFitSummaryExtended () {
     36
     37    psLogMsg ("psphot.pspsf", PS_LOG_INFO, "fitted %5d ext (%d iter, %d pix), %5d pcm (%d iter, %d pix)\n",
     38              NfitEXT, NfitIterEXT, NfitPixEXT, NfitPCM, NfitIterPCM, NfitPixPCM);
     39    return true;
     40}
     41
     42bool psphotFitInitExtended () {
     43    NfitEXT = 0;
     44    NfitIterEXT = 0;
     45    NfitPixEXT = 0;
     46    NfitPCM = 0;
     47    NfitIterPCM = 0;
     48    NfitPixPCM = 0;
    2149    return true;
    2250}
     
    169197    options.mode = PM_SOURCE_FIT_PSF;
    170198    pmSourceFitModel (source, PSF, &options, maskVal);
     199    NfitIterPSF += PSF->nIter;
    171200
    172201    if (!isfinite(PSF->params->data.F32[PM_PAR_I0])) psAbort("nan in fit");
     
    440469    options.mode = PM_SOURCE_FIT_PSF;
    441470    pmSourceFitSet (source, modelSet, &options, maskVal);
     471    NfitIterDBL += DBL->nIter;
     472    NfitPixDBL += DBL->nDOF;
     473
    442474    return (modelSet);
    443475}
     
    507539
    508540    pmSourceFitModel (source, model, &options, maskVal);
     541    NfitIterEXT += model->nIter;
     542    NfitPixEXT += model->nDOF;
    509543
    510544# if (PS_TRACE_ON)
     
    587621    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
    588622    pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);  // NOTE : 1687 allocs in here
     623    NfitIterPCM += pcm->modelConv->nIter;
     624    NfitPixPCM += pcm->modelConv->nDOF;
    589625    if (TIMING) { t5 = psTimerMark ("psphotFitPCM"); }
    590626
Note: See TracChangeset for help on using the changeset viewer.