- Timestamp:
- Jul 17, 2014, 12:32:26 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-ops-20130712/ppStack/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppStackReadout.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-ops-20130712/ppStack/src
- Property svn:mergeinfo changed
/trunk/ppStack/src merged: 35931,36364-36365,36610,36710,36717,36855,36886
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-ops-20130712/ppStack/src/ppStackReadout.c
r34800 r37067 34 34 bool safety = PS_SCALAR_VALUE(args->data[4], U8); // Safety switch on? 35 35 bool normalise = PS_SCALAR_VALUE(args->data[5], U8); // Normalise images? 36 bool bscaleoffset = PS_SCALAR_VALUE(args->data[6], U8); // Apply bscale offset? 36 37 37 38 psVector *mask = options->inputMask; // Mask for inputs … … 40 41 psVector *addVariance = options->matchChi2; // Additional variance when rejecting 41 42 psVector *norm = normalise ? options->norm : NULL; // Normalisations to apply to images 43 psVector *bscaleApplyOffset = bscaleoffset ? options->bscaleOffset : NULL; // BSCALE offset to apply to images 42 44 43 45 bool status = ppStackReadoutFinal(config, options->outRO, options->expRO, thread->readouts, mask, reject, 44 weightings, exposures, addVariance, safety, norm ); // Status of operation46 weightings, exposures, addVariance, safety, norm, bscaleApplyOffset); // Status of operation 45 47 46 48 thread->busy = false; … … 116 118 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 117 119 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 120 121 int nminpix = psMetadataLookupS32(&mdok, recipe, "NMINPIX"); // Minimum input per pixel to combine with 118 122 119 123 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe … … 161 165 162 166 if (!pmStackCombine(outRO, NULL, stack, maskBad, maskSuspect, maskBlank, kernelSize, iter, 163 combineRej, combineSys, combineDiscard, useVariance, safe, false)) {167 combineRej, combineSys, combineDiscard, useVariance, safe, nminpix, false)) { 164 168 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); 165 169 psFree(stack); … … 184 188 psFree(stack); 185 189 190 //MEH change to trace 191 //psLogMsg("ppStack", PS_LOG_INFO, "initial stack image sectionNum %d", sectionNum); 192 186 193 sectionNum++; 187 194 … … 197 204 const psVector *mask, const psArray *rejected, const psVector *weightings, 198 205 const psVector *exposures, const psVector *addVariance, bool safety, 199 const psVector *norm )206 const psVector *norm, const psVector *bscaleApplyOffset) 200 207 { 201 208 assert(config); … … 216 223 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 217 224 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 225 226 int nminpix = psMetadataLookupS32(&mdok, recipe, "NMINPIX"); // Minimum input per pixel to combine with 218 227 219 228 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask for bad … … 265 274 stack->data[i] = data; 266 275 276 //MEH -- apply bscale offset before norm 277 if (bscaleApplyOffset) { 278 //MEH change to trace 279 //psLogMsg("ppStack", PS_LOG_INFO, "bscaleApplyOffset: %d %f", i, bscaleApplyOffset->data.F32[i]); 280 psBinaryOp(ro->image, ro->image, "-", psScalarAlloc(bscaleApplyOffset->data.F32[i], PS_TYPE_F32)); 281 } 282 267 283 if (norm) { 268 284 float normalise = powf(10.0, -0.4 * norm->data.F32[i]); // Normalisation … … 273 289 274 290 if (!pmStackCombine(outRO, expRO, stack, maskBad, maskSuspect, maskBlank, 0, iter, combineRej, 275 combineSys, combineDiscard, useVariance, safe, rejected)) {291 combineSys, combineDiscard, useVariance, safe, nminpix, rejected)) { 276 292 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 277 293 psFree(stack); … … 293 309 psFree(stack); 294 310 311 //MEH change to trace 312 //psLogMsg("ppStack", PS_LOG_INFO, "final stack image sectionNum %d", sectionNum); 313 295 314 sectionNum++; 296 315
Note:
See TracChangeset
for help on using the changeset viewer.
