Changeset 4901 for trunk/psphot/src/apply_psf_model.c
- Timestamp:
- Aug 29, 2005, 5:44:55 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/apply_psf_model.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/apply_psf_model.c
r4642 r4901 14 14 int Niter = 0; 15 15 16 psMemoryId id = psMemGetId (); 16 17 psTimerStart ("psphot"); 17 18 … … 33 34 34 35 for (int i = 0; i < sources->n; i++) { 36 35 37 psSource *source = sources->data[i]; 36 38 … … 39 41 if (source->type == PS_SOURCE_SATURATED) continue; 40 42 41 // do I even need to test?42 if (source->modelPSF != NULL) {43 psFree (source->modelPSF);44 }45 46 43 // use the source moments, etc to guess basic model parameters 47 psModel *model = pmSourceModelGuess (source, psf->type);44 psModel *modelFLT = pmSourceModelGuess (source, psf->type); 48 45 49 46 // set PSF parameters for this model 50 model = psModelFromPSF (model, psf);47 psModel *model = psModelFromPSF (modelFLT, psf); 51 48 x = model->params->data.F32[2]; 52 49 y = model->params->data.F32[3]; 50 psFree (modelFLT); 53 51 54 52 // set the fit radius based on the object flux limit and the model … … 72 70 psLogMsg ("psphot", 3, "PSF fit failed for %f, %f (%d iterations)\n", x, y, model->nIter); 73 71 source->type = PS_SOURCE_FAIL_FIT_PSF; // better choice? 72 psFree (model); 74 73 continue; 75 74 }
Note:
See TracChangeset
for help on using the changeset viewer.
