- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotFindFootprints.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/psphot
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/psphot merged eligible /branches/eam_branches/stackphot.20100406/psphot 27622-27655 /branches/pap_delete/psphot 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/psphot/src
- Property svn:ignore
-
old new 18 18 psphotVersionDefinitions.h 19 19 psphotMomentsStudy 20 psphotPetrosianStudy 21 psphotForced 22 psphotMakePSF 23 psphotStack
-
- Property svn:ignore
-
branches/simtest_nebulous_branches/psphot/src/psphotFindFootprints.c
r24274 r27840 1 1 # include "psphotInternal.h" 2 2 3 bool psphotFindFootprints (pmDetections *detections, psImage *significance, pmReadout *readout, psMetadata *recipe, const int pass, psImageMaskType maskVal) {3 bool psphotFindFootprints (pmDetections *detections, psImage *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int pass, psImageMaskType maskVal) { 4 4 5 5 bool status; … … 9 9 int npixMin = psMetadataLookupS32(&status, recipe, "FOOTPRINT_NPIXMIN"); 10 10 PS_ASSERT (status, false); 11 12 float FOOTPRINT_NSIGMA_LIMIT;13 if (pass == 1) {14 FOOTPRINT_NSIGMA_LIMIT = psMetadataLookupS32(&status, recipe, "FOOTPRINT_NSIGMA_LIMIT");15 } else {16 FOOTPRINT_NSIGMA_LIMIT = psMetadataLookupS32(&status, recipe, "FOOTPRINT_NSIGMA_LIMIT_2");17 }18 PS_ASSERT (status, false);19 20 // XXX do we need to use the same threshold here as for peaks? does it make sense for21 // these to be different?22 23 float threshold = PS_SQR(FOOTPRINT_NSIGMA_LIMIT);24 11 25 12 int growRadius = 0; … … 54 41 if (pass == 2) { 55 42 // merge in old peaks; 56 const int includePeaks = 0x0 | 0x2; // i.e. just from newFootprints 57 58 // XXX EAM : still not sure I understand this: are we double-couning or undercounting peaks 43 const int includePeaks = 0x1 | 0x2; // i.e. both new and old footprints 59 44 60 45 psArray *mergedFootprints = pmFootprintArraysMerge(detections->footprints, footprints, includePeaks); … … 63 48 psFree(footprints); 64 49 psFree(detections->footprints); 50 51 // replace the merged footprints on the detection structure 65 52 detections->footprints = mergedFootprints; 66 53 } else { … … 68 55 } 69 56 70 psphotCullPeaks(readout ->image, readout->variance, recipe, detections->footprints);57 psphotCullPeaks(readout, recipe, detections->footprints); 71 58 detections->peaks = pmFootprintArrayToPeaks(detections->footprints); 72 59 psLogMsg ("psphot", PS_LOG_INFO, "%ld peaks, %ld total footprints: %f sec\n", detections->peaks->n, detections->footprints->n, psTimerMark ("psphot.footprints")); … … 74 61 return detections; 75 62 } 63 64 bool psphotCheckFootprints (pmDetections *detections) { 65 66 // check for messed up footprints in the old peaks 67 for (int i = 0; i < detections->oldPeaks->n; i++) { 68 pmPeak *peak = detections->oldPeaks->data[i]; 69 pmFootprint *footprint = peak->footprint; 70 if (!footprint) continue; 71 for (int j = 0; j < footprint->spans->n; j++) { 72 pmSpan *sp = footprint->spans->data[j]; 73 psAssert (sp, "missing span"); 74 } 75 } 76 return true; 77 }
Note:
See TracChangeset
for help on using the changeset viewer.
