Index: /branches/eam_branches/ohana.20170822/src/relphot/include/relphot.h
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/include/relphot.h	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/include/relphot.h	(revision 40235)
@@ -407,4 +407,5 @@
 int           findMosaics         PROTO((Catalog *catalog, int Ncatalog, int doMosaicList));
 
+void checkImages (char *name);
 int dumpMags (FILE *fout, Catalog *catalog, int Ncatalog);
 
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c	(revision 40235)
@@ -1159,2 +1159,11 @@
   return (stats);
 }
+
+void checkImages (char *name) {
+
+  off_t i;
+  fprintf (stderr, "--- %s ---\n", name);
+  for (i = 0; i < Nimage; i++) {
+    fprintf (stderr, "%s : 0x%08x : %6.3f  %6.3f\n", image[i].name, image[i].flags, image[i].McalPSF, image[i].McalAPER);
+  }
+}
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/load_images.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/load_images.c	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/load_images.c	(revision 40235)
@@ -52,4 +52,24 @@
       free (subset);
       subset = image;
+    }
+  }
+
+  // reset image values as needed.  always allow 'few' images to succeed, if possible (new
+  // images / detections may have been added
+  for (off_t i = 0; i < Nsubset; i++) {
+    if (subset[i].flags & ID_IMAGE_PHOTOM_FEW) { 
+      subset[i].flags &= ~(ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR);
+    }
+    if (RESET) {
+      if (RESET_ZEROPTS) {
+	if (!KEEP_UBERCAL || !(subset[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
+	  subset[i].McalPSF  = 0.0;
+	  subset[i].McalAPER = 0.0;
+	  subset[i].dMcal    = NAN;
+	  subset[i].flags   &= ~ID_IMAGE_PHOTOM_UBERCAL;
+	}
+      }
+      subset[i].flags &= ~ID_IMAGE_PHOTOM_POOR;
+      subset[i].ubercalDist = 1000;
     }
   }
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/plotstuff.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/plotstuff.c	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/plotstuff.c	(revision 40235)
@@ -179,5 +179,5 @@
 
   KapaInitGraph (graphdata);
-  graphdata[0].style = 2;
+  graphdata[0].style = KAPA_PLOT_POINTS; /* points */
   graphdata[0].ptype = 2;
   graphdata[0].ltype = 0;
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c	(revision 40235)
@@ -41,4 +41,6 @@
   load_images (&db, skylist, &UserPatch, FALSE, USE_ALL_IMAGES);
   MARKTIME("-- load images: %f sec\n", dtime);
+
+  checkImages("load images");
 
   /* unlock, if we can (else, unlocked below) */
@@ -60,4 +62,6 @@
     /* add in a loop over the catalogs calling dvo_catalog_chipcoords */
 
+    checkImages("load catalog");
+
     /* match measurements with images, mosaics */
     initImageBins  (catalog, Ncatalog, TRUE);
@@ -77,4 +81,5 @@
 
     setExclusions (catalog, Ncatalog, TRUE);
+    checkImages("set Exclu");
 
     global_stats (catalog, Ncatalog, flatcorr, 0);
@@ -109,7 +114,9 @@
       }
       if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
+      checkImages("start loop");
 
       setMrel  (catalog, Ncatalog, flatcorr); // threaded
       if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
+      checkImages("set Mrel");
 
       if (PLOTSTUFF) {
@@ -117,4 +124,5 @@
       }
       setMcal  (catalog, FALSE, flatcorr);
+      checkImages("set Mcal");
       if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
 
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/select_images.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/select_images.c	(revision 40234)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/select_images.c	(revision 40235)
@@ -251,21 +251,4 @@
     image[nimage] = timage[i]; 
     inSubset[i] = TRUE;
-    /* always allow 'few' images to succeed, if possible (new images / detections may have
-     * been added) */
-    if (image[nimage].flags & ID_IMAGE_PHOTOM_FEW) { 
-      image[nimage].flags &= ~(ID_IMAGE_PHOTOM_FEW | ID_IMAGE_PHOTOM_POOR);
-    }
-    if (RESET) {
-      if (RESET_ZEROPTS) {
-	if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
-	  image[nimage].McalPSF  = 0.0;
-	  image[nimage].McalAPER = 0.0;
-	  image[nimage].dMcal    = NAN;
-	  image[nimage].flags   &= ~ID_IMAGE_PHOTOM_UBERCAL;
-	}
-      }
-      image[nimage].flags &= ~ID_IMAGE_PHOTOM_POOR;
-      image[nimage].ubercalDist = 1000;
-    }
     line_number[nimage] = i;
     nimage ++;
