Index: trunk/Ohana/src/opihi/cmd.data/Makefile
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 16111)
+++ trunk/Ohana/src/opihi/cmd.data/Makefile	(revision 16117)
@@ -42,7 +42,5 @@
 $(SRC)/erase.$(ARCH).o		\
 $(SRC)/extract.$(ARCH).o	\
-$(SRC)/fft1d.old.$(ARCH).o		\
 $(SRC)/fft1d.$(ARCH).o		\
-$(SRC)/fft2d.old.$(ARCH).o		\
 $(SRC)/fft2d.$(ARCH).o		\
 $(SRC)/fit2d.$(ARCH).o		\
Index: trunk/Ohana/src/opihi/cmd.data/gaussj.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/gaussj.c	(revision 16111)
+++ trunk/Ohana/src/opihi/cmd.data/gaussj.c	(revision 16117)
@@ -5,7 +5,13 @@
   float *m, *v;
   double **a, **b;
-  int i, j, N, status;
+  int i, j, N, status, QUIET;
   Vector *B;
   Buffer *A;
+
+  QUIET = FALSE;
+  if ((N = get_argument (argc, argv, "-q"))) {
+    QUIET = TRUE;
+    remove_argument (N, &argc, argv);
+  }
 
   if (argc != 3) goto usage;
@@ -50,5 +56,5 @@
   free (b);
 
-  if (!status) {
+  if (!status && !QUIET) {
       gprint (GP_ERR, "failure in matrix solution\n");
   }
Index: trunk/Ohana/src/opihi/cmd.data/init.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/init.c	(revision 16111)
+++ trunk/Ohana/src/opihi/cmd.data/init.c	(revision 16117)
@@ -26,8 +26,6 @@
 int erase            PROTO((int, char **));
 int extract          PROTO((int, char **));
-int fft1dold         PROTO((int, char **));
 int fft1d            PROTO((int, char **));
 int fft2d            PROTO((int, char **));
-int fft2dold         PROTO((int, char **));
 int fit2d            PROTO((int, char **));
 int fit              PROTO((int, char **));
@@ -147,8 +145,6 @@
   {"erase",        erase,	     "erase objects on an overlay"},
   {"extract",      extract,	     "extract a portion of a buffer into another buffer"},
-  {"fft1dold",     fft1dold,	     "fft on the pixel-stream in an image"},
   {"fft1d",        fft1d,	     "fft on the pixel-stream in an image"},
   {"fft2d",        fft2d,	     "fft on an image"},
-  {"fft2dold",     fft2dold,	     "fft on an image"},
   {"fit",     	   fit,		     "fit polynomial to vector pair"},
   {"fit2d",        fit2d,	     "fit 2-d polynomial to vector triplet"},
Index: trunk/Ohana/src/opihi/cmd.data/test/fft1d.sh
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/test/fft1d.sh	(revision 16111)
+++ trunk/Ohana/src/opihi/cmd.data/test/fft1d.sh	(revision 16117)
@@ -15,11 +15,6 @@
  fft1d f 0 to Frn Fin
 
- fft1dold f 0 to Fro Fio
-
  clear
  section a 0.0 0.0 1.0 0.5
  lim t Fro; box; plot -pt 7 -c blue t Fro; plot -pt 2 -c red t Frn
-
- section b 0.0 0.5 1.0 0.5
- lim t Fio; box; plot -pt 7 -c blue t Fio; plot -pt 2 -c red t Fin
 end
Index: trunk/Ohana/src/opihi/cmd.data/test/gaussj.sh
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/test/gaussj.sh	(revision 16111)
+++ trunk/Ohana/src/opihi/cmd.data/test/gaussj.sh	(revision 16117)
@@ -3,6 +3,10 @@
  test1
  test2
-end
-
+ test3
+ test4
+ test5
+end
+
+# a very simple diagonal matrix equation
 macro test1
  $PASS = 1
@@ -22,4 +26,7 @@
 
  gaussj A B
+ if (not($STATUS))
+   $PASS = 0
+ end
 
  if (abs(A[0][0] - 0.75) > 0.01)
@@ -64,4 +71,5 @@
 end
 
+# a very simple off-diagonal matrix equation
 macro test2
  $PASS = 1
@@ -81,4 +89,7 @@
 
  gaussj A B
+ if (not($STATUS))
+   $PASS = 0
+ end
 
  # echo A[0][0] A[0][1] A[0][2]
@@ -127,2 +138,107 @@
 end
 
+# a singular matrix equation
+macro test3
+ $PASS = 1
+ break -auto off
+
+ mcreate A 3 3
+ create B 0 3
+
+ A[0][0] = 2
+ A[1][0] = 2
+ A[2][2] = 2
+
+ A[0][1] = -1
+ A[1][1] = -1
+ A[2][1] = -1
+
+ gaussj -q A B
+ if ($STATUS)
+   $PASS = 0
+ end
+end
+
+# a very large matrix equation
+macro test4
+ $PASS = 1
+ break -auto off
+
+ $Ndim = 50
+ mcreate A $Ndim $Ndim
+ create B 0 $Ndim
+
+ # generate the diagonal + off-diagonal elements
+ for i 0 $Ndim
+   A[$i][$i] = 2.0
+   if ($i > 0)
+     A[$i][$i-1] = -1.0
+   end
+   if ($i < $Ndim - 1)
+     A[$i][$i+1] = -1.0
+   end
+ end
+
+ set inB = B
+ set inA = A
+
+ gaussj A B
+ if (not($STATUS))
+   $PASS = 0
+ end
+
+ set meas = zero(inB)
+ for i 0 B[]
+  for j 0 B[]
+   meas[$i] = meas[$i] + inA[$i][$j] * B[$j]
+  end
+ end
+
+ for i 0 inB[]
+  if (abs(inB[$i]-meas[$i]) > 1e-3)
+    $PASS = 0
+    echo inB[$i] meas[$i] {inB[$i]-meas[$i]}
+  end
+ end
+end
+
+# a nearly singular matrix equation
+macro test5
+ $PASS = 1
+ break -auto off
+
+ delete A B inA inB meas
+
+ mcreate A 3 3
+ create B 0 3
+
+ A[0][0] = 2
+ A[1][0] = 2.00001
+ A[2][2] = 2
+
+ A[0][1] = -1
+ A[1][1] = -1
+ A[2][1] = -1
+
+ set inB = B
+ set inA = A
+
+ gaussj A B
+ if (not($STATUS))
+   $PASS = 0
+ end
+
+ set meas = zero(inB)
+ for i 0 B[]
+  for j 0 B[]
+   meas[$i] = meas[$i] + inA[$i][$j] * B[$j]
+  end
+ end
+
+ for i 0 inB[]
+  if (abs(inB[$i]-meas[$i]) > 1e-5)
+    $PASS = 0
+  end
+ end
+end
+
