IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26648


Ignore:
Timestamp:
Jan 20, 2010, 5:18:51 PM (16 years ago)
Author:
Paul Price
Message:

Do detection efficiency early, so it's always done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotReadoutMinimal.c

    r26596 r26648  
    5454        return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL);
    5555    }
     56#if 0
    5657    if (!detections->peaks->n) {
    5758        psLogMsg ("psphot", 3, "unable to find detections in this image");
    5859        return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL);
    5960    }
     61#endif
    6062
    6163    // construct sources and measure basic stats
    6264    psArray *sources = psphotSourceStats (config, readout, detections, false);
    6365    if (!sources) return false;
     66
     67    // Do the efficiency before everything else, to ensure it's done
     68    if (!psphotEfficiency(config, readout, view, psf, recipe, sources)) {
     69        psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources");
     70        psErrorClear();
     71    }
     72
     73    if (detections->peaks->n == 0 || sources->n == 0) {
     74        psLogMsg ("psphot", 3, "unable to find detections in this image");
     75        return psphotReadoutCleanup (config, readout, recipe, detections, psf, NULL);
     76    }
     77
     78
    6479
    6580    // find blended neighbors of very saturated stars
     
    103118    psphotMagnitudes(config, readout, view, sources, psf);
    104119
    105     if (!psphotEfficiency(config, readout, view, psf, recipe, sources)) {
    106         psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources");
    107         psErrorClear();
    108     }
    109 
    110120    // drop the references to the image pixels held by each source
    111121    psphotSourceFreePixels (sources);
Note: See TracChangeset for help on using the changeset viewer.