Changeset 25958
- Timestamp:
- Oct 27, 2009, 3:49:50 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceStats.c
r25852 r25958 242 242 243 243 // this function attempts to iteratively determine the best value for sigma of the moments weighting Gaussian 244 // this function modifies the recipe values MOMENTS_SX_MAX, MOMENTS_SY_MAX, and PSF_CLUMP_GRID_SCALE, used by pmSourcePSFClump 244 245 bool psphotSetMomentsWindow (psMetadata *recipe, psMetadata *analysis, psArray *sources) { 245 246 … … 250 251 251 252 // XXX move this to a config file? 252 float sigma[4] = {1.0, 2.0, 3.0, 4.5}; 253 float Sout[4]; 253 # define NSIGMA 8 254 float sigma[NSIGMA] = {1.0, 2.0, 3.0, 4.5, 6.0, 9.0, 12.0, 18.0}; 255 float Sout[NSIGMA]; 254 256 255 257 // this sorts by peak->SN … … 257 259 258 260 // loop over radii: 259 for (int i = 0; i < 4; i++) {261 for (int i = 0; i < NSIGMA; i++) { 260 262 261 263 // XXX move max source number to config … … 302 304 303 305 // we are looking for sigma for which Sout = 0.65 (or some other value) 304 305 306 float Sigma = NAN; 306 307 float minS = Sout[0]; 307 308 float maxS = Sout[0]; 308 for (int i = 0; i < 4; i++) {309 for (int i = 0; i < NSIGMA; i++) { 309 310 minS = PS_MIN(Sout[i], minS); 310 311 maxS = PS_MAX(Sout[i], maxS); … … 313 314 if (maxS < 0.65) Sigma = sigma[0]; 314 315 315 for (int i = 0; i < 3; i++) {316 for (int i = 0; i < NSIGMA - 1; i++) { 316 317 if ((Sout[i] > 0.65) && (Sout[i+1] > 0.65)) continue; 317 318 if ((Sout[i] < 0.65) && (Sout[i+1] < 0.65)) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
