IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19911


Ignore:
Timestamp:
Oct 6, 2008, 3:12:51 AM (18 years ago)
Author:
eugene
Message:

move visualization down one level; new APIs for psphotRoughClass and psphotMagnitudes; adding psphotImageQuality

File:
1 edited

Legend:

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

    r19888 r19911  
    3636    }
    3737
    38     // set up the Visual display, display the image, weight, mask (ch 1,2,3)
    39     psphotVisualShowImage (config, readout);
     38    // display the image, weight, mask (ch 1,2,3)
     39    psphotVisualShowImage (readout);
    4040
    4141    // generate a background model (median, smoothed image)
     
    6969    }
    7070 
    71     // display the peaks and footprints
    72     psphotVisualShowPeaks (config, view, detections);
    73     psphotVisualShowFootprints (config, view, detections);
    74 
    7571    // construct sources and measure basic stats
    7672    psArray *sources = psphotSourceStats (readout, recipe, detections);
     
    8076    }
    8177
    82     psphotVisualShowMoments (config, view, sources);
    83 
    8478    // find blended neighbors of very saturated stars
    8579    // XXX merge this with Basic Deblend?
     
    9387
    9488    // classify sources based on moments, brightness
    95     if (!psphotRoughClass (sources, recipe, havePSF)) {
     89    if (!psphotRoughClass (readout, sources, recipe, havePSF)) {
    9690        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    9791        return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
     
    10195    }
    10296
    103     psphotVisualShowRoughClass (config, view, sources);
    104     psphotVisualShowFlags (config, view, sources);
     97    psphotImageQuality (recipe, sources);
    10598
    10699    // if we were not supplied a PSF, choose one here
     
    120113    }
    121114
    122     psphotVisualShowPSFModel (config, readout, psf);
     115    psphotVisualShowPSFModel (readout, psf);
    123116
    124117    // Define source fitting parameters for everything that follows PSF fits
     
    161154    psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE);
    162155
    163     // XXX we have to place this here because the models are not realized until psphotGuessModels
    164     // or fitted until psphotFitSourcesLinear.  There is an example of generating a residual image
    165     // in pmPSFtry.c
    166 
    167     psphotVisualShowPSFStars (config, view, psf, sources);
    168     psphotVisualShowSatStars (config, view, psf, sources);
    169     psphotVisualShowResidualImage (config, readout);
    170     psphotVisualShowFlags (config, view, sources);
     156    // We have to place these visualizations here because the models are not realized until
     157    // psphotGuessModels or fitted until psphotFitSourcesLinear.
     158    psphotVisualShowPSFStars (recipe, psf, sources);
     159    psphotVisualShowSatStars (recipe, psf, sources);
    171160
    172161    // identify CRs and extended sources
     
    176165    }
    177166
    178     psphotVisualPlotSourceSize (config, sources);
    179     psphotVisualShowSourceSize (config, view, sources);
    180 
    181167    // non-linear PSF and EXT fit to brighter sources
    182168    psphotBlendFit (readout, sources, recipe, psf);
    183169
    184     psphotVisualShowResidualImage (config, readout);
    185     psphotVisualShowFlags (config, view, sources);
    186 
    187170    // replace all sources
    188171    psphotReplaceAllSources (sources, recipe);
     
    190173    // linear fit to include all sources
    191174    psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
    192 
    193     psphotVisualShowResidualImage (config, readout);
    194     psphotVisualShowFlags (config, view, sources);
    195175
    196176    // if we only do one pass, skip to extended source analysis
     
    214194    psphotSubNoise (readout, sources, recipe);
    215195
    216     // display the new peaks and footprints
    217     psphotVisualShowPeaks (config, view, detections);
    218     psphotVisualShowFootprints (config, view, detections);
    219 
    220196    // define new sources based on only the new peaks
    221197    psArray *newSources = psphotSourceStats (readout, recipe, detections);
    222198
    223199    // set source type
    224     if (!psphotRoughClass (newSources, recipe, havePSF)) {
     200    if (!psphotRoughClass (readout, newSources, recipe, havePSF)) {
    225201        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    226202        return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
    227203    }
    228 
    229     psphotVisualShowRoughClass (config, view, sources);
    230     psphotVisualShowFlags (config, view, sources);
    231204
    232205    // create full input models
     
    243216    psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
    244217
    245     psphotVisualShowResidualImage (config, readout);
    246     psphotVisualShowFlags (config, view, sources);
    247 
    248218pass1finish:
    249219
    250220    // measure source size for the remaining sources
    251221    psphotSourceSize (config, readout, sources, recipe, 0);
    252     psphotVisualPlotSourceSize (config, sources);
    253     psphotVisualShowSourceSize (config, view, sources);
    254222
    255223    psphotExtendedSourceAnalysis (readout, sources, recipe);
     
    268236    }
    269237
    270     psphotVisualPlotApResid (config, sources);
    271 
    272238    // calculate source magnitudes
    273     pmReadout *background = psphotSelectBackground (config, view, false);
    274     psphotMagnitudes(sources, recipe, psf, background);
     239    psphotMagnitudes(config, view, sources, recipe, psf);
    275240
    276241    // replace failed sources?
Note: See TracChangeset for help on using the changeset viewer.