IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20330


Ignore:
Timestamp:
Oct 22, 2008, 11:46:51 AM (18 years ago)
Author:
Paul Price
Message:

Don't want to save sources --- we're already holding them elsewhere,
and trying to save them can make for an error (due to required
uniqueness of PSPHOT.SOURCES on the readout->analysis MD).

File:
1 edited

Legend:

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

    r20085 r20330  
    3131    // XXX this requires sources to be supplied as PSPHOT.INPUT.CMF
    3232    pmDetections *detections = psphotLoadPSFSources (config, view);
    33     if (detections == NULL) {
    34       psLogMsg ("psphot", 3, "problem loading psf stars");
    35       return psphotReadoutCleanup (config, readout, recipe, detections, NULL, NULL);
    36     }
    37     if (detections->peaks == NULL) {
    38       psLogMsg ("psphot", 3, "no psf stars supplied");
    39       return psphotReadoutCleanup (config, readout, recipe, detections, NULL, NULL);
     33    if (!detections || !detections->peaks) {
     34        psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars");
     35        return psphotReadoutCleanup(config, readout, recipe, detections, NULL, NULL);
    4036    }
    4137
    4238    // construct sources and measure basic stats (moments, local sky)
    43     psArray *sources = psphotSourceStats (readout, recipe, detections);
     39    psArray *sources = psphotSourceStats(readout, recipe, detections);
    4440    if (!sources) return false;
    4541
     
    5147    }
    5248
    53     pmPSF *psf = psphotChoosePSF (readout, sources, recipe);
    54     if (psf == NULL) {
    55       psLogMsg ("psphot", 3, "failure to construct a psf model");
    56       return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
     49    pmPSF *psf = psphotChoosePSF(readout, sources, recipe);
     50    if (!psf) {
     51        psWarning("Failed to construct a psf model");
     52        psFree(sources);
     53        return psphotReadoutCleanup(config, readout, recipe, detections, NULL, NULL);
    5754    }
    58     psphotVisualShowPSFModel (readout, psf);
     55    psphotVisualShowPSFModel(readout, psf);
    5956
    6057    // drop the references to the image pixels held by each source
    61     psphotSourceFreePixels (sources);
     58    psphotSourceFreePixels(sources);
     59    psFree(sources);
    6260
    6361    // create the exported-metadata and free local data
    64     return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);
     62    return psphotReadoutCleanup(config, readout, recipe, detections, psf, NULL);
    6563}
Note: See TracChangeset for help on using the changeset viewer.