Index: branches/eam_branches/ipp-20140610/psphot/src/psphotChoosePSF.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotChoosePSF.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotChoosePSF.c	(revision 36884)
@@ -448,5 +448,5 @@
 
             // get the model full-width at half-max
-            float FWHM_MAJOR = 2*modelPSF->modelRadius (modelPSF->params, 0.5);
+            float FWHM_MAJOR = 2*modelPSF->class->modelRadius (modelPSF->params, 0.5);
 
             // XXX make sure this is consistent with the re-definition of PM_PAR_SXX
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotEfficiency.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotEfficiency.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotEfficiency.c	(revision 36884)
@@ -71,5 +71,5 @@
                 continue;
             }
-            float flux = normModel->modelFlux(normModel->params); // Total flux for peak of 1.0
+            float flux = normModel->class->modelFlux(normModel->params); // Total flux for peak of 1.0
             psFree(normModel);
             if (!isfinite(flux)) {
@@ -424,5 +424,5 @@
                     continue;
                 }
-                float sourceRadius = PS_MAX(radius, model->modelRadius(model->params, minFlux)); // Radius for source
+                float sourceRadius = PS_MAX(radius, model->class->modelRadius(model->params, minFlux)); // Radius for source
                 psFree(model);
                 if (!isfinite(sourceRadius)) {
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotEvalFLT.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotEvalFLT.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotEvalFLT.c	(revision 36884)
@@ -53,5 +53,5 @@
     } 
 
-    keep = model->modelFitStatus(model);
+    keep = model->class->modelFitStatus(model);
     if (keep) return true;
 
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotFullForceSummaryReadout.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotFullForceSummaryReadout.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotFullForceSummaryReadout.c	(revision 36884)
@@ -425,5 +425,5 @@
                 // copy the best fit params to the model
                 // fractional radii with the lowest chisq
-                psEllipseAxes axes = pmPSF_ModelToAxes(model->params->data.F32, model->type);
+                psEllipseAxes axes = pmPSF_ModelToAxes(model->params->data.F32, model->class->useReff);
 
                 // examine the params for the trial with minimum chisq.
@@ -637,5 +637,5 @@
                 // now save the model parameters in the model structure
 
-                pmPSF_AxesToModel (model->params->data.F32, axes, modelType);
+                pmPSF_AxesToModel (model->params->data.F32, axes, model->class->useReff);
 
                 model->mag = -2.5 * log10(flux0);
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotGalaxyShape.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotGalaxyShape.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotGalaxyShape.c	(revision 36884)
@@ -283,5 +283,5 @@
 
         // I have some source guess (e0, e1, e2)
-        psEllipseAxes guessAxes = pmPSF_ModelToAxes (PAR, modelType);
+        psEllipseAxes guessAxes = pmPSF_ModelToAxes (PAR, model->class->useReff);
 
         float fRmajorBest = NAN;
@@ -295,5 +295,5 @@
                 testAxes.minor = guessAxes.minor * fRminor;
                 
-                pmPSF_AxesToModel (PAR, testAxes, modelType);
+                pmPSF_AxesToModel (PAR, testAxes, model->class->useReff);
                 
                 psphotGalaxyShapeSource (pcm, source, galaxyFits, maskVal, psfSize, true);
@@ -324,5 +324,5 @@
 #endif
             
-            pmPSF_AxesToModel (PAR, testAxes, modelType);
+            pmPSF_AxesToModel (PAR, testAxes, model->class->useReff);
                 
             psphotGalaxyShapeSource (pcm, source, galaxyFits, maskVal, psfSize, false);
@@ -400,5 +400,5 @@
 
     pcm->modelConv->params->data.F32[PM_PAR_I0] = Io;
-    float flux = pcm->modelConv->modelFlux (pcm->modelConv->params);
+    float flux = pcm->modelConv->class->modelFlux (pcm->modelConv->params);
     float dflux = flux * (dIo / Io);
 
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotLensing.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotLensing.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotLensing.c	(revision 36884)
@@ -12,4 +12,10 @@
     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
     psAssert (recipe, "missing recipe?");
+
+    // perform full extended source non-linear fits?
+    if (!psMetadataLookupBool (&status, recipe, "LENSING_PARAMETERS")) {
+        psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source fits\n");
+        return true;
+    }
 
     int num = psphotFileruleCount(config, filerule);
@@ -87,4 +93,5 @@
     }
 
+    psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "LENS_OBJ", PS_META_REPLACE, "per-object lensing stats measured", true);
     psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects\n", (int) sources->n);
 
@@ -317,4 +324,5 @@
     psFree (stats);
 
