Changeset 19172 for trunk/ppStack/src/ppStackReadout.c
- Timestamp:
- Aug 22, 2008, 2:05:48 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackReadout.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackReadout.c
r18918 r19172 10 10 #include "ppStack.h" 11 11 12 //#define REJECTION_FILES // Write rejection mask?13 //#define INSPECTION_FILES // Write inspection mask?14 //#define COMBINED_FILES // Write combined images?12 #define REJECTION_FILES // Write rejection mask? 13 #define INSPECTION_FILES // Write inspection mask? 14 #define COMBINED_FILES // Write combined images? 15 15 16 16 … … 34 34 int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations 35 35 float combineRej = psMetadataLookupF32(NULL, recipe, "COMBINE.REJ"); // Combination threshold 36 psMaskType maskVal = pmConfigMaskGet("BLANK", config); // Value to mask37 36 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 38 37 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels … … 40 39 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 41 40 int kernelSize = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size 41 42 psString maskValStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask going in 43 psMaskType maskVal = pmConfigMaskGet(maskValStr, config); // Bits to mask going in to pmSubtractionMatch 44 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits to mask for bad 45 psMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 42 46 43 47 int num = readouts->n; // Number of inputs … … 67 71 } 68 72 69 if (!pmStackCombine(outRO, stack, maskVal , maskVal, kernelSize, iter, combineRej, true,73 if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, kernelSize, iter, combineRej, true, 70 74 useVariance, safe)) { 71 75 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); … … 93 97 psRegionSet(0, outRO->image->numCols - 1, 94 98 0, outRO->image->numRows - 1), 95 mask Val);99 maskBad); 96 100 psString name = NULL; // Name of image 97 101 psStringAppend(&name, "inspect_%03d_%03d.fits", sectionNum, i); … … 143 147 144 148 bool mdok; // Status of MD lookup 145 psMaskType maskVal = pmConfigMaskGet("BLANK", config); // Value to mask146 149 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 150 151 psString maskValStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask going in 152 psMaskType maskVal = pmConfigMaskGet(maskValStr, config); // Bits to mask going in to pmSubtractionMatch 153 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits to mask for bad 154 psMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels 147 155 148 156 int num = readouts->n; // Number of inputs … … 210 218 psRegionSet(0, outRO->image->numCols - 1, 211 219 0, outRO->image->numRows - 1), 212 mask Val);220 maskBad); 213 221 psString name = NULL; // Name of image 214 222 psStringAppend(&name, "reject_%03d.fits", i); … … 222 230 #endif 223 231 224 if (!pmStackCombine(outRO, stack, maskVal, maskVal, 0, 0, NAN, numGood != num, useVariance, false)) { 232 if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0, 0, NAN, 233 numGood != num, useVariance, false)) { 225 234 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 226 235 psFree(fpaList);
Note:
See TracChangeset
for help on using the changeset viewer.
