- Timestamp:
- Sep 13, 2009, 4:49:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c
r20001 r25351 1 1 /****************************************************************************** 2 2 * this file defines the PGAUSS source shape model. Note that these model functions are loaded 3 * by pmModel Group.c using 'include', and thus need no 'include' statements of their own. The3 * by pmModelClass.c using 'include', and thus need no 'include' statements of their own. The 4 4 * models use a psVector to represent the set of parameters, with the sequence used to specify 5 5 * 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 few6 * specifics of the model. All models which are used as a PSF representations share a few 7 7 * parameters, for which # define names are listed in pmModel.h: 8 8 … … 29 29 30 30 // 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 31 33 psF32 PM_MODEL_FUNC(psVector *deriv, 32 34 const psVector *params, … … 191 193 192 194 // make an initial guess for parameters 195 // 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters 193 196 bool PM_MODEL_GUESS (pmModel *model, pmSource *source) 194 197 { … … 205 208 psEllipseShape shape = psEllipseAxesToShape (axes); 206 209 207 PAR[PM_PAR_SKY] = moments->Sky;210 PAR[PM_PAR_SKY] = 0.0; 208 211 PAR[PM_PAR_I0] = peak->flux; 209 212 PAR[PM_PAR_XPOS] = peak->xf; … … 415 418 bool PM_MODEL_FIT_STATUS (pmModel *model) 416 419 { 417 psF32 dP;418 420 bool status; 419 421 … … 421 423 psF32 *dPAR = model->dparams->data.F32; 422 424 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 428 425 status = true; 429 status &= (dP < 0.5);430 426 status &= (PAR[PM_PAR_I0] > 0); 431 427 status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Note:
See TracChangeset
for help on using the changeset viewer.
