IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2009, 3:12:47 PM (17 years ago)
Author:
eugene
Message:

check in changes from gene@development branch : extensive changes to moments calculation, psf model generation, aperture residuals; improvements to extended source analysis

Location:
trunk/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src

    • Property svn:ignore
      •  

        old new  
        1818psphotVersionDefinitions.h
        1919psphotMomentsStudy
         20psphotPetrosianStudy
  • trunk/psphot/src/psphotReadout.c

    r25738 r25755  
    8181
    8282    // construct sources and measure basic stats
    83     psArray *sources = psphotSourceStats (config, readout, detections);
     83    psArray *sources = psphotSourceStats (config, readout, detections, true);
    8484    if (!sources) return false;
    8585    if (!strcasecmp (breakPt, "PEAKS")) {
     
    126126        return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
    127127    }
    128 
    129128    psphotVisualShowPSFModel (readout, psf);
    130129
     
    132131    psphotLoadExtSources (config, view, sources);
    133132
    134     // construct an initial model for each object
     133    // construct an initial model for each object, set the radius to fitRadius, set circular fit mask
    135134    psphotGuessModels (config, readout, sources, psf);
    136135
    137     // XXX test output of models
    138     // psphotTestSourceOutput (readout, sources, recipe, psf);
    139 
    140     // linear PSF fit to source peaks
     136    // linear PSF fit to source peaks, subtract the models from the image (in PSF mask)
    141137    psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE);
    142138
     
    144140    // psphotGuessModels or fitted until psphotFitSourcesLinear.
    145141    psphotVisualShowPSFStars (recipe, psf, sources);
    146     psphotVisualShowSatStars (recipe, psf, sources);
    147142
    148143    // identify CRs and extended sources
    149     psphotSourceSize (config, readout, sources, recipe, 0);
     144    psphotSourceSize (config, readout, sources, recipe, psf, 0);
    150145    if (!strcasecmp (breakPt, "ENSEMBLE")) {
    151146        goto finish;
    152147    }
     148    psphotVisualShowSatStars (recipe, psf, sources);
    153149
    154150    // non-linear PSF and EXT fit to brighter sources
     151    // replace model flux, adjust mask as needed, fit, subtract the models (full stamp)
    155152    psphotBlendFit (config, readout, sources, psf);
    156153
     
    158155    psphotReplaceAllSources (sources, recipe);
    159156
    160     // linear fit to include all sources
     157    // linear fit to include all sources (subtract again)
    161158    psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
    162159
     
    165162        goto pass1finish;
    166163    }
    167 
    168     // XXX for the moment, drop the re-calc of the background (prove this works)
    169     // replace background in residual image
    170     // psphotSkyReplace (config, view);
    171     // re-measure background model (median, smoothed image)
    172     // psphotImageMedian (config, view);
     164    // NOTE: possibly re-measure background model here with objects subtracted
    173165
    174166    // add noise for subtracted objects
     
    182174
    183175    // define new sources based on only the new peaks
    184     psArray *newSources = psphotSourceStats (config, readout, detections);
     176    psArray *newSources = psphotSourceStats (config, readout, detections, false);
    185177
    186178    // set source type
     
    190182    }
    191183
    192     // create full input models
     184    // create full input models, set the radius to fitRadius, set circular fit mask
    193185    psphotGuessModels (config, readout, newSources, psf);
    194186
     
    206198
    207199    // measure source size for the remaining sources
    208     psphotSourceSize (config, readout, sources, recipe, 0);
     200    psphotSourceSize (config, readout, sources, recipe, psf, 0);
    209201
    210202    psphotExtendedSourceAnalysis (readout, sources, recipe);
Note: See TracChangeset for help on using the changeset viewer.