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

    r20001 r25351  
    11/******************************************************************************
    22 * this file defines the SERSIC 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
     
    3232# define PM_MODEL_FIT_STATUS      pmModelFitStatus_SERSIC
    3333
     34// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
     35// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
     36// values need to be pixel coords
    3437psF32 PM_MODEL_FUNC (psVector *deriv,
    3538                     const psVector *params,
     
    223226
    224227// make an initial guess for parameters
     228// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
    225229bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    226230{
     
    247251    if (!isfinite(shape.sxy)) return false;
    248252
    249     // XXX PAR[PM_PAR_SKY]  = moments->Sky;
    250253    PAR[PM_PAR_SKY]  = 0.0;
    251254    PAR[PM_PAR_I0]   = peak->flux;
     
    429432bool PM_MODEL_FIT_STATUS (pmModel *model)
    430433{
    431 
    432     psF32 dP;
    433434    bool  status;
    434435
     
    436437    psF32 *dPAR = model->dparams->data.F32;
    437438
    438     dP = 0;
    439     dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
    440     dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
    441     dP = sqrt (dP);
    442 
    443439    status = true;
    444 //    status &= (dP < 0.5);
    445440    status &= (PAR[PM_PAR_I0] > 0);
    446441    status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
    447 
    448     fprintf (stderr, "SERSIC status pars: dP: %f, I0: %f, S/N: %f\n",
    449              dP, PAR[PM_PAR_I0], (dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]));
    450442
    451443    return status;
Note: See TracChangeset for help on using the changeset viewer.