Changeset 21250 for trunk/psphot/src/psphotReadout.c
- Timestamp:
- Feb 1, 2009, 11:48:37 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadout.c
r21166 r21250 127 127 psphotVisualShowPSFModel (readout, psf); 128 128 129 // Define source fitting parameters for everything that follows PSF fits130 // This allows different parameters to be used from the PSF fitting131 {132 bool status = true; // Status of MD lookup133 int fitIter = psMetadataLookupS32(&status, recipe, "EXT_FIT_ITER"); // Max number of fit iterations134 if (!status || fitIter <= 0) {135 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "EXT_FIT_ITER is not positive");136 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);137 }138 float fitTol = psMetadataLookupF32 (&status, recipe, "EXT_FIT_TOL"); // Fit tolerance139 if (!status || !isfinite(fitTol) || fitTol <= 0) {140 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "EXT_FIT_TOL is not positive");141 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);142 }143 bool poisson = psMetadataLookupBool(&status, recipe, "POISSON.ERRORS.PHOT.LMM"); // Poisson errors?144 if (!status) {145 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "POISSON.ERRORS.PHOT.LMM is not defined");146 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);147 }148 float skySig = psMetadataLookupF32(&status, recipe, "SKY_SIG");149 if (!status || !isfinite(skySig) || skySig <= 0) {150 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "SKY_SIG is not positive");151 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);152 }153 pmSourceFitModelInit(fitIter, fitTol, PS_SQR(skySig), poisson);154 }155 156 129 // include externally-supplied sources 157 130 psphotLoadExtSources (config, view, sources);
Note:
See TracChangeset
for help on using the changeset viewer.
