IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25924


Ignore:
Timestamp:
Oct 22, 2009, 2:19:10 PM (17 years ago)
Author:
Paul Price
Message:

Unconvolved images shouldn't be combined without the SAFE setting unless the user desires it.

Location:
branches/pap/ppStack/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppStack/src/ppStack.h

    r25830 r25924  
    8585                         const psVector *addVariance, // Additional variance for rejection
    8686                         bool full,                   // Combine full image?
     87                         bool safety,                 // Enable safety switch?
    8788                         const psVector *norm         // Normalisations to apply
    8889    );
  • branches/pap/ppStack/src/ppStackCombineFinal.c

    r25911 r25924  
    1111
    1212bool ppStackCombineFinal(pmReadout *target, ppStackThreadData *stack, psArray *covariances,
    13                          ppStackOptions *options, pmConfig *config, bool full, bool normalise)
     13                         ppStackOptions *options, pmConfig *config, bool full, bool safe, bool normalise)
    1414{
    1515    psAssert(stack, "Require stack");
     
    4242        psArrayAdd(job->args, 1, config);
    4343        PS_ARRAY_ADD_SCALAR(job->args, full, PS_TYPE_U8);
     44        PS_ARRAY_ADD_SCALAR(job->args, safe, PS_TYPE_U8);
    4445        PS_ARRAY_ADD_SCALAR(job->args, normalise, PS_TYPE_U8);
    4546        if (!psThreadJobAddPending(job)) {
  • branches/pap/ppStack/src/ppStackLoop.c

    r25911 r25924  
    9797    // Final combination
    9898    psTrace("ppStack", 2, "Final stack of convolved images....\n");
    99     if (!ppStackCombineFinal(options->outRO, stack, options->convCovars, options, config, false, false)) {
     99    if (!ppStackCombineFinal(options->outRO, stack, options->convCovars, options, config,
     100                             false, false, false)) {
    100101        psError(PS_ERR_UNKNOWN, false, "Unable to perform final combination.");
    101102        psFree(stack);
     
    132133        }
    133134        psTrace("ppStack", 2, "Stack of unconvolved images....\n");
    134         if (!ppStackCombineFinal(options->unconvRO, stack, options->origCovars, options, config, true, true)) {
     135        if (!ppStackCombineFinal(options->unconvRO, stack, options->origCovars, options, config,
     136                                 true, true, true)) {
    135137            psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination.");
    136138            psFree(stack);
  • branches/pap/ppStack/src/ppStackLoop.h

    r25911 r25924  
    6262    pmConfig *config,                   // Configuration
    6363    bool full,                          // Combine full image?
     64    bool safe,                          // Allow safe combination?
    6465    bool norm                           // Normalise images?
    6566    );
  • branches/pap/ppStack/src/ppStackReadout.c

    r25830 r25924  
    4444    pmConfig *config = args->data[3];   // Configuration
    4545    bool full = PS_SCALAR_VALUE(args->data[4], U8); // Combine full image?
    46     bool normalise = PS_SCALAR_VALUE(args->data[5], U8); // Normalise images?
     46    bool safety = PS_SCALAR_VALUE(args->data[5], U8);    // Safety switch on?
     47    bool normalise = PS_SCALAR_VALUE(args->data[6], U8); // Normalise images?
    4748
    4849    psVector *mask = options->inputMask; // Mask for inputs
     
    5354
    5455    bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected,
    55                                       weightings, addVariance, full, norm); // Status of operation
     56                                      weightings, addVariance, full, safety, norm); // Status of operation
    5657
    5758    thread->busy = false;
     
    183184bool ppStackReadoutFinal(const pmConfig *config, pmReadout *outRO, const psArray *readouts,
    184185                         const psVector *mask, const psArray *rejected, const psVector *weightings,
    185                          const psVector *addVariance, bool full, const psVector *norm)
     186                         const psVector *addVariance, bool full, bool safety, const psVector *norm)
    186187{
    187188    assert(config);
     
    216217    if (rejected) {
    217218        // We have rejection from a previous combination: combine without flagging pixels to inspect
    218         safe = false;
     219        safe &= safety;
    219220        iter = 0;
    220221        combineRej = NAN;
  • branches/pap/ppStack/src/ppStackThread.c

    r25911 r25924  
    282282
    283283    {
    284         psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 6);
     284        psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 7);
    285285        task->function = &ppStackReadoutFinalThread;
    286286        psThreadTaskAdd(task);
Note: See TracChangeset for help on using the changeset viewer.