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_PS1_V1.c

    r29004 r31153  
    213213bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    214214{
    215     pmMoments *moments = source->moments;
    216     pmPeak    *peak    = source->peak;
    217     psF32     *PAR  = model->params->data.F32;
    218 
    219     psEllipseMoments emoments;
    220     emoments.x2 = moments->Mxx;
    221     emoments.xy = moments->Mxy;
    222     emoments.y2 = moments->Myy;
    223 
    224     // force the axis ratio to be < 20.0
    225     psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0);
    226 
    227     if (!isfinite(axes.major)) return false;
    228     if (!isfinite(axes.minor)) return false;
    229     if (!isfinite(axes.theta)) return false;
    230 
    231     psEllipseShape shape = psEllipseAxesToShape (axes);
    232 
    233     if (!isfinite(shape.sx))  return false;
    234     if (!isfinite(shape.sy))  return false;
    235     if (!isfinite(shape.sxy)) return false;
    236 
     215    psF32 *PAR  = model->params->data.F32;
     216
     217    // sky is set to 0.0
    237218    PAR[PM_PAR_SKY]  = 0.0;
    238     PAR[PM_PAR_I0]   = peak->flux;
    239     PAR[PM_PAR_XPOS] = peak->xf;
    240     PAR[PM_PAR_YPOS] = peak->yf;
    241     PAR[PM_PAR_SXX]  = PS_MAX(0.5, M_SQRT2*shape.sx);
    242     PAR[PM_PAR_SYY]  = PS_MAX(0.5, M_SQRT2*shape.sy);
    243     PAR[PM_PAR_SXY]  = shape.sxy;
     219
     220    // set the shape parameters
     221    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments)) {
     222      return false;
     223    }
     224
     225    // set the model normalization
     226    if (!pmModelSetNorm(&PAR[PM_PAR_I0], source)) {
     227      return false;
     228    }
     229
     230    // set the model position
     231    if (!pmModelSetPosition(&PAR[PM_PAR_XPOS], &PAR[PM_PAR_YPOS], source)) {
     232      return false;
     233    }
     234
     235    // extra parameter
    244236    PAR[PM_PAR_7]    = 0.5;
    245237
     
    314306    float z0 = 0.0;
    315307    float z1 = pow((1.0 / limit), (1.0 / ALPHA));
    316     psAssert (isfinite(z1), "fix this code: z1 should not be nan for %f", PAR[PM_PAR_7]);
     308    psAssert (isfinite(z1), "fix this code: z1 should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f)",
     309              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY]);
    317310    if (PAR[PM_PAR_7] < 0.0) z1 *= 2.0;
    318311
Note: See TracChangeset for help on using the changeset viewer.