Index: trunk/ppTranslate/src/ppMopsRead.c
===================================================================
--- trunk/ppTranslate/src/ppMopsRead.c	(revision 34285)
+++ trunk/ppTranslate/src/ppMopsRead.c	(revision 34435)
@@ -22,4 +22,6 @@
   long num = inNames->n;                   // Number of inputs
   psArray *detections = psArrayAlloc(num); // Array of detections, to return
+  double plateScale = 0.0;        // Plate scale
+  long numGood = 0;               // Number of good rows
   for (int i = 0; i < num; i++) {
     const char *name = inNames->data[i];
@@ -96,4 +98,5 @@
     det->mjd = psMetadataLookupF64(NULL, header, "MJD-OBS") + det->exptime / 2.0 / 3600 / 24;
 
+    //It's recomputed 
     det->seeing = (float) 0.5 * (psMetadataLookupF32(NULL, header, "FWHM_MAJ") +
 				 psMetadataLookupF32(NULL, header, "FWHM_MIN"));
@@ -189,7 +192,5 @@
     psVector *angleV = psMetadataLookupVector(NULL, table, "POSANGLE");
     psVector *flagsV = psMetadataLookupVector(NULL, table, "FLAGS");
-
-    double plateScale = 0.0;        // Plate scale
-    long numGood = 0;               // Number of good rows
+    long localNumGood = 0;               // Number of good rows in the current skycell
     for (long row = 0; row < size; row++) {
 
@@ -233,16 +234,22 @@
       plateScale += scale;
       numGood++;
-    }
-    det->seeing *= ((float) plateScale) / ((float) numGood);
-
-    // Are we using numGood for anything outside of this function?
-    det->numGood = numGood;
-
+      localNumGood++;
+    }
     if (isfinite(args->zp) && numGood > 0) {
       psBinaryOp(mag, mag, "+", psScalarAlloc(args->zp, PS_TYPE_F32));
     }
 
-    psTrace("ppMops.read", 2, "Read %ld good rows from %s\n", numGood, (const char*)name);
+    psTrace("ppMops.read", 2, "Read %ld good rows from %s\n", localNumGood, (const char*)name);
   }
+  //The seeing is the product of the mean of FWHM_MIN and FWHM_MAJ by
+  //the mean of the scale values of all "good" detections.
+  if (numGood > 0) {
+    //Avoid dividing by 0
+    det->seeing *= ((float) plateScale) / ((float) numGood);
+  } else {
+    det->seeing = NAN;
+  }
+  // Are we using numGood for anything outside of this function?
+  det->numGood = numGood;
 
   psTrace("ppMops.read", 1, "Done reading input detections\n");
