Changeset 25812
- Timestamp:
- Oct 8, 2009, 10:56:29 AM (17 years ago)
- Location:
- branches/pap/ppStack/src
- Files:
-
- 6 edited
-
ppStack.h (modified) (1 diff)
-
ppStackCombineFinal.c (modified) (2 diffs)
-
ppStackLoop.c (modified) (2 diffs)
-
ppStackLoop.h (modified) (1 diff)
-
ppStackReadout.c (modified) (6 diffs)
-
ppStackThread.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStack.h
r23573 r25812 83 83 const psArray *rejected, // Array with pixels rejected in each image 84 84 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? 86 87 ); 87 88 -
branches/pap/ppStack/src/ppStackCombineFinal.c
r25811 r25812 11 11 12 12 bool ppStackCombineFinal(pmReadout *target, ppStackThreadData *stack, 13 ppStackOptions *options, pmConfig *config )13 ppStackOptions *options, pmConfig *config, bool full) 14 14 { 15 15 psAssert(stack, "Require stack"); … … 41 41 psArrayAdd(job->args, 1, options); 42 42 psArrayAdd(job->args, 1, config); 43 PS_ARRAY_ADD_SCALAR(job->args, full, PS_TYPE_BOOL); 43 44 if (!psThreadJobAddPending(job)) { 44 45 psFree(job); -
branches/pap/ppStack/src/ppStackLoop.c
r25810 r25812 97 97 // Final combination 98 98 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)) { 100 100 psError(PS_ERR_UNKNOWN, false, "Unable to perform final combination."); 101 101 psFree(stack); … … 132 132 } 133 133 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)) { 135 135 psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination."); 136 136 psFree(stack); -
branches/pap/ppStack/src/ppStackLoop.h
r25810 r25812 59 59 ppStackThreadData *stack, // Stack 60 60 ppStackOptions *options, // Options 61 pmConfig *config // Configuration 61 pmConfig *config, // Configuration 62 bool full // Combine full image? 62 63 ); 63 64 -
branches/pap/ppStack/src/ppStackReadout.c
r25810 r25812 43 43 ppStackOptions *options = args->data[2]; // Options 44 44 pmConfig *config = args->data[3]; // Configuration 45 bool full = PS_SCALAR_VALUE(args->data[4], U8); // Combine full image? 45 46 46 47 psVector *mask = options->inputMask; // Mask for inputs … … 49 50 psVector *addVariance = options->matchChi2; // Additional variance when rejecting 50 51 52 51 53 bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected, 52 weightings, addVariance ); // Status of operation54 weightings, addVariance, full); // Status of operation 53 55 54 56 thread->busy = false; … … 180 182 bool ppStackReadoutFinal(const pmConfig *config, pmReadout *outRO, const psArray *readouts, 181 183 const psVector *mask, const psArray *rejected, const psVector *weightings, 182 const psVector *addVariance )184 const psVector *addVariance, bool full) 183 185 { 184 186 assert(config); … … 211 213 psArray *stack = psArrayAlloc(num); // Array for stacking 212 214 213 bool entire = true; // Combine entire image? 214 if (rejected) { 215 if (!rejected) { 215 216 // We have rejection from a previous combination: combine without flagging pixels to inspect 216 entire = false;217 217 safe = false; 218 218 iter = 0; … … 225 225 if (mask->data.U8[i] & (PPSTACK_MASK_REJECT | PPSTACK_MASK_BAD)) { 226 226 // Image completely rejected since previous combination 227 entire= true;227 full = true; 228 228 continue; 229 229 } else if (mask->data.U8[i]) { … … 256 256 if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0, 257 257 iter, combineRej, combineSys, combineDiscard, 258 entire, useVariance, safe, !rejected)) {258 full, useVariance, safe, !rejected)) { 259 259 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 260 260 psFree(stack); -
branches/pap/ppStack/src/ppStackThread.c
r25810 r25812 277 277 278 278 { 279 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 4);279 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 5); 280 280 task->function = &ppStackReadoutFinalThread; 281 281 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
