IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 7:41:23 PM (16 years ago)
Author:
eugene
Message:

updates from eam_branches/20091201

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackPhotometry.c

    r24216 r26898  
    1919    psAssert(recipe, "We've thrown an error on this before.");
    2020
    21     bool mdok;                          // Status of MD lookup
    22     if (!psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) {
     21    if (!options->photometry) {
    2322        // Nothing to do
    2423        return true;
     
    6059                           "Bits to use for mark", markValue);
    6160
    62     pmCell *sourcesCell = pmFPAfileThisCell(config->files, photView, "PPSTACK.OUTPUT");
    63     psArray *inSources = psMetadataLookupPtr(NULL, sourcesCell->analysis, "PSPHOT.SOURCES");
     61    psArray *inSources = options->sources;
    6462    if (!inSources) {
    6563        psError(PS_ERR_UNKNOWN, false, "Unable to find input sources");
     
    9290    if (options->stats) {
    9391        pmReadout *photRO = pmFPAviewThisReadout(photView, photFile->fpa); // Readout with the sources
    94         psArray *sources = psMetadataLookupPtr(NULL, photRO->analysis, "PSPHOT.SOURCES"); // Sources
    95         psMetadataAddS32(options->stats, PS_LIST_TAIL, "NUM_SOURCES", 0,
    96                          "Number of sources detected", sources ? sources->n : 0);
    97         psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_PHOT", 0,
    98                          "Time to do photometry", psTimerMark("PPSTACK_PHOT"));
     92        pmDetections *detections = psMetadataLookupPtr(NULL, photRO->analysis, "PSPHOT.DETECTIONS"); // detections
     93        if (detections) {
     94            psAssert (detections->allSources, "missing sources?");
     95            psMetadataAddS32(options->stats, PS_LIST_TAIL, "NUM_SOURCES", 0, "Number of sources detected", detections->allSources->n);
     96        } else {
     97            psMetadataAddS32(options->stats, PS_LIST_TAIL, "NUM_SOURCES", 0, "Number of sources detected", 0);
     98        }
     99        psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_PHOT", 0, "Time to do photometry", psTimerMark("PPSTACK_PHOT"));
    99100    }
    100101    psFree(photView);
Note: See TracChangeset for help on using the changeset viewer.