Changeset 25830 for branches/pap/ppStack/src/ppStackReadout.c
- Timestamp:
- Oct 13, 2009, 11:12:03 AM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/ppStack/src/ppStackReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStackReadout.c
r25821 r25830 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 47 47 48 psVector *mask = options->inputMask; // Mask for inputs … … 49 50 psVector *weightings = options->weightings; // Weightings (1/noise^2) for each image 50 51 psVector *addVariance = options->matchChi2; // Additional variance when rejecting 51 52 psVector *norm = normalise ? options->norm : NULL; // Normalisations to apply to images 52 53 53 54 bool status = ppStackReadoutFinal(config, target, thread->readouts, mask, rejected, 54 weightings, addVariance, full ); // Status of operation55 weightings, addVariance, full, norm); // Status of operation 55 56 56 57 thread->busy = false; … … 182 183 bool ppStackReadoutFinal(const pmConfig *config, pmReadout *outRO, const psArray *readouts, 183 184 const psVector *mask, const psArray *rejected, const psVector *weightings, 184 const psVector *addVariance, bool full )185 const psVector *addVariance, bool full, const psVector *norm) 185 186 { 186 187 assert(config); … … 252 253 data->reject = rejected ? psMemIncrRefCounter(rejected->data[i]) : NULL; 253 254 stack->data[i] = data; 255 256 if (norm) { 257 float normalise = powf(10.0, -0.4 * norm->data.F32[i]); // Normalisation 258 psBinaryOp(ro->image, ro->image, "*", psScalarAlloc(normalise, PS_TYPE_F32)); 259 psBinaryOp(ro->variance, ro->variance, "*", psScalarAlloc(PS_SQR(normalise), PS_TYPE_F32)); 260 } 254 261 } 255 262
Note:
See TracChangeset
for help on using the changeset viewer.
