Index: /branches/eam_branches/20090715/psModules/src/objects/pmModel.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/pmModel.c	(revision 25354)
+++ /branches/eam_branches/20090715/psModules/src/objects/pmModel.c	(revision 25355)
@@ -56,6 +56,7 @@
 
     tmp->type = type;
-    tmp->chisq = 0.0;
-    tmp->chisqNorm = 0.0;
+    tmp->mag = NAN;
+    tmp->chisq = NAN;
+    tmp->chisqNorm = NAN;
     tmp->nDOF  = 0;
     tmp->nPix  = 0;
@@ -189,7 +190,7 @@
     psVector *params = model->params;
 
-    psS32 imageCol;
-    psS32 imageRow;
-    psF32 pixelValue;
+    float imageCol;
+    float imageRow;
+    float pixelValue;
 
     // save original values; restore before returning
@@ -255,11 +256,11 @@
                 continue;
 
-            // XXX should we use using 0.5 pixel offset?
 	    // Convert to coordinate in parent image, with offset (dx,dy)
-            imageCol = ix + image->col0 - dx;
-            imageRow = iy + image->row0 - dy;
-
-            x->data.F32[0] = (float) imageCol;
-            x->data.F32[1] = (float) imageRow;
+	    // 0.5 PIX: the model take pixel coordinates so convert the pixel index here
+            imageCol = ix + 0.5 + image->col0 - dx;
+            imageRow = iy + 0.5 + image->row0 - dy;
+
+            x->data.F32[0] = imageCol;
+            x->data.F32[1] = imageRow;
 
             pixelValue = 0.0;
