Index: trunk/psphot/src/psphotPSFConvModel.c
===================================================================
--- trunk/psphot/src/psphotPSFConvModel.c	(revision 14348)
+++ trunk/psphot/src/psphotPSFConvModel.c	(revision 14655)
@@ -58,18 +58,8 @@
     psVector *dparams = modelConv->dparams;
 
-    // get the model function for this model
-    pmModelFunc modelFunc = pmModelFunc_GetFunction (modelConv->type);
-    if (!modelFunc)
-	psAbort("invalid model function");
-
-    // get the limits function for this model
-    pmModelLimits checkLimits = pmModelLimits_GetFunction (modelConv->type);
-    if (!checkLimits)
-	psAbort("invalid model limits function");
-
     // create the minimization constraints
     psMinConstraint *constraint = psMinConstraintAlloc();
     constraint->paramMask = psVectorAlloc (params->n, PS_TYPE_U8);
-    constraint->checkLimits = checkLimits;
+    constraint->checkLimits = modelConv->modelLimits;
 
     // set parameter mask based on fitting mode
@@ -81,6 +71,6 @@
     // force the floating parameters to fall within the contraint ranges
     for (int i = 0; i < params->n; i++) {
-	checkLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);
-	checkLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);
+	modelConv->modelLimits (PS_MINIMIZE_PARAM_MIN, i, params->data.F32, NULL);
+	modelConv->modelLimits (PS_MINIMIZE_PARAM_MAX, i, params->data.F32, NULL);
     }
 
@@ -90,5 +80,5 @@
     psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
 
-    bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelFunc);
+    bool fitStatus = psphotModelWithPSF_LMM (myMin, covar, params, constraint, source, psf, modelConv->modelFunc);
     for (int i = 0; i < dparams->n; i++) {
         if (psTraceGetLevel("psphot") >= 4) {
