- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (2 props)
-
psphot/src/psphotBlendFit.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psphot/src
- Property svn:ignore
-
old new 22 22 psphotMakePSF 23 23 psphotStack 24 psphotModelTest
-
- Property svn:mergeinfo set to
- Property svn:ignore
-
branches/meh_branches/ppstack_test/psphot/src/psphotBlendFit.c
r31452 r33415 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 … … 148 151 149 152 // wait for the threads to finish and manage results 150 if (!psThreadPoolWait (false )) {153 if (!psThreadPoolWait (false, true)) { 151 154 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); 152 155 psFree (fitOptions); … … 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 # if (0) 239 # define TEST_X 34 240 # define TEST_Y 28 241 242 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) { 243 fprintf (stderr, "test object\n"); 244 } 245 246 # undef TEST_X 247 # undef TEST_Y 248 # endif 249 235 250 // skip non-astronomical objects (very likely defects) 236 251 if (source->mode & PM_SOURCE_MODE_BLEND) continue; … … 246 261 247 262 // limit selection to some SN limit 248 if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue; 249 263 if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) { 264 if (source->moments->KronFlux < FIT_SN_LIM * source->moments->KronFluxErr) continue; 265 } else { 266 if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue; 267 } 250 268 // exclude sources outside optional analysis region 251 269 if (source->peak->xf < AnalysisRegion.x0) continue; … … 267 285 } 268 286 269 // replace object in image 287 // replace object in image & remove excess noise 270 288 if (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED) { 271 289 pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal); … … 305 323 Nfail ++; 306 324 307 // re-subtract the object, leave local sky 325 // re-subtract the object, leave local sky, re-bump noise 308 326 pmSourceCacheModel (source, maskVal); 309 327 pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
Note:
See TracChangeset
for help on using the changeset viewer.
