Changeset 25810
- Timestamp:
- Oct 8, 2009, 9:19:14 AM (17 years ago)
- Location:
- branches/pap/ppStack/src
- Files:
-
- 5 edited
-
ppStackCombineFinal.c (modified) (3 diffs)
-
ppStackLoop.c (modified) (2 diffs)
-
ppStackLoop.h (modified) (1 diff)
-
ppStackReadout.c (modified) (2 diffs)
-
ppStackThread.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStackCombineFinal.c
r25809 r25810 10 10 #include "ppStackLoop.h" 11 11 12 bool ppStackCombineFinal(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config) 12 bool ppStackCombineFinal(pmReadout *target, ppStackThreadData *stack, 13 ppStackOptions *options, pmConfig *config) 13 14 { 14 15 psAssert(stack, "Require stack"); … … 30 31 } 31 32 32 // call: ppStackReadoutFinal(config, outRO, readouts, rejected)33 // call: ppStackReadoutFinal(config, target, readouts, rejected) 33 34 psThreadJob *job = psThreadJobAlloc("PPSTACK_FINAL_COMBINE"); // Job to start 35 psArrayAdd(job->args, 1, target); 34 36 psArrayAdd(job->args, 1, thread); 35 37 psArrayAdd(job->args, 1, options); … … 65 67 } 66 68 if (sumWeights > 0.0) { 67 pmReadout *outRO = options->outRO; // Output readout 68 outRO->covariance = psImageCovarianceSum(options->covariances); 69 psBinaryOp(outRO->covariance->image, outRO->covariance->image, "/", 69 target->covariance = psImageCovarianceSum(options->covariances); 70 psBinaryOp(target->covariance->image, target->covariance->image, "/", 70 71 psScalarAlloc(sumWeights, PS_TYPE_F32)); 71 72 psFree(options->covariances); options->covariances = NULL; 72 psImageCovarianceTransfer( outRO->variance, outRO->covariance);73 psImageCovarianceTransfer(target->variance, target->covariance); 73 74 } 74 75 } else { 75 options->outRO->covariance = psImageCovarianceNone();76 target->covariance = psImageCovarianceNone(); 76 77 } 77 78 78 79 #ifdef TESTING 79 pmStackVisualPlotTestImage( outRO->image, "combined_initial.fits");80 ppStackWriteImage("combined_final.fits", NULL, outRO->image, config);80 pmStackVisualPlotTestImage(target->image, "combined_initial.fits"); 81 ppStackWriteImage("combined_final.fits", NULL, target->image, config); 81 82 #endif 82 83 -
branches/pap/ppStack/src/ppStackLoop.c
r25797 r25810 97 97 // Final combination 98 98 psTrace("ppStack", 2, "Final stack of convolved images....\n"); 99 if (!ppStackCombineFinal( stack, options, config)) {99 if (!ppStackCombineFinal(options->outRO, stack, options, config)) { 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( stack, options, config)) {134 if (!ppStackCombineFinal(options->unconvRO, stack, options, config)) { 135 135 psError(PS_ERR_UNKNOWN, false, "Unable to perform unconvolved combination."); 136 136 psFree(stack); -
branches/pap/ppStack/src/ppStackLoop.h
r23576 r25810 56 56 // Final combination 57 57 bool ppStackCombineFinal( 58 pmReadout *target, // Target readout 58 59 ppStackThreadData *stack, // Stack 59 60 ppStackOptions *options, // Options -
branches/pap/ppStack/src/ppStackReadout.c
r23577 r25810 39 39 40 40 psArray *args = job->args; // Arguments 41 p pStackThread *thread = args->data[0]; // Thread42 ppStack Options *options = args->data[1]; // Options43 p mConfig *config = args->data[2]; // Configuration44 45 pmReadout *outRO = options->outRO; // Output readout 41 pmReadout *target = args->data[0]; // Output readout 42 ppStackThread *thread = args->data[1]; // Thread 43 ppStackOptions *options = args->data[2]; // Options 44 pmConfig *config = args->data[3]; // Configuration 45 46 46 psVector *mask = options->inputMask; // Mask for inputs 47 47 psArray *rejected = options->rejected; // Rejected pixels … … 49 49 psVector *addVariance = options->matchChi2; // Additional variance when rejecting 50 50 51 bool status = ppStackReadoutFinal(config, outRO, thread->readouts, mask, rejected,51 bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected, 52 52 weightings, addVariance); // Status of operation 53 53 -
branches/pap/ppStack/src/ppStackThread.c
r25799 r25810 277 277 278 278 { 279 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 3);279 psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 4); 280 280 task->function = &ppStackReadoutFinalThread; 281 281 psThreadTaskAdd(task);
Note:
See TracChangeset
for help on using the changeset viewer.
