Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 1921)
+++ trunk/psLib/src/math/psStats.c	(revision 1928)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-28 23:27:37 $
+ *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-29 19:52:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1780,10 +1780,10 @@
         tmp = psVectorAlloc(in->n, PS_TYPE_F32);
         for (i = 0; i < in->n; i++) {
-            tmp->data.F32[i] = (float)in->data.S32[i];
+            tmp->data.F32[i] = (float)in->data.S8[i];
         }
     } else if (in->type.type == PS_TYPE_U16) {
         tmp = psVectorAlloc(in->n, PS_TYPE_F32);
         for (i = 0; i < in->n; i++) {
-            tmp->data.F32[i] = (float)in->data.U32[i];
+            tmp->data.F32[i] = (float)in->data.U16[i];
         }
     } else if (in->type.type == PS_TYPE_F64) {
@@ -1851,9 +1851,9 @@
     // ************************************************************************
     if (stats->options & PS_STAT_SAMPLE_MEAN) {
-        p_psVectorSampleMean(in, mask, maskVal, stats);
+        p_psVectorSampleMean(inF32, mask, maskVal, stats);
     }
     // ************************************************************************
     if (stats->options & PS_STAT_SAMPLE_MEDIAN) {
-        p_psVectorSampleMedian(in, mask, maskVal, stats);
+        p_psVectorSampleMedian(inF32, mask, maskVal, stats);
     }
     // ************************************************************************
@@ -1861,10 +1861,10 @@
     // mean has already been calculated? Or should we always calculate it?
     if (stats->options & PS_STAT_SAMPLE_STDEV) {
-        p_psVectorSampleMean(in, mask, maskVal, stats);
-        p_psVectorSampleStdev(in, mask, maskVal, stats);
+        p_psVectorSampleMean(inF32, mask, maskVal, stats);
+        p_psVectorSampleStdev(inF32, mask, maskVal, stats);
     }
     // ************************************************************************
     if (stats->options & PS_STAT_SAMPLE_QUARTILE) {
-        p_psVectorSampleQuartiles(in, mask, maskVal, stats);
+        p_psVectorSampleQuartiles(inF32, mask, maskVal, stats);
     }
     // Since the various robust stats quantities share much computation, they
@@ -1875,17 +1875,17 @@
             (stats->options & PS_STAT_ROBUST_MODE) ||
             (stats->options & PS_STAT_ROBUST_STDEV) || (stats->options & PS_STAT_ROBUST_QUARTILE)) {
-        p_psVectorRobustStats(in, mask, maskVal, stats);
+        p_psVectorRobustStats(inF32, mask, maskVal, stats);
     }
 
     if ((stats->options & PS_STAT_CLIPPED_MEAN) || (stats->options & PS_STAT_CLIPPED_STDEV)) {
-        p_psVectorClippedStats(in, mask, maskVal, stats);
+        p_psVectorClippedStats(inF32, mask, maskVal, stats);
     }
     // ************************************************************************
     if (stats->options & PS_STAT_MAX) {
-        p_psVectorMax(in, mask, maskVal, stats);
+        p_psVectorMax(inF32, mask, maskVal, stats);
     }
     // ************************************************************************
     if (stats->options & PS_STAT_MIN) {
-        p_psVectorMin(in, mask, maskVal, stats);
+        p_psVectorMin(inF32, mask, maskVal, stats);
     }
 
