Index: trunk/psModules/src/objects/pmFootprintAssignPeaks.c
===================================================================
--- trunk/psModules/src/objects/pmFootprintAssignPeaks.c	(revision 37964)
+++ trunk/psModules/src/objects/pmFootprintAssignPeaks.c	(revision 38038)
@@ -56,5 +56,5 @@
 	const int y = peak->y - row0;
 	
-	if (ids) { assert (x >= 0 && x < numCols && y >= 0 && y < numRows);}
+	if (ids) { psAssert (x >= 0 && x < numCols && y >= 0 && y < numRows, "out of range");}
 	int id = ids ? ids->data.S32[y][x] : 0;
 
Index: trunk/psModules/src/objects/pmModelFuncs.h
===================================================================
--- trunk/psModules/src/objects/pmModelFuncs.h	(revision 37964)
+++ trunk/psModules/src/objects/pmModelFuncs.h	(revision 38038)
@@ -36,16 +36,19 @@
 
 typedef enum {
-    PM_MODEL_STATUS_NONE           = 0x000, ///< model fit not yet attempted, no other info
-    PM_MODEL_STATUS_FITTED         = 0x001, ///< model fit completed
-    PM_MODEL_STATUS_NONCONVERGE    = 0x002, ///< model fit did not converge
-    PM_MODEL_STATUS_OFFIMAGE       = 0x004, ///< model fit drove out of range
-    PM_MODEL_STATUS_BADARGS        = 0x008, ///< model fit called with invalid args
-    PM_MODEL_STATUS_LIMITS         = 0x010, ///< model parameters hit limits
-    PM_MODEL_STATUS_WEAK_FIT       = 0x020, ///< model fit met loose tolerance, but not tight tolerance
-    PM_MODEL_STATUS_NAN_CHISQ      = 0x040, ///< model fit failed with a NAN chisq 
-    PM_MODEL_SERSIC_PCM_FAIL_GUESS = 0x080, ///< sersic model fit failed on the initial moments-based guess
-    PM_MODEL_SERSIC_PCM_FAIL_GRID  = 0x100, ///< sersic model fit failed on the grid search
-    PM_MODEL_PCM_FAIL_GUESS        = 0x200, ///< non-sersic model fit failed on the initial moments-based guess
-    PM_MODEL_BEST_FIT              = 0x400, ///< this model was the best fit and was subtracted
+    PM_MODEL_STATUS_NONE           = 0x0000, ///< model fit not yet attempted, no other info
+    PM_MODEL_STATUS_FITTED         = 0x0001, ///< model fit completed
+    PM_MODEL_STATUS_NONCONVERGE    = 0x0002, ///< model fit did not converge
+    PM_MODEL_STATUS_OFFIMAGE       = 0x0004, ///< model fit drove out of range
+    PM_MODEL_STATUS_BADARGS        = 0x0008, ///< model fit called with invalid args
+    PM_MODEL_STATUS_LIMITS         = 0x0010, ///< model parameters hit limits
+    PM_MODEL_STATUS_WEAK_FIT       = 0x0020, ///< model fit met loose tolerance, but not tight tolerance
+    PM_MODEL_STATUS_NAN_CHISQ      = 0x0040, ///< model fit failed with a NAN chisq 
+    PM_MODEL_SERSIC_PCM_FAIL_GUESS = 0x0080, ///< sersic model fit failed on the initial moments-based guess
+    PM_MODEL_SERSIC_PCM_FAIL_GRID  = 0x0100, ///< sersic model fit failed on the grid search
+    PM_MODEL_PCM_FAIL_GUESS        = 0x0200, ///< non-sersic model fit failed on the initial moments-based guess
+    PM_MODEL_BEST_FIT              = 0x0400, ///< this model was the best fit and was subtracted
+    PM_MODEL_STATUS_NAN_SHAPE      = 0x0800, ///< model ellipse parameters do not transform to valid ellipse
+    PM_MODEL_STATUS_NAN_SHAPE_ERR  = 0x1000, ///< model ellipse parameters errors do not transform to valid ellipse
+    PM_MODEL_STATUS_FAIL_SHAPE_ERR = 0x2000, ///< could not find an MC solution for ellipse parameter errors
 } pmModelStatus;
 
