IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9519


Ignore:
Timestamp:
Oct 12, 2006, 11:48:41 AM (20 years ago)
Author:
eugene
Message:

added error checks to psphotReadoutCleanup

File:
1 edited

Legend:

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

    r9270 r9519  
    4040
    4141    if (!strcasecmp (breakPt, "PEAKS")) {
    42         psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     42        if (!psphotReadoutCleanup (config, readout, recipe, NULL, sources)) return false;
    4343        return true;
    4444    }
     
    5757    }
    5858    if (!strcasecmp (breakPt, "MOMENTS")) {
    59         psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     59        if (!psphotReadoutCleanup (config, readout, recipe, NULL, sources)) return false;
    6060        return true;
    6161    }
     
    6464    pmPSF *psf = psphotChoosePSF (readout, sources, recipe);
    6565    if (!strcasecmp (breakPt, "PSFMODEL")) {
    66         psphotReadoutCleanup (config, readout, recipe, psf, sources);
     66        if (!psphotReadoutCleanup (config, readout, recipe, psf, sources)) return false;
    6767        return true;
    6868    }
     
    7171    psphotEnsemblePSF (readout, sources, recipe, psf, FALSE);
    7272    if (!strcasecmp (breakPt, "ENSEMBLE")) {
    73         psphotReadoutCleanup (config, readout, recipe, psf, sources);
     73        if (!psphotReadoutCleanup (config, readout, recipe, psf, sources)) return false;
    7474        return true;
    7575    }
     
    9494        psTrace ("psphotReadout", 4, "failure on psphotApResid");
    9595        psError(PSPHOT_ERR_PHOTOM, false, "Measure aperture photometry corrections");
    96         psphotReadoutCleanup (config, readout, recipe, psf, sources);
    9796        return false;
    9897    }
     
    109108
    110109    // create the exported-metadata and free local data
    111     psphotReadoutCleanup (config, readout, recipe, psf, sources);
     110    if (!psphotReadoutCleanup (config, readout, recipe, psf, sources)) return false;
    112111    return true;
    113112}
     
    117116    // use the psf-model to measure FWHM stats
    118117    if (psf) {
    119         psphotPSFstats (readout, recipe, psf);
    120     } else {
    121         psphotMomentsStats (readout, recipe, sources);
     118        if (!psphotPSFstats (readout, recipe, psf)) {
     119            psError(PS_ERR_IO, true, "Failed to measure PSF shape parameters");
     120            return false;
     121        }
     122    } else if (sources) {
     123        if (!psphotMomentsStats (readout, recipe, sources)) {
     124            psError(PS_ERR_IO, true, "Failed to measure Moment shape parameters");
     125            return false;
     126        }
    122127    }
    123128
Note: See TracChangeset for help on using the changeset viewer.