Changeset 36710
- Timestamp:
- Apr 30, 2014, 7:04:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
ippconfig/gpc1/ppStack.config (modified) (1 diff)
-
ippconfig/recipes/ppStack.config (modified) (1 diff)
-
ppStack/src/ppStackReadout.c (modified) (4 diffs)
-
psModules/src/imcombine/pmStack.c (modified) (4 diffs)
-
psModules/src/imcombine/pmStack.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/ppStack.config
r36659 r36710 167 167 PSF.TARGET.AS.MAX BOOL TRUE 168 168 PSF.TARGET.AS.MAX.EPSILON F32 0.1 169 THRESHOLD.MASK F32 0. 01# Threshold for mask deconvolution (0..1)169 THRESHOLD.MASK F32 0.3 # Threshold for mask deconvolution (0..1) 170 170 COMBINE.ITER F32 0.5 # Number of rejection iterations per input 171 COMBINE.REJ F32 2.5 # Rejection threshold in combination (sigma)171 COMBINE.REJ F32 3.5 # Rejection threshold in combination (sigma) 172 172 COMBINE.SYS F32 0.1 # Relative systematic error in combination 173 173 COMBINE.DISCARD F32 0.2 # Discard fraction for Olympic weighted mean 174 174 IMAGE.REJ F32 0.1 # Rejected pixel fraction threshold for rejecting entire image 175 NMINPIX S32 10 # Minimum input per pixel -- testing 176 MASK.VAL STR SUSPECT,MASK.VALUE,CONV.BAD,GHOST # Mask value of input bad pixels 175 177 END 176 178 -
trunk/ippconfig/recipes/ppStack.config
r36659 r36710 32 32 TARGET.FRAC F32 0.1 # Minimum flux fraction for target PSF 33 33 TARGET.MINMAG F32 3.0 # Minimum magnitude difference to tolerate in stamp 34 NMINPIX S32 1 # Minimum input per pixel -- testing 34 35 35 36 BACKGROUND.MODEL BOOL FALSE # Construct a stacked version of the warp stage background -
trunk/ppStack/src/ppStackReadout.c
r36610 r36710 116 116 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 117 117 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 118 119 int nminpix = psMetadataLookupS32(&mdok, recipe, "NMINPIX"); // Minimum input per pixel to combine with 118 120 119 121 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe … … 161 163 162 164 if (!pmStackCombine(outRO, NULL, stack, maskBad, maskSuspect, maskBlank, kernelSize, iter, 163 combineRej, combineSys, combineDiscard, useVariance, safe, false)) {165 combineRej, combineSys, combineDiscard, useVariance, safe, nminpix, false)) { 164 166 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); 165 167 psFree(stack); … … 218 220 bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection? 219 221 bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels 222 223 int nminpix = psMetadataLookupS32(&mdok, recipe, "NMINPIX"); // Minimum input per pixel to combine with 220 224 221 225 psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask for bad … … 275 279 276 280 if (!pmStackCombine(outRO, expRO, stack, maskBad, maskSuspect, maskBlank, 0, iter, combineRej, 277 combineSys, combineDiscard, useVariance, safe, rejected)) {281 combineSys, combineDiscard, useVariance, safe, nminpix, rejected)) { 278 282 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 279 283 psFree(stack); -
trunk/psModules/src/imcombine/pmStack.c
r36651 r36710 835 835 psImageMaskType goodMask, // Value for good pixels 836 836 bool safe, // Safe combination? 837 int nminpix, // Minimum number of input per pixel 837 838 float invTotalWeight // Inverse of total weight for all inputs 838 839 ) … … 854 855 CHECKPIX(x, y, "bad vs good : %x %x %x\n", maskValue, badMask, blankMask); 855 856 856 switch (num) { 857 //MEH -- hackish adding of lower limit for input per pixel 858 int numN = num; 859 if (num < nminpix) { 860 CHECKPIX(x, y, "Nmin (%d) inputs (%d) to combine, pixel %d,%d is manually set bad\n", nminpix, numN, x, y); 861 numN = 0; 862 } 863 switch (numN) { 857 864 case 0: { 858 865 // Nothing to combine: it's bad … … 1518 1525 bool useVariance, 1519 1526 bool safe, 1527 int nminpix, 1520 1528 bool rejection) 1521 1529 { … … 1692 1700 psImageMaskType goodMask = 0; // OR of mask bits in all good input pixels 1693 1701 combineExtract(&num, &suspect, &badMask, &goodMask, buffer, combinedImage, combinedMask, combinedVariance, input, weights, exps, addVariance, reject, x, y, badMaskBits, suspectMaskBits); 1694 combinePixels(combinedImage, combinedMask, combinedVariance, exp, expnum, expweight, num, buffer, x, y, blankMaskBits, badMask, goodMask, safe, totalExpWeight);1702 combinePixels(combinedImage, combinedMask, combinedVariance, exp, expnum, expweight, num, buffer, x, y, blankMaskBits, badMask, goodMask, safe, nminpix, totalExpWeight); 1695 1703 1696 1704 if (iter > 0) { -
trunk/psModules/src/imcombine/pmStack.h
r34842 r36710 61 61 bool useVariance, ///< Use variance values for rejection? 62 62 bool safe, ///< Play safe with small numbers of input pixels (mask if N <= 2)? 63 int nminpix, ///< Minimum number input per pixel to combine 63 64 bool rejectInspect ///< Reject pixels instead of marking them for inspection? 64 65 );
Note:
See TracChangeset
for help on using the changeset viewer.
