IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 23, 2006, 6:16:11 PM (20 years ago)
Author:
eugene
Message:

fixed some errors with double sources, added second-pass linear PSF fit, multiple-depths

File:
1 edited

Legend:

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

    r6442 r6481  
    1717
    1818    // construct sources and measure basic stats
     19    // limit moments analysis by S/N?
    1920    sources = psphotSourceStats (readout, config, peaks);
    2021
    2122    // classify sources based on moments, brightness
     23    // faint sources not classified?
    2224    psphotRoughClass (sources, config);
    2325
     
    2830    psf = psphotChoosePSF (config, sources);
    2931
    30     // select analysis method
    31     char *FITMODE = psMetadataLookupStr (&status, config, "FITMODE");
    32     if (!strcasecmp(FITMODE, "ENSEMBLE")) {
    33         psphotEnsemblePSF (readout, config, sources, psf);
    34     }
     32    // linear PSF fit to peaks
     33    psphotEnsemblePSF (readout, config, sources, psf, FALSE);
    3534
    36     if (!strcasecmp(FITMODE, "BLEND")) {
    37         psphotEnsemblePSF (readout, config, sources, psf);
    38         psphotBlendFit (readout, config, sources, psf);
    39         psphotReplaceUnfit (sources);
    40         psphotApResid (readout, sources, config, psf);
    41     }
     35    // non-linear PSF and EXT fit to brighter sources
     36    psphotBlendFit (readout, config, sources, psf);
    4237
     38    // replace fitted sources
     39    psphotReplaceUnfit (sources);
     40
     41    // find remaining peaks after first source subtraction pass
     42    // psphotFindPeaks ();
     43
     44    // linear PSF fit to remaining peaks
     45    psphotEnsemblePSF (readout, config, sources, psf, TRUE);
     46
     47    // measure aperture photometry corrections
     48    psphotApResid (readout, sources, config, psf);
     49
     50    // calculate source magnitudes
    4351    psphotMagnitudes (config, sources, psf);
    4452
     53    // update the header with stats results
    4554    psMetadata *header = pmReadoutGetHeader (readout);
    4655    psphotUpdateHeader (header, config);
    4756
    48     // psphotSkyReplace (readout, skymodel);
     57    // XXX make this an option?
     58    // replace background in residual image
     59    psphotSkyReplace (readout, skymodel);
    4960
    5061    // need to do something with the sources, psf, and sky
     
    6677// XXX Deprecate or allow these versions?
    6778# if (0)
     79    // select analysis method
     80    char *FITMODE = psMetadataLookupStr (&status, config, "FITMODE");
     81    if (!strcasecmp(FITMODE, "ENSEMBLE")) {
     82        psphotEnsemblePSF (readout, config, sources, psf);
     83    }
     84
    6885    if (!strcasecmp(FITMODE, "FULL")) {
    6986        psphotEnsemblePSF (readout, config, sources, psf);
Note: See TracChangeset for help on using the changeset viewer.