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

    r29004 r31153  
    203203bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    204204{
    205     pmMoments *moments = source->moments;
    206     pmPeak    *peak    = source->peak;
    207     psF32     *PAR  = model->params->data.F32;
    208 
    209     psEllipseMoments emoments;
    210     emoments.x2 = moments->Mxx;
    211     emoments.xy = moments->Mxy;
    212     emoments.y2 = moments->Myy;
    213 
    214     // force the axis ratio to be < 20.0
    215     psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0);
    216 
    217     if (!isfinite(axes.major)) return false;
    218     if (!isfinite(axes.minor)) return false;
    219     if (!isfinite(axes.theta)) return false;
    220 
    221     psEllipseShape shape = psEllipseAxesToShape (axes);
    222 
    223     if (!isfinite(shape.sx))  return false;
    224     if (!isfinite(shape.sy))  return false;
    225     if (!isfinite(shape.sxy)) return false;
    226 
     205    psF32 *PAR  = model->params->data.F32;
     206
     207    // sky is set to 0.0
    227208    PAR[PM_PAR_SKY]  = 0.0;
    228     PAR[PM_PAR_I0]   = peak->flux;
    229     PAR[PM_PAR_XPOS] = peak->xf;
    230     PAR[PM_PAR_YPOS] = peak->yf;
    231     PAR[PM_PAR_SXX]  = PS_MAX(0.5, shape.sx);
    232     PAR[PM_PAR_SYY]  = PS_MAX(0.5, shape.sy);
    233     PAR[PM_PAR_SXY]  = shape.sxy;
     209
     210    // set the shape parameters
     211    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments)) {
     212      return false;
     213    }
     214
     215    // set the model normalization
     216    if (!pmModelSetNorm(&PAR[PM_PAR_I0], source)) {
     217      return false;
     218    }
     219
     220    // set the model position
     221    if (!pmModelSetPosition(&PAR[PM_PAR_XPOS], &PAR[PM_PAR_YPOS], source)) {
     222      return false;
     223    }
     224
     225    // extra parameter
    234226    PAR[PM_PAR_7]    = 1.5;
    235227
     
    305297    // choose a z value guaranteed to be beyond our limit
    306298    float z0 = pow((1.0 / limit), (1.0 / PAR[PM_PAR_7]));
    307     psAssert (isfinite(z0), "fix this code: z0 should not be nan for %f", PAR[PM_PAR_7]);
     299    psAssert (isfinite(z0), "fix this code: z0 should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f), par 7 = %f",
     300              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY], PAR[PM_PAR_7]);
     301
    308302    float z1 = (1.0 / limit);
    309     psAssert (isfinite(z1), "fix this code: z1 should not be nan for %f", PAR[PM_PAR_7]);
     303    psAssert (isfinite(z1), "fix this code: z1 should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f), par 7 = %f",
     304              PAR[PM_PAR_I0], flux, axes.major, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY], PAR[PM_PAR_7]);
     305
    310306    z1 = PS_MAX (z0, z1);
    311307    z0 = 0.0;
Note: See TracChangeset for help on using the changeset viewer.