Index: branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CMF.c.in
===================================================================
--- branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CMF.c.in	(revision 36264)
+++ branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO_CMF.c.in	(revision 36266)
@@ -1062,6 +1062,9 @@
         model->nDOF = psMetadataLookupF32(&status, row, "EXT_NDOF");
 
-        // XXX: We don't have place to put this. Needs to go in psf extension:
-        // psMetadataLookupS32(&status, row, "EXT_MODEL_TYPE");
+        // EXT_MODEL_TYPE gives the model chosen by psphot as the best.
+        // Putting this into the XFIT table makes 3 copies of it (one for each model)
+        // but since we have fewer XFIT rows than psf rows that is cheaper than putting it
+        // in the psf table.
+        psS32 extModelType = psMetadataLookupS32(&status, row, "EXT_MODEL_TYPE");
 
         psEllipseAxes axes;
@@ -1094,4 +1097,17 @@
         psArrayAdd(source->modelFits, 1, model);
         psFree(model);
+
+        if (modelType == extModelType) {
+            // The software that created this source picked this model as the best of the fits. 
+            // Set the extModel to point to it.
+            psFree(source->modelEXT);
+            source->modelEXT = psMemIncrRefCounter(model);
+            if (0) {
+                // since FLAGS were read we shouldn't need to do this.
+                source->type = PM_SOURCE_TYPE_EXTENDED;
+                source->mode |= PM_SOURCE_MODE_EXTMODEL;
+                source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT;   // XXX: Is this safe?
+            }
+        }
 
         psFree(row);
