IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25812


Ignore:
Timestamp:
Oct 8, 2009, 10:56:29 AM (17 years ago)
Author:
Paul Price
Message:

Need to be able to choose whether to combine entire image or not.

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

Legend:

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

    r23573 r25812  
    8383                         const psArray *rejected, // Array with pixels rejected in each image
    8484                         const psVector *weightings, // Weighting factors for each image
    85                          const psVector *addVariance // Additional variance for rejection
     85                         const psVector *addVariance, // Additional variance for rejection
     86                         bool full                    // Combine full image?
    8687    );
    8788
  • branches/pap/ppStack/src/ppStackCombineFinal.c

    r25811 r25812  
    1111
    1212bool ppStackCombineFinal(pmReadout *target, ppStackThreadData *stack,
    13                          ppStackOptions *options, pmConfig *config)
     13                         ppStackOptions *options, pmConfig *config, bool full)
    1414{
    1515    psAssert(stack, "Require stack");
     
    4141        psArrayAdd(job->args, 1, options);
    4242        psArrayAdd(job->args, 1, config);
     43        PS_ARRAY_ADD_SCALAR(job->args, full, PS_TYPE_BOOL);
    4344        if (!psThreadJobAddPending(job)) {
    4445            psFree(job);
  • branches/pap/ppStack/src/ppStackLoop.c

    r25810 r25812  
    9797    // Final combination
    9898    psTrace("ppStack", 2, "Final stack of convolved images....\n");
    99     if (!ppStackCombineFinal(options->outRO, stack, options, config)) {
     99    if (!ppStackCombineFinal(options->outRO, stack, options, config, false)) {
    100100        psError(PS_ERR_UNKNOWN, false, "Unable to perform final combination.");
    101101        psFree(stack);
     
    132132        }
    133133        psTrace("ppStack", 2, "Stack of unconvolved images....\n");
    134         if (!ppStackCombineFinal(options->unconvRO, stack, options, config)) {
     134        if (!ppStackCombineFinal(options->unconvRO, stack, options, config, true)) {
    135135            psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination.");
    136136            psFree(stack);
  • branches/pap/ppStack/src/ppStackLoop.h

    r25810 r25812  
    5959    ppStackThreadData *stack,           // Stack
    6060    ppStackOptions *options,            // Options
    61     pmConfig *config                    // Configuration
     61    pmConfig *config,                   // Configuration
     62    bool full                           // Combine full image?
    6263    );
    6364
  • branches/pap/ppStack/src/ppStackReadout.c

    r25810 r25812  
    4343    ppStackOptions *options = args->data[2]; // Options
    4444    pmConfig *config = args->data[3];   // Configuration
     45    bool full = PS_SCALAR_VALUE(args->data[4], U8); // Combine full image?
    4546
    4647    psVector *mask = options->inputMask; // Mask for inputs
     
    4950    psVector *addVariance = options->matchChi2; // Additional variance when rejecting
    5051
     52
    5153    bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected,
    52                                       weightings, addVariance); // Status of operation
     54                                      weightings, addVariance, full); // Status of operation
    5355
    5456    thread->busy = false;
     
    180182bool ppStackReadoutFinal(const pmConfig *config, pmReadout *outRO, const psArray *readouts,
    181183                         const psVector *mask, const psArray *rejected, const psVector *weightings,
    182                          const psVector *addVariance)
     184                         const psVector *addVariance, bool full)
    183185{
    184186    assert(config);
     
    211213    psArray *stack = psArrayAlloc(num); // Array for stacking
    212214
    213     bool entire = true;                 // Combine entire image?
    214     if (rejected) {
     215    if (!rejected) {
    215216        // We have rejection from a previous combination: combine without flagging pixels to inspect
    216         entire = false;
    217217        safe = false;
    218218        iter = 0;
     
    225225        if (mask->data.U8[i] & (PPSTACK_MASK_REJECT | PPSTACK_MASK_BAD)) {
    226226            // Image completely rejected since previous combination
    227             entire = true;
     227            full = true;
    228228            continue;
    229229        } else if (mask->data.U8[i]) {
     
    256256    if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0,
    257257                        iter, combineRej, combineSys, combineDiscard,
    258                         entire, useVariance, safe, !rejected)) {
     258                        full, useVariance, safe, !rejected)) {
    259259        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
    260260        psFree(stack);
  • branches/pap/ppStack/src/ppStackThread.c

    r25810 r25812  
    277277
    278278    {
    279         psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 4);
     279        psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 5);
    280280        task->function = &ppStackReadoutFinalThread;
    281281        psThreadTaskAdd(task);
Note: See TracChangeset for help on using the changeset viewer.