Index: /trunk/psLib/test/dataManip/tst_psMinimize06.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psMinimize06.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psMinimize06.c	(revision 4141)
@@ -15,74 +15,22 @@
 
 /*****************************************************************************
-myFunc(): This routine subtracts the associate value in expectedParm[] from
-each parameter and then squares it, then sums that for all parameters, then
-adds MIN_VALUE to it.  The minimum for this function will be MIN_VALUE, and
-will occur when each parameter equals the associated value in expectedParm[].
- 
-This procedure ignores the coordinates, other than to ensure that they were
-passed correctly from psMinimizePowell().
- 
+myFunc():
+    sum = (param[0] * x[0]) + 
+          (param[1] * x[1]) +
+          ...
  *****************************************************************************/
-psVector *myFunc(psImage *myDeriv,
-                 psVector *myParams,
-                 psArray *myCoords)
+psF64 myFunc(psVector *deriv,
+             psVector *params,
+             psVector *x)
 {
-    psVector *sum = psVectorAlloc(myCoords->n, PS_TYPE_F32);
-    psS32 i;
-    psS32 j;
-
-
-    if (myDeriv == NULL) {
-        myDeriv = psImageAlloc(myParams->n, myCoords->n, PS_TYPE_F32);
-        psError(PS_ERR_UNKNOWN, true, "myDeriv is NULL.\n");
+    if ((deriv == NULL) ||
+            (params == NULL)) {
+        psError(PS_ERR_UNKNOWN, true, "deriv or params is NULL.\n");
     }
 
-    for (i=0;i<N;i++) {
-        sum->data.F32[i] = MIN_VALUE;
-        for (j=0;j<NUM_PARAMS;j++) {
-            sum->data.F32[i]+= (myParams->data.F32[j] - expectedParm[j]) *
-                               (myParams->data.F32[j] - expectedParm[j]);
-
-            myDeriv->data.F32[i][j] = (2.0 * myParams->data.F32[j]) -
-                                      (2.0 * expectedParm[j]);
-        }
-    }
-
-    return(sum);
-}
-
-/*****************************************************************************
-myFuncEAM(): This routine subtracts the associate value in expectedParm[] from
-each parameter and then squares it, then sums that for all parameters, then
-adds MIN_VALUE to it.  The minimum for this function will be MIN_VALUE, and
-will occur when each parameter equals the associated value in expectedParm[].
- 
-This procedure ignores the coordinates, other than to ensure that they were
-passed correctly from psMinimizePowell().
- 
- *****************************************************************************/
-psVector *myFuncEAM(psImage *myDeriv,
-                    psVector *myParams,
-                    psArray *myCoords)
-{
-    psVector *sum = psVectorAlloc(myCoords->n, PS_TYPE_F32);
-    psS32 i;
-    psS32 j;
-
-
-    if (myDeriv == NULL) {
-        myDeriv = psImageAlloc(myParams->n, myCoords->n, PS_TYPE_F32);
-        psError(PS_ERR_UNKNOWN, true, "myDeriv is NULL.\n");
-    }
-
-    for (i=0;i<N;i++) {
-        sum->data.F32[i] = MIN_VALUE;
-        for (j=0;j<NUM_PARAMS;j++) {
-            sum->data.F32[i]+= (myParams->data.F32[j] - expectedParm[j]) *
-                               (myParams->data.F32[j] - expectedParm[j]);
-
-            myDeriv->data.F32[i][j] = (2.0 * myParams->data.F32[j]) -
-                                      (2.0 * expectedParm[j]);
-        }
+    psF64 sum = 0.0;
+    for (psS32 i=0 ; i < params->n ; i++) {
+        sum += (params->data.F32[i] * x->data.F32[i]);
+        deriv->data.F32[i] = params->data.F32[i];
     }
 
@@ -121,6 +69,6 @@
         myParams->data.F32[i] = (float) i;
         myParams->data.F32[i] = expectedParm[i] * 1.3;
+        myParams->data.F32[i] = 0.0;
         myParams->data.F32[i] = (float) (5 + i);
-        myParams->data.F32[i] = 0.0;
     }
 
Index: /trunk/psLib/test/dataManip/tst_psStats00.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats00.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats00.c	(revision 4141)
@@ -3,8 +3,14 @@
 *  @brief Contains tests for psVectorStats with sample mean calculations
 *
-*  @author George Gusciora, MHPCC
+*  We extensively test the code with data type PS_TYPE_F32.  If these pass, we 
+*  do a much simpler test with data types PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_F64.
+*
+*  If the psStats,c code every changes such that vectors of different type
+*  are handled by different routines, then these tests must be extended.
+*
+*  @author GLG, MHPCC
 * 
-*  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-07 20:27:42 $
+*  @version $Revision: 1.18 $  $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-07 23:31:32 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -51,4 +57,9 @@
 static psF64 expectedWeightMeanWithMaskRangeF32 =  0.046574;
 
+psF64 rtc(void);
+psF64 sT, eT;
+psF64 diff;
+
+#include <unistd.h>
 psS32 main(psS32 argc, char* argv[] )
 {
Index: /trunk/psLib/test/dataManip/tst_psStats01.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats01.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats01.c	(revision 4141)
@@ -1,10 +1,16 @@
 /** @file  tst_psStats01.c
 *
-*  @brief Contains tests for psVectorStats with max calculations
-*
-*  @author George Gusciora, MHPCC
-*
-*  @version $Revision: 1.11 $  $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-07 20:27:42 $
+*  @brief Contains tests for psVectorStats with max calculations.
+*
+*  We extensively test the code with data type PS_TYPE_F32.  If these pass, we 
+*  do a much simpler test with data types PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_F64.
+*
+*  If the psStats,c code every changes such that vectors of different type
+*  are handled by different routines, then these tests must be extended.
+*
+*  @author GLG, MHPCC
+*
+*  @version $Revision: 1.12 $  $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-07 23:31:32 $
 *
 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
Index: /trunk/psLib/test/dataManip/tst_psStats03.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats03.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats03.c	(revision 4141)
@@ -2,4 +2,7 @@
     This routine must ensure that PS_STAT_SAMPLE_MEDIAN is correctly computed
     by the procedure psVectorStats().
+ 
+    XXX: Must add tests for various data types, other than psF32.  Copy code
+    from tst_psStats00.c-tst_psStats02.c.
  *****************************************************************************/
 #include <stdio.h>
Index: /trunk/psLib/test/dataManip/tst_psStats04.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats04.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats04.c	(revision 4141)
@@ -5,4 +5,7 @@
     Note: The NVALUES stat was removed from the IfA requirements spec.  So,
     this test is no longer in use.
+ 
+    XXX: Must add tests for various data types, other than psF32.  Copy code
+    from tst_psStats00.c-tst_psStats02.c.
  *****************************************************************************/
 #include <stdio.h>
Index: /trunk/psLib/test/dataManip/tst_psStats06.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats06.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats06.c	(revision 4141)
@@ -2,4 +2,7 @@
     This routine must ensure that PS_STAT_SAMPLE_STDEV is correctly computed
     by the procedure psArrayStats().
+ 
+    XXX: Must add tests for various data types, other than psF32.  Copy code
+    from tst_psStats00.c-tst_psStats02.c.
  *****************************************************************************/
 #include <stdio.h>
Index: /trunk/psLib/test/dataManip/tst_psStats07.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats07.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats07.c	(revision 4141)
@@ -2,4 +2,7 @@
    This routine must ensure that PS_STAT_ROBUST_QUARTILE is correctly computed
    by the procedure psArrayStats().
+ 
+   XXX: Must add tests for various data types, other than psF32.  Copy code
+   from tst_psStats00.c-tst_psStats02.c.
 *****************************************************************************/
 #include <stdio.h>
Index: /trunk/psLib/test/dataManip/tst_psStats08.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats08.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats08.c	(revision 4141)
@@ -2,4 +2,7 @@
     This routine must ensure that PS_STAT_SAMPLE_QUARTILE is correctly computed
     by the procedure psArrayStats().
+ 
+    XXX: Must add tests for various data types, other than psF32.  Copy code
+    from tst_psStats00.c-tst_psStats02.c.
  *****************************************************************************/
 #include <stdio.h>
Index: /trunk/psLib/test/dataManip/tst_psStats09.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psStats09.c	(revision 4140)
+++ /trunk/psLib/test/dataManip/tst_psStats09.c	(revision 4141)
@@ -3,4 +3,7 @@
     PS_STAT_CLIPPED_STDEV is calculate correctly by the procedure
     psVectorStats().
+ 
+    XXX: Must add tests for various data types, other than psF32.  Copy code
+    from tst_psStats00.c-tst_psStats02.c.
  *****************************************************************************/
 #include <stdio.h>
