Changeset 18591 for trunk/ppStack/src/ppStackMatch.c
- Timestamp:
- Jul 16, 2008, 5:36:56 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackMatch.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackMatch.c
r18559 r18591 30 30 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 31 31 int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size 32 psMaskType maskBad = pmConfigMaskGet(psMetadataLookupStr(NULL, recipe, "MASK.BAD"), config); // Value to mask 32 33 psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch 34 psMaskType maskOut = pmConfigMaskGet("BLANK", config); // Bits to mask after pmSubtractionMatch 35 33 36 bool mdok; // Status of MD lookup 34 37 bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise variances? … … 41 44 float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness 42 45 43 if (!pmReadoutMaskNonfinite(readout, mask Bad)) {46 if (!pmReadoutMaskNonfinite(readout, maskIn)) { 44 47 psError(PS_ERR_UNKNOWN, false, "Unable to mask non-finite pixels in readout."); 45 48 return false; … … 64 67 int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order 65 68 int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel 66 psMaskType maskBlank = pmConfigMaskGet(psMetadataLookupStr(NULL, recipe, "MASK.BLANK"),67 config); // Mask for blank reg.68 69 float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction 69 70 bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters? … … 114 115 sources, stampsName, type, size, order, widths, orders, inner, ringsOrder, 115 116 binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej, 116 mask Bad, maskBlank, badFrac, PM_SUBTRACTION_MODE_1)) {117 maskIn, maskOut, badFrac, PM_SUBTRACTION_MODE_1)) { 117 118 psError(PS_ERR_UNKNOWN, false, "Unable to match images."); 118 119 psFree(fake); … … 200 201 if (renorm) { 201 202 psLogMsg("ppStack", PS_LOG_INFO, "Renormalising variance map."); 202 if (!pmReadoutWeightRenorm(readout, mask Bad, renormMean, renormStdev, renormWidth, rng)) {203 if (!pmReadoutWeightRenorm(readout, maskOut, renormMean, renormStdev, renormWidth, rng)) { 203 204 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances."); 204 205 psFree(output); … … 209 210 // Ensure the background value is zero 210 211 psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background 211 if (!psImageBackground(bg, NULL, readout->image, readout->mask, mask Bad, rng)) {212 if (!psImageBackground(bg, NULL, readout->image, readout->mask, maskOut, rng)) { 212 213 psWarning("Can't measure background for image."); 213 214 psErrorClear();
Note:
See TracChangeset
for help on using the changeset viewer.
