Changeset 33839
- Timestamp:
- May 1, 2012, 11:49:02 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotRadialProfileWings.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotRadialProfileWings.c
r33411 r33839 55 55 static float MIN_RADIUS = NAN; 56 56 static float SKY_STDEV = NAN; 57 static float SKY_SLOPE_MIN = NAN; 57 58 // static FILE *file = NULL; 58 59 … … 81 82 82 83 MIN_RADIUS = psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS"); 83 if (!status ) {84 if (!status || (MIN_RADIUS > MAX_RADIUS)) { 84 85 MIN_RADIUS = psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS"); 85 86 } … … 89 90 if (!status) { 90 91 SKY_STDEV = 1.0; // a crude default value (why would this not exist?) 92 } 93 94 // SKY_SLOPE_MIN is the sigma of the sky model (ie, smoothed on large scales) 95 SKY_SLOPE_MIN = psMetadataLookupF32 (&status, recipe, "SKY_SLOPE_MIN"); 96 if (!status) { 97 SKY_SLOPE_MIN = 3.0; 91 98 } 92 99 … … 302 309 limitSlope = slope; 303 310 } 304 if (!limit && isfinite(slope) && (fabs(slope) < 3.0)) {311 if (!limit && isfinite(slope) && (fabs(slope) < SKY_SLOPE_MIN)) { 305 312 // SB no longer changing. 306 313 limit = true; 307 314 // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope 308 315 if (isfinite(lastFlux)) { 309 float interpolatedRadius = lastRadius + lastFlux / 3.0;316 float interpolatedRadius = lastRadius + lastFlux / SKY_SLOPE_MIN; 310 317 if (interpolatedRadius < MAX_RADIUS) { 311 318 limitRadius = interpolatedRadius;
Note:
See TracChangeset
for help on using the changeset viewer.
