- Timestamp:
- Mar 16, 2011, 3:41:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceOutputs.c
r30931 r30935 180 180 return true; 181 181 } 182 183 // this function decides if the source position should be based on the peak or the moments.184 // this is only used if we know we should not use a model fit position (eg, no model, or no185 // model yet)186 bool pmSourcePositionUseMoments(pmSource *source) {187 188 if (!source->moments) return false; // can't if there are no moments189 if (!source->moments->nPixels) return false; // can't if the moments were not measured190 if (source->mode && PM_SOURCE_MODE_MOMENTS_FAILURE) return false; // can't if the moments failed...191 192 if (source->mode & PM_SOURCE_MODE_SATSTAR) return true; // moments are best for SATSTARs193 194 float dX = source->moments->Mx - source->peak->xf;195 float dY = source->moments->My - source->peak->yf;196 float dR = hypot(dX, dY);197 198 // only use the moments position if the moment-peak offset is small or the star is saturated199 if (dR > 1.5) return false200 201 return true;202 }
Note:
See TracChangeset
for help on using the changeset viewer.