+    psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "LENS_PSF", PS_META_REPLACE, "psf-trend lensing stats measured", true);
     psLogMsg ("psphot.lensing", PS_LOG_DETAIL, "calculate lensing parameters for %d objects: %f sec\n", (int) sources->n, psTimerMark ("psphot.lensing"));
 
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotLoadSRCTEXT.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotLoadSRCTEXT.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotLoadSRCTEXT.c	(revision 36884)
@@ -73,5 +73,5 @@
 	    dPAR[PM_PAR_I0]   = 0.0;
 
-	    pmPSF_AxesToModel (PAR, axes, modelType);
+	    pmPSF_AxesToModel (PAR, axes, model->class->useReff);
 
 	    float peakFlux    = 1.0;
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotMakeFluxScale.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotMakeFluxScale.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotMakeFluxScale.c	(revision 36884)
@@ -38,5 +38,5 @@
             } else {
 		// measure the fitMag for this model
-		fitSum = model->modelFlux (model->params);
+		fitSum = model->class->modelFlux (model->params);
 	    }
 	    if (fitSum < 1.e-6) continue;
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotRadiusChecks.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotRadiusChecks.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotRadiusChecks.c	(revision 36884)
@@ -60,7 +60,7 @@
     if (radiusFit <= 0) {               // use fixed radius
         if (moments == NULL) {
-            radiusFit = model->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
+            radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
         } else {
-            radiusFit = model->modelRadius(model->params, 1.0);
+            radiusFit = model->class->modelRadius(model->params, 1.0);
         }
         model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING);
@@ -95,7 +95,7 @@
     if (radiusFit <= 0) {               // use fixed radius
         if (moments == NULL) {
-            radiusFit = model->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
+            radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);
         } else {
-            radiusFit = model->modelRadius(model->params, 1.0);
+            radiusFit = model->class->modelRadius(model->params, 1.0);
         }
         model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING);
@@ -294,5 +294,5 @@
     float flux = deep ? EXT_FIT_NSIGMA*EXT_FIT_SKY_SIG : 0.1 * model->params->data.F32[PM_PAR_I0];
 
-    float rawRadius = model->modelRadius (model->params, flux);
+    float rawRadius = model->class->modelRadius (model->params, flux);
     if (isnan(rawRadius)) return false;
 
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotSersicModelClass.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotSersicModelClass.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotSersicModelClass.c	(revision 36884)
@@ -586,5 +586,5 @@
             coord->data.F32[1] = (psF32) (i + source->pixels->row0);
 
-            pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv->modelFunc (NULL, params, coord);
+            pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv->class->modelFunc (NULL, params, coord);
         }
     }
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotSourceFits.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotSourceFits.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotSourceFits.c	(revision 36884)
@@ -700,5 +700,5 @@
 	model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[i];
 
-	if (!model->modelGuess(model, source, maskVal, markVal)) {
+	if (!model->class->modelGuess(model, source, maskVal, markVal)) {
 	    model->flags |= PM_MODEL_STATUS_BADARGS;
 	    return false;
@@ -723,5 +723,5 @@
     model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it
     model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[iMin];
-    model->modelGuess(model, source, maskVal, markVal);
+    model->class->modelGuess(model, source, maskVal, markVal);
 
     return true;
@@ -752,5 +752,5 @@
 	model->params->data.F32[PM_PAR_7] = indexGuess[i];
 	
-	if (!model->modelGuess(model, source, maskVal, markVal)) {
+	if (!model->class->modelGuess(model, source, maskVal, markVal)) {
 	    model->flags |= PM_MODEL_STATUS_BADARGS;
 	    return false;
Index: branches/eam_branches/ipp-20140610/psphot/src/psphotVisual.c
===================================================================
--- branches/eam_branches/ipp-20140610/psphot/src/psphotVisual.c	(revision 36845)
+++ branches/eam_branches/ipp-20140610/psphot/src/psphotVisual.c	(revision 36884)
@@ -1444,14 +1444,14 @@
 	    coord->data.F32[1] = r;
 	    coord->data.F32[0] = 0.0;
-	    fmaj->data.F32[i] = log10(source->modelPSF->modelFunc (NULL, params, coord));
+	    fmaj->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord));
 
 	    coord->data.F32[0] = r;
 	    coord->data.F32[1] = 0.0;
-	    fmin->data.F32[i] = log10(source->modelPSF->modelFunc (NULL, params, coord));
+	    fmin->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord));
 	}
 	psFree (coord);
 	psFree (params);
 
-	float FWHM_MAJOR = 2.0*source->modelPSF->modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]);
+	float FWHM_MAJOR = 2.0*source->modelPSF->class->modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]);
 	float FWHM_MINOR = FWHM_MAJOR * (axes.minor / axes.major);
 	if (FWHM_MAJOR < FWHM_MINOR) PS_SWAP (FWHM_MAJOR, FWHM_MINOR); 
