Changeset 32996 for trunk/psphot/src/psphotRadialProfileWings.c
- Timestamp:
- Dec 22, 2011, 9:00:06 AM (14 years ago)
- Location:
- trunk/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20111122/psphot (added) merged: 32850,32924
- Property svn:mergeinfo changed
-
trunk/psphot/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20111122/psphot/src (added) merged: 32850,32924
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotRadialProfileWings.c
r32776 r32996 80 80 } 81 81 82 MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS");82 MIN_RADIUS = psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS"); 83 83 if (!status) { 84 MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS");84 MIN_RADIUS = psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS"); 85 85 } 86 86 … … 209 209 # define TEST_Y 3096 210 210 211 float InterpolateValues (float X0, float Y0, float X1, float Y1, float X); 212 211 213 // XXX use integer radius values? the rings assume integer values, right? or do they? 212 214 bool psphotRadialProfileWingsSource (pmSource *source, pmReadout *readout, psImageMaskType maskVal) { … … 226 228 227 229 // radii will be MIN_RADIUS to MAX_RADIUS in NN log steps: 228 float NSTEP = 10.0;230 float NSTEP = 25.0; 229 231 float MIN_DR = 2; 230 232 float NSIGMA = 1.0; … … 288 290 // fprintf (stderr, "%f %f : %f : %f %f : %f\n", source->peak->xf, source->peak->yf, radius, meanFlux, meanFluxError, slope); 289 291 290 if (!limit) { 291 limit |= (meanFlux - NSIGMA * meanFluxError < THRESHOLD); // dropped to sky level 292 limit |= isfinite(slope) && (fabs(slope) < 3.0); // SB no longer changing. 293 limitRadius = meanRadius; 292 if (!limit && (meanFlux - NSIGMA * meanFluxError < THRESHOLD)) { 293 // dropped to sky level 294 limit = true; 295 // linearly interpolate to the radius at which we hit the sky 296 if (isfinite(lastFlux)) { 297 limitRadius = InterpolateValues(lastFlux, lastRadius, meanFlux, meanRadius, 0.0); 298 } else { 299 limitRadius = meanRadius; 300 } 301 limitFlux = meanFlux; 302 limitSlope = slope; 303 } 304 if (!limit && isfinite(slope) && (fabs(slope) < 3.0)) { 305 // SB no longer changing. 306 limit = true; 307 // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope 308 if (isfinite(lastFlux)) { 309 limitRadius = lastRadius + lastFlux / 3.0; 310 } else { 311 limitRadius = meanRadius; 312 } 294 313 limitFlux = meanFlux; 295 314 limitSlope = slope;
Note:
See TracChangeset
for help on using the changeset viewer.
