Index: /trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.c	(revision 7578)
+++ /trunk/psLib/src/mathtypes/psImage.c	(revision 7579)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.106 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-13 19:53:54 $
+ *  @version $Revision: 1.107 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 02:29:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -363,5 +363,5 @@
     #define IMAGE_SET_CASE(TYPE) \
 case PS_TYPE_##TYPE: \
-    image->data.TYPE[y][x] = value; \
+    image->data.TYPE[y][x] = (ps##TYPE)value; \
     break;
 
@@ -400,20 +400,20 @@
                 "Invalid x-position %d.  Position out of range (%d-%d)\n",
                 x, image->col0, image->numCols+image->col0-1 );
-        return false;
+        return NAN;
     } else if ( y >= (image->row0 + image->numRows) ) {
         psError(PS_ERR_BAD_PARAMETER_SIZE, true,
                 "Invalid y-position %d.  Position out of range (%d-%d)\n",
                 y, image->row0, image->numRows+image->row0-1 );
-        return false;
+        return NAN;
     } else if (x < image->col0 && x >= 0) {
         psError(PS_ERR_BAD_PARAMETER_SIZE, true,
                 "Invalid x-position %d.  Position out of range (%d-%d)\n",
                 x, image->col0, image->numCols+image->col0-1 );
-        return false;
+        return NAN;
     } else if (y < image->row0 && y >= 0) {
         psError(PS_ERR_BAD_PARAMETER_SIZE, true,
                 "Invalid y-position %d.  Position out of range (%d-%d)\n",
                 y, image->row0, image->numRows+image->row0-1 );
-        return false;
+        return NAN;
     } else if (x < 0 || y < 0) {
         if (x < 0) {
@@ -424,5 +424,5 @@
                     "Invalid x-position %d.  Position out of range (%d-%d)\n",
                     (x+image->col0), image->col0, image->numCols+image->col0-1 );
-            return false;
+            return NAN;
         }
         if (y < 0) {
@@ -433,5 +433,5 @@
                     "Invalid y-position %d.  Position out of range (%d-%d)\n",
                     (y+image->row0), image->row0, image->numRows+image->row0-1 );
-            return false;
+            return NAN;
         }
     } else {
Index: /trunk/psLib/src/mathtypes/psImage.h
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.h	(revision 7578)
+++ /trunk/psLib/src/mathtypes/psImage.h	(revision 7579)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-14 01:29:16 $
+ *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 02:29:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -93,6 +93,6 @@
  */
 psImage* psImageAlloc(
-    int numCols,                       ///< Number of rows in image.
-    int numRows,                       ///< Number of columns in image.
+    int numCols,                       ///< Number of columns in image.
+    int numRows,                       ///< Number of rows in image.
     psElemType type                    ///< Type of data for image.
 )
Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 7578)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 7579)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-06-01 01:00:03 $
+*  @version $Revision: 1.76 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-06-15 02:29:12 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -873,5 +873,5 @@
 }
 
