Index: branches/eam_branches/ipp-20120905/psLib/share/tai_utc.dat
===================================================================
--- branches/eam_branches/ipp-20120905/psLib/share/tai_utc.dat	(revision 34407)
+++ branches/eam_branches/ipp-20120905/psLib/share/tai_utc.dat	(revision 34735)
@@ -12,5 +12,5 @@
 #          JD           TAI-UTC    Const 1       Const 2
 #        (days)          (sec)      (none)       (none)
-#          psF64	         psF64      psF64         psF64
+#         psF64	        psF64      psF64         psF64
         2437300.5      1.4228180    37300.0     0.0012960
         2437512.5      1.3728180    37300.0     0.0012960
@@ -51,2 +51,3 @@
 	2453736.5     33.0000000    41317.0     0.0000000
 	2454832.5     34.0000000    41317.0     0.0000000
+        2456109.5     35.0000000    41317.0     0.0000000
Index: branches/eam_branches/ipp-20120905/psLib/share/tai_utc.raw
===================================================================
--- branches/eam_branches/ipp-20120905/psLib/share/tai_utc.raw	(revision 34407)
+++ branches/eam_branches/ipp-20120905/psLib/share/tai_utc.raw	(revision 34735)
@@ -37,2 +37,3 @@
  2006 JAN  1 =JD 2453736.5  TAI-UTC=  33.0       S + (MJD - 41317.) X 0.0      S
  2009 JAN  1 =JD 2454832.5  TAI-UTC=  34.0       S + (MJD - 41317.) X 0.0      S
+ 2012 JUL  1 =JD 2456109.5  TAI-UTC=  35.0       S + (MJD - 41317.) X 0.0      S
Index: branches/eam_branches/ipp-20120905/psLib/src/imageops/psImageConvolve.c
===================================================================
--- branches/eam_branches/ipp-20120905/psLib/src/imageops/psImageConvolve.c	(revision 34407)
+++ branches/eam_branches/ipp-20120905/psLib/src/imageops/psImageConvolve.c	(revision 34735)
@@ -605,6 +605,16 @@
     PS_ASSERT_IMAGE_NON_NULL(image, false);
 
+    if (sigma < 0.25) {
+        psTrace("psLib.imageops", 5, "sigma: %f < 0.25 skipping smoothing", sigma);
+        return true;
+    }
+
     // relevant terms
     int Nrange = sigma*Nsigma + 0.5;    // Number of pixels either side for convolution kernel
+    if (Nrange < 1) {
+        // using zero will cause an arithmetic exception in the loop
+        psTrace("psLib.imageops", 5, "Nrange %d for smoothing too small skipping smoothing", Nrange);
+        return true;
+    }
     int Nx = image->numCols;            // Number of columns
     int Ny = image->numRows;            // Number of rows
Index: branches/eam_branches/ipp-20120905/psLib/src/math/psHistogram.c
===================================================================
--- branches/eam_branches/ipp-20120905/psLib/src/math/psHistogram.c	(revision 34407)
+++ branches/eam_branches/ipp-20120905/psLib/src/math/psHistogram.c	(revision 34735)
@@ -58,5 +58,5 @@
     psTrace("psLib.math", 3, "---- %s() begin  ----\n", __func__);
     psTrace("psLib.math", 5, "(lower, upper, n) is (%f, %f, %d)\n", lower, upper, n);
-    psAssert(n > 0, "Number of bins must be positive");
+    psAssert(n > 0, "Number of bins must be positive not %d", n);
     psAssert(upper >= lower, "Bounds must be sensical");
 
Index: branches/eam_branches/ipp-20120905/psLib/src/math/psStats.c
===================================================================
--- branches/eam_branches/ipp-20120905/psLib/src/math/psStats.c	(revision 34407)
+++ branches/eam_branches/ipp-20120905/psLib/src/math/psStats.c	(revision 34735)
@@ -764,4 +764,8 @@
             goto escape;
         }
+        if (!isfinite(max - min)) {
+            COUNT_WARNING(10, 100, "Range of of the input vector is too large: %lf.\n", (double)max - (double) min);
+            goto escape;
+        }
         psTrace(TRACE, 6, "Data min/max is (%.2f, %.2f)\n", min, max);
 
@@ -802,4 +806,9 @@
         psTrace(TRACE, 6, "Numbins is %ld\n", numBins);
         psTrace(TRACE, 6, "Creating a robust histogram from data range (%.2f - %.2f)\n", min, max);
+
+        // We are sometimes causing psHistogramAlloc to assert.
+        // Assert here so we can get more information about what is going wrong.
+        psAssert(numBins > 0, "Invalid numBins: %ld max: %f min: %f binSize: %f", numBins, max, min, binSize);
+        
         // Generate the histogram
         histogram = psHistogramAlloc(min - 2.0*binSize, max + 2.0*binSize, numBins);
@@ -858,4 +867,8 @@
             // if we did not mask anything, give up.
         }
+
+        // We were causing psHistogramAlloc to assert. 
+        // Assert here so we can get more information about what is going wrong.
+        psAssert(numBins > 0, "Invalid numBins %ld max: %f min: %f binSize: %f", numBins, max, min, binSize);
 
         // ADD step 1: Convert the specific histogram to a cumulative histogram
