IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 13, 2009, 4:49:08 PM (17 years ago)
Author:
eugene
Message:

clean up comments, notes on 0.5 PIX, drop old dPAR test (ill-defined), force sky == 0.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c

    r20001 r25351  
    11/******************************************************************************
    22 * this file defines the PGAUSS source shape model.  Note that these model functions are loaded
    3  * by pmModelGroup.c using 'include', and thus need no 'include' statements of their own.  The
     3 * by pmModelClass.c using 'include', and thus need no 'include' statements of their own.  The
    44 * models use a psVector to represent the set of parameters, with the sequence used to specify
    55 * the meaning of the parameter.  The meaning of the parameters may thus vary depending on the
    6  * specifics of the model.  All models which are used a PSF representations share a few
     6 * specifics of the model.  All models which are used as a PSF representations share a few
    77 * parameters, for which # define names are listed in pmModel.h:
    88
     
    2929
    3030// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
     31// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
     32// values need to be pixel coords
    3133psF32 PM_MODEL_FUNC(psVector *deriv,
    3234                    const psVector *params,
     
    191193
    192194// make an initial guess for parameters
     195// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
    193196bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    194197{
     
    205208    psEllipseShape shape = psEllipseAxesToShape (axes);
    206209
    207     PAR[PM_PAR_SKY]  = moments->Sky;
     210    PAR[PM_PAR_SKY]  = 0.0;
    208211    PAR[PM_PAR_I0]   = peak->flux;
    209212    PAR[PM_PAR_XPOS] = peak->xf;
     
    415418bool PM_MODEL_FIT_STATUS (pmModel *model)
    416419{
    417     psF32 dP;
    418420    bool  status;
    419421
     
    421423    psF32 *dPAR = model->dparams->data.F32;
    422424
    423     dP = 0;
    424     dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
    425     dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
    426     dP = sqrt (dP);
    427 
    428425    status = true;
    429     status &= (dP < 0.5);
    430426    status &= (PAR[PM_PAR_I0] > 0);
    431427    status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Note: See TracChangeset for help on using the changeset viewer.