Index: branches/eam_branches/relphot.20210521/src/ZeroPointModes.c
===================================================================
--- branches/eam_branches/relphot.20210521/src/ZeroPointModes.c	(revision 41625)
+++ branches/eam_branches/relphot.20210521/src/ZeroPointModes.c	(revision 41631)
@@ -104,10 +104,10 @@
 
   if (!TGROUP_ZEROPT && MOSAIC_ZEROPT) {
-    if (CurrentLoop <= 4) {
+    if (CurrentLoop < 6) {
       TGROUP_ZPT_MODE = TGROUP_ZPT_MODE_NONE;
       MOSAIC_ZPT_MODE = MOSAIC_ZPT_MODE_ALL;
       IMAGE_ZPT_MODE  = IMAGE_ZPT_MODE_NONE;
     }
-    if ((CurrentLoop > 4) && (CurrentLoop <= 999)) {
+    if ((CurrentLoop >= 6) && (CurrentLoop < 12)) {
       // after iterating a few times on the Mosaic zero points:
       // * identify the good / bad mosaics
@@ -118,4 +118,27 @@
       clean_mosaics(); // do this on every pass or just sometimes?
     }
+    if ((CurrentLoop >= 12) && (CurrentLoop < 18)) {
+      // after iterating a few times on the Mosaic zero points:
+      // * identify the good / bad mosaics
+      // * fit the images from the bad mosaics
+      TGROUP_ZPT_MODE = TGROUP_ZPT_MODE_NONE; // stop fitting the bad nights
+      MOSAIC_ZPT_MODE = MOSAIC_ZPT_MODE_GOOD_MOSAIC;
+      IMAGE_ZPT_MODE  = IMAGE_ZPT_MODE_BAD_MOSAIC;
+      clean_mosaics(); // do this on every pass or just sometimes?
+      clean_images(); // do this on every pass 
+      clean_stars(catalog, Ncatalog); // do this on every pass 
+    }
+    if ((CurrentLoop >= 18) && (CurrentLoop < 999)) {
+      // after iterating a few times on the Mosaic zero points:
+      // * identify the good / bad mosaics
+      // * fit the images from the bad mosaics
+      TGROUP_ZPT_MODE = TGROUP_ZPT_MODE_NONE; // stop fitting the bad nights
+      MOSAIC_ZPT_MODE = MOSAIC_ZPT_MODE_GOOD_MOSAIC;
+      IMAGE_ZPT_MODE  = IMAGE_ZPT_MODE_BAD_MOSAIC;
+      GRID_ZPT_MODE  = GRID_ZPT_MODE_ALL; // only fit bad mosaics on bad nights
+      clean_mosaics(); // do this on every pass or just sometimes?
+      clean_images(); // do this on every pass 
+      clean_stars(catalog, Ncatalog); // do this on every pass 
+    }
   }
 
