Changeset 32318
- Timestamp:
- Sep 5, 2011, 8:58:06 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psphot/src/psphotExtendedSourceFits.c
r32240 r32318 6 6 bool status = true; 7 7 8 fprintf (stdout, "\n"); 9 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Extended Source Fits ---"); 10 8 11 // select the appropriate recipe information 9 12 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); … … 12 15 // perform full extended source non-linear fits? 13 16 if (!psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_FITS")) { 14 psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source measurements\n");17 psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source fits\n"); 15 18 return true; 16 19 } … … 301 304 302 305 // skip PSF-like and non-astronomical objects 303 if ( source->type == PM_SOURCE_TYPE_STAR) continue;306 if (!(source->mode & PM_SOURCE_MODE_EXT_LIMIT)) continue; 304 307 if (source->type == PM_SOURCE_TYPE_DEFECT) continue; 305 308 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; … … 330 333 } 331 334 332 // XXX deprecate?333 // XXX // extFitPars are the non-parametric data measured for this model fit (moments, kron, etc)334 // XXX if (source->extFitPars == NULL) {335 // XXX source->extFitPars = psArrayAllocEmpty (models->list->n);336 // XXX }337 338 335 // loop here over the models chosen for each source (exclude by S/N) 339 336 psMetadataIterator *iter = psMetadataIteratorAlloc (models, PS_LIST_HEAD, NULL); … … 346 343 347 344 // check the SNlim and skip model if source is too faint 348 float SNlim= psMetadataLookupF32 (&status, model, "SNLIM_VALUE");345 float FIT_SN_LIM = psMetadataLookupF32 (&status, model, "SNLIM_VALUE"); 349 346 assert (status); 350 347 351 348 // limit selection to some SN limit 352 349 // assert (source->peak); // how can a source not have a peak? 353 if (sqrt(source->peak->detValue) < SNlim) { 350 // limit selection to some SN limit 351 bool skipSource = false; 352 if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) { 353 skipSource = (source->moments->KronFlux < FIT_SN_LIM * source->moments->KronFluxErr); 354 } else { 355 skipSource = (sqrt(source->peak->detValue) < FIT_SN_LIM); 356 } 357 if (skipSource) { 354 358 Nfaint ++; 355 359 continue;
Note:
See TracChangeset
for help on using the changeset viewer.
