IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2009, 11:48:37 AM (17 years ago)
Author:
eugene
Message:

moved look up of parameters for extended sources fits from psphotReadout to psphotBlendFit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotReadout.c

    r21166 r21250  
    127127    psphotVisualShowPSFModel (readout, psf);
    128128
    129     // Define source fitting parameters for everything that follows PSF fits
    130     // This allows different parameters to be used from the PSF fitting
    131     {
    132         bool status = true;             // Status of MD lookup
    133         int fitIter = psMetadataLookupS32(&status, recipe, "EXT_FIT_ITER"); // Max number of fit iterations
    134         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 tolerance
    139         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 
    156129    // include externally-supplied sources
    157130    psphotLoadExtSources (config, view, sources);
Note: See TracChangeset for help on using the changeset viewer.