IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 29, 2008, 2:16:50 PM (18 years ago)
Author:
eugene
Message:

moved peaks and footprints into detections; moving mask selections into recipe and called functions; dropping unused MODE flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080229/psphot/src/psphotSourceSize.c

    r15802 r16760  
    66// compares the observed flux to the model.
    77
    8 bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe) {
     8bool psphotSourceSize (pmReadout *readout, psArray *sources, psMetadata *recipe, long first) {
     9
     10    psTimerStart ("psphot");
    911
    1012    // loop over all source
    11     for (int i = 0; i < sources->n; i++) {
     13    for (int i = first; i < sources->n; i++) {
    1214        pmSource *source = sources->data[i];
    1315
     16        // skip source if it was already measured
     17        if (isfinite(source->crNsigma)) continue;
     18
     19        source->crNsigma  = -1.0;
     20        source->extNsigma = -1.0;
     21
    1422        // source must have been subtracted
     23        source->crNsigma  = -3.0;
    1524        if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue;
    1625
     
    2332
    2433        // skip sources which are too close to a boundary
     34        source->crNsigma  = -4.0;
    2535        if (xPeak < 1) continue;
    2636        if (xPeak > source->pixels->numCols - 2) continue;
     
    2939
    3040        // XXX for now, just skip any sources with masked pixels
     41        source->crNsigma  = -5.0;
    3142        bool keep = true;
    3243        for (int iy = -1; (iy <= +1) && keep; iy++) {
     
    97108        source->extNsigma = (nEXT > 0) ? fabs(fEXT) / nEXT : 0.0;
    98109        // NOTE: abs needed to make the Nsigma value positive
     110
     111        if (!isfinite(source->crNsigma)) {
     112          fprintf (stderr, ".");
     113          source->crNsigma = -6.0;
     114        }
     115
    99116    }
     117
     118    psLogMsg ("psphot.size", PS_LOG_INFO, "measure source sizes for %ld sources: %f sec\n", sources->n - first, psTimerMark ("psphot"));
     119
    100120    return true;
    101121}
Note: See TracChangeset for help on using the changeset viewer.