Changeset 25924
- Timestamp:
- Oct 22, 2009, 2:19:10 PM (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) (4 diffs)
-
ppStackThread.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStack.h
r25830 r25924 85 85 const psVector *addVariance, // Additional variance for rejection 86 86 bool full, // Combine full image? 87 bool safety, // Enable safety switch? 87 88 const psVector *norm // Normalisations to apply 88 89 ); -
branches/pap/ppStack/src/ppStackCombineFinal.c
r25911 r25924 11 11 12 12 bool 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) 14 14 { 15 15 psAssert(stack, "Require stack"); … … 42 42 psArrayAdd(job->args, 1, config); 43 43 PS_ARRAY_ADD_SCALAR(job->args, full, PS_TYPE_U8); 44 PS_ARRAY_ADD_SCALAR(job->args, safe, PS_TYPE_U8); 44 45 PS_ARRAY_ADD_SCALAR(job->args, normalise, PS_TYPE_U8); 45 46 if (!psThreadJobAddPending(job)) { -
branches/pap/ppStack/src/ppStackLoop.c
r25911 r25924 97 97 // Final combination 98 98 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)) { 100 101 psError(PS_ERR_UNKNOWN, false, "Unable to perform final combination."); 101 102 psFree(stack); … … 132 133 } 133 134 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)) { 135 137 psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination."); 136 138 psFree(stack); -
branches/pap/ppStack/src/ppStackLoop.h
r25911 r25924 62 62 pmConfig *config, // Configuration 63 63 bool full, // Combine full image? 64 bool safe, // Allow safe combination? 64 65 bool norm // Normalise images? 65 66 ); -
branches/pap/ppStack/src/ppStackReadout.c
r25830 r25924 44 44 pmConfig *config = args->data[3]; // Configuration 45 45 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? 47 48 48 49 psVector *mask = options->inputMask; // Mask for inputs … … 53 54 54 55 bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected, 55 weightings, addVariance, full, norm); // Status of operation56 weightings, addVariance, full, safety, norm); // Status of operation 56 57 57 58 thread->busy = false; … … 183 184 bool ppStackReadoutFinal(const pmConfig *config, pmReadout *outRO, const psArray *readouts, 184 185 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) 186 187 { 187 188 assert(config); … … 216 217 if (rejected) { 217 218 // We have rejection from a previous combination: combine without flagging pixels to inspect 218 safe = false;219 safe &= safety; 219 220 iter = 0; 220 221 combineRej = NAN; -
branches/pap/ppStack/src/ppStackThread.c
r25911 r25924 282 282 283 283 { 284 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 6);284 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 7); 285 285 task->function = &ppStackReadoutFinalThread; 286 286 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
