Changeset 30902
- Timestamp:
- Mar 14, 2011, 3:04:49 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/psModules/src/objects
- Files:
-
- 2 edited
-
pmFootprint.h (modified) (1 diff)
-
pmFootprintCullPeaks.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h
r30865 r30902 85 85 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance 86 86 const float min_threshold, // minimum permitted coll height 87 const float max_threshold // maximum permitted coll height 87 const float max_threshold,// maximum permitted coll height 88 const bool isWeightVar // the input weight may be variance (sigma^2) or S/N (1/sigma) 88 89 ); 89 90 -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c
r30865 r30902 39 39 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance 40 40 const float min_threshold, // minimum permitted coll height 41 const float max_threshold) { // maximum permitted coll height 41 const float max_threshold, 42 const bool isWeightVar 43 ) { // maximum permitted coll height 42 44 assert (img != NULL); assert (img->type.type == PS_TYPE_F32); 43 45 assert (weight != NULL); assert (weight->type.type == PS_TYPE_F32); … … 98 100 // float threshold = subImg->data.F32[y][x] - nsigma_delta*stdev; 99 101 100 const float stdev = sqrt(subWt->data.F32[y][x]); 101 const float flux = subImg->data.F32[y][x]; 102 const float fStdev = fabs(stdev/flux); 103 const float stdev_pad = fabs(flux * hypot(fStdev, fPadding)); 102 float stdev = 0.0; 103 float flux = 0.0; 104 if (isWeightVar) { 105 flux = subImg->data.F32[y][x]; 106 stdev = sqrt(subWt->data.F32[y][x]); 107 } else { 108 flux = subImg->data.F32[y][x]; 109 stdev = flux / sqrt(subWt->data.F32[y][x]); // should be 1/sqrt(subWT) 110 } 111 const float fStdev = fabs(stdev/flux); 112 const float stdev_pad = fabs(flux * hypot(fStdev, fPadding)); 113 104 114 // if flux is negative, careful with fStdev 105 115 … … 124 134 } 125 135 136 // XXX can we / should we use pmFootprintsFind() if the starting footprint is too large? 126 137 // init peakFootprint here? 127 138 pmFootprintsFindAtPoint(peakFootprint, peakFPSpans, subImg, subMask, threshold, brightPeaks, peak->y, peak->x);
Note:
See TracChangeset
for help on using the changeset viewer.
