Index: /trunk/Ohana/src/relphot/src/GridOps.c
===================================================================
--- /trunk/Ohana/src/relphot/src/GridOps.c	(revision 20362)
+++ /trunk/Ohana/src/relphot/src/GridOps.c	(revision 20363)
@@ -1,8 +1,8 @@
 # include "relphot.h"
 
-typedef enum {
-  GRID_FITTED,
-  GRID_FROZEN,
-  GRID_REFERENCE,
+enum {
+    GRID_FITTED,
+    GRID_FROZEN,
+    GRID_REFERENCE,
 };
 
@@ -235,4 +235,7 @@
   mlist[i][Nlist[i]] = meas;
 
+  // for the moment, add up the total grid count
+  gridN[i]++;
+
   Nlist[i] ++;
   if (Nlist[i] == NLIST[i]) {
@@ -247,4 +250,17 @@
 }
 
+int showGridCount() {
+
+    int ix, iy, i;
+
+    for (iy = 0; iy < gridY; iy++) {
+	for (ix = 0; ix < gridX; ix++) {
+	    i = ix + iy*gridX;
+	    fprintf (stderr, "%3d  ", gridN[i]);
+	}
+	fprintf (stderr, "\n");
+    }
+}
+
 float getMgrid (int meas, int cat) {
 
@@ -258,5 +274,7 @@
   // during the grid annealing process, we skip over grid cells until they have enough
   // valid stars to be fitted
-  if (gridV[i] == GRID_FROZEN) return (NAN);
+  if (gridV[i] == GRID_FROZEN) {
+    return (NAN);
+  }
 
   value = gridM[i];
