Changeset 19599
- Timestamp:
- Sep 18, 2008, 9:38:38 AM (18 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
ppStackArguments.c (modified) (2 diffs)
-
ppStackMatch.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r19399 r19599 81 81 psMaskType value = pmConfigMaskGet(name, config); \ 82 82 psMetadataAddU8(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \ 83 }84 85 // Get a statistic name from the command-line or recipe, and add the enum to the arguments86 #define VALUE_ARG_RECIPE_STAT(ARGNAME, RECIPENAME) { \87 const char *stat = psMetadataLookupStr(NULL, config->arguments, ARGNAME); \88 if (!stat) { \89 stat = psMetadataLookupStr(NULL, recipe, RECIPENAME); \90 if (!stat) { \91 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find %s in recipe %s", \92 RECIPENAME, PPSTACK_RECIPE); \93 goto ERROR; \94 } \95 } \96 psMetadataAddS32(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, \97 NULL, psStatsOptionFromString(stat)); \98 83 } 99 84 … … 281 266 } 282 267 VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0); 283 VALUE_ARG_RECIPE_STAT("-renorm-mean", "RENORM.MEAN");284 VALUE_ARG_RECIPE_STAT("-renorm-stdev", "RENORM.STDEV");268 valueArgRecipeStr(arguments, recipe, "-renorm-mean", "RENORM.MEAN", recipe); 269 valueArgRecipeStr(arguments, recipe, "-renorm-stdev", "RENORM.STDEV", recipe); 285 270 286 271 valueArgRecipeStr(arguments, recipe, "-temp-image", "TEMP.IMAGE", recipe); -
trunk/ppStack/src/ppStackMatch.c
r19548 r19599 72 72 bool mdok; // Status of MD lookup 73 73 bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances? 74 psStatsOptions renormMean = psMetadataLookupS32(&mdok, recipe, "RENORM.MEAN"); // Statistic for mean75 psStatsOptions renormStdev = psMetadataLookupS32(&mdok, recipe, "RENORM.STDEV"); // Statistic for stdev76 int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalisation box77 74 float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness 78 75 int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads … … 364 361 // Renormalise the variances if desired 365 362 if (renorm) { 363 // Statistics for renormalisation 364 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe, 365 "RENORM.MEAN")); 366 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupS32(&mdok, recipe, 367 "RENORM.STDEV")); 368 int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalisation box 369 366 370 psLogMsg("ppStack", PS_LOG_INFO, "Renormalising variance map."); 367 371 if (!pmReadoutWeightRenorm(readout, maskBad, renormMean, renormStdev, renormWidth, rng)) {
Note:
See TracChangeset
for help on using the changeset viewer.
