Changeset 11164
- Timestamp:
- Jan 18, 2007, 6:46:33 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotBasicDeblend.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotBasicDeblend.c
r10803 r11164 27 27 for (int i = 0; i < SN->n; i++) { 28 28 source = sources->data[i]; 29 SN->data.F32[i] = source->peak-> counts;29 SN->data.F32[i] = source->peak->SN; 30 30 } 31 31 psVector *index = psVectorSortIndex (NULL, SN); … … 79 79 // threshold is fraction of the source peak flux 80 80 // image is background subtracted; source->moments->Sky should always be 0.0 81 threshold = FRACTION * source-> moments->Peak;82 // threshold is no less than NSIGMA above the local median sigma?83 threshold = PS_MAX (threshold, NSIGMA *sqrt(source->moments->dSky));81 threshold = FRACTION * source->peak->SN; 82 // threshold is no less than NSIGMA 83 threshold = PS_MAX (threshold, NSIGMA); 84 84 85 85 // generate a basic contour (set of x,y coordinates at-or-below flux level) … … 95 95 // the left boundary and xv[i+1] corresponding to the right boundary 96 96 97 // a blend can only be associated with one primary source 98 97 99 psVector *xv = contour->data[0]; 98 100 psVector *yv = contour->data[1]; 99 101 for (int k = 0; k < overlap->n; k++) { 100 102 testSource = overlap->data[k]; 101 if (testSource->peak->counts > source->peak->counts) continue; 103 if (testSource->mode & PM_SOURCE_MODE_BLEND) continue; 104 if (testSource->peak->value > source->peak->value) continue; 102 105 for (int j = 0; j < xv->n; j+=2) { 103 106 if (fabs(yv->data.F32[j] - testSource->peak->y) > 0.5) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
