Index: /branches/eam_branches/20091201/psLib/src/math/psMatrix.c
===================================================================
--- /branches/eam_branches/20091201/psLib/src/math/psMatrix.c	(revision 26371)
+++ /branches/eam_branches/20091201/psLib/src/math/psMatrix.c	(revision 26372)
@@ -1144,20 +1144,18 @@
 }
 
-// this is basically a wrapper for the gsl function: gsl_linalg_SV_decomp()
-// SVD decomposes matrix A based on the following equation:  A = U w V^T .
-// This function (as usual for SVD implementations) returns V not V^T.
-// U and V are returned to images; w is returned to a vector.  The input image is not modified.
-// U, V, and w must be supplied as allocated structures, but their lengths are set here to match the 
-// dimensionality of A. 
-// XXX there is no error handling for the gsl functions (anywhere in psMatrix.c)
+// this is basically a wrapper for the gsl function: gsl_linalg_SV_decomp() SVD decomposes
+// matrix A based on the following equation: A = U w V^T .  This function (as usual for SVD
+// implementations) returns V not V^T.  U and V are returned to images; w is returned to a
+// vector representing the diagonal of w.  The input image A is not modified.  U, V, and w may
+// be supplied as NULL or may be allocated; their lengths are set here to match the
+// dimensionality of A.  XXX there is no error handling for the gsl functions (anywhere in
+// psMatrix.c)
 bool psMatrixSVD(psImage **U, psVector **w, psImage **V, const psImage *A)
 {
     // Error checks  Missing one for eval
-    PS_ASSERT_PTR_NON_NULL(*U, false);
-    PS_ASSERT_PTR_NON_NULL(*w, false);
-    PS_ASSERT_PTR_NON_NULL(*V, false);
-    PS_ASSERT_GENERAL_IMAGE_NON_NULL(A, false);
-    PS_CHECK_POINTERS(A, evec, false);
-    PS_CHECK_DIMEN_AND_TYPE(A, PS_DIMEN_IMAGE, false);
+    PS_ASSERT_PTR_NON_NULL(U, false);
+    PS_ASSERT_PTR_NON_NULL(w, false);
+    PS_ASSERT_PTR_NON_NULL(V, false);
+    PS_ASSERT_PTR_NON_NULL(A, false);
 
     // A is provided with size Nx,Ny = numCols,numRows
Index: /branches/eam_branches/20091201/psLib/src/math/psMatrix.h
===================================================================
--- /branches/eam_branches/20091201/psLib/src/math/psMatrix.h	(revision 26371)
+++ /branches/eam_branches/20091201/psLib/src/math/psMatrix.h	(revision 26372)
@@ -196,6 +196,6 @@
 
 
-/// Single value decomposition, provided by Andy Becker
-psImage *psMatrixSVD(psImage* evec, psVector* eval, const psImage* in);
+/// Single value decomposition (original by Andy Becker, updated by EAM)
+bool psMatrixSVD(psImage **U, psVector **w, psImage **V, const psImage *A);
 
 /// @}
Index: /branches/eam_branches/20091201/psLib/src/mathtypes/psVector.c
===================================================================
--- /branches/eam_branches/20091201/psLib/src/mathtypes/psVector.c	(revision 26371)
+++ /branches/eam_branches/20091201/psLib/src/mathtypes/psVector.c	(revision 26372)
@@ -729,5 +729,5 @@
     char line[1024];
 
-    sprintf (line, "vector: %s\n", name);
+    sprintf (line, "# vector: %s\n", name);
     if (write(fd, line, strlen(line))) {;} //ignore return value
 
