Changeset 6379 for trunk/psphot/src/psphotChoosePSF.c
- Timestamp:
- Feb 7, 2006, 8:52:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotChoosePSF.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r6117 r6379 1 1 # include "psphot.h" 2 2 3 // 2006.02.07 : no leaks! 3 4 // try PSF models and select best option 4 5 pmPSF *psphotChoosePSF (psMetadata *config, psArray *sources, psStats *skystats) { … … 8 9 pmPSFtry *try = NULL; 9 10 psArray *stars = NULL; 10 psMetadataItem *item = NULL;11 11 12 12 psTimerStart ("psphot"); … … 37 37 psMetadataItem *mdi = psMetadataLookup (config, "PSF_MODEL"); 38 38 if (mdi == NULL) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection"); 39 39 40 if (mdi->type == PS_DATA_STRING) { 40 41 list = psListAlloc(NULL); … … 51 52 psListIterator *iter = psListIteratorAlloc (list, PS_LIST_HEAD, FALSE); 52 53 for (int i = 0; i < models->n; i++) { 53 54 item = psListGetAndIncrement (iter); 54 // XXX psListGetAndIncrement does not increment ref counter!? 55 // XXX if it did, i should free 'item' below 56 psMetadataItem *item = psListGetAndIncrement (iter); 55 57 modelName = item->data.V; 56 57 58 models->data[i] = pmPSFtryModel (stars, modelName, RADIUS); 58 psFree (modelName); 59 psFree (item); 59 // psFree (item); 60 60 } 61 61 psFree (iter); … … 98 98 psLogMsg ("psphot.pspsf", 3, "selected psf model %s, ApResid: %f +/- %f\n", modelName, psf->ApResid, psf->dApResid); 99 99 100 char *breakPt = psMetadataLookup Ptr (&status, config, "BREAK_POINT");100 char *breakPt = psMetadataLookupStr (&status, config, "BREAK_POINT"); 101 101 if (!strcasecmp (breakPt, "PSFFIT")) exit (0); 102 102
Note:
See TracChangeset
for help on using the changeset viewer.