-bool psVectorSet(const psVector *input,
+bool psVectorSet(psVector *input,
                  long position,
                  double complex value)
@@ -904,38 +904,38 @@
     switch (input->type.type) {
     case PS_TYPE_U8:
-        *(psU8*)&input->data.U8[position] = value;
+        input->data.U8[position] = (psU8)value;
         break;
     case PS_TYPE_U16:
-        *(psU16*)&input->data.U16[position] = value;
+        input->data.U16[position] = (psU16)value;
         break;
     case PS_TYPE_U32:
-        *(psU32*)&input->data.U32[position] = value;
+        input->data.U32[position] = (psU32)value;
         break;
     case PS_TYPE_U64:
-        *(psU64*)&input->data.U64[position] = value;
+        input->data.U64[position] = (psU64)value;
         break;
     case PS_TYPE_S8:
-        *(psS8*)&input->data.S8[position] = value;
+        input->data.S8[position] = (psS8)value;
         break;
     case PS_TYPE_S16:
-        *(psS16*)&input->data.S16[position] = value;
+        input->data.S16[position] = (psS16)value;
         break;
     case PS_TYPE_S32:
-        *(psS32*)&input->data.S32[position] = value;
+        input->data.S32[position] = (psS32)value;
         break;
     case PS_TYPE_S64:
-        *(psS64*)&input->data.S64[position] = value;
+        input->data.S64[position] = (psS64)value;
         break;
     case PS_TYPE_F32:
-        *(psF32*)&input->data.F32[position] = value;
+        input->data.F32[position] = (psF32)value;
         break;
     case PS_TYPE_F64:
-        *(psF64*)&input->data.F64[position] = value;
+        input->data.F64[position] = (psF64)value;
         break;
     case PS_TYPE_C32:
-        *(psC32*)&input->data.C32[position] = value;
+        input->data.C32[position] = (psC32)value;
         break;
     case PS_TYPE_C64:
-        *(psC64*)&input->data.C64[position] = value;
+        input->data.C64[position] = (psC64)value;
         break;
     default:
Index: /trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.h	(revision 7578)
+++ /trunk/psLib/src/mathtypes/psVector.h	(revision 7579)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-02-28 02:53:03 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 02:29:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -233,5 +233,5 @@
  */
 bool psVectorSet(
-    const psVector *input,             ///< Input vector to set
+    psVector *input,                   ///< Input vector to set
     long position,                     ///< vector position
     double complex value               ///< value to set
Index: /trunk/psLib/test/mathtypes/tst_psImage.c
===================================================================
--- /trunk/psLib/test/mathtypes/tst_psImage.c	(revision 7578)
+++ /trunk/psLib/test/mathtypes/tst_psImage.c	(revision 7579)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-03-14 03:25:48 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 02:29:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -361,10 +361,10 @@
 {
     psImage *image = NULL;
-    image = psImageAlloc(5, 5, PS_TYPE_S32);
+    image = psImageAlloc(5, 4, PS_TYPE_S32);
 
     //Set the position of the subimage relative to the parent.
     image->col0 = 10;
     image->row0 = 10;
-    for (int i = 0; i < 5; i++) {
+    for (int i = 0; i < 4; i++) {
         for (int j = 0; j < 5; j++) {
             image->data.S32[i][j] = i+j;
@@ -419,11 +419,12 @@
 
     //Try to set a position inside of the subimage.
-    if ( !psImageSet(image, 13, 14, 666) ) {
+    if ( !psImageSet(image, 14, 12, 666) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageSet failed to return true when passed valid parameters.\n");
         return 6;
-    } else if (image->data.S32[3][4] != 666) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psImageSet failed to set the data values correctly.\n");
+    }
+    if (image->data.S32[2][4] != 666) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                "psImageSet failed to set the data values correctly. value=%d\n", image->data.S32[2][4]);
         return 7;
     }
@@ -433,8 +434,8 @@
                 "psImageSet failed to return true when passed valid parameters.\n");
         return 8;
-    } else if  (image->data.S32[4][4] != 666) {
+    } else if  (image->data.S32[3][4] != 666) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageSet failed to set (from the tail) the data values correctly.\n");
-        printf("\n value at 14,14 is %d\n", image->data.S32[4][4]);
+        printf("\n value at 14,14 is %d\n", image->data.S32[3][4]);
         return 9;
     }
@@ -477,10 +478,10 @@
 {
     psImage *image = NULL;
-    image = psImageAlloc(5, 5, PS_TYPE_S32);
+    image = psImageAlloc(5, 3, PS_TYPE_S32);
 
     //Set the position of the subimage relative to the parent.
     image->col0 = 10;
     image->row0 = 10;
-    for (int i = 0; i < 5; i++) {
+    for (int i = 0; i < 3; i++) {
         for (int j = 0; j < 5; j++) {
             image->data.S32[i][j] = i+j;
@@ -535,5 +536,5 @@
 
     //Try to get a position inside of the subimage.
-    if ( psImageGet(image, 13, 14) != 7 ) {
+    if ( psImageGet(image, 14, 12) != 6 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageGet failed to return the correct value.\n");
@@ -541,5 +542,5 @@
     }
     //Try to get a position inside of the subimage from the tail.
-    if ( psImageGet(image, -1, -1) != 8 ) {
+    if ( psImageGet(image, -1, -1) != 6 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageGet failed to return the correct value.\n");
@@ -549,5 +550,5 @@
     //Try to get a position outside of the subimage but inside of the parent image.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 1, 1) ) ) {
+    if ( !isnan( psImageGet(image, 1, 1) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -555,5 +556,5 @@
     }
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 9, 10) ) ) {
+    if ( !isnan( psImageGet(image, 9, 10) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -563,5 +564,5 @@
     //Try to set a position outside of the subimage.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 15, 14) ) ) {
+    if ( !isnan( psImageGet(image, 15, 14) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -570,5 +571,5 @@
     //Try to set a position outside of the subimage, indexing from the tail.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, -6, -1) ) ) {
+    if ( !isnan( psImageGet(image, -6, -1) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
