Changeset 18865 for trunk/psphot/src/psphotChoosePSF.c
- Timestamp:
- Aug 1, 2008, 2:50:07 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotChoosePSF.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r18582 r18865 64 64 assert (status); 65 65 66 // XXX ROBUST seems to be too agressive given the small numbers. 66 // XXX ROBUST seems to be too agressive given the small numbers. 67 67 // options->stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 68 68 options->stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); … … 74 74 options->psfFieldYo = readout->image->row0; 75 75 76 pmSourceFitModelInit (15, 0.01, PS_SQR(SKY_SIG), options->poissonErrorsPhotLMM); 76 int fitIter = psMetadataLookupS32(&status, recipe, "PSF_FIT_ITER"); // Maximum number of fit iterations 77 if (!status || fitIter <= 0) { 78 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "PSF_FIT_ITER is not positive"); 79 return false; 80 } 81 float fitTol = psMetadataLookupF32 (&status, recipe, "PSF_FIT_TOL"); // Fit tolerance 82 if (!status || !isfinite(fitTol) || fitTol <= 0) { 83 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "PSF_FIT_TOL is not positive"); 84 return false; 85 } 86 pmSourceFitModelInit(fitIter, fitTol, PS_SQR(SKY_SIG), options->poissonErrorsPhotLMM); 77 87 78 88 psArray *stars = psArrayAllocEmpty (sources->n); … … 188 198 bool mdok; // Status of MD lookup 189 199 if (!psMetadataLookupBool(&mdok, recipe, PSPHOT_RECIPE_PSF_FAKE_ALLOW)) { 190 psFree (modelNames);191 psFree(options);200 psFree (modelNames); 201 psFree(options); 192 202 return NULL; 193 203 } 194 204 195 205 // generate a psf model using the first selection 196 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "Using guess PSF model");206 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "Using guess PSF model"); 197 207 198 208 // unset the PSFSTAR flags (none are used):
Note:
See TracChangeset
for help on using the changeset viewer.
