IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2007, 4:48:20 PM (19 years ago)
Author:
eugene
Message:

added deblend for saturated stars, fixed AddNoise

File:
1 edited

Legend:

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

    r12665 r12689  
    6161        return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);
    6262    }
     63    pmPeaksWriteText (peaks, "oldpeaks.dat");
    6364
    6465    // construct sources and measure basic stats
     
    7071        return psphotReadoutCleanup(config, readout, recipe, NULL, sources);
    7172    }
     73
     74    psphotDeblendSatstars (sources, recipe);
    7275
    7376    // mark blended peaks PS_SOURCE_BLEND
     
    102105    psphotGuessModels (readout, sources, recipe, psf);
    103106
     107    psphotSaveImage (NULL, readout->image,  "image.v0.fits");
     108
    104109    // linear PSF fit to peaks
    105110    psphotEnsemblePSF (readout, sources, recipe, psf, FALSE);
     111    psphotSaveImage (NULL, readout->image,  "image.v1.fits");
    106112    if (!strcasecmp (breakPt, "ENSEMBLE")) {
    107113        goto finish;
    108114    }
    109115
    110     // plot positive + negative sources (replace, then remove)
    111     psphotSourcePlots (readout, sources, recipe);
    112 
    113116    // non-linear PSF and EXT fit to brighter sources
    114117    psphotBlendFit (readout, sources, recipe, psf);
     118    psphotSaveImage (NULL, readout->image,  "image.v2.fits");
    115119
    116120    // replace all sources
    117121    psphotReplaceAll (sources);
    118 
    119     // plot positive sources
    120     // psphotSourcePlots (readout, sources, recipe);
     122    psphotSaveImage (NULL, readout->image,  "image.v3.fits");
    121123
    122124    // linear PSF fit to remaining peaks
    123125    psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
     126    psphotSaveImage (NULL, readout->image,  "image.v4.fits");
    124127    if (!strcasecmp (breakPt, "PASS1")) {
    125128        goto finish;
     
    137140    // find the peaks in the image
    138141    psArray *newPeaks = psphotFindPeaks (readout, recipe, 2);
     142    pmPeaksWriteText (newPeaks, "newpeaks.dat");
    139143
    140144    // remove noise for subtracted objects
     
    153157    // replace all sources
    154158    psphotReplaceAll (sources);
     159    psphotSaveImage (NULL, readout->image,  "image.v5.fits");
    155160
    156161    // merge the newly selected peaks into the existing list
     
    160165    // linear PSF fit to remaining peaks
    161166    psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
     167    psphotSaveImage (NULL, readout->image,  "image.v6.fits");
    162168
    163169finish:
     170
     171    // plot positive sources
     172    psphotSourcePlots (readout, sources, recipe);
    164173
    165174    // measure aperture photometry corrections
Note: See TracChangeset for help on using the changeset viewer.