IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31053


Ignore:
Timestamp:
Mar 25, 2011, 5:05:43 AM (15 years ago)
Author:
eugene
Message:

avoid errors from duplicate metadata entries; only supply TIME_FINAL for convolved stack

Location:
tags/ipp-20110218/ppStack/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110218/ppStack/src/ppStackCombineFinal.c

    r30985 r31053  
    1111
    1212    psTimerStart("PPSTACK_FINAL");
    13    
     13
    1414    pmReadout *outRO = options->outRO;                                      // Output readout
    1515    pmReadout *expRO = options->expRO;                                      // Exposure readout
     
    8787    bool haveCovariances = false;
    8888    if (covariances) {
    89         for (int i = 0; i < covariances->n; i++) {
    90             haveCovariances |= (covariances->data[i] != NULL);
    91         }
     89        for (int i = 0; i < covariances->n; i++) {
     90            haveCovariances |= (covariances->data[i] != NULL);
     91        }
    9292    }
    9393
     
    114114
    115115    if (options->stats) {
    116       psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_FINAL", 0,
    117                        "Time to make final stack", psTimerMark("PPSTACK_FINAL"));
     116        // only add the timer if it has not been set (convolved stack)
     117        // XXX this is weak: we should be distinguishing explicitly between convolved and unconvolved stacks
     118        psMetadataLookupF32 (&status, options->stats, "TIME_FINAL");
     119        if (!status) {
     120            psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_FINAL", PS_META_DUPLICATE_OK, "Time to make final stack", psTimerMark("PPSTACK_FINAL"));
     121        }
    118122    }
    119    
     123
    120124    return true;
    121125}
  • tags/ipp-20110218/ppStack/src/ppStackCombineInitial.c

    r30985 r31053  
    8989
    9090    if (options->stats) {
    91         psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_INITIAL", 0,
     91        psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_INITIAL", PS_META_DUPLICATE_OK,
    9292                         "Time to make initial stack", psTimerMark("PPSTACK_INITIAL"));
    9393    }
  • tags/ipp-20110218/ppStack/src/ppStackConvolve.c

    r30985 r31053  
    1717
    1818    psTimerStart("PPSTACK_CONVOLVE");
    19    
     19
    2020    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
    2121    psAssert(recipe, "We've thrown an error on this before.");
     
    368368
    369369    if (options->stats) {
    370       psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_CONVOLVE", 0,
    371                        "Time to convolve input images", psTimerMark("PPSTACK_CONVOLVE"));
    372     }
    373    
     370        psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_CONVOLVE", PS_META_DUPLICATE_OK,
     371                       "Time to convolve input images", psTimerMark("PPSTACK_CONVOLVE"));
     372    }
     373
    374374    return true;
    375375}
  • tags/ipp-20110218/ppStack/src/ppStackPhotometry.c

    r30620 r31053  
    8484            psMetadataAddS32(options->stats, PS_LIST_TAIL, "NUM_SOURCES", 0, "Number of sources detected", 0);
    8585        }
    86         psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_PHOT", 0, "Time to do photometry", psTimerMark("PPSTACK_PHOT"));
     86        psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_PHOT", PS_META_DUPLICATE_OK, "Time to do photometry", psTimerMark("PPSTACK_PHOT"));
    8787    }
    8888
Note: See TracChangeset for help on using the changeset viewer.