Index: branches/czw_branch/20160809/ippconfig/hsc/psastro.config
===================================================================
--- branches/czw_branch/20160809/ippconfig/hsc/psastro.config	(revision 39783)
+++ branches/czw_branch/20160809/ippconfig/hsc/psastro.config	(revision 39784)
@@ -83,5 +83,5 @@
 
 # mosaic radius match in pixels (do these make sense?)
-PSASTRO.MOSAIC.RADIUS.N0    F32    5
+PSASTRO.MOSAIC.RADIUS.N0    F32    15
 PSASTRO.MOSAIC.RADIUS.N1    F32    10
 PSASTRO.MOSAIC.RADIUS.N2    F32    10
Index: branches/czw_branch/20160809/psModules/src/astrom/pmAstrometryObjects.c
===================================================================
--- branches/czw_branch/20160809/psModules/src/astrom/pmAstrometryObjects.c	(revision 39783)
+++ branches/czw_branch/20160809/psModules/src/astrom/pmAstrometryObjects.c	(revision 39784)
@@ -238,5 +238,5 @@
     bool status;
     double photomWindowSigma  = psMetadataLookupF32 (&status, config, "PSASTRO.PHOTOM.WINDOW.SIGMA");
-    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma < 0.01)));
+    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma) < 0.01));
     double photomWindowFactor = photomWindowApply ? -0.5/PS_SQR(photomWindowSigma) : 0.0;
 
@@ -790,5 +790,5 @@
     // sigma of gaussian window to down-weight photometric outliers (ignored if NAN or 0.0)
     double photomWindowSigma  = psMetadataLookupF32 (&status, config, "PSASTRO.PHOTOM.WINDOW.SIGMA");
-    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma < 0.01)));
+    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma) < 0.01));
     double photomWindowFactor = photomWindowApply ? -0.5/PS_SQR(photomWindowSigma) : 0.0;
 
@@ -1074,5 +1074,5 @@
     // sigma of gaussian window to down-weight photometric outliers (ignored if NAN or 0.0)
     double photomWindowSigma  = psMetadataLookupF32 (&status, recipe, "PSASTRO.PHOTOM.WINDOW.SIGMA");
-    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma < 0.01)));
+    bool   photomWindowApply  = !(isnan(photomWindowSigma) || (fabs(photomWindowSigma) < 0.01));
     double photomWindowFactor = photomWindowApply ? -0.5/PS_SQR(photomWindowSigma) : 0.0;
 
Index: branches/czw_branch/20160809/psastro/src/psastroMosaicAstrom.c
===================================================================
--- branches/czw_branch/20160809/psastro/src/psastroMosaicAstrom.c	(revision 39783)
+++ branches/czw_branch/20160809/psastro/src/psastroMosaicAstrom.c	(revision 39784)
@@ -56,22 +56,25 @@
     }
 
-    // now fit the chips under the common distortion with higher-order terms
-    // first, re-perform the match with a slightly tighter circle
-    if (!psastroMosaicSetMatch (fpa, recipe, nIter)) {
-        psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass)");
-        return false;
-    }
-    if (!psastroMosaicChipAstrom (fpa, recipe, nIter)) {
-        psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (4th pass)");
-        return false;
-    }
-
-    if (psTraceGetLevel("psastro.dump") > 0) {
+    
+    for (int iter = 0; (iter < nIter); iter++) {
+      // now fit the chips under the common distortion with higher-order terms
+      // first, re-perform the match with a slightly tighter circle
+      if (!psastroMosaicSetMatch (fpa, recipe, iter)) {
+        psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass %d)", iter);
+        return false;
+      }
+      if (!psastroMosaicChipAstrom (fpa, recipe, iter)) {
+        psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (pass %d)", iter);
+        return false;
+      }
+      
+      if (psTraceGetLevel("psastro.dump") > 0) {
         // the last filename (see filenames in psastroMosaicFit)
         char filename[256];
         snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2);
         psastroDumpMatches (fpa, filename);
-    }
-
+      }
+    }
+    
     // save WCS and analysis metadata in update header.
     // (pull or create local view to entry on readout->analysis)
