Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/include/relphot.h
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/include/relphot.h	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/include/relphot.h	(revision 35872)
@@ -244,4 +244,5 @@
 
 int USE_BASIC_CHECK;
+int USE_FULL_OVERLAP;
 
 # ifdef GRID_V1
Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/MosaicOps.c	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/MosaicOps.c	(revision 35872)
@@ -302,7 +302,7 @@
     mosaic[j].Mcal  = 0.0;
     mosaic[j].dMcal = 0.0;
-    mosaic[j].dMsys = 0.0;
     mosaic[j].Xm    = 0.0;
-    mosaic[j].flags  = subset[i].flags;
+    mosaic[j].dMsys = subset[i].flags;
+    mosaic[j].flags = subset[i].flags;
     mosaic[j].secz  = subset[i].secz;
     mosaic[j].photcode = GetPhotcodeEquivCodebyCode (subset[i].photcode);
Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/args.c	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/args.c	(revision 35872)
@@ -64,4 +64,10 @@
   }
 
+  USE_FULL_OVERLAP = TRUE;
+  if ((N = get_argument (argc, argv, "-sloppy-image-overlap"))) {
+    remove_argument (N, &argc, argv);
+    USE_FULL_OVERLAP = FALSE;
+  }
+
   SET_MREL_VERSION = 1;
   if ((N = get_argument (argc, argv, "-set-mrel-version"))) {
Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/reload_catalogs.c	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/reload_catalogs.c	(revision 35872)
@@ -164,6 +164,21 @@
   }
 
-  int i;
+  int i, j;
   for (i = 0; i < table->Nhosts; i++) {
+
+    if (sky->Nregions < table->Nhosts) {
+      // do any of the regions want this host?
+      int wantThisHost = FALSE;
+      for (j = 0; j < sky->Nregions; j++) {
+	if (HostTableTestHost (sky->regions[j], table->hosts[i].hostID)) {
+	  wantThisHost = TRUE;
+	  break;
+	}
+      }
+      if (!wantThisHost) {
+	// fprintf (stderr, "skip host %s\n", table->hosts[i].hostname);
+	continue;
+      }
+    }
 
     // ensure that the paths are absolute path names
Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/relphot_images.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/relphot_images.c	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/relphot_images.c	(revision 35872)
@@ -232,5 +232,10 @@
     freeGridBins (Ncatalog);
 
-  } // (NLOOP > 0) : this loop determines the offsets per chip 
+    // end of if (NLOOP > 0) block : this loop determines the offsets per chip 
+  } else { 
+    // If nloop == 0, the above pass is not performed, in which case
+    // the Mcal values passed to the mosaics are not returned to the images...
+    setMcalFinal (); // copy per-mosaic calibrations to the images
+  }
 
   reload_images (&db);
@@ -247,5 +252,8 @@
     db.format = dvo_catalog_catformat (UPDATE_CATFORMAT);
   }
-  dvo_image_update (&db, VERBOSE);
+  if (NLOOP > 0) {
+    // do not save changes if we did not make changes. 
+    dvo_image_update (&db, VERBOSE);
+  }
   dvo_image_unlock (&db); 
 
Index: /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/select_images.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/select_images.c	(revision 35871)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/relphot/src/select_images.c	(revision 35872)
@@ -176,24 +176,26 @@
     // declination, the range of RA is limited by the actual catalog boundaries
     // check if this image is in range for the Dmax and Dmin locations
-
-    int iDecBandMin = (DminImage + 90.0) / dDecBand;
-    int iDecBandMax = (DmaxImage + 90.0) / dDecBand;
-
-    // the sky region RA is defined to be 0 - 360.0
-    if (RminImage < RminBand[iDecBandMin]) { 
-      if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
-      continue;
-    }
-    if (RminImage < RminBand[iDecBandMax]) {
-      if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
-      continue;
-    }
-    if (RmaxImage > RmaxBand[iDecBandMin]) {
-      if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
-      continue;
-    }
-    if (RmaxImage > RmaxBand[iDecBandMax]) {
-      if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
-      continue;
+    if (USE_FULL_OVERLAP && strcmp(&timage[i].coords.ctype[4], "-DIS")) {
+
+      int iDecBandMin = (DminImage + 90.0) / dDecBand;
+      int iDecBandMax = (DmaxImage + 90.0) / dDecBand;
+
+      // the sky region RA is defined to be 0 - 360.0
+      if (RminImage < RminBand[iDecBandMin]) { 
+	if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
+	continue;
+      }
+      if (RminImage < RminBand[iDecBandMax]) {
+	if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
+	continue;
+      }
+      if (RmaxImage > RmaxBand[iDecBandMin]) {
+	if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
+	continue;
+      }
+      if (RmaxImage > RmaxBand[iDecBandMax]) {
+	if (VERBOSE2) fprintf (stderr, "skip image %s (%f,%f) on boundary\n", timage[i].name, 0.5*(RminImage + RmaxImage), 0.5*(DminImage + DmaxImage));
+	continue;
+      }
     }
 
