Index: /branches/eam_branch_20081230/psLib/src/math/psStats.c
===================================================================
--- /branches/eam_branch_20081230/psLib/src/math/psStats.c	(revision 21125)
+++ /branches/eam_branch_20081230/psLib/src/math/psStats.c	(revision 21126)
@@ -13,6 +13,6 @@
  * use ->min and ->max (PS_STAT_USE_RANGE)
  *
- *  @version $Revision: 1.230.8.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-12-30 20:40:00 $
+ *  @version $Revision: 1.230.8.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-01-17 20:30:35 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -728,5 +728,5 @@
     // XXX this would be better if we had globally defined mask values
     psVectorMaskType maskVal = MASK_MARK | maskValInput;
-    psVector *mask = psVectorAlloc(myVector->n, PS_TYPE_MASK); // The actual mask we will use
+    psVector *mask = psVectorAlloc(myVector->n, PS_TYPE_VECTOR_MASK); // The actual mask we will use
     psVectorInit(mask, 0);
     if (maskInput) {
@@ -2256,10 +2256,10 @@
         }
     }
-    psVector *maskU8 = NULL;            // Input mask vector, U8 version
+    psVector *maskVector = NULL;            // Input mask vector, U8 version
     if (mask) {
-        if (mask->type.type == PS_TYPE_MASK) {
-            maskU8 = psMemIncrRefCounter((psPtr)mask);
+        if (mask->type.type == PS_TYPE_VECTOR_MASK) {
+            maskVector = psMemIncrRefCounter((psPtr)mask);
         } else {
-            maskU8 = psVectorCopy(NULL, mask, PS_TYPE_MASK);
+            maskVector = psVectorCopy(NULL, mask, PS_TYPE_VECTOR_MASK);
         }
     }
@@ -2280,5 +2280,5 @@
     // ************************************************************************
     if (stats->options & PS_STAT_SAMPLE_MEAN) {
-        if (!vectorSampleMean(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorSampleMean(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate vector sample mean");
             status &= false;
@@ -2288,5 +2288,5 @@
     // ************************************************************************
     if (stats->options & (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_QUARTILE)) {
-        if (!vectorSampleMedian(inF32, maskU8, maskVal, stats)) {
+        if (!vectorSampleMedian(inF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate sample median");
             status &= false;
@@ -2296,5 +2296,5 @@
     // ************************************************************************
     if (stats->options & PS_STAT_SAMPLE_STDEV) {
-        if (!vectorSampleStdev(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorSampleStdev(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate sample stdev");
             status &= false;
@@ -2303,5 +2303,5 @@
 
     if (stats->options & (PS_STAT_SAMPLE_SKEWNESS | PS_STAT_SAMPLE_KURTOSIS)) {
-        if (!vectorSampleMoments(inF32, maskU8, maskVal, stats)) {
+        if (!vectorSampleMoments(inF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate sample moments");
             status &= false;
@@ -2311,5 +2311,5 @@
     // ************************************************************************
     if (stats->options & (PS_STAT_MAX | PS_STAT_MIN)) {
-        if (vectorMinMax(inF32, maskU8, maskVal, stats) == 0) {
+        if (vectorMinMax(inF32, maskVector, maskVal, stats) == 0) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate vector minimum and maximum");
             status &= false;
@@ -2319,5 +2319,5 @@
     // ************************************************************************
     if (stats->options & (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV | PS_STAT_ROBUST_QUARTILE)) {
-        if (!vectorRobustStats(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorRobustStats(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, _("Failed to calculate robust statistics"));
             status &= false;
@@ -2327,5 +2327,5 @@
     // ************************************************************************
     if (stats->options & (PS_STAT_FITTED_MEAN | PS_STAT_FITTED_STDEV)) {
-        if (!vectorFittedStats(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorFittedStats(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, _("Failed to calculate fitted statistics"));
             status &= false;
@@ -2338,5 +2338,5 @@
             psAbort("you may not specify both FITTED_MEAN and FITTED_MEAN_V2");
         }
-        if (!vectorFittedStats_v2(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorFittedStats_v2(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, _("Failed to calculate fitted statistics"));
             status &= false;
@@ -2349,5 +2349,5 @@
             psAbort("you may not specify both FITTED_MEAN and FITTED_MEAN_V3");
         }
-        if (!vectorFittedStats_v3(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorFittedStats_v3(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, _("Failed to calculate fitted statistics"));
             status &= false;
@@ -2360,5 +2360,5 @@
             psAbort("you may not specify both FITTED_MEAN and FITTED_MEAN_V4");
         }
-        if (!vectorFittedStats_v4(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorFittedStats_v4(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, _("Failed to calculate fitted statistics"));
             status &= false;
@@ -2368,5 +2368,5 @@
     // ************************************************************************
     if ((stats->options & PS_STAT_CLIPPED_MEAN) || (stats->options & PS_STAT_CLIPPED_STDEV)) {
-        if (!vectorClippedStats(inF32, errorsF32, maskU8, maskVal, stats)) {
+        if (!vectorClippedStats(inF32, errorsF32, maskVector, maskVal, stats)) {
             psError(PS_ERR_UNKNOWN, false, "Failed to calculate clipped statistics\n");
             status &= false;
@@ -2376,5 +2376,5 @@
     psFree(inF32);
     psFree(errorsF32);
-    psFree(maskU8);
+    psFree(maskVector);
     psTrace(TRACE, 3,"---- %s() end  ----\n", __func__);
     return status;
