Changeset 14655 for trunk/psphot/src/psphotPSFConvModel.c
- Timestamp:
- Aug 23, 2007, 2:40:16 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotPSFConvModel.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotPSFConvModel.c
r14348 r14655 58 58 psVector *dparams = modelConv->dparams; 59 59 60 // get the model function for this model61 pmModelFunc modelFunc = pmModelFunc_GetFunction (modelConv->type);62 if (!modelFunc)63 psAbort("invalid model function");64 65 // get the limits function for this model66 pmModelLimits checkLimits = pmModelLimits_GetFunction (modelConv->type);67 if (!checkLimits)68 psAbort("invalid model limits function");69 70 60 // create the minimization constraints 71 61 psMinConstraint *constraint = psMinConstraintAlloc(); 72 62 constraint->paramMask = psVectorAlloc (params->n, PS_TYPE_U8); 73 constraint->checkLimits = checkLimits;63 constraint->checkLimits = modelConv->modelLimits; 74 64 75 65 // set parameter mask based on fitting mode … … 81 71 // force the floating parameters to fall within the contraint ranges 82 72 for (int i = 0; i < params->n; i++) { 83 checkLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);84 checkLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);73 modelConv->modelLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL); 74 modelConv->modelLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL); 85 75 } 86 76 … … 90 80 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 91 81 92 bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, model Func);82 bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelConv->modelFunc); 93 83 for (int i = 0; i < dparams->n; i++) { 94 84 if (psTraceGetLevel("psphot") >= 4) {
Note:
See TracChangeset
for help on using the changeset viewer.
