Changeset 32850
- Timestamp:
- Dec 2, 2011, 11:42:55 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20111122/psphot
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
src (modified) (1 prop)
-
src/psphotKronIterate.c (modified) (3 diffs)
-
src/psphotRadialProfileWings.c (modified) (4 diffs)
-
src/psphotStackImageLoop.c (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/psphot
- Property svn:mergeinfo changed
/trunk/psphot (added) merged: 32776
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20111122/psphot/src
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20111122/psphot/src/psphotKronIterate.c
r32633 r32850 111 111 112 112 pmSource *source = sources->data[i]; 113 if (!source->peak) continue; // XXX how can we have a peak-less source?114 115 // allocate space for moments116 if (!source->moments) continue;117 113 118 114 // set a window function for each source based on the moments 115 // (this skips really bad sources (no peak, no moments, DEFECT) 119 116 psphotKronWindowSetSource (source, kronWindow, false, true); 120 117 } … … 221 218 222 219 // XXX TEST : use a window based on the radial profile numbers: max is skyRadius, min is RADIUS 223 float maxWindow = source->skyRadius; 220 // if we lack the skyRadius (eg MATCHED sources), go to the default value 221 float maxWindow = isfinite(source->skyRadius) ? source->skyRadius : RADIUS; 224 222 float windowRadius = PS_MAX(RADIUS, maxWindow); 225 223 … … 400 398 401 399 if (!source) return false; 400 if (!source->peak) return false; // XXX how can we have a peak-less source? 402 401 if (!source->moments) return false; 402 if (source->type == PM_SOURCE_TYPE_DEFECT) return false; 403 if (source->type == PM_SOURCE_TYPE_SATURATED) return false; 403 404 psAssert(kronWindow, "need a window"); 404 405 -
branches/eam_branches/ipp-20111122/psphot/src/psphotRadialProfileWings.c
r32738 r32850 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) { … … 223 225 if (isfinite(source->skyRadius)) return true; 224 226 227 if (source->mode2 & PM_SOURCE_MODE2_MATCHED) return true; // skip matched sources (no signal) 228 225 229 // radii will be MIN_RADIUS to MAX_RADIUS in NN log steps: 226 float NSTEP = 10.0;230 float NSTEP = 25.0; 227 231 float MIN_DR = 2; 228 232 float NSIGMA = 1.0; … … 286 290 // fprintf (stderr, "%f %f : %f : %f %f : %f\n", source->peak->xf, source->peak->yf, radius, meanFlux, meanFluxError, slope); 287 291 288 if (!limit) { 289 limit |= (meanFlux - NSIGMA * meanFluxError < THRESHOLD); // dropped to sky level 290 limit |= isfinite(slope) && (fabs(slope) < 3.0); // SB no longer changing. 291 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 } 292 313 limitFlux = meanFlux; 293 314 limitSlope = slope; -
branches/eam_branches/ipp-20111122/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo set to
Note:
See TracChangeset
for help on using the changeset viewer.
