Changeset 10201
- Timestamp:
- Nov 26, 2006, 12:35:10 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReplaceUnfit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReplaceUnfit.c
r9576 r10201 10 10 source = sources->data[i]; 11 11 12 if (!(source->mode & PM_SOURCE_MODE_TEMPSUB)) continue; 12 // replace other sources? 13 if (source->mode & PM_SOURCE_MODE_FAIL) goto replace; 14 continue; 15 16 replace: 13 17 if (source->modelPSF == NULL) continue; 14 18 … … 23 27 return true; 24 28 } 29 30 bool psphotReplaceAll (psArray *sources) { 31 32 pmSource *source; 33 34 psTimerStart ("psphot"); 35 36 for (int i = 0; i < sources->n; i++) { 37 source = sources->data[i]; 38 39 // replace other sources? 40 if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue; 41 42 // select appropriate model 43 pmModel *model = pmSourceGetModel (NULL, source); 44 if (model == NULL) continue; // model must be defined 45 46 psTrace ("psphot", 3, "replacing object at %f,%f\n", 47 model->params->data.F32[2], model->params->data.F32[3]); 48 49 pmModelAdd (source->pixels, source->mask, model, false, false); 50 source->mode &= ~PM_SOURCE_MODE_SUBTRACTED; 51 } 52 psLogMsg ("psphot.replace", 3, "replace models: %f sec (%ld objects)\n", psTimerMark ("psphot"), sources->n); 53 return true; 54 }
Note:
See TracChangeset
for help on using the changeset viewer.
