Changeset 32348 for trunk/psphot/src/psphotBlendFit.c
- Timestamp:
- Sep 6, 2011, 1:32:31 PM (15 years ago)
- Location:
- trunk/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
trunk/psphot/src
- Property svn:ignore
-
old new 22 22 psphotMakePSF 23 23 psphotStack 24 psphotModelTest
-
- Property svn:ignore
-
trunk/psphot/src/psphotBlendFit.c
r31452 r32348 5 5 { 6 6 bool status = true; 7 8 fprintf (stdout, "\n"); 9 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Fit Sources (Non-Linear) ---"); 7 10 8 11 // select the appropriate recipe information … … 186 189 psFree (fitOptions); 187 190 188 psLogMsg ("psphot.psphotBlendFit", PS_LOG_ INFO, "fit models: %f sec for %d objects (%d psf, %d ext, %d failed, %ld skipped)\n", psTimerMark ("psphot.fit.nonlinear"), Nfit, Npsf, Next, Nfail, sources->n - Nfit);191 psLogMsg ("psphot.psphotBlendFit", PS_LOG_WARN, "fit models: %f sec for %d objects (%d psf, %d ext, %d failed, %ld skipped)\n", psTimerMark ("psphot.fit.nonlinear"), Nfit, Npsf, Next, Nfail, sources->n - Nfit); 189 192 190 193 psphotVisualShowResidualImage (readout, false); … … 233 236 pmSource *source = sources->data[i]; 234 237 238 # define TEST_X -420.0 239 # define TEST_Y 300.0 240 241 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) { 242 fprintf (stderr, "test galaxy\n"); 243 } 244 245 # undef TEST_X 246 # undef TEST_Y 247 235 248 // skip non-astronomical objects (very likely defects) 236 249 if (source->mode & PM_SOURCE_MODE_BLEND) continue; … … 246 259 247 260 // limit selection to some SN limit 248 if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue; 249 261 if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) { 262 if (source->moments->KronFlux < FIT_SN_LIM * source->moments->KronFluxErr) continue; 263 } else { 264 if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue; 265 } 250 266 // exclude sources outside optional analysis region 251 267 if (source->peak->xf < AnalysisRegion.x0) continue; … … 267 283 } 268 284 269 // replace object in image 285 // replace object in image & remove excess noise 270 286 if (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED) { 271 287 pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal); … … 305 321 Nfail ++; 306 322 307 // re-subtract the object, leave local sky 323 // re-subtract the object, leave local sky, re-bump noise 308 324 pmSourceCacheModel (source, maskVal); 309 325 pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
Note:
See TracChangeset
for help on using the changeset viewer.
