IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14755


Ignore:
Timestamp:
Sep 5, 2007, 11:38:36 AM (19 years ago)
Author:
eugene
Message:

load externally-supplied PSF before finding peaks, only try for PSF Clump if PSF not supplied

File:
1 edited

Legend:

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

    r14655 r14755  
    7979    psphotModelTest (config, view, recipe, maskVal, maskMark);
    8080
    81     // find the peaks in the image
     81    // load the psf model, if suppled
     82    // XXX include code in here to save FWHM_X,FWHM_Y in the recipe
     83    pmPSF *psf = psphotLoadPSF (config, view, recipe);
     84   
     85    // find the peaks in the image. 
     86
     87    // XXX clean this up into a single function.  if psf is defined, we should treat this as
     88    // pass "2", not "1".  re-define this boolean to be "have PSF"
    8289    psArray *peaks;
    8390    psArray *footprints = NULL;
     
    102109    }
    103110
    104     // psArray *bounds = psphotGetBounds ();
    105     // psArray *sources = psphotBoundsToSources ();
    106 
    107111    // construct sources and measure basic stats
    108112    psArray *sources = psphotSourceStats (readout, recipe, peaks, maskVal, maskMark);
     
    122126    }
    123127
     128    // use source classes to select PSF candidate stars (from PSF clump)?
     129    bool findPSFClump = (psf == NULL);
     130
    124131    // classify sources based on moments, brightness
    125     if (!psphotRoughClass (sources, recipe, true, maskSat)) {
     132    if (!psphotRoughClass (sources, recipe, findPSFClump, maskSat)) {
    126133        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
    127134        return psphotReadoutCleanup (config, readout, recipe, NULL, sources);
     
    131138    }
    132139
    133     // load the psf model, if suppled
    134     pmPSF *psf = psphotLoadPSF (config, view, recipe);
    135     if (!psf) {
     140    // if we were not supplied a PSF, choose one here
     141    if (psf == NULL) {
    136142        // use bright stellar objects to measure PSF
    137143        psf = psphotChoosePSF (readout, sources, recipe, maskVal, maskMark);
Note: See TracChangeset for help on using the changeset viewer.