Changeset 41705 for trunk/psphot
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/tags/ipp-ps1-20210510 merged: 41663,41665,41669,41685-41704
- Property svn:mergeinfo changed
-
trunk/psphot
- Property svn:mergeinfo changed
/tags/ipp-ps1-20210510/psphot (added) merged: 41669
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotSourceSize.c
r36375 r41705 26 26 bool psphotSourceSizePSF (psphotSourceSizeOptions *options, pmReadout *readout, psArray *sources, pmPSF *psf, psMetadata *recipe); 27 27 bool psphotDynamicLimitsCR (psphotSourceSizeOptions *options, pmReadout *readout, psArray *sources, pmPSF *psf, psMetadata *recipe); 28 bool psphotSourceClass (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options );29 bool psphotSourceClassRegion (psRegion *region, pmPSFClump *psfClump, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options );28 bool psphotSourceClass (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options, pmConfig *config); 29 bool psphotSourceClassRegion (psRegion *region, pmPSFClump *psfClump, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options, pmConfig *config); 30 30 bool psphotSourceSelectCR (pmReadout *readout, psArray *sources, psphotSourceSizeOptions *options); 31 31 bool psphotMaskCosmicRay (pmReadout *readout, pmSource *source, psImageMaskType maskVal, int maxWindowCR); … … 162 162 // classify the sources based on ApResid and Moments 163 163 // NOTE: only sources not already measured !(source->tmpFlags & PM_SOURCE_TMPF_SIZE_MEASURED) 164 psphotSourceClass(readout, sources, recipe, psf, &options );164 psphotSourceClass(readout, sources, recipe, psf, &options, config); 165 165 166 166 // attempt to mask the candidate CRs; flag if CR nature is confirmed … … 403 403 404 404 // classify sources based on the combination of psf-mag, Mxx, Myy 405 bool psphotSourceClass (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options ) {405 bool psphotSourceClass (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options, pmConfig *config) { 406 406 407 407 bool status; … … 411 411 psLogMsg("psModules.objects", PS_LOG_INFO, "Source Size classifications: %4s %4s %4s %4s %4s", "Npsf", "Next", "Nsat", "Ncr", "Nskip"); 412 412 413 if (!psphotSourceClassRegion (NULL, &psfClump, sources, recipe, psf, options )) {413 if (!psphotSourceClassRegion (NULL, &psfClump, sources, recipe, psf, options, config)) { 414 414 psLogMsg ("psphot", 4, "Failed to determine source classification for full image\n"); 415 415 } else { … … 439 439 } 440 440 441 if (!psphotSourceClassRegion (region, &psfClump, sources, recipe, psf, options )) {441 if (!psphotSourceClassRegion (region, &psfClump, sources, recipe, psf, options, config)) { 442 442 psLogMsg ("psphot", 4, "Failed to determine source classification for region %f,%f - %f,%f\n", region->x0, region->y0, region->x1, region->y1); 443 443 continue; … … 450 450 } 451 451 452 bool psphotSourceClassRegion (psRegion *region, pmPSFClump *psfClump, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options ) {452 bool psphotSourceClassRegion (psRegion *region, pmPSFClump *psfClump, psArray *sources, psMetadata *recipe, pmPSF *psf, psphotSourceSizeOptions *options, pmConfig *config) { 453 453 454 454 PS_ASSERT_PTR_NON_NULL(sources, false); … … 461 461 int Nskip = 0; 462 462 463 //initiallise mask values to use later on 464 pmSourceMagnitudesInit (config, recipe); 465 463 466 pmSourceMode noMoments = PM_SOURCE_MODE_MOMENTS_FAILURE | PM_SOURCE_MODE_SKYVAR_FAILURE | PM_SOURCE_MODE_SKY_FAILURE | PM_SOURCE_MODE_BELOW_MOMENTS_SN; 464 465 467 // request the pixWeight values as well as the magnitudes 466 468 pmSourcePhotometryMode photMode = PM_SOURCE_PHOT_WEIGHT; … … 502 504 source->mode |= PM_SOURCE_MODE_SIZE_SKIPPED; 503 505 psTrace("psphot", 7, "Not calculating source size since source is not subtracted\n"); 506 pmSourceMaskEval (source, source->maskObj, maskVal); 504 507 Nskip ++; 505 508 continue; … … 512 515 psAssert (source->moments, "why is this source missing moments?"); 513 516 if (source->mode & noMoments) { 517 pmSourceMaskEval (source, source->maskObj, maskVal); 514 518 Nskip ++; 515 519 continue;
Note:
See TracChangeset
for help on using the changeset viewer.
