Index: /trunk/Ohana/src/relphot/include/relphot.h
===================================================================
--- /trunk/Ohana/src/relphot/include/relphot.h	(revision 41671)
+++ /trunk/Ohana/src/relphot/include/relphot.h	(revision 41672)
@@ -428,4 +428,5 @@
 double CLOUD_TOLERANCE;
 int    VARIABILITY_STATS;
+int    USE_OLS_FOR_AVERAGES;
 
 int    PARALLEL;
Index: /trunk/Ohana/src/relphot/src/args.c
===================================================================
--- /trunk/Ohana/src/relphot/src/args.c	(revision 41671)
+++ /trunk/Ohana/src/relphot/src/args.c	(revision 41672)
@@ -440,4 +440,9 @@
     remove_argument (N, &argc, argv);
     VARIABILITY_STATS = TRUE;
+  }
+  USE_OLS_FOR_AVERAGES = FALSE;
+  if ((N = get_argument (argc, argv, "-use-ols-for-averages"))) {
+    remove_argument (N, &argc, argv);
+    USE_OLS_FOR_AVERAGES = TRUE;
   }
 
@@ -876,4 +881,9 @@
     VARIABILITY_STATS = TRUE;
   }
+  USE_OLS_FOR_AVERAGES = FALSE;
+  if ((N = get_argument (argc, argv, "-use-ols-for-averages"))) {
+    remove_argument (N, &argc, argv);
+    USE_OLS_FOR_AVERAGES = TRUE;
+  }
 
   MIN_ERROR = 0.001;
Index: /trunk/Ohana/src/relphot/src/setMrelCatalog.c
===================================================================
--- /trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 41671)
+++ /trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 41672)
@@ -81,5 +81,13 @@
   SetMrelInfoReset (results); // reset the counters
 
-  useOLS = UseStandardOLS (ZPT_STARS);
+  // XXX if we are iterating on the image zero points, we should use OLS
+  // until we have performed a few iterations.  UseStandardOLS() returns
+  // true (use OLS) or false depending on the zero point mode (TGROUP, MOSAIC, IMAGE) and the
+  // number of iterations.
+
+  // On the final pass (isSetMrelFinal), we should use OLS or IRLS depending on
+  // the user choice (USE_OLS_FOR_AVERAGES)
+
+  useOLS = isSetMrelFinal ? USE_OLS_FOR_AVERAGES : UseStandardOLS (ZPT_STARS);
   for (j = 0; j < catalog[Nc].Naverage; j++) {
 
