IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:09:53 AM (15 years ago)
Author:
eugene
Message:

merging updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/ppStack/src/ppStackLoop.c

    r31158 r31442  
    115115    // Final combination.  This one does NOT need to be normalized since the convolution takes care of that
    116116    psTrace("ppStack", 2, "Final stack of convolved images....\n");
    117     if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, false, true)) {
     117    if (options->convolve) {
     118      if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, false, true)) {
    118119        psError(psErrorCodeLast(), false, "Unable to perform final combination.");
    119120        psFree(stack);
    120121        return false;
    121     }
     122      }
     123    }
     124    else {
     125      // Since we haven't convolved, I believe we do need to normalize here.
     126      if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true)) {
     127        psError(psErrorCodeLast(), false, "Unable to perform final combination.");
     128        psFree(stack);
     129        return false;
     130      }
     131    }
     132     
    122133    psLogMsg("ppStack", PS_LOG_INFO, "Stage 5: Final Stack: %f sec", psTimerClear("PPSTACK_STEPS"));
    123134    ppStackMemDump("final");
     135
     136    // Update Header
     137    // Do this before performing photometry so that the cmf header gets all of the information.
     138    if (!ppStackUpdateHeader(stack, options, config)) {
     139        psError(psErrorCodeLast(), false, "Unable to update header.");
     140        psFree(stack);
     141        return false;
     142    }
    124143
    125144    // Photometry
     
    132151    ppStackMemDump("photometry");
    133152
    134     // Update Header
    135     if (!ppStackUpdateHeader(stack, options, config)) {
    136         psError(psErrorCodeLast(), false, "Unable to update header.");
    137         psFree(stack);
    138         return false;
    139     }
    140153    // Create JPEGS
    141154    if (!ppStackJPEGs(stack, options, config)) {
Note: See TracChangeset for help on using the changeset viewer.