Index: trunk/psModules/src/imcombine/pmReadoutCombine.c
===================================================================
--- trunk/psModules/src/imcombine/pmReadoutCombine.c	(revision 7259)
+++ trunk/psModules/src/imcombine/pmReadoutCombine.c	(revision 7278)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-01 03:39:15 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 00:55:23 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,4 +30,6 @@
                             )
 {
+    assert(stats);
+
     switch (option) {
     case PS_STAT_SAMPLE_MEAN:
@@ -96,25 +98,19 @@
     if (zero) {
         PS_ASSERT_VECTOR_TYPE(zero, PS_TYPE_F32, false);
-        if (zero->n != inputs->n) {
-            psError(PS_ERR_UNKNOWN, true, "Zero vector has incorrect size (%d vs %d).\n",
-                    zero->n, inputs->n);
-            return false;
-        }
+        PS_ASSERT_VECTOR_SIZE(zero, inputs->n, false);
     }
     if (scale) {
         PS_ASSERT_VECTOR_TYPE(scale, PS_TYPE_F32, false);
-        if (scale->n != inputs->n) {
-            psError(PS_ERR_UNKNOWN, true, "Scale vector has incorrect size (%d vs %d).\n",
-                    scale->n, inputs->n);
-            return false;
-        }
-    }
-    assert(params->fracLow >= 0.0 && params->fracLow < 1.0);
-    assert(params->fracHigh >= 0.0 && params->fracHigh < 1.0);
-    assert(params->combine == PS_STAT_SAMPLE_MEAN ||
-           params->combine == PS_STAT_SAMPLE_MEDIAN ||
-           params->combine == PS_STAT_ROBUST_MEDIAN ||
-           params->combine == PS_STAT_FITTED_MEAN ||
-           params->combine == PS_STAT_CLIPPED_MEAN);
+        PS_ASSERT_VECTOR_SIZE(scale, inputs->n, false);
+    }
+    PS_ASSERT_FLOAT_WITHIN_RANGE(params->fracLow, 0.0, 1.0, false);
+    PS_ASSERT_FLOAT_WITHIN_RANGE(params->fracHigh, 0.0, 1.0, false);
+    if (params->combine != PS_STAT_SAMPLE_MEAN && params->combine != PS_STAT_SAMPLE_MEDIAN &&
+            params->combine != PS_STAT_ROBUST_MEDIAN && params->combine != PS_STAT_FITTED_MEAN &&
+            params->combine != PS_STAT_CLIPPED_MEAN) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Combination method is not SAMPLE_MEAN, SAMPLE_MEDIAN, "
+                "ROBUST_MEDIAN, FITTED_MEAN or CLIPPED_MEAN.\n");
+        return false;
+    }
 
     psStats *stats = psStatsAlloc(params->combine); // The statistics to use in the combination
