Changeset 36859 for trunk/psModules/src/objects/pmSourceFitModel.c
- Timestamp:
- Jun 13, 2014, 8:35:36 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceFitModel.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceFitModel.c
r36623 r36859 33 33 #include "pmMoments.h" 34 34 #include "pmModelFuncs.h" 35 #include "pmModelClass.h" 35 36 #include "pmModel.h" 36 37 #include "pmModelUtils.h" 37 #include "pmModelClass.h"38 38 #include "pmSourceMasks.h" 39 39 #include "pmSourceExtendedPars.h" … … 170 170 psMinConstraint *constraint = psMinConstraintAlloc(); 171 171 constraint->paramMask = psVectorAlloc (params->n, PS_TYPE_VECTOR_MASK); 172 constraint->checkLimits = model-> modelLimits;172 constraint->checkLimits = model->class->modelLimits; 173 173 174 174 // set parameter mask based on fitting mode … … 233 233 // force the floating parameters to fall within the contraint ranges 234 234 for (int i = 0; i < params->n; i++) { 235 model-> modelLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);236 model-> modelLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);235 model->class->modelLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL); 236 model->class->modelLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL); 237 237 } 238 238 … … 254 254 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 255 255 256 fitStatus = psMinimizeLMChi2(myMin, covar, params, constraint, x, y, yErr, model-> modelFunc);256 fitStatus = psMinimizeLMChi2(myMin, covar, params, constraint, x, y, yErr, model->class->modelFunc); 257 257 for (int i = 0; i < dparams->n; i++) { 258 258 if ((constraint->paramMask != NULL) && constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) … … 306 306 altmask->data.PS_TYPE_VECTOR_MASK_DATA[i] = (constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) ? 0 : 1; 307 307 } 308 psMinimizeGaussNewtonDelta(delta, params, altmask, x, y, yErr, model-> modelFunc);308 psMinimizeGaussNewtonDelta(delta, params, altmask, x, y, yErr, model->class->modelFunc); 309 309 310 310 for (int i = 0; i < dparams->n; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
