IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 22, 2011, 9:00:06 AM (14 years ago)
Author:
eugene
Message:

need to guess models for matched detections in order to get forced photometry -- this meant modifying psphotGuessModels to work on the allSources, not newSources and to test if the guess had previously been performed; updates to radial profile analysis to get smoother Krons -- this now agrees very well with sextractor (though my apertures are slightly smaller and not elliptical)

Location:
trunk/psphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src

  • trunk/psphot/src/psphotRadialProfileWings.c

    r32776 r32996  
    8080    }
    8181
    82     MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS");
     82    MIN_RADIUS = psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS");
    8383    if (!status) {
    84         MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS");
     84        MIN_RADIUS = psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS");
    8585    }
    8686
     
    209209# define TEST_Y 3096
    210210
     211float InterpolateValues (float X0, float Y0, float X1, float Y1, float X);
     212
    211213// XXX use integer radius values?  the rings assume integer values, right? or do they?
    212214bool psphotRadialProfileWingsSource (pmSource *source, pmReadout *readout, psImageMaskType maskVal) {
     
    226228
    227229    // radii will be MIN_RADIUS to MAX_RADIUS in NN log steps:
    228     float NSTEP = 10.0;
     230    float NSTEP = 25.0;
    229231    float MIN_DR = 2;
    230232    float NSIGMA = 1.0;
     
    288290        // fprintf (stderr, "%f %f : %f : %f %f  :  %f\n", source->peak->xf, source->peak->yf, radius, meanFlux, meanFluxError, slope);
    289291
    290         if (!limit) {
    291             limit |= (meanFlux - NSIGMA * meanFluxError < THRESHOLD); // dropped to sky level
    292             limit |= isfinite(slope) && (fabs(slope) < 3.0); // SB no longer changing.
    293             limitRadius = meanRadius;
     292        if (!limit && (meanFlux - NSIGMA * meanFluxError < THRESHOLD)) {
     293            // dropped to sky level
     294            limit = true;
     295            // linearly interpolate to the radius at which we hit the sky
     296            if (isfinite(lastFlux)) {
     297                limitRadius = InterpolateValues(lastFlux, lastRadius, meanFlux, meanRadius, 0.0);
     298            } else {
     299                limitRadius = meanRadius;
     300            }
     301            limitFlux = meanFlux;
     302            limitSlope = slope;
     303        }
     304        if (!limit && isfinite(slope) && (fabs(slope) < 3.0)) {
     305            // SB no longer changing.       
     306            limit = true;
     307            // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope
     308            if (isfinite(lastFlux)) {
     309                limitRadius = lastRadius + lastFlux / 3.0;
     310            } else {
     311                limitRadius = meanRadius;
     312            }
    294313            limitFlux = meanFlux;
    295314            limitSlope = slope;
Note: See TracChangeset for help on using the changeset viewer.