Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 15335)
+++ trunk/psLib/src/math/psStats.c	(revision 15370)
@@ -13,6 +13,6 @@
  * use ->min and ->max (PS_STAT_USE_RANGE)
  *
- *  @version $Revision: 1.218 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-09-29 23:58:55 $
+ *  @version $Revision: 1.219 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-10-24 19:08:24 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -152,5 +152,6 @@
 // static prototypes:
 static psF32 minimizeLMChi2Gauss1D(psVector *deriv, const psVector *params, const psVector *coords);
-static psF32 fitQuadraticSearchForYThenReturnX(const psVector *xVec, psVector *yVec, psS32 binNum, psF32 yVal);
+static psF32 fitQuadraticSearchForYThenReturnX(const psVector *xVec, psVector *yVec, psS32 binNum,
+                                               psF32 yVal);
 
 /******************************************************************************
@@ -309,5 +310,5 @@
 
     // Allocate temporary vectors for the data.
-    psVector *outVector = psVectorAllocEmpty(inVector->n, PS_TYPE_F32); // Vector containing the unmasked values
+    psVector *outVector = psVectorAllocEmpty(inVector->n, PS_TYPE_F32); // Vector containing unmasked values
     psF32 *output = outVector->data.F32; // Dereference the vector
 
@@ -401,5 +402,6 @@
     // If the mean is NAN, then generate a warning and set the stdev to NAN.
     if (isnan(stats->sampleMean)) {
-        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): sample mean is NAN.  Setting stats->sampleStdev = NAN.\n");
+        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): sample mean is NAN.  "
+                "Setting stats->sampleStdev = NAN.\n");
         stats->sampleStdev = NAN;
         return true;
@@ -443,10 +445,12 @@
         // Assume that the user knows what he's doing when he masks out everything --> no error.
         stats->sampleStdev = NAN;
-        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): no valid psVector elements (%ld).  Setting stats->sampleStdev = NAN.\n", count);
+        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): no valid psVector elements (%ld).  "
+                "Setting stats->sampleStdev = NAN.\n", count);
         return true;
     }
     if (count == 1) {
         stats->sampleStdev = 0.0;
-        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): only one valid psVector elements (%ld).  Setting stats->sampleStdev = 0.0.\n", count);
+        psTrace(TRACE, 5, "WARNING: vectorSampleStdev(): only one valid psVector elements (%ld).  "
+                "Setting stats->sampleStdev = 0.0.\n", count);
         return true;
     }
@@ -623,5 +627,6 @@
         // a) Exclude all values x_i for which |x_i - x| > K * stdev
         if (errors) {
-            // XXXX if we convert errors to variance, this should square the other terms (A*A faster than sqrt(A))
+            // XXXX if we convert errors to variance, this should square the other terms (A*A faster than
+            // sqrt(A))
             for (long j = 0; j < myVector->n; j++) {
                 if (!tmpMask->data.U8[j] &&
@@ -749,5 +754,7 @@
     // Iterate to get the best bin size
     for (int iterate = 1; iterate > 0; iterate++) {
-        psTrace(TRACE, 6, "-------------------- Iterating on Bin size.  Iteration number %d --------------------\n", iterate);
+        psTrace(TRACE, 6,
+                "-------------------- Iterating on Bin size.  Iteration number %d --------------------\n",
+                iterate);
 
         // Get the minimum and maximum values
@@ -832,11 +839,12 @@
                                                                 binMedian, totalDataPoints/2.0);
         if (isnan(stats->robustMedian)) {
-            psError(PS_ERR_UNKNOWN, false, "Failed to fit a quadratic and calculate the 50-percent position.\n");
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to fit a quadratic and calculate the 50-percent position.\n");
             goto escape;
         }
         psTrace(TRACE, 6, "Current robust median is %f\n", stats->robustMedian);
 
-        // ADD step 4: Find the bins which contains the 15.8655% (-1 sigma) and 84.1345% (+1 sigma) data points
-        // also find the 30.8538% (-0.5 sigma) and 69.1462% (+0.5 sigma) points
+        // ADD step 4: Find the bins which contains the 15.8655% (-1 sigma) and 84.1345% (+1 sigma) data
+        // points also find the 30.8538% (-0.5 sigma) and 69.1462% (+0.5 sigma) points
         PS_BIN_FOR_VALUE(binLo, cumulative->nums, totalDataPoints * 0.158655f, 0);
         PS_BIN_FOR_VALUE(binHi, cumulative->nums, totalDataPoints * 0.841345f, 0);
@@ -858,5 +866,6 @@
         }
 
-        // ADD step 4b: Interpolate Sigma (linearly) to find these two positions exactly: these are the 1sigma positions.
+        // ADD step 4b: Interpolate Sigma (linearly) to find these two positions exactly: these are the 1sigma
+        // positions.
         psTrace(TRACE, 6, "binLo is %ld.  Nums at that bin and the next are (%.2f, %.2f)\n",
                 binLo, cumulative->nums->data.F32[binLo], cumulative->nums->data.F32[binLo+1]);
@@ -868,10 +877,16 @@
         // (extrapolation should not be needed and will result in errors)
         float binLoF32, binHiF32, binL2F32, binH2F32, binL4F32, binH4F32;
-        PS_BIN_INTERPOLATE (binLoF32, cumulative->nums, cumulative->bounds, binLo, totalDataPoints * 0.158655f);
-        PS_BIN_INTERPOLATE (binHiF32, cumulative->nums, cumulative->bounds, binHi, totalDataPoints * 0.841345f);
-        PS_BIN_INTERPOLATE (binL2F32, cumulative->nums, cumulative->bounds, binL2, totalDataPoints * 0.308538f);
-        PS_BIN_INTERPOLATE (binH2F32, cumulative->nums, cumulative->bounds, binH2, totalDataPoints * 0.691462f);
-        PS_BIN_INTERPOLATE (binL4F32, cumulative->nums, cumulative->bounds, binL4, totalDataPoints * 0.022481f);
-        PS_BIN_INTERPOLATE (binH4F32, cumulative->nums, cumulative->bounds, binH4, totalDataPoints * 0.977519f);
+        PS_BIN_INTERPOLATE (binLoF32, cumulative->nums, cumulative->bounds, binLo,
+                            totalDataPoints * 0.158655f);
+        PS_BIN_INTERPOLATE (binHiF32, cumulative->nums, cumulative->bounds, binHi,
+                            totalDataPoints * 0.841345f);
+        PS_BIN_INTERPOLATE (binL2F32, cumulative->nums, cumulative->bounds, binL2,
+                            totalDataPoints * 0.308538f);
+        PS_BIN_INTERPOLATE (binH2F32, cumulative->nums, cumulative->bounds, binH2,
+                            totalDataPoints * 0.691462f);
+        PS_BIN_INTERPOLATE (binL4F32, cumulative->nums, cumulative->bounds, binL4,
+                            totalDataPoints * 0.022481f);
+        PS_BIN_INTERPOLATE (binH4F32, cumulative->nums, cumulative->bounds, binH4,
+                            totalDataPoints * 0.977519f);
 
         // report +/- 1 sigma points
@@ -891,8 +906,8 @@
         float sigma4 = (binH4F32 - binL4F32) / 4.0;
 
-	// take the smallest of the three: if we have a clump with wide outliers, sigma2 and
-	// sigma4 will be biased high; if we have a bi-modal distribution, sigma1 and sigma2
-	// will be biased high.
-	sigma = PS_MIN (sigma1, PS_MIN (sigma2, sigma4));
+        // take the smallest of the three: if we have a clump with wide outliers, sigma2 and
+        // sigma4 will be biased high; if we have a bi-modal distribution, sigma1 and sigma2
+        // will be biased high.
+        sigma = PS_MIN (sigma1, PS_MIN (sigma2, sigma4));
 
         psTrace(TRACE, 6, "The 2x sigma is %f.\n", sigma1);
@@ -1328,5 +1343,6 @@
 
         if (poly->coeff[2] >= 0.0) {
-            psTrace(TRACE, 6, "Parabolic fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+            psTrace(TRACE, 6, "Parabolic fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psError(PS_ERR_UNKNOWN, false, "fit did not converge\n");
             psFree(x);
@@ -1344,5 +1360,6 @@
             done = true;
         } else {
-            psTrace(TRACE, 6, "Parabolic fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+            psTrace(TRACE, 6, "Parabolic fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psTrace(TRACE, 6, "The new guess mean  is %f.\n", guessMean);
             psTrace(TRACE, 6, "The new guess stdev is %f.\n", guessStdev);
@@ -1490,14 +1507,17 @@
                 valPeak = histogram->nums->data.F32[binPeak];
             }
-	    psTrace (TRACE, 6, "(%f = %.0f) ", histogram->bounds->data.F32[i], histogram->nums->data.F32[i]);
-        }
-	psTrace (TRACE, 6, "\n");
+            psTrace (TRACE, 6, "(%f = %.0f) ", histogram->bounds->data.F32[i], histogram->nums->data.F32[i]);
+        }
+        psTrace (TRACE, 6, "\n");
 
         // assume a reasonably well-defined gaussian-like population; run from peak out until val < 0.25*peak
 
         psTrace(TRACE, 6, "The clipped numBins is %ld\n", binMax - binMin);
-        psTrace(TRACE, 6, "The clipped min is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binMin), binMin);
-        psTrace(TRACE, 6, "The clipped max is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binMax - 1), binMax - 1);
-        psTrace(TRACE, 6, "The clipped peak is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binPeak), binPeak);
+        psTrace(TRACE, 6, "The clipped min is %f (%ld)\n",
+                PS_BIN_MIDPOINT(histogram, binMin), binMin);
+        psTrace(TRACE, 6, "The clipped max is %f (%ld)\n",
+                PS_BIN_MIDPOINT(histogram, binMax - 1), binMax - 1);
+        psTrace(TRACE, 6, "The clipped peak is %f (%ld)\n",
+                PS_BIN_MIDPOINT(histogram, binPeak), binPeak);
         psTrace(TRACE, 6, "The clipped peak value is %f\n", histogram->nums->data.F32[binPeak]);
 
@@ -1513,6 +1533,8 @@
                 }
             }
-            psTrace(TRACE, 6, "Lower bound for lower half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binS), binS);
-            psTrace(TRACE, 6, "Upper bound for lower half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binE), binE);
+            psTrace(TRACE, 6, "Lower bound for lower half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binS), binS);
+            psTrace(TRACE, 6, "Upper bound for lower half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binE), binE);
 
             psVector *y = psVectorAllocEmpty(binE - binS, PS_TYPE_F32); // Vector of coordinates
@@ -1523,5 +1545,6 @@
                     continue;
                 x->data.F32[j] = PS_BIN_MIDPOINT(histogram, i);
-                y->data.F32[j] = log(histogram->nums->data.F32[i]); // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                y->data.F32[j] = log(histogram->nums->data.F32[i]);
                 j++;
             }
@@ -1544,11 +1567,13 @@
 
             if (poly->coeff[2] >= 0.0) {
-                psTrace(TRACE, 6, "Failed parabolic fit: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+                psTrace(TRACE, 6, "Failed parabolic fit: %f + %f x + %f x^2\n",
+                        poly->coeff[0], poly->coeff[1], poly->coeff[2]);
                 psFree(poly);
                 psFree(histogram);
                 psFree(statsMinMax);
 
-                // sometimes, the guessStdev is much too large.  in this case, the entire real population tends to be found
-                // in a single bin.  make one attempt to recover by dropping the guessStdev down by a jump and trying again
+                // sometimes, the guessStdev is much too large.  in this case, the entire real population
+                // tends to be found in a single bin.  make one attempt to recover by dropping the guessStdev
+                // down by a jump and trying again
                 if (iteration == 0) {
                     guessStdev = 0.25*guessStdev;
@@ -1568,5 +1593,6 @@
                 done = true;
             }
-            psTrace(TRACE, 6, "Parabolic Lower fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+            psTrace(TRACE, 6, "Parabolic Lower fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psTrace(TRACE, 6, "The lower mean  is %f.\n", guessMean);
             psTrace(TRACE, 6, "The lower stdev is %f.\n", guessStdev);
@@ -1575,5 +1601,5 @@
         }
 
-	// for test, measure the same result for the upper section
+        // for test, measure the same result for the upper section
         {
             // fit the upper half of the distribution
@@ -1587,6 +1613,8 @@
                 }
             }
-            psTrace(TRACE, 6, "Lower bound for upper half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binS), binS);
-            psTrace(TRACE, 6, "Upper bound for upper half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binE), binE);
+            psTrace(TRACE, 6, "Lower bound for upper half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binS), binS);
+            psTrace(TRACE, 6, "Upper bound for upper half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binE), binE);
 
             psVector *y = psVectorAllocEmpty(binE - binS, PS_TYPE_F32); // Vector of coordinates
@@ -1597,5 +1625,6 @@
                     continue;
                 x->data.F32[j] = PS_BIN_MIDPOINT(histogram, i);
-                y->data.F32[j] = log(histogram->nums->data.F32[i]); // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                y->data.F32[j] = log(histogram->nums->data.F32[i]);
                 j++;
             }
@@ -1618,17 +1647,18 @@
 
             // calculate upper mean & stdev from parabolic fit -- ignore this value
-#ifndef PS_NO_TRACE
             float upperStdev = sqrt(-0.5/poly->coeff[2]);
             float upperMean = poly->coeff[1]*PS_SQR(upperStdev);
-            psTrace(TRACE, 6, "Parabolic Upper fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+#ifndef PS_NO_TRACE
+            psTrace(TRACE, 6, "Parabolic Upper fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psTrace(TRACE, 6, "The upper mean  is %f.\n", upperMean);
             psTrace(TRACE, 6, "The upper stdev is %f.\n", upperStdev);
 #endif
 
-	    // if the resulting value is outside of the range binMin - binMax, use the upper value
-	    if (done && (guessMean > PS_BIN_MIDPOINT(histogram, binMax - 1))) {
-		guessMean = upperMean;
-		guessStdev = upperStdev;
-	    }
+            // if the resulting value is outside of the range binMin - binMax, use the upper value
+            if (done && (guessMean > PS_BIN_MIDPOINT(histogram, binMax - 1))) {
+                guessMean = upperMean;
+                guessStdev = upperStdev;
+            }
 
             psFree (poly);
@@ -1718,7 +1748,7 @@
         // Calculate the number of bins.
         // XXX can we calculate the binMin, binMax **before** building this histogram?
-	// if the range is too absurd, adjust numBins & binSize
+        // if the range is too absurd, adjust numBins & binSize
         long numBins = PS_MAX (50, PS_MIN (10000, (max - min) / binSize));
-	binSize = (max - min) / (float) numBins;
+        binSize = (max - min) / (float) numBins;
         psTrace(TRACE, 6, "The new min/max values are (%f, %f).\n", min, max);
         psTrace(TRACE, 6, "The new bin size is %f.\n", binSize);
@@ -1774,7 +1804,7 @@
                 valPeak = histogram->nums->data.F32[binPeak];
             }
-	    psTrace (TRACE, 6, "(%f = %.0f) ", histogram->bounds->data.F32[i], histogram->nums->data.F32[i]);
-        }
-	psTrace (TRACE, 6, "\n");
+            psTrace (TRACE, 6, "(%f = %.0f) ", histogram->bounds->data.F32[i], histogram->nums->data.F32[i]);
+        }
+        psTrace (TRACE, 6, "\n");
 
         // assume a reasonably well-defined gaussian-like population; run from peak out until val < 0.25*peak
@@ -1782,5 +1812,6 @@
         psTrace(TRACE, 6, "The clipped numBins is %ld\n", binMax - binMin);
         psTrace(TRACE, 6, "The clipped min is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binMin), binMin);
-        psTrace(TRACE, 6, "The clipped max is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binMax - 1), binMax - 1);
+        psTrace(TRACE, 6, "The clipped max is %f (%ld)\n",
+                PS_BIN_MIDPOINT(histogram, binMax - 1), binMax - 1);
         psTrace(TRACE, 6, "The clipped peak is %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binPeak), binPeak);
         psTrace(TRACE, 6, "The clipped peak value is %f\n", histogram->nums->data.F32[binPeak]);
@@ -1804,6 +1835,8 @@
                 }
             }
-            psTrace(TRACE, 6, "Lower bound for lower half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binS), binS);
-            psTrace(TRACE, 6, "Upper bound for lower half: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binE), binE);
+            psTrace(TRACE, 6, "Lower bound for lower half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binS), binS);
+            psTrace(TRACE, 6, "Upper bound for lower half: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binE), binE);
 
             psVector *y = psVectorAllocEmpty(binE - binS, PS_TYPE_F32); // Vector of coordinates
@@ -1814,5 +1847,6 @@
                     continue;
                 x->data.F32[j] = PS_BIN_MIDPOINT(histogram, i);
-                y->data.F32[j] = log(histogram->nums->data.F32[i]); // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                y->data.F32[j] = log(histogram->nums->data.F32[i]);
                 j++;
             }
@@ -1835,11 +1869,13 @@
 
             if (poly->coeff[2] >= 0.0) {
-                psTrace(TRACE, 6, "Failed parabolic fit: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+                psTrace(TRACE, 6, "Failed parabolic fit: %f + %f x + %f x^2\n",
+                        poly->coeff[0], poly->coeff[1], poly->coeff[2]);
                 psFree(poly);
                 psFree(histogram);
                 psFree(statsMinMax);
 
-                // sometimes, the guessStdev is much too large.  in this case, the entire real population tends to be found
-                // in a single bin.  make one attempt to recover by dropping the guessStdev down by a jump and trying again
+                // sometimes, the guessStdev is much too large.  in this case, the entire real population
+                // tends to be found in a single bin.  make one attempt to recover by dropping the guessStdev
+                // down by a jump and trying again
                 if (iteration == 0) {
                     guessStdev = 0.25*guessStdev;
@@ -1859,5 +1895,6 @@
                 done = true;
             }
-            psTrace(TRACE, 6, "Parabolic Lower fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+            psTrace(TRACE, 6, "Parabolic Lower fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psTrace(TRACE, 6, "The lower mean  is %f.\n", guessMean);
             psTrace(TRACE, 6, "The lower stdev is %f.\n", guessStdev);
@@ -1866,9 +1903,9 @@
         }
 
-	// if we converge on a solution outside the range binMin - binMax, use a more conservative range
-	float minValue = PS_BIN_MIDPOINT(histogram, binMin);
-	float maxValue = PS_BIN_MIDPOINT(histogram, binMax - 1);
-
-	if (done && ((guessMean < minValue) || (guessMean > maxValue))) {
+        // if we converge on a solution outside the range binMin - binMax, use a more conservative range
+        float minValue = PS_BIN_MIDPOINT(histogram, binMin);
+        float maxValue = PS_BIN_MIDPOINT(histogram, binMax - 1);
+
+        if (done && ((guessMean < minValue) || (guessMean > maxValue))) {
             psTrace(TRACE, 6, "Inconsistent result, re-trying the fit\n");
 
@@ -1890,6 +1927,8 @@
                 }
             }
-            psTrace(TRACE, 6, "Lower bound for symmetric range: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binS), binS);
-            psTrace(TRACE, 6, "Upper bound for symmetric range: %f (%ld)\n", PS_BIN_MIDPOINT(histogram, binE), binE);
+            psTrace(TRACE, 6, "Lower bound for symmetric range: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binS), binS);
+            psTrace(TRACE, 6, "Upper bound for symmetric range: %f (%ld)\n",
+                    PS_BIN_MIDPOINT(histogram, binE), binE);
 
             psVector *y = psVectorAllocEmpty(binE - binS, PS_TYPE_F32); // Vector of coordinates
@@ -1900,5 +1939,6 @@
                     continue;
                 x->data.F32[j] = PS_BIN_MIDPOINT(histogram, i);
-                y->data.F32[j] = log(histogram->nums->data.F32[i]); // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                // note this is the natural log: expected distribution is A exp(-(x-xo)^2/2sigma^2)
+                y->data.F32[j] = log(histogram->nums->data.F32[i]);
                 j++;
             }
@@ -1921,27 +1961,28 @@
 
             // calculate upper mean & stdev from parabolic fit -- ignore this value
-#ifndef PS_NO_TRACE
             guessStdev = sqrt(-0.5/poly->coeff[2]);
             guessMean = poly->coeff[1]*PS_SQR(guessStdev);
-            psTrace(TRACE, 6, "Parabolic Symmetric fit results: %f + %f x + %f x^2\n", poly->coeff[0], poly->coeff[1], poly->coeff[2]);
+#ifndef PS_NO_TRACE
+            psTrace(TRACE, 6, "Parabolic Symmetric fit results: %f + %f x + %f x^2\n",
+                    poly->coeff[0], poly->coeff[1], poly->coeff[2]);
             psTrace(TRACE, 6, "The symmetric mean  is %f.\n", guessMean);
             psTrace(TRACE, 6, "The symmetric stdev is %f.\n", guessStdev);
 #endif
 
-	    // if we converge on a solution outside the range binMin - binMax, use a more conservative range
-	    float minValueSym = PS_BIN_MIDPOINT(histogram, binS);
-	    float maxValueSym = PS_BIN_MIDPOINT(histogram, binE - 1);
-
-	    // saturate on min or max value
-	    if (guessMean < minValueSym) {
-		guessMean = minValueSym;
-		psTrace(TRACE, 6, "The symmetric mean is out of bounds, saturating to %f.\n", guessMean);
-	    }
-		
-	    // saturate on min or max value
-	    if (guessMean > maxValueSym) {
-		guessMean = maxValueSym;
-		psTrace(TRACE, 6, "The symmetric mean is out of bounds, saturating to %f.\n", guessMean);
-	    }
+            // if we converge on a solution outside the range binMin - binMax, use a more conservative range
+            float minValueSym = PS_BIN_MIDPOINT(histogram, binS);
+            float maxValueSym = PS_BIN_MIDPOINT(histogram, binE - 1);
+
+            // saturate on min or max value
+            if (guessMean < minValueSym) {
+                guessMean = minValueSym;
+                psTrace(TRACE, 6, "The symmetric mean is out of bounds, saturating to %f.\n", guessMean);
+            }
+
+            // saturate on min or max value
+            if (guessMean > maxValueSym) {
+                guessMean = maxValueSym;
+                psTrace(TRACE, 6, "The symmetric mean is out of bounds, saturating to %f.\n", guessMean);
+            }
 
             psFree (poly);
@@ -1996,5 +2037,6 @@
         // However, it is also not used anywhere, yet.
         //
-        psWarning("WARNING: vectorSmoothHistGaussian() on non-uniform histograms has not been tested or used.\n");
+        psWarning("WARNING: vectorSmoothHistGaussian() on non-uniform "
+                  "histograms has not been tested or used.\n");
 
         for (long i = 0; i < numBins; i++) {
@@ -2607,5 +2649,6 @@
         if (!psVectorFitPolynomial1D(myPoly, NULL, 0, y, NULL, x)) {
             psError(PS_ERR_UNEXPECTED_NULL, false,
-                    _("Failed to fit a 1-dimensional polynomial to the three specified data points.  Returning NAN."));
+                    _("Failed to fit a 1-dimensional polynomial to the three specified data points.  "
+                      "Returning NAN."));
             psFree(x);
             psFree(y);
