Changeset 21525
- Timestamp:
- Feb 17, 2009, 3:38:42 PM (17 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 3 edited
-
ppStackArguments.c (modified) (2 diffs)
-
ppStackLoop.c (modified) (3 diffs)
-
ppStackMatch.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r21477 r21525 176 176 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-limit", 0, "Limit on star rejection fraction for successful iteration", NAN); 177 177 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-sys", 0, "Estimated systematic error", NAN); 178 psMetadataAddBool(arguments, PS_LIST_TAIL, "-renorm", 0, "Renormalise variance maps?", false);179 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0,180 "Statistic for mean in renormalisation", NULL);181 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0,182 "Statistic for stdev in renormalisation", NULL);183 psMetadataAddF32(arguments, PS_LIST_TAIL, "-renorm-width", 0, "Gaussian width for renormalisation", NAN);184 psMetadataAddS32(arguments, PS_LIST_TAIL, "-renorm-num", 0, "Number of samples for renormalisation", 0);185 178 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL); 186 179 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL); … … 280 273 } 281 274 282 if (psMetadataLookupBool(NULL, arguments, "-renorm") ||283 psMetadataLookupBool(NULL, recipe, "RENORM")) {284 psMetadataAddBool(arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true);285 }286 VALUE_ARG_RECIPE_INT("-renorm-num", "RENORM.NUM", S32, 0);287 VALUE_ARG_RECIPE_FLOAT("-renorm-width", "RENORM.WIDTH", F32);288 valueArgRecipeStr(arguments, recipe, "-renorm-mean", "RENORM.MEAN", recipe);289 valueArgRecipeStr(arguments, recipe, "-renorm-stdev", "RENORM.STDEV", recipe);290 291 275 valueArgRecipeStr(arguments, recipe, "-temp-image", "TEMP.IMAGE", recipe); 292 276 valueArgRecipeStr(arguments, recipe, "-temp-mask", "TEMP.MASK", recipe); -
trunk/ppStack/src/ppStackLoop.c
r21477 r21525 1151 1151 psLogMsg("ppStack", PS_LOG_INFO, "Stage 7 : WCS & JPEGS : %f sec", psTimerClear("PPSTACK_STEPS")); 1152 1152 1153 if (psMetadataLookupBool(&mdok, recipe, "RENORM")) {1154 // Statistics for renormalisation1155 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,1156 "RENORM.MEAN"));1157 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,1158 "RENORM.STDEV"));1159 int renormNum = psMetadataLookupS32(&mdok, recipe, "RENORM.NUM"); // Number of samples1160 float renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width of Gaussian phot1161 psImageMaskType maskValue = pmConfigMaskGet("BLANK", config); // Bits to mask1162 if (!pmReadoutVarianceRenormPhot(outRO, maskValue, renormNum, renormWidth,1163 renormMean, renormStdev, NULL)) {1164 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");1165 psFree(outRO);1166 return false;1167 }1168 }1169 1170 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Renormalization : %f sec", psTimerClear("PPSTACK_STEPS"));1171 1172 1153 if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) { 1173 1154 psTrace("ppStack", 1, "Photometering stacked image....\n"); … … 1199 1180 } 1200 1181 1201 psLogMsg("ppStack", PS_LOG_INFO, "Stage 9: Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));1182 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS")); 1202 1183 1203 1184 psThreadPoolFinalize(); … … 1254 1235 } 1255 1236 1256 psLogMsg("ppStack", PS_LOG_INFO, "Stage 10: Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));1237 psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS")); 1257 1238 1258 1239 memDump("finish"); -
trunk/ppStack/src/ppStackMatch.c
r21477 r21525 189 189 190 190 bool mdok; // Status of MD lookup 191 bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances?192 191 float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness 193 192 int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads … … 374 373 } 375 374 #endif 376 377 // Renormalise the variances if desired378 if (renorm) {379 // Statistics for renormalisation380 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,381 "RENORM.MEAN"));382 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,383 "RENORM.STDEV"));384 385 if (!pmReadoutVarianceRenormPixels(readout, maskBad, renormMean, renormStdev, rng)) {386 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");387 psFree(output);388 return false;389 }390 }391 375 392 376 if (threads > 0) { … … 562 546 } 563 547 564 // Renormalise the variances if desired565 if (renorm) {566 // Statistics for renormalisation567 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,568 "RENORM.MEAN"));569 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,570 "RENORM.STDEV"));571 572 if (!pmReadoutVarianceRenormPixels(readout, maskBad, renormMean, renormStdev, rng)) {573 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");574 psFree(output);575 return false;576 }577 }578 579 548 // Ensure the background value is zero 580 549 psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background
Note:
See TracChangeset
for help on using the changeset viewer.
