- 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_QGAUSS.c
r20001 r25351 1 1 /****************************************************************************** 2 2 * this file defines the QGAUSS source shape model (XXX need a better name!). Note that these 3 * model functions are loaded by pmModel Group.c using 'include', and thus need no 'include'3 * model functions are loaded by pmModelClass.c using 'include', and thus need no 'include' 4 4 * statements of their own. The models use a psVector to represent the set of parameters, with 5 5 * the sequence used to specify the meaning of the parameter. The meaning of the parameters … … 29 29 # define PM_MODEL_FIT_STATUS pmModelFitStatus_QGAUSS 30 30 31 // the model is a function of the pixel coordinate (pixcoord[0,1] = x,y) 32 // 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords 33 // values need to be pixel coords 31 34 psF32 PM_MODEL_FUNC (psVector *deriv, 32 35 const psVector *params, … … 213 216 214 217 // make an initial guess for parameters 218 // 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters 215 219 bool PM_MODEL_GUESS (pmModel *model, pmSource *source) 216 220 { … … 237 241 if (!isfinite(shape.sxy)) return false; 238 242 239 // XXX turn this off here for now PAR[PM_PAR_SKY] = moments->Sky;240 243 PAR[PM_PAR_SKY] = 0.0; 241 244 PAR[PM_PAR_I0] = peak->flux; … … 444 447 bool PM_MODEL_FIT_STATUS (pmModel *model) 445 448 { 446 447 psF32 dP;448 449 bool status; 449 450 … … 451 452 psF32 *dPAR = model->dparams->data.F32; 452 453 453 dP = 0;454 dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);455 dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);456 dP = sqrt (dP);457 458 454 status = true; 459 // status &= (dP < 0.5);460 455 status &= (PAR[PM_PAR_I0] > 0); 461 456 status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Note:
See TracChangeset
for help on using the changeset viewer.
