Changeset 34797
- Timestamp:
- Dec 11, 2012, 11:24:10 AM (14 years ago)
- Location:
- tags/ipp-20121026
- Files:
-
- 3 edited
-
ippconfig/recipes/psphot.config (modified) (2 diffs, 1 prop)
-
psphot/src/psphotOutput.c (modified) (4 diffs, 1 prop)
-
psphot/src/psphotSourceMatch.c (modified) (4 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20121026/ippconfig/recipes/psphot.config
- Property svn:mergeinfo set to
r34656 r34797 345 345 PSPHOT.EXT.NSIGMA.LIMIT F32 3.0 # sources with extNsigma greater that this get tagged as likely extended sources 346 346 PSPHOT.EXT.NSIGMA.MOMENTS F32 3.0 # sources with extNsigma greater that this get tagged as likely extended sources 347 PSPHOT.EXT.DIFF.ALTERNATE BOOL FALSE # use alternate extended source calculation; designed for diff trails 348 PSPHOT.EXT.DIFF.ALTERNATE.THRESH F32 1.5 # threshold for alternate extended source calculations 347 349 PSPHOT.CR.GROW S32 1 # Number of pixels to grow CR mask 348 350 PSPHOT.CR.NSIGMA.SOFTEN F32 0.0025 # Softening parameter for weights … … 382 384 # Note: if an input has a filter not in this list it will be processed after all of the others with MATCH.ALL = FALSE 383 385 PSPHOT.STACK.MATCH.FILTERS METADATA 384 TYPE PSPHOT_STACK.MATCH.FILTER FILTER.ID ORDER MATCH.ALL 385 gband PSPHOT_STACK.MATCH.FILTER g 4 FALSE 386 rband PSPHOT_STACK.MATCH.FILTER r 2 FALSE 387 iband PSPHOT_STACK.MATCH.FILTER i 1 FALSE 388 zband PSPHOT_STACK.MATCH.FILTER z 3 FALSE 389 yband PSPHOT_STACK.MATCH.FILTER y 5 TRUE 390 wband PSPHOT_STACK.MATCH.FILTER w 0 FALSE 386 TYPE PSPHOT_STACK.MATCH.FILTER FILTER.ID ORDER MATCH.ALL Y.RATIO.MAX 387 gband PSPHOT_STACK.MATCH.FILTER g 4 FALSE 0 388 rband PSPHOT_STACK.MATCH.FILTER r 2 FALSE 0.6 389 iband PSPHOT_STACK.MATCH.FILTER i 1 FALSE 0.4 390 zband PSPHOT_STACK.MATCH.FILTER z 3 FALSE 0 391 yband PSPHOT_STACK.MATCH.FILTER y 5 TRUE 0 392 wband PSPHOT_STACK.MATCH.FILTER w 0 FALSE 0 391 393 END 392 394 -
tags/ipp-20121026/psphot/src/psphotOutput.c
- Property svn:mergeinfo set to
r34528 r34797 201 201 int nCR = 0; 202 202 int nEXT = 0; 203 int nForced = 0; 204 int nDetections = sources != NULL ? sources->n : 0; 203 205 204 206 // count the number of sources which will be written and other sub-types 205 207 for (int i = 0; (sources != NULL) && (i < sources->n); i++) { 206 208 pmSource *source = (pmSource *) sources->data[i]; 209 if (source->mode2 & PM_SOURCE_MODE2_MATCHED) { 210 nForced ++; 211 } 207 212 pmModel *model = pmSourceGetModel (NULL, source); 208 213 if (model == NULL) … … 217 222 } 218 223 224 // XXX: This loop cauess nSrc to be twice as large as it should be. This is kept 225 // for compatability 219 226 for (int i = 0; (sources != NULL) && (i < sources->n); i++) { 220 227 pmSource *source = (pmSource *) sources->data[i]; … … 226 233 227 234 psMetadataAddS32 (header, PS_LIST_TAIL, "NSTARS", PS_META_REPLACE, "Number of sources", nSrc); 235 psMetadataAddS32 (header, PS_LIST_TAIL, "NDET", PS_META_REPLACE, "Number of detections", nDetections); 228 236 psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_EXT", PS_META_REPLACE, "Number of extended sources", nEXT); 229 237 psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_CR", PS_META_REPLACE, "Number of cosmic rays", nCR); 238 psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_FRC", PS_META_REPLACE, "Number of Forced detections", nForced); 230 239 return true; 231 240 } … … 306 315 psMetadataItemSupplement (&status, header, analysis, "NSTARS"); 307 316 317 psMetadataItemSupplement (&status, header, analysis, "NDET"); 308 318 psMetadataItemSupplement (&status, header, analysis, "NDET_EXT"); 309 319 psMetadataItemSupplement (&status, header, analysis, "NDET_CR"); 320 psMetadataItemSupplement (&status, header, analysis, "NDET_FRC"); 310 321 311 322 psMetadataItemSupplement (&status, header, analysis, "PSPHOT.PSF.APRESID"); -
tags/ipp-20121026/psphot/src/psphotSourceMatch.c
- Property svn:mergeinfo set to
r34542 r34797 7 7 int order; 8 8 bool matchAll; 9 long nSources; 10 float yRatioMax; 9 11 char filterID[MATCH_INFO_FILTER_STR_LEN]; 10 12 } psphotStackMatchInfo; … … 218 220 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 219 221 psAssert (detections, "missing detections?"); 222 psAssert (detections->allSources, "all sources not defined?"); 220 223 221 224 detArrays->data[i] = psMemIncrRefCounter(detections); 222 225 readouts->data[i] = psMemIncrRefCounter(readout); 226 } 227 228 // We are having a problem with large number of false y band detections causing large numbers of 229 // matched detections to be created. 230 // The matchInfo recipe each entry contains a value for Y.RATIO.MAX. For each filter with a non-zero value 231 // we compare the ratio of the number of y detections to the number of detections in that filter to Y.RATIO.MAX. 232 // If the ratio in all filters with a non-zero is above its limit we consider the y band stack to 233 // be suspect and so disable the y band matchAll recipe (if set) 234 235 int iy = -1; 236 // note now we are looping over matchInfo 237 for (int i = 0; i < nImages; i++) { 238 // Remember which input is y 239 if (!strcmp(matchInfo[i].filterID, "y")) { 240 iy = i; 241 } 242 pmDetections *detections = detArrays->data[matchInfo[i].inputNum]; 243 matchInfo[i].nSources = detections->allSources->n; 244 } 245 246 if (iy >= 0) { 247 int nCut = 0; 248 int nTry = 0; 249 for (int i = 0; i < nImages; i++) { 250 if (i == iy) continue; 251 if (matchInfo[i].yRatioMax != 0.0 && matchInfo[i].nSources > 0) { 252 ++nTry; 253 float ratio = (float) matchInfo[iy].nSources / (float) matchInfo[i].nSources; 254 psLogMsg ("psphot", PS_LOG_DETAIL, "nSrc_y / nSrc_%s: %6.3f max: %6.3f", matchInfo[i].filterID, ratio, 255 matchInfo[i].yRatioMax); 256 if (ratio > matchInfo[i].yRatioMax) { 257 // This one is above it's threshold 258 ++nCut; 259 } 260 } 261 } 262 if (nTry > 0 && nCut == nTry) { 263 // All filters with a cut were above the threshold. Disable matchAll for y band 264 psLogMsg ("psphot", PS_LOG_INFO, "Clearing y band matchAll because y ratio was too high in %d filters", nTry); 265 matchInfo[iy].matchAll = false; 266 } 223 267 } 224 268 … … 516 560 bool matchAll = (strcasecmp("true", matchAllStr) == 0); 517 561 562 psString yRatioStr = psMetadataLookupStr (&status, item->data.md, "Y.RATIO.MAX"); 563 psF32 yRatioMax = atof(yRatioStr); 564 518 565 // look for this filter in the inputs 519 566 for (int i = 0; i < num; i++) { … … 524 571 matchInfo[i].order = order; 525 572 matchInfo[i].matchAll = matchAll; 573 matchInfo[i].yRatioMax = yRatioMax; 574 matchInfo[i].nSources = 0; 526 575 psLogMsg ("psphot", PS_LOG_DETAIL, "input: %d %s match order: %d match all: %d\n", 527 576 i, thisFilter, order, matchAll);
Note:
See TracChangeset
for help on using the changeset viewer.
