IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12707


Ignore:
Timestamp:
Mar 30, 2007, 6:29:25 PM (19 years ago)
Author:
eugene
Message:

making output images based on trace

File:
1 edited

Legend:

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

    r12689 r12707  
    22
    33bool psphotReadout (pmConfig *config, pmFPAview *view) {
     4
     5    bool dump = (psTraceGetLevel("psphot") >= 6);
    46
    57    // select the current recipe
     
    3638    psphotModelTest (readout, recipe);
    3739
    38     if (psTraceGetLevel("psphot") > 5) {
     40    if (psTraceGetLevel("psphot") >= 5) {
    3941        psphotSaveImage (NULL, readout->image,  "image.fits");
    4042        psphotSaveImage (NULL, readout->mask,   "mask.fits");
     
    6163        return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);
    6264    }
    63     pmPeaksWriteText (peaks, "oldpeaks.dat");
    6465
    6566    // construct sources and measure basic stats
     
    105106    psphotGuessModels (readout, sources, recipe, psf);
    106107
    107     psphotSaveImage (NULL, readout->image,  "image.v0.fits");
     108    if (dump) psphotSaveImage (NULL, readout->image,  "image.v0.fits");
    108109
    109110    // linear PSF fit to peaks
    110111    psphotEnsemblePSF (readout, sources, recipe, psf, FALSE);
    111     psphotSaveImage (NULL, readout->image,  "image.v1.fits");
     112    if (dump) psphotSaveImage (NULL, readout->image,  "image.v1.fits");
    112113    if (!strcasecmp (breakPt, "ENSEMBLE")) {
    113114        goto finish;
     
    116117    // non-linear PSF and EXT fit to brighter sources
    117118    psphotBlendFit (readout, sources, recipe, psf);
    118     psphotSaveImage (NULL, readout->image,  "image.v2.fits");
     119    if (dump) psphotSaveImage (NULL, readout->image,  "image.v2.fits");
    119120
    120121    // replace all sources
    121122    psphotReplaceAll (sources);
    122     psphotSaveImage (NULL, readout->image,  "image.v3.fits");
     123    if (dump) psphotSaveImage (NULL, readout->image,  "image.v3.fits");
    123124
    124125    // linear PSF fit to remaining peaks
    125126    psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
    126     psphotSaveImage (NULL, readout->image,  "image.v4.fits");
     127    if (dump) psphotSaveImage (NULL, readout->image,  "image.v4.fits");
    127128    if (!strcasecmp (breakPt, "PASS1")) {
    128129        goto finish;
     
    140141    // find the peaks in the image
    141142    psArray *newPeaks = psphotFindPeaks (readout, recipe, 2);
    142     pmPeaksWriteText (newPeaks, "newpeaks.dat");
    143143
    144144    // remove noise for subtracted objects
     
    157157    // replace all sources
    158158    psphotReplaceAll (sources);
    159     psphotSaveImage (NULL, readout->image,  "image.v5.fits");
     159    if (dump) psphotSaveImage (NULL, readout->image,  "image.v5.fits");
    160160
    161161    // merge the newly selected peaks into the existing list
     
    165165    // linear PSF fit to remaining peaks
    166166    psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
    167     psphotSaveImage (NULL, readout->image,  "image.v6.fits");
     167    if (dump) psphotSaveImage (NULL, readout->image,  "image.v6.fits");
    168168
    169169finish:
    170170
    171171    // plot positive sources
    172     psphotSourcePlots (readout, sources, recipe);
     172    // psphotSourcePlots (readout, sources, recipe);
    173173
    174174    // measure aperture photometry corrections
     
    180180
    181181    // calculate source magnitudes
    182     // XXX modify this API to take config, view?
    183182    pmReadout *background = psphotSelectBackground (config, view);
    184183    psphotMagnitudes(sources, recipe, psf, background);
Note: See TracChangeset for help on using the changeset viewer.