- Timestamp:
- Sep 5, 2011, 8:45:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psphot/src/psphotExtendedSourceAnalysis.c
r32238 r32310 7 7 { 8 8 bool status = true; 9 10 fprintf (stdout, "\n"); 11 psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Extended Source Analysis (Petrosians) ---"); 9 12 10 13 // select the appropriate recipe information … … 204 207 pmSource *source = sources->data[i]; 205 208 209 // if we have checked the source validity on the basis of the object set, then 210 // we either skip these tests below or we skip the source completely 211 if (source->tmpFlags & PM_SOURCE_TMPF_STACK_SKIP) continue; 212 if (source->tmpFlags & PM_SOURCE_TMPF_STACK_KEEP) goto keepSource; 213 206 214 // skip PSF-like and non-astronomical objects 207 215 if (source->type == PM_SOURCE_TYPE_DEFECT) continue; … … 217 225 218 226 // limit selection to some SN limit 219 assert (source->peak); // how can a source not have a peak? 220 if (sqrt(source->peak->detValue) < SN_LIM) continue; 221 222 // limit selection by analysis region 227 // assert (source->peak); // how can a source not have a peak? 228 // limit selection to some SN limit 229 bool skipSource = false; 230 if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) { 231 skipSource = (source->moments->KronFlux < SN_LIM * source->moments->KronFluxErr); 232 } else { 233 skipSource = (sqrt(source->peak->detValue) < SN_LIM); 234 } 235 if (skipSource) continue; 236 237 // limit selection by analysis region (this automatically apply 223 238 if (source->peak->x < region->x0) continue; 224 239 if (source->peak->y < region->y0) continue; 225 240 if (source->peak->x > region->x1) continue; 226 241 if (source->peak->y > region->y1) continue; 242 243 keepSource: 227 244 228 245 // replace object in image
Note:
See TracChangeset
for help on using the changeset viewer.
