IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2011, 1:04:41 PM (15 years ago)
Author:
eugene
Message:

updates to pmPeak to better distinguish peak flux versions; updates to visualization; add bits for substantial suspect masking; consolidate assignment of source position and flux based on peak, moments, etc; improve footprint culling process; fix PSF_QF and PSF_QF_PERFECT calculations; fix source model chisq values

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

    • Property svn:ignore
      •  

        old new  
        2828ChangeLog
        2929psmodules-*.tar.*
         30a.out.dSYM
  • trunk/psModules/src/objects/models/pmModel_PGAUSS.c

    r29004 r31153  
    194194bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    195195{
    196     pmMoments *moments = source->moments;
    197     pmPeak    *peak    = source->peak;
    198     psF32     *PAR     = model->params->data.F32;
    199 
    200     psEllipseMoments emoments;
    201     emoments.x2 = moments->Mxx;
    202     emoments.xy = moments->Mxy;
    203     emoments.y2 = moments->Myy;
    204 
    205     psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0);
    206     psEllipseShape shape = psEllipseAxesToShape (axes);
    207 
     196    psF32 *PAR  = model->params->data.F32;
     197
     198    // sky is set to 0.0
    208199    PAR[PM_PAR_SKY]  = 0.0;
    209     PAR[PM_PAR_I0]   = peak->flux;
    210     PAR[PM_PAR_XPOS] = peak->xf;
    211     PAR[PM_PAR_YPOS] = peak->yf;
    212     PAR[PM_PAR_SXX] = PS_MAX(0.5, M_SQRT2*shape.sx);
    213     PAR[PM_PAR_SYY] = PS_MAX(0.5, M_SQRT2*shape.sy);
    214     PAR[PM_PAR_SXY] = shape.sxy;
     200
     201    // set the shape parameters
     202    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments)) {
     203      return false;
     204    }
     205
     206    // set the model normalization
     207    if (!pmModelSetNorm(&PAR[PM_PAR_I0], source)) {
     208      return false;
     209    }
     210
     211    // set the model position
     212    if (!pmModelSetPosition(&PAR[PM_PAR_XPOS], &PAR[PM_PAR_YPOS], source)) {
     213      return false;
     214    }
     215
    215216    return(true);
    216217}
     
    285286    // choose a z value guaranteed to be beyond our limit
    286287    float z0 = pow((1.0 / limit), (1.0 / 3.0));
    287     psAssert (isfinite(z0), "fix this code: z0 should not be nan for %f", PAR[PM_PAR_I0]);
     288    psAssert (isfinite(z0), "fix this code: z0 should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f)",
     289              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY]);
     290
    288291    float z1 = (1.0 / limit);
    289     psAssert (isfinite(z1), "fix this code: z1 should not be nan for %f", PAR[PM_PAR_I0]);
     292    psAssert (isfinite(z1), "fix this code: z1 should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f)",
     293              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY]);
     294
    290295    z1 = PS_MAX (z0, z1);
    291296    z0 = 0.0;
Note: See TracChangeset for help on using the changeset viewer.