- Timestamp:
- Jan 23, 2013, 3:08:32 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
ippconfig/gpc1/psphot.config (modified) (2 diffs)
-
ippconfig/recipes/psphot.config (modified) (1 diff)
-
psModules/src/camera/pmFPAMaskWeight.c (modified) (2 diffs)
-
psModules/src/objects/pmSourceIO_CMF.c.in (modified) (1 diff)
-
psphot/src/psphotSourceSize.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/psphot.config
r34769 r35038 53 53 PSPHOT.EXT.DIFF.ALTERNATE BOOL TRUE 54 54 PSPHOT.EXT.DIFF.ALTERNATE.THRESH F32 1.25 55 56 PSPHOT.EXT.FIT.ALL.SOURCES BOOL TRUE 57 PSPHOT.EXT.FIT.ALL.THRESH F32 1000 55 58 END 56 59 … … 59 62 PSPHOT.EXT.DIFF.ALTERNATE BOOL TRUE 60 63 PSPHOT.EXT.DIFF.ALTERNATE.THRESH F32 1.25 64 65 PSPHOT.EXT.FIT.ALL.SOURCES BOOL TRUE 66 PSPHOT.EXT.FIT.ALL.THRESH F32 1000 61 67 END 62 68 -
trunk/ippconfig/recipes/psphot.config
r34846 r35038 347 347 PSPHOT.EXT.DIFF.ALTERNATE BOOL FALSE # use alternate extended source calculation; designed for diff trails 348 348 PSPHOT.EXT.DIFF.ALTERNATE.THRESH F32 1.5 # threshold for alternate extended source calculations 349 PSPHOT.EXT.FIT.ALL.SOURCES BOOL FALSE # Apply extended object fits to all sources 350 PSPHOT.EXT.FIT.ALL.THRESH F32 1000 # Set density threshold above which to not fit all sources 349 351 PSPHOT.CR.GROW S32 1 # Number of pixels to grow CR mask 350 352 PSPHOT.CR.NSIGMA.SOFTEN F32 0.0025 # Softening parameter for weights -
trunk/psModules/src/camera/pmFPAMaskWeight.c
r31451 r35038 538 538 psF32 **imageData = readout->image->data.F32;// Dereference image 539 539 psF32 **varianceData = readout->variance ? readout->variance->data.F32 : NULL; // Dereference variance map 540 540 float maskFrac = 0.0; 541 541 for (int y = 0; y < numRows; y++) { 542 542 for (int x = 0; x < numCols; x++) { 543 543 if (maskData[y][x] & maskVal) { 544 maskFrac += 1; 544 545 imageData[y][x] = NAN; 545 546 if (varianceData) { … … 549 550 } 550 551 } 551 552 maskFrac = maskFrac / (1.0 * numRows * numCols); 553 psMetadataAddF32(readout->analysis, PS_LIST_TAIL, "READOUT.MASK.FRAC", PS_META_REPLACE, 554 "fraction of pixels masked by pmReadoutMaskApply",maskFrac); 552 555 return true; 553 556 } -
trunk/psModules/src/objects/pmSourceIO_CMF.c.in
r34564 r35038 830 830 psMetadataAddF32 (row, PS_LIST_TAIL, "KRON_MAG", 0, "Kron Mag", kronMag); 831 831 832 @PS1_DV 1,PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n);832 @PS1_DV0,PS1_DV1@ psMetadataAddF32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n); 833 833 @ALL,!PS1_DV0,!PS1_DV1@ psMetadataAddS32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n); 834 834 psMetadataAddStr (row, PS_LIST_TAIL, "MODEL_TYPE", 0, "name of model", pmModelClassGetName (model->type)); -
trunk/psphot/src/psphotSourceSize.c
r34769 r35038 13 13 bool altDiffExt; 14 14 float altDiffExtThresh; 15 bool extFitAll; 16 bool extFitAllReadout; 17 float extFitAllThresh; 15 18 float soft; 16 19 int grow; … … 127 130 // Threshold for this alternate method 128 131 options.altDiffExtThresh = psMetadataLookupF32(&status, recipe, "PSPHOT.EXT.DIFF.ALTERNATE.THRESH"); 132 assert (status); 133 // Option to enable fitting of all objects with extended model. 134 options.extFitAll = psMetadataLookupBool(&status, recipe, "PSPHOT.EXT.FIT.ALL.SOURCES"); 135 assert (status); 136 // Fitting everything is fine, but if the source density is high, we probably shouldn't. 137 options.extFitAllThresh = psMetadataLookupF32(&status, recipe, "PSPHOT.EXT.FIT.ALL.THRESH"); 129 138 assert (status); 130 139 … … 413 422 414 423 psLogMsg("psModules.objects", PS_LOG_INFO, "Source Size classifications: %4s %4s %4s %4s %4s", "Npsf", "Next", "Nsat", "Ncr", "Nskip"); 415 424 // Determine if this readout is above the threshold to ext fit all sources 425 if (options->extFitAll) { 426 float maskFrac = psMetadataLookupF32(&status,readout->analysis,"READOUT.MASK.FRAC"); 427 if (status) { 428 maskFrac = 0.0; 429 } 430 if (sources->n * (1.0 - maskFrac) > options->extFitAllThresh) { 431 options->extFitAllReadout = false; 432 } 433 else { 434 options->extFitAllReadout = true; 435 } 436 } 437 416 438 if (!psphotSourceClassRegion (NULL, &psfClump, sources, recipe, psf, options)) { 417 439 psLogMsg ("psphot", 4, "Failed to determine source classification for full image\n"); … … 420 442 } 421 443 return true; 422 444 423 445 int nRegions = psMetadataLookupS32 (&status, readout->analysis, "PSF.CLUMP.NREGIONS"); 424 446 for (int i = 0; i < nRegions; i ++) { … … 426 448 psMetadata *regionMD = psMetadataLookupPtr (&status, readout->analysis, regionName); 427 449 psAssert (regionMD, "regions must be defined by earlier call to psphotRoughClassRegion"); 428 450 429 451 psRegion *region = psMetadataLookupPtr (&status, regionMD, "REGION"); 430 452 psAssert (region, "regions must be defined by earlier call to psphotRoughClassRegion"); 431 453 432 454 // pull FWHM_X,Y from the recipe, use to define psfClump.X,Y 433 455 psfClump.X = psMetadataLookupF32 (&status, regionMD, "PSF.CLUMP.X"); psAssert (status, "missing PSF.CLUMP.X"); … … 559 581 // * SAT stars should not be faint, but defects may? 560 582 583 // If the recipe requests we do extended source fits to everything, set 584 // the EXT_LIMIT flag 585 if (options->extFitAllReadout) { 586 source->mode |= PM_SOURCE_MODE_EXT_LIMIT; 587 } 561 588 // Defects may not always match CRs from peak curvature analysis 562 589 // Defects may also be marked as SATSTAR -- XXX deactivate this flag?
Note:
See TracChangeset
for help on using the changeset viewer.
