Changeset 5828 for trunk/psphot/src/psphotReplaceUnfit.c
- Timestamp:
- Dec 22, 2005, 4:20:27 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReplaceUnfit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReplaceUnfit.c
r5802 r5828 3 3 bool psphotReplaceUnfit (psArray *sources) { 4 4 5 pmModel *model;6 5 pmSource *source; 7 6 … … 11 10 source = sources->data[i]; 12 11 13 // skip non-astronomical objects (very likely defects) 14 // these were never fitted and subtracted 15 if (source->mode & PM_SOURCE_BLEND) continue; 16 if (source->type == PM_SOURCE_SATURATED) continue; 12 if (!(source->mode & PM_SOURCE_TEMPSUB)) continue; 13 if (source->modelPSF == NULL) continue; 17 14 18 if (source->type == PM_SOURCE_DEFECT) { 19 if (source->mode & PM_SOURCE_SUBTRACTED) goto addPSF; 20 continue; 21 } 22 23 if (source->type == PM_SOURCE_GALAXY) { 24 if (source->mode & PM_SOURCE_FAIL) goto addPSF; 25 if (source->mode & PM_SOURCE_POOR) goto addPSF; 26 continue; 27 } 28 29 // need to skip the successful fits 30 if (source->type == PM_SOURCE_STAR) { 31 if (source->mode & PM_SOURCE_FAIL) goto addPSF; 32 if (source->mode & PM_SOURCE_POOR) goto addPSF; 33 continue; 34 } 35 36 addPSF: 37 model = source->modelPSF; 38 if (model == NULL) continue; 39 40 pmSourceAddModel (source->pixels, source->mask, model, false, false); 15 pmSourceAddModel (source->pixels, source->mask, source->modelPSF, false, false); 41 16 source->mode &= ~PM_SOURCE_SUBTRACTED; 17 source->mode &= ~PM_SOURCE_TEMPSUB; 42 18 } 43 psLogMsg ("psphot.replace", 4, "replace models: %f(%d objects)\n", psTimerMark ("psphot"), sources->n);19 psLogMsg ("psphot.replace", 3, "replace unfitted models: %f sec (%d objects)\n", psTimerMark ("psphot"), sources->n); 44 20 return true; 45 21 } 22 23 # if (0) 24 if (source->mode & PM_SOURCE_BLEND) continue; 25 if (source->type == PM_SOURCE_SATURATED) continue; 26 27 if (source->type == PM_SOURCE_DEFECT) { 28 if (source->mode & PM_SOURCE_SUBTRACTED) goto addPSF; 29 continue; 30 } 31 32 if (source->type == PM_SOURCE_GALAXY) { 33 if (source->mode & PM_SOURCE_FAIL) goto addPSF; 34 if (source->mode & PM_SOURCE_POOR) goto addPSF; 35 continue; 36 } 37 38 // need to skip the successful fits 39 if (source->type == PM_SOURCE_STAR) { 40 if (source->mode & PM_SOURCE_FAIL) goto addPSF; 41 if (source->mode & PM_SOURCE_POOR) goto addPSF; 42 continue; 43 } 44 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
