IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35632


Ignore:
Timestamp:
Jun 5, 2013, 11:25:30 AM (13 years ago)
Author:
eugene
Message:

allow unthreaded version for testing; track npix

File:
1 edited

Legend:

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

    r34404 r35632  
    2929}
    3030
     31int NpixTotal = 0;
     32
    3133// construct an initial PSF model for each object (new sources only)
    3234bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index) {
     
    8688
    8789    psArray *cellGroups = psphotAssignSources (Cx, Cy, sources);
     90
     91    NpixTotal = 0;
    8892
    8993    for (int i = 0; i < cellGroups->n; i++) {
     
    103107            PS_ARRAY_ADD_SCALAR(job->args, markVal,  PS_TYPE_IMAGE_MASK);
    104108
     109# if (1)
    105110            if (!psThreadJobAddPending(job)) {
    106111                psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
    107112                return false;
    108113            }
    109         }
     114# else
     115            if (!psphotGuessModel_Threaded(job)) {
     116                psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
     117                return false;
     118            }
     119            psFree(job);
     120# endif
     121        }
     122
    110123
    111124        // wait for the threads to finish and manage results
     
    143156    psFree (cellGroups);
    144157
    145     psLogMsg ("psphot.models", PS_LOG_WARN, "built models for %ld objects: %f sec\n", sources->n, psTimerMark ("psphot.models"));
     158    psLogMsg ("psphot.models", PS_LOG_WARN, "built models for %ld objects: %f sec (%d pixels)\n", sources->n, psTimerMark ("psphot.models"), NpixTotal);
    146159    return true;
    147160}
     
    240253
    241254        pmSourceCacheModel (source, maskVal);  // ALLOC x14 (!)
     255        NpixTotal += source->pixels->numCols * source->pixels->numRows;
    242256    }
    243257
Note: See TracChangeset for help on using the changeset viewer.