Changeset 29217
- Timestamp:
- Sep 23, 2010, 7:08:16 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823/ppStack/src
- Files:
-
- 4 edited
-
ppStackCombineFinal.c (modified) (1 diff)
-
ppStackLoop.c (modified) (1 diff)
-
ppStackMatch.c (modified) (2 diffs)
-
ppStackReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/ppStack/src/ppStackCombineFinal.c
r28405 r29217 93 93 94 94 // Sum covariance matrices 95 // the array may be defined, but no covariances actually supplied. 96 bool haveCovariances = false; 95 97 if (covariances) { 98 for (int i = 0; i < covariances->n; i++) { 99 haveCovariances |= (covariances->data[i] != NULL); 100 } 101 } 102 103 if (haveCovariances) { 96 104 outRO->covariance = psImageCovarianceAverageWeighted(covariances, options->weightings); 97 105 } else { -
branches/eam_branches/ipp-20100823/ppStack/src/ppStackLoop.c
r28182 r29217 204 204 #if 1 205 205 // Unconvolved stack --- it's cheap to calculate, compared to everything else! 206 // XXX unconvolved stack is currently using the convolved mask! oops! 206 207 if (options->convolve) { 207 208 // Start threading -
branches/eam_branches/ipp-20100823/ppStack/src/ppStackMatch.c
r28253 r29217 68 68 69 69 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 70 psMetadataAdd U8(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskBad);70 psMetadataAddImageMask(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskBad); 71 71 72 72 psImage *binned = psphotModelBackgroundReadoutNoFile(ro, config); // Binned background model … … 153 153 int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads 154 154 155 if (!pmReadoutMaskNonfinite(readout, maskVal)) { 155 // Replaced pmReadoutMaskNonfinite with pmReadoutMaskInvalid (tests for already masked pixels) 156 if (!pmReadoutMaskInvalid(readout, maskVal, maskBad)) { 156 157 psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels in readout."); 157 158 return false; -
branches/eam_branches/ipp-20100823/ppStack/src/ppStackReadout.c
r27427 r29217 130 130 int kernelSize = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size 131 131 132 psString maskValStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask going in 133 psImageMaskType maskVal = pmConfigMaskGet(maskValStr, config); // Bits to mask going in to pmSubtractionMatch 132 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask for bad 133 psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 134 134 135 psString maskSuspectStr = psMetadataLookupStr(NULL, recipe, "MASK.SUSPECT"); // Name of suspect mask bits 135 136 psImageMaskType maskSuspect = pmConfigMaskGet(maskSuspectStr, config); // Suspect bits 136 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits to mask for bad 137 psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 137 138 bool status = false; 139 psImageMaskType maskBlank; 140 psString maskBlankStr = psMetadataLookupStr(&status, recipe, "MASK.BLANK"); // Name of bits to set for empty pixels 141 if (maskBlankStr) { 142 maskBlank = pmConfigMaskGet(maskBlankStr, config); // Bits to mask for bad pixels 143 } else { 144 maskBlankStr = psMetadataLookupStr(&status, recipe, "MASK.BAD"); // Old name for MASK.BLANK 145 if (maskBlankStr) { 146 maskBlank = pmConfigMaskGet(maskBlankStr, config); // Bits to mask for bad pixels 147 } else { 148 maskBlank = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels 149 } 150 } 138 151 139 152 int num = readouts->n; // Number of inputs … … 157 170 } 158 171 159 if (!pmStackCombine(outRO, NULL, stack, mask Val | maskBad, maskSuspect, maskBad, kernelSize, iter,172 if (!pmStackCombine(outRO, NULL, stack, maskBad, maskSuspect, maskBlank, kernelSize, iter, 160 173 combineRej, combineSys, combineDiscard, useVariance, safe, false)) { 161 174 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); … … 215 228 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 216 229 217 psString maskValStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask going in 218 psImageMaskType maskVal = pmConfigMaskGet(maskValStr, config); // Bits to mask going in to pmSubtractionMatch 230 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask for bad 231 psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 232 219 233 psString maskSuspectStr = psMetadataLookupStr(NULL, recipe, "MASK.SUSPECT"); // Name of suspect mask bits 220 234 psImageMaskType maskSuspect = pmConfigMaskGet(maskSuspectStr, config); // Suspect bits 221 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits to mask for bad 222 psImageMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 235 236 bool status = false; 237 psImageMaskType maskBlank; 238 psString maskBlankStr = psMetadataLookupStr(&status, recipe, "MASK.BLANK"); // Name of bits to set for empty pixels 239 if (maskBlankStr) { 240 maskBlank = pmConfigMaskGet(maskBlankStr, config); // Bits to mask for bad pixels 241 } else { 242 maskBlankStr = psMetadataLookupStr(&status, recipe, "MASK.BAD"); // Old name for MASK.BLANK 243 if (maskBlankStr) { 244 maskBlank = pmConfigMaskGet(maskBlankStr, config); // Bits to mask for bad pixels 245 } else { 246 maskBlank = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels 247 } 248 } 223 249 224 250 int num = readouts->n; // Number of inputs … … 257 283 } 258 284 259 if (!pmStackCombine(outRO, expRO, stack, mask Val | maskBad, maskSuspect, maskBad, 0, iter, combineRej,285 if (!pmStackCombine(outRO, expRO, stack, maskBad, maskSuspect, maskBlank, 0, iter, combineRej, 260 286 combineSys, combineDiscard, useVariance, safe, rejected)) { 261 287 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
Note:
See TracChangeset
for help on using the changeset viewer.
