Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c	(revision 25351)
@@ -1,8 +1,8 @@
 /******************************************************************************
  * this file defines the GAUSS source shape model.  Note that these model functions are loaded
- * by pmModelGroup.c using 'include', and thus need no 'include' statements of their own.  The
+ * by pmModelClass.c using 'include', and thus need no 'include' statements of their own.  The
  * models use a psVector to represent the set of parameters, with the sequence used to specify
  * the meaning of the parameter.  The meaning of the parameters may thus vary depending on the
- * specifics of the model.  All models which are used a PSF representations share a few
+ * specifics of the model.  All models which are used as a PSF representations share a few
  * parameters, for which # define names are listed in pmModel.h:
 
@@ -192,4 +192,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -207,5 +208,5 @@
     psEllipseShape shape = psEllipseAxesToShape (axes);
 
-    PAR[PM_PAR_SKY]  = moments->Sky;
+    PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
     PAR[PM_PAR_XPOS] = peak->xf;
@@ -369,5 +370,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-    psF32 dP;
     bool  status;
 
@@ -375,17 +375,9 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
 
-    if (status)
-        return true;
-    return false;
+    return status;
 }
 
Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c	(revision 25351)
@@ -1,8 +1,8 @@
 /******************************************************************************
  * this file defines the PGAUSS source shape model.  Note that these model functions are loaded
- * by pmModelGroup.c using 'include', and thus need no 'include' statements of their own.  The
+ * by pmModelClass.c using 'include', and thus need no 'include' statements of their own.  The
  * models use a psVector to represent the set of parameters, with the sequence used to specify
  * the meaning of the parameter.  The meaning of the parameters may thus vary depending on the
- * specifics of the model.  All models which are used a PSF representations share a few
+ * specifics of the model.  All models which are used as a PSF representations share a few
  * parameters, for which # define names are listed in pmModel.h:
 
@@ -29,4 +29,6 @@
 
 // the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
+// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
+// values need to be pixel coords
 psF32 PM_MODEL_FUNC(psVector *deriv,
                     const psVector *params,
@@ -191,4 +193,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -205,5 +208,5 @@
     psEllipseShape shape = psEllipseAxesToShape (axes);
 
-    PAR[PM_PAR_SKY]  = moments->Sky;
+    PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
     PAR[PM_PAR_XPOS] = peak->xf;
@@ -415,5 +418,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-    psF32 dP;
     bool  status;
 
@@ -421,11 +423,5 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PS1_V1.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PS1_V1.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PS1_V1.c	(revision 25351)
@@ -1,9 +1,9 @@
 /******************************************************************************
- * this file defines the PS1_V1 source shape model (XXX need a better name!).  Note that these
- * model functions are loaded by pmModelGroup.c using 'include', and thus need no 'include'
- * statements of their own.  The models use a psVector to represent the set of parameters, with
- * the sequence used to specify the meaning of the parameter.  The meaning of the parameters
- * may thus vary depending on the specifics of the model.  All models which are used a PSF
- * representations share a few parameters, for which # define names are listed in pmModel.h:
+ * this file defines the PS1_V1 source shape model.  Note that these model functions are loaded
+ * by pmModelClass.c using 'include', and thus need no 'include' statements of their own.  The
+ * models use a psVector to represent the set of parameters, with the sequence used to specify
+ * the meaning of the parameter.  The meaning of the parameters may thus vary depending on the
+ * specifics of the model.  All models which are used as a PSF representations share a few
+ * parameters, for which # define names are listed in pmModel.h:
 
    power-law with fitted linear term
@@ -32,4 +32,7 @@
 # define ALPHA_M 0.666
 
+// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
+// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
+// values need to be pixel coords
 psF32 PM_MODEL_FUNC (psVector *deriv,
                      const psVector *params,
@@ -216,4 +219,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -240,5 +244,4 @@
     if (!isfinite(shape.sxy)) return false;
 
-    // XXX turn this off here for now PAR[PM_PAR_SKY]  = moments->Sky;
     PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
@@ -448,6 +451,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-
-    psF32 dP;
     bool  status;
 
@@ -455,11 +456,5 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-//    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c	(revision 25351)
@@ -1,5 +1,5 @@
 /******************************************************************************
  * this file defines the QGAUSS source shape model (XXX need a better name!).  Note that these
- * model functions are loaded by pmModelGroup.c using 'include', and thus need no 'include'
+ * model functions are loaded by pmModelClass.c using 'include', and thus need no 'include'
  * statements of their own.  The models use a psVector to represent the set of parameters, with
  * the sequence used to specify the meaning of the parameter.  The meaning of the parameters
@@ -29,4 +29,7 @@
 # define PM_MODEL_FIT_STATUS      pmModelFitStatus_QGAUSS
 
+// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
+// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
+// values need to be pixel coords
 psF32 PM_MODEL_FUNC (psVector *deriv,
                      const psVector *params,
@@ -213,4 +216,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -237,5 +241,4 @@
     if (!isfinite(shape.sxy)) return false;
 
-    // XXX turn this off here for now PAR[PM_PAR_SKY]  = moments->Sky;
     PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
@@ -444,6 +447,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-
-    psF32 dP;
     bool  status;
 
@@ -451,11 +452,5 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-//    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c	(revision 25351)
@@ -1,8 +1,8 @@
 /******************************************************************************
  * this file defines the RGAUSS source shape model (XXX need a better name!).  Note that these
- * model functions are loaded by pmModelGroup.c using 'include', and thus need no 'include'
+ * model functions are loaded by pmModelClass.c using 'include', and thus need no 'include'
  * statements of their own.  The models use a psVector to represent the set of parameters, with
  * the sequence used to specify the meaning of the parameter.  The meaning of the parameters
- * may thus vary depending on the specifics of the model.  All models which are used a PSF
+ * may thus vary depending on the specifics of the model.  All models which are used as a PSF
  * representations share a few parameters, for which # define names are listed in pmModel.h:
 
@@ -29,4 +29,7 @@
 # define PM_MODEL_FIT_STATUS      pmModelFitStatus_RGAUSS
 
+// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
+// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
+// values need to be pixel coords
 psF32 PM_MODEL_FUNC (psVector *deriv,
                      const psVector *params,
@@ -62,5 +65,5 @@
         dPAR[PM_PAR_SXY] = -q*X*Y;
 
-        // this model derivative is undefined at z = 0.0, but is actually 0.0
+        // this model derivative is undefined at z = 0.0, but the limit is zero as z -> 0.0
         dPAR[PM_PAR_7] = (z == 0.0) ? 0.0 : -5.0*t*log(z)*p*z;
     }
@@ -206,4 +209,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -230,5 +234,5 @@
     if (!isfinite(shape.sxy)) return false;
 
-    PAR[PM_PAR_SKY]  = moments->Sky;
+    PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
     PAR[PM_PAR_XPOS] = peak->xf;
@@ -436,6 +440,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-
-    psF32 dP;
     bool  status;
 
@@ -443,11 +445,5 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
Index: branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c
===================================================================
--- branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c	(revision 25350)
+++ branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c	(revision 25351)
@@ -1,8 +1,8 @@
 /******************************************************************************
  * this file defines the SERSIC source shape model.  Note that these model functions are loaded
- * by pmModelGroup.c using 'include', and thus need no 'include' statements of their own.  The
+ * by pmModelClass.c using 'include', and thus need no 'include' statements of their own.  The
  * models use a psVector to represent the set of parameters, with the sequence used to specify
  * the meaning of the parameter.  The meaning of the parameters may thus vary depending on the
- * specifics of the model.  All models which are used a PSF representations share a few
+ * specifics of the model.  All models which are used as a PSF representations share a few
  * parameters, for which # define names are listed in pmModel.h:
 
@@ -32,4 +32,7 @@
 # define PM_MODEL_FIT_STATUS      pmModelFitStatus_SERSIC
 
+// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
+// 0.5 PIX: the parameters are defined in terms of pixel coords, so the incoming pixcoords
+// values need to be pixel coords
 psF32 PM_MODEL_FUNC (psVector *deriv,
                      const psVector *params,
@@ -223,4 +226,5 @@
 
 // make an initial guess for parameters
+// 0.5 PIX: moments and peaks are in pixel coords, thus so are model parameters
 bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
 {
@@ -247,5 +251,4 @@
     if (!isfinite(shape.sxy)) return false;
 
-    // XXX PAR[PM_PAR_SKY]  = moments->Sky;
     PAR[PM_PAR_SKY]  = 0.0;
     PAR[PM_PAR_I0]   = peak->flux;
@@ -429,6 +432,4 @@
 bool PM_MODEL_FIT_STATUS (pmModel *model)
 {
-
-    psF32 dP;
     bool  status;
 
@@ -436,16 +437,7 @@
     psF32 *dPAR = model->dparams->data.F32;
 
-    dP = 0;
-    dP += PS_SQR(dPAR[PM_PAR_SXX] / PAR[PM_PAR_SXX]);
-    dP += PS_SQR(dPAR[PM_PAR_SYY] / PAR[PM_PAR_SYY]);
-    dP = sqrt (dP);
-
     status = true;
-//    status &= (dP < 0.5);
     status &= (PAR[PM_PAR_I0] > 0);
     status &= ((dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]) < 0.5);
-
-    fprintf (stderr, "SERSIC status pars: dP: %f, I0: %f, S/N: %f\n",
-	     dP, PAR[PM_PAR_I0], (dPAR[PM_PAR_I0]/PAR[PM_PAR_I0]));
 
     return status;
