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

    r29004 r31153  
    210210bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    211211{
    212     pmMoments *moments = source->moments;
    213     pmPeak    *peak    = source->peak;
    214     psF32     *PAR  = model->params->data.F32;
    215 
    216     psEllipseMoments emoments;
    217     emoments.x2 = moments->Mxx;
    218     emoments.xy = moments->Mxy;
    219     emoments.y2 = moments->Myy;
    220 
    221     // force the axis ratio to be < 20.0
    222     psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0);
    223 
    224     if (!isfinite(axes.major)) return false;
    225     if (!isfinite(axes.minor)) return false;
    226     if (!isfinite(axes.theta)) return false;
    227 
    228     psEllipseShape shape = psEllipseAxesToShape (axes);
    229 
    230     if (!isfinite(shape.sx))  return false;
    231     if (!isfinite(shape.sy))  return false;
    232     if (!isfinite(shape.sxy)) return false;
    233 
     212    psF32 *PAR  = model->params->data.F32;
     213
     214    // sky is set to 0.0
    234215    PAR[PM_PAR_SKY]  = 0.0;
    235     PAR[PM_PAR_I0]   = peak->flux;
    236     PAR[PM_PAR_XPOS] = peak->xf;
    237     PAR[PM_PAR_YPOS] = peak->yf;
    238     PAR[PM_PAR_SXX]  = PS_MAX(0.5, M_SQRT2*shape.sx);
    239     PAR[PM_PAR_SYY]  = PS_MAX(0.5, M_SQRT2*shape.sy);
    240     PAR[PM_PAR_SXY]  = shape.sxy;
     216
     217    // set the shape parameters
     218    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments)) {
     219      return false;
     220    }
     221
     222    // set the model normalization
     223    if (!pmModelSetNorm(&PAR[PM_PAR_I0], source)) {
     224      return false;
     225    }
     226
     227    // set the model position
     228    if (!pmModelSetPosition(&PAR[PM_PAR_XPOS], &PAR[PM_PAR_YPOS], source)) {
     229      return false;
     230    }
     231
    241232    return(true);
    242233}
     
    303294    psF64 radius = axes.major * sqrt (2.0) * zn;
    304295
    305     psAssert (isfinite(radius), "fix this code: z should not be nan for %f", PAR[PM_PAR_7]);
     296    psAssert (isfinite(radius), "fix this code: radius should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f)",
     297              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY]);
    306298    return (radius);
    307299}
Note: See TracChangeset for help on using the changeset viewer.