IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7506


Ignore:
Timestamp:
Jun 9, 2006, 6:24:40 PM (20 years ago)
Author:
eugene
Message:

added error check on psphotRoughClass

File:
1 edited

Legend:

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

    r7435 r7506  
    2121    psphotModelTest (readout, recipe);
    2222
    23     // generate a background model (median, smoothed image)
    24     psphotImageMedian (config, view);
    25 
    2623    // psphotSaveImage (NULL, readout->image,  "image.fits");
    2724    // psphotSaveImage (NULL, readout->mask,   "mask.fits");
    2825    // psphotSaveImage (NULL, readout->weight, "weight.fits");
     26
     27    // generate a background model (median, smoothed image)
     28    psphotImageMedian (config, view);
    2929
    3030    // find the peaks in the image
     
    3737    // classify sources based on moments, brightness
    3838    // faint sources not classified?
    39     psphotRoughClass (sources, recipe);
     39    if (!psphotRoughClass (sources, recipe)) {
     40        psFree (peaks);
     41        psFree (sources);
     42        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
     43        pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
     44        pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
     45        return false;
     46    }
    4047
    4148    // mark blended peaks PS_SOURCE_BLEND
Note: See TracChangeset for help on using the changeset viewer.