IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13304


Ignore:
Timestamp:
May 7, 2007, 5:02:08 PM (19 years ago)
Author:
Paul Price
Message:

Don't generate mask if it already exists --- don't want existing version clobbered.

File:
1 edited

Legend:

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

    r13225 r13304  
    2424
    2525    // generate mask & weight images if they don't already exit
    26     if (!pmReadoutGenerateMaskWeight (readout, true)) {
     26    if ((!readout->mask && !pmReadoutGenerateMask(readout)) ||
     27        (!readout->weight && !pmReadoutGenerateWeight(readout, true))) {
    2728        psError (PSPHOT_ERR_CONFIG, false, "trouble creating mask and/or weight");
    2829        return false;
     
    7172
    7273    if (!peaks) {
    73         psLogMsg ("psphot", 3, "unable to find peaks in this image");
    74         return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);
     74        psLogMsg ("psphot", 3, "unable to find peaks in this image");
     75        return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);
    7576    }
    7677
     
    9192    // mark blended peaks PS_SOURCE_BLEND
    9293    if (!psphotBasicDeblend (sources, recipe)) {
    93         psLogMsg ("psphot", 3, "failed on deblend analysis");
    94         return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     94        psLogMsg ("psphot", 3, "failed on deblend analysis");
     95        return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
    9596    }
    9697
    9798    // classify sources based on moments, brightness
    9899    if (!psphotRoughClass (sources, recipe)) {
    99         psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    100         return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     100        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
     101        return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
    101102    }
    102103    if (!strcasecmp (breakPt, "MOMENTS")) {
     
    107108    pmPSF *psf = psphotLoadPSF (config, view, recipe);
    108109    if (!psf) {
    109         // use bright stellar objects to measure PSF
    110         psf = psphotChoosePSF (readout, sources, recipe);
    111         if (psf == NULL) {
    112             psLogMsg ("psphot", 3, "failure to construct a psf model");
    113             return psphotReadoutCleanup (config, readout, recipe, psf, sources);
    114         }
     110        // use bright stellar objects to measure PSF
     111        psf = psphotChoosePSF (readout, sources, recipe);
     112        if (psf == NULL) {
     113            psLogMsg ("psphot", 3, "failure to construct a psf model");
     114            return psphotReadoutCleanup (config, readout, recipe, psf, sources);
     115        }
    115116    }
    116117    if (!strcasecmp (breakPt, "PSFMODEL")) {
     
    121122    psphotLoadExtSources (config, view, sources);
    122123
    123     // construct an initial model for each object 
     124    // construct an initial model for each object
    124125    psphotGuessModels (readout, sources, recipe, psf);
    125126
    126     // XXX test output of models 
     127    // XXX test output of models
    127128    // psphotTestSourceOutput (readout, sources, recipe, psf);
    128129
     
    205206finish:
    206207
    207     // plot positive sources 
     208    // plot positive sources
    208209    // psphotSourcePlots (readout, sources, recipe);
    209210
Note: See TracChangeset for help on using the changeset viewer.