Index: trunk/psModules/src/objects/pmSourceIO_CMF.c.in
===================================================================
--- trunk/psModules/src/objects/pmSourceIO_CMF.c.in	(revision 37964)
+++ trunk/psModules/src/objects/pmSourceIO_CMF.c.in	(revision 38038)
@@ -1252,6 +1252,6 @@
         }
 
-	// XXX : make this depend on what is in the cmf
-	if (0) {
+	// NOTE: we no longer write out the covariance matrix
+	if (false) {
 	    // read the covariance matrix
 	    int nparams = model->params->n;
@@ -1266,4 +1266,12 @@
 	    model->covar = covar;
 	}
+
+	// we are only saving the values stored in dPAR[SXX,etc]
+        dPAR[PM_PAR_SXX] = psMetadataLookupF32(&status, row, "EXT_WIDTH_MAJ_ERR");
+        dPAR[PM_PAR_SYY] = psMetadataLookupF32(&status, row, "EXT_WIDTH_MIN_ERR");
+        dPAR[PM_PAR_SXY] = psMetadataLookupF32(&status, row, "EXT_THETA_ERR");
+
+	// other parameters that we need to read
+        PAR[PM_PAR_SKY] = psMetadataLookupF32(&status, row, "SKY_EXT");
 
         if (modelType == extModelType) {
Index: trunk/psModules/src/objects/pmSourceIO_PS1_CAL_0.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO_PS1_CAL_0.c	(revision 37964)
+++ trunk/psModules/src/objects/pmSourceIO_PS1_CAL_0.c	(revision 38038)
@@ -376,5 +376,5 @@
     psVector *radialBinsLower = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.LOWER");
     psVector *radialBinsUpper = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.UPPER");
-    assert (radialBinsLower->n == radialBinsUpper->n);
+    psAssert (radialBinsLower->n == radialBinsUpper->n, "upper and lower bins must match");
 
     // we write out all sources, regardless of quality.  the source flags tell us the state
Index: trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c	(revision 37964)
+++ trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c	(revision 38038)
@@ -322,5 +322,5 @@
     psVector *radialBinsLower = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.LOWER");
     psVector *radialBinsUpper = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.UPPER");
-    assert (radialBinsLower->n == radialBinsUpper->n);
+    psAssert (radialBinsLower->n == radialBinsUpper->n, "upper and lower bins must match");
 
     // we write out all sources, regardless of quality.  the source flags tell us the state
Index: trunk/psModules/src/objects/pmSourceOutputs.c
===================================================================
--- trunk/psModules/src/objects/pmSourceOutputs.c	(revision 37964)
+++ trunk/psModules/src/objects/pmSourceOutputs.c	(revision 38038)
@@ -60,18 +60,32 @@
     // we need a measure of the image quality (FWHM) for this image, in order to get the positional errors
     *fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "FWHM_MAJ");
-    if (!status1) {
-	*fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW1");
-	if (!status1) {
-	    *fwhmMajor = 5.0; // XXX just a guess!
-	}
-    }
+    if (status1) goto got_major;
+
+    *fwhmMajor = psMetadataLookupF32(&status1, header, "FWHM_MAJ");
+    if (status1) goto got_major;
+
+    *fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW1");
+    if (status1) goto got_major;
+
+    *fwhmMajor = psMetadataLookupF32(&status1, header, "IQ_FW1");
+    if (status1) goto got_major;
+
+    *fwhmMajor = 5.0; // XXX just a guess!
+
+    got_major:
+
     *fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "FWHM_MIN");
-    if (!status1) {
-	*fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW2");
-	if (!status1) {
-	    *fwhmMinor = 5.0; // XXX just a guess!
-	}
-    }
-
+    if (status1) goto got_minor;
+    *fwhmMinor = psMetadataLookupF32(&status1, header, "FWHM_MIN");
+    if (status1) goto got_minor;
+
+    *fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW2");
+    if (status1) goto got_minor;
+    *fwhmMinor = psMetadataLookupF32(&status1, header, "IQ_FW2");
+    if (status1) goto got_minor;
+
+    *fwhmMinor = 5.0; // XXX just a guess!
+
+    got_minor:
     return true;
 
