Changeset 17255 for trunk/ppStack/src/ppStackMatch.c
- Timestamp:
- Mar 31, 2008, 3:46:38 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackMatch.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackMatch.c
r17031 r17255 16 16 17 17 bool ppStackMatch(pmReadout *readout, psArray **regions, psArray **kernels, 18 const pmReadout *sourcesRO, const pmPSF *psf, const pmConfig *config)18 const pmReadout *sourcesRO, const pmPSF *psf, psRandom *rng, const pmConfig *config) 19 19 { 20 20 assert(readout); … … 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 = pmConfigMask(psMetadataLookupStr(NULL, recipe, "MASK.BAD"), config); // Value to mask 33 bool mdok; // Status of MD lookup 34 bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances? 35 psStatsOptions renormMean = psMetadataLookupS32(&mdok, recipe, "RENORM.MEAN"); // Statistic for mean 36 psStatsOptions renormStdev = psMetadataLookupS32(&mdok, recipe, "RENORM.STDEV"); // Statistic for stdev 37 int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalisation box 38 39 // Renormalise the variances if desired 40 if (renorm && !pmReadoutWeightRenorm(readout, maskBad, renormMean, renormStdev, renormWidth, rng)) { 41 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances."); 42 psFree(output); 43 return false; 44 } 32 45 33 46 #ifndef NO_CONVOLUTION 34 bool mdok; // Status of MD lookup35 47 int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order 36 48 float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs … … 47 59 int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order 48 60 int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel 49 psMaskType maskBad = pmConfigMask(psMetadataLookupStr(NULL, recipe, "MASK.BAD"),50 config); // Value to mask51 61 psMaskType maskBlank = pmConfigMask(psMetadataLookupStr(NULL, recipe, "MASK.BLANK"), 52 62 config); // Mask for blank reg.
Note:
See TracChangeset
for help on using the changeset viewer.
