IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2009, 2:53:12 PM (17 years ago)
Author:
Paul Price
Message:

Merging branches/pap (unconvolved stacks, reworked combinePixels function into clearer roles, only throw out most variant pixel on each iteration, throw suspect pixels out as first rejection step) stack development. I think I've got everything, but not entirely sure, since I've already merged this branch once before (for dual convolution).

Location:
trunk/ppStack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack

  • trunk/ppStack/src/ppStackLoop.c

    r25738 r26076  
    5656    // Start threading
    5757    ppStackThreadInit();
    58     ppStackThreadData *stack = ppStackThreadDataSetup(options, config);
     58    ppStackThreadData *stack = ppStackThreadDataSetup(options, config, true);
    5959    if (!stack) {
    6060        psError(PS_ERR_IO, false, "Unable to initialise stack threads.");
     
    6262        return false;
    6363    }
    64     psFree(options->cells); options->cells = NULL;
    6564
    6665    // Prepare for combination
     
    9897    // Final combination
    9998    psTrace("ppStack", 2, "Final stack of convolved images....\n");
    100     if (!ppStackCombineFinal(stack, options, config)) {
     99    if (!ppStackCombineFinal(options->outRO, stack, options->convCovars, options, config, false, false)) {
    101100        psError(PS_ERR_UNKNOWN, false, "Unable to perform final combination.");
    102101        psFree(stack);
     
    106105    psLogMsg("ppStack", PS_LOG_INFO, "Stage 5: Final Stack: %f sec", psTimerClear("PPSTACK_STEPS"));
    107106    ppStackMemDump("final");
    108 
    109107
    110108    // Clean up
     
    121119    psFree(stack);
    122120
     121#if 1
     122    // Unconvolved stack --- it's cheap to calculate, compared to everything else!
     123    if (options->convolve) {
     124        // Start threading
     125        ppStackThreadData *stack = ppStackThreadDataSetup(options, config, false);
     126        if (!stack) {
     127            psError(PS_ERR_IO, false, "Unable to initialise stack threads.");
     128            psFree(options);
     129            return false;
     130        }
     131        psTrace("ppStack", 2, "Stack of unconvolved images....\n");
     132        if (!ppStackCombineFinal(options->unconvRO, stack, options->origCovars, options, config, false, true)) {
     133            psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination.");
     134            psFree(stack);
     135            psFree(options);
     136            return false;
     137        }
     138        psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: Unconvolved Stack: %f sec", psTimerClear("PPSTACK_STEPS"));
     139        ppStackMemDump("unconv");
     140
     141        psFree(stack);
     142    }
     143    psFree(options->cells); options->cells = NULL;
     144#endif
    123145
    124146    // Photometry
     
    129151        return false;
    130152    }
    131     psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: Photometry Analysis: %f sec", psTimerClear("PPSTACK_STEPS"));
     153    psLogMsg("ppStack", PS_LOG_INFO, "Stage 8: Photometry Analysis: %f sec", psTimerClear("PPSTACK_STEPS"));
    132154    ppStackMemDump("photometry");
    133 
    134155
    135156    // Finish up
     
    140161        return false;
    141162    }
    142     psLogMsg("ppStack", PS_LOG_INFO, "Stage 8: Final output: %f sec", psTimerClear("PPSTACK_STEPS"));
     163    psLogMsg("ppStack", PS_LOG_INFO, "Stage 9: Final output: %f sec", psTimerClear("PPSTACK_STEPS"));
    143164    ppStackMemDump("finish");
    144165
    145166    psFree(options);
     167
    146168    return true;
    147169}
Note: See TracChangeset for help on using the changeset viewer.