Index: /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c	(revision 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_GAUSS.c	(revision 25679)
@@ -260,4 +260,6 @@
     psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0);
     psF64 radius = axes.major * sqrt (2.0 * log(PAR[PM_PAR_I0] / flux));
+    psAssert (isfinite(radius, "fix this code: radius should not be nan for %f", PAR[PM_PAR_I0]));
+
     return (radius);
 }
Index: /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c	(revision 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PGAUSS.c	(revision 25679)
@@ -287,5 +287,7 @@
     // choose a z value guaranteed to be beyond our limit
     float z0 = pow((1.0 / limit), (1.0 / 3.0));
+    psAssert (isfinite(z0, "fix this code: z0 should not be nan for %f", PAR[PM_PAR_I0]));
     float z1 = (1.0 / limit);
+    psAssert (isfinite(z1, "fix this code: z1 should not be nan for %f", PAR[PM_PAR_I0]));
     z1 = PS_MAX (z0, z1);
     z0 = 0.0;
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 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_PS1_V1.c	(revision 25679)
@@ -325,4 +325,5 @@
     float z0 = 0.0;
     float z1 = pow((1.0 / limit), (1.0 / ALPHA));
+    psAssert (isfinite(z1, "fix this code: z1 should not be nan for %f", PAR[PM_PAR_7]));
     if (PAR[PM_PAR_7] < 0.0) z1 *= 2.0;
 
Index: /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c	(revision 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_QGAUSS.c	(revision 25679)
@@ -321,5 +321,7 @@
     // choose a z value guaranteed to be beyond our limit
     float z0 = pow((1.0 / limit), (1.0 / 2.25));
+    psAssert (isfinite(z0, "fix this code: z0 should not be nan for %f", PAR[PM_PAR_7]));
     float z1 = (1.0 / limit) / PAR[PM_PAR_7];
+    psAssert (isfinite(z1, "fix this code: z1 should not be nan for %f", PAR[PM_PAR_7]));
     z1 = PS_MAX (z0, z1);
     z0 = 0.0;
Index: /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c	(revision 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_RGAUSS.c	(revision 25679)
@@ -314,5 +314,7 @@
     // choose a z value guaranteed to be beyond our limit
     float z0 = pow((1.0 / limit), (1.0 / PAR[PM_PAR_7]));
+    psAssert (isfinite(z0, "fix this code: z0 should not be nan for %f", PAR[PM_PAR_7]));
     float z1 = (1.0 / limit);
+    psAssert (isfinite(z1, "fix this code: z1 should not be nan for %f", PAR[PM_PAR_7]));
     z1 = PS_MAX (z0, z1);
     z0 = 0.0;
Index: /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c	(revision 25678)
+++ /branches/eam_branches/20090715/psModules/src/objects/models/pmModel_SERSIC.c	(revision 25679)
@@ -324,6 +324,8 @@
 
     psF64 z = pow (-log(limit), (1.0 / PAR[PM_PAR_7]));
+    psAssert (isfinite(z, "fix this code: z should not be nan for %f", PAR[PM_PAR_7]));
 
     psF64 radius = sigma * sqrt (2.0 * z);
+    psAssert (isfinite(radius, "fix this code: radius should not be nan for %f, %f", PAR[PM_PAR_7], sigma));
 
     if (isnan(radius))
