Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 1863)
+++ /trunk/psLib/src/astro/psTime.c	(revision 1864)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 02:36:39 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -28,4 +28,5 @@
 #include "psImage.h"
 
+#include "psAstronomyErrors.h"
 
 /** Sidereal angular conversion from seconds to radians for GMST in seconds (i.e. pi/(180*240)) */
Index: /trunk/psLib/src/astronomy/psTime.c
===================================================================
--- /trunk/psLib/src/astronomy/psTime.c	(revision 1863)
+++ /trunk/psLib/src/astronomy/psTime.c	(revision 1864)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 02:36:39 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -28,4 +28,5 @@
 #include "psImage.h"
 
+#include "psAstronomyErrors.h"
 
 /** Sidereal angular conversion from seconds to radians for GMST in seconds (i.e. pi/(180*240)) */
Index: /trunk/psLib/src/dataManip/psDataManipErrors.dat
===================================================================
--- /trunk/psLib/src/dataManip/psDataManipErrors.dat	(revision 1863)
+++ /trunk/psLib/src/dataManip/psDataManipErrors.dat	(revision 1864)
@@ -7,2 +7,13 @@
 #  N.B. in code, the ERRORNAME appears as PS_ERRORTEXT_ERRORNAME
 ####################################################################
+#
+psVectorFFT_IMAGE_TYPE_UNSUPPORTED     Input psVector type, %s, is not supported. Valid data types are psF32 and psC32.
+psVectorFFT_REVERSE_NOT_COMPLEX        Input psVector (%s) is not complex.  Reverse FFT operation requires a complex input.
+psVectorFFT_FORWARD_NOT_REAL           Input psVector (%s) is not real.  Forward FFT operation requires a real input.
+psVectorFFT_FFTW_PLAN_NULL             Could not create a valid FFT plan to perform the transform.
+psVectorFFT_TYPE_UNSUPPORTED           Specified psVector type, %s, is not supported.
+psVectorFFT_REAL_IMAG_TYPE_MISMATCH    Real psVector type, %s, and imaginary psVector type, %s, must be the same.
+psVectorFFT_REAL_IMAG_SIZE_MISMATCH    Real psVector size, %d, and imaginary psVector size, %d, must be the same.
+psVectorFFT_NONREAL_NOTSUPPORTED       Input psVector type, %s, is required to be either psF32 or psF64.
+psVectorFFT_NONCOMPLEX_NOTSUPPORTED    Input psVector type, %s, is required to be either psC32 or psC64.
+
Index: /trunk/psLib/src/dataManip/psDataManipErrors.h
===================================================================
--- /trunk/psLib/src/dataManip/psDataManipErrors.h	(revision 1863)
+++ /trunk/psLib/src/dataManip/psDataManipErrors.h	(revision 1864)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,4 +30,13 @@
 
 //~Start #define PS_ERRORTEXT_$1 "$2"
+#define PS_ERRORTEXT_psVectorFFT_IMAGE_TYPE_UNSUPPORTED "Input psVector type, %s, is not supported. Valid data types are psF32 and psC32."
+#define PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX "Input psVector (%s) is not complex.  Reverse FFT operation requires a complex input."
+#define PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL "Input psVector (%s) is not real.  Forward FFT operation requires a real input."
+#define PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL "Could not create a valid FFT plan to perform the transform."
+#define PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED "Specified psVector type, %s, is not supported."
+#define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH "Real psVector type, %s, and imaginary psVector type, %s, must be the same."
+#define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_SIZE_MISMATCH "Real psVector size, %d, and imaginary psVector size, %d, must be the same."
+#define PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED "Input psVector type, %s, is required to be either psF32 or psF64."
+#define PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED "Input psVector type, %s, is required to be either psC32 or psC64."
 //~End
 
Index: /trunk/psLib/src/dataManip/psVectorFFT.c
===================================================================
--- /trunk/psLib/src/dataManip/psVectorFFT.c	(revision 1863)
+++ /trunk/psLib/src/dataManip/psVectorFFT.c	(revision 1864)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-25 21:10:08 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,6 @@
 #include "psImageExtraction.h"
 
+#include "psDataManipErrors.h"
+
 #define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE
 
@@ -42,5 +44,10 @@
 
     if ((type != PS_TYPE_F32) && (type != PS_TYPE_C32)) {
-        psError(__func__, "Input image must be a 32-bit float or complex image (type=%d)", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_IMAGE_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -48,5 +55,10 @@
 
     if ((type != PS_TYPE_C32) && (direction == PS_FFT_REVERSE)) {
-        psError(__func__, "Input image must be complex image for reverse FFT (type=%d).", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -55,5 +67,10 @@
 
     if ((type != PS_TYPE_F32) && (direction == PS_FFT_FORWARD)) {
-        psError(__func__, "Input image must be real image for forward FFT (type=%d).", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -94,5 +111,7 @@
     /* check if a plan exists now */
     if (plan == NULL) {
-        psError(__func__, "Failed to create FFTW plan.");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL);
         psFree(out);
         return NULL;
@@ -142,6 +161,22 @@
             outVec[i] = crealf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not extract real component from given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_F64);
+        out->n = numElements;
+        outVec = out->data.F64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = creal(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorReal",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -186,6 +221,22 @@
             outVec[i] = cimagf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not extract imaginary component from given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_F64);
+        out->n = numElements;
+        outVec = out->data.F64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = cimag(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorImaginary",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -213,11 +264,12 @@
 
     if (imag->type.type != type) {
-        psError(__func__, "The inputs to psVectorComplex must be the same type.");
-        psFree(out);
-        return NULL;
-    }
-
-    if (PS_IS_PSELEMTYPE_COMPLEX(type)) {
-        psError(__func__, "The inputs to psVectorComplex can not be complex.");
+        char* typeStrReal;
+        char* typeStrImag;
+        PS_TYPE_NAME(typeStrReal,type);
+        PS_TYPE_NAME(typeStrImag,imag->type.type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorComplex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH,
+                   typeStrReal,typeStrImag);
         psFree(out);
         return NULL;
@@ -236,6 +288,23 @@
             outVec[i] = realVec[i] + I * imagVec[i];
         }
-    } else {
-        psError(__func__, "Can not merge real and imaginary portions for given vector type (%d).", type);
+    } else if (type == PS_TYPE_F64) {
+        psC64* outVec;
+        psF64* realVec = real->data.F64;
+        psF64* imagVec = imag->data.F64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_C64);
+        out->n = numElements;
+        outVec = out->data.C64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = realVec[i] + I * imagVec[i];
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorComplex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -281,6 +350,22 @@
             outVec[i] = crealf(inVec[i]) - I * cimagf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not compute complex conjugate for given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psC64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_C64);
+        out->n = numElements;
+        outVec = out->data.C64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = creal(inVec[i]) - I * cimag(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorConjugate",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -309,11 +394,4 @@
     outNumElements = inHalfNumElements + 1;
 
-    /* if not a complex number, this is not implemented */
-    if (!PS_IS_PSELEMTYPE_COMPLEX(type)) {
-        psError(__func__, "Power Spectrum for non-complex inputs is not implemented.");
-        psFree(out);
-        return NULL;
-    }
-
     if (type == PS_TYPE_C32) {
         psF32* outVec;
@@ -340,11 +418,40 @@
         inAbs1 = cabsf(inVec[inHalfNumElements]);
         outVec[inHalfNumElements] = inAbs1 * inAbs1 / inNumElementsSquared;
-    } else {
-        psError(__func__, "Can not power spectrum for given vector type (%d).", type);
-        psFree(out);
-        return NULL;
-    }
-
-    return out;
-
-}
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+        psF64 inAbs1;
+        psF64 inAbs2;
+
+        out = psVectorRecycle(out, outNumElements, PS_TYPE_F64);
+        out->n = outNumElements;
+        outVec = out->data.F64;
+
+        // from ADD: P_0 = |C_0|^2/N^2
+        inAbs1 = cabs(inVec[0]);
+        outVec[0] = inAbs1 * inAbs1 / inNumElementsSquared;
+
+        // from ADD: P_j = (|C_j|^2+|C_N-j|^2)/N^2, where j = 1,2,...,(N/2-1)
+        for (unsigned int i = 1; i < inHalfNumElements; i++) {
+            inAbs1 = cabs(inVec[i]);
+            inAbs2 = cabs(inVec[inNumElements - i]);
+            outVec[i] = (inAbs1 * inAbs1 + inAbs2 * inAbs2) / inNumElementsSquared;
+        }
+
+        // from ADD: P_N/2 = |C_N/2|^2/N^2
+        inAbs1 = cabs(inVec[inHalfNumElements]);
+        outVec[inHalfNumElements] = inAbs1 * inAbs1 / inNumElementsSquared;
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorPowerSpectrum",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,
+                   typeStr);
+        psFree(out);
+        return NULL;
+    }
+
+    return out;
+
+}
Index: /trunk/psLib/src/fft/psImageFFT.c
===================================================================
--- /trunk/psLib/src/fft/psImageFFT.c	(revision 1863)
+++ /trunk/psLib/src/fft/psImageFFT.c	(revision 1864)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-21 22:30:19 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,5 +24,5 @@
 #include "psImageErrors.h"
 
-#define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE
+#define PS_FFTW_PLAN_RIGOR FFTW_ESTIMATE
 
 static bool p_fftwWisdomImported = false;
@@ -90,5 +90,5 @@
     plan = fftwf_plan_dft_2d(numCols, numRows,
                              (fftwf_complex *) out->data.C32[0],
-                             (fftwf_complex *) out->data.C32[0], direction, P_FFTW_PLAN_RIGOR);
+                             (fftwf_complex *) out->data.C32[0], direction, PS_FFTW_PLAN_RIGOR);
 
     /* check if a plan exists now -- if not, it is a real problem */
@@ -422,6 +422,6 @@
 
             for (unsigned int col = 0; col < numCols; col++) {
-                real = crealf(inRow[col]);
-                imag = cimagf(inRow[col]);
+                real = creal(inRow[col]);
+                imag = cimag(inRow[col]);
                 outRow[col] = real * real + imag * imag / numElementsSquared;
             }
Index: /trunk/psLib/src/fft/psVectorFFT.c
===================================================================
--- /trunk/psLib/src/fft/psVectorFFT.c	(revision 1863)
+++ /trunk/psLib/src/fft/psVectorFFT.c	(revision 1864)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-25 21:10:08 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,6 @@
 #include "psImageExtraction.h"
 
+#include "psDataManipErrors.h"
+
 #define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE
 
@@ -42,5 +44,10 @@
 
     if ((type != PS_TYPE_F32) && (type != PS_TYPE_C32)) {
-        psError(__func__, "Input image must be a 32-bit float or complex image (type=%d)", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_IMAGE_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -48,5 +55,10 @@
 
     if ((type != PS_TYPE_C32) && (direction == PS_FFT_REVERSE)) {
-        psError(__func__, "Input image must be complex image for reverse FFT (type=%d).", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -55,5 +67,10 @@
 
     if ((type != PS_TYPE_F32) && (direction == PS_FFT_FORWARD)) {
-        psError(__func__, "Input image must be real image for forward FFT (type=%d).", type);
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -94,5 +111,7 @@
     /* check if a plan exists now */
     if (plan == NULL) {
-        psError(__func__, "Failed to create FFTW plan.");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorFFT",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL);
         psFree(out);
         return NULL;
@@ -142,6 +161,22 @@
             outVec[i] = crealf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not extract real component from given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_F64);
+        out->n = numElements;
+        outVec = out->data.F64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = creal(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorReal",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -186,6 +221,22 @@
             outVec[i] = cimagf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not extract imaginary component from given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_F64);
+        out->n = numElements;
+        outVec = out->data.F64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = cimag(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorImaginary",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -213,11 +264,12 @@
 
     if (imag->type.type != type) {
-        psError(__func__, "The inputs to psVectorComplex must be the same type.");
-        psFree(out);
-        return NULL;
-    }
-
-    if (PS_IS_PSELEMTYPE_COMPLEX(type)) {
-        psError(__func__, "The inputs to psVectorComplex can not be complex.");
+        char* typeStrReal;
+        char* typeStrImag;
+        PS_TYPE_NAME(typeStrReal,type);
+        PS_TYPE_NAME(typeStrImag,imag->type.type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorComplex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH,
+                   typeStrReal,typeStrImag);
         psFree(out);
         return NULL;
@@ -236,6 +288,23 @@
             outVec[i] = realVec[i] + I * imagVec[i];
         }
-    } else {
-        psError(__func__, "Can not merge real and imaginary portions for given vector type (%d).", type);
+    } else if (type == PS_TYPE_F64) {
+        psC64* outVec;
+        psF64* realVec = real->data.F64;
+        psF64* imagVec = imag->data.F64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_C64);
+        out->n = numElements;
+        outVec = out->data.C64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = realVec[i] + I * imagVec[i];
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorComplex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -281,6 +350,22 @@
             outVec[i] = crealf(inVec[i]) - I * cimagf(inVec[i]);
         }
-    } else {
-        psError(__func__, "Can not compute complex conjugate for given vector type (%d).", type);
+    } else if (type == PS_TYPE_C64) {
+        psC64* outVec;
+        psC64* inVec = in->data.C64;
+
+        out = psVectorRecycle(out, numElements, PS_TYPE_C64);
+        out->n = numElements;
+        outVec = out->data.C64;
+
+        for (unsigned int i = 0; i < numElements; i++) {
+            outVec[i] = creal(inVec[i]) - I * cimag(inVec[i]);
+        }
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorConjugate",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,
+                   typeStr);
         psFree(out);
         return NULL;
@@ -309,11 +394,4 @@
     outNumElements = inHalfNumElements + 1;
 
-    /* if not a complex number, this is not implemented */
-    if (!PS_IS_PSELEMTYPE_COMPLEX(type)) {
-        psError(__func__, "Power Spectrum for non-complex inputs is not implemented.");
-        psFree(out);
-        return NULL;
-    }
-
     if (type == PS_TYPE_C32) {
         psF32* outVec;
@@ -340,11 +418,40 @@
         inAbs1 = cabsf(inVec[inHalfNumElements]);
         outVec[inHalfNumElements] = inAbs1 * inAbs1 / inNumElementsSquared;
-    } else {
-        psError(__func__, "Can not power spectrum for given vector type (%d).", type);
-        psFree(out);
-        return NULL;
-    }
-
-    return out;
-
-}
+    } else if (type == PS_TYPE_C64) {
+        psF64* outVec;
+        psC64* inVec = in->data.C64;
+        psF64 inAbs1;
+        psF64 inAbs2;
+
+        out = psVectorRecycle(out, outNumElements, PS_TYPE_F64);
+        out->n = outNumElements;
+        outVec = out->data.F64;
+
+        // from ADD: P_0 = |C_0|^2/N^2
+        inAbs1 = cabs(inVec[0]);
+        outVec[0] = inAbs1 * inAbs1 / inNumElementsSquared;
+
+        // from ADD: P_j = (|C_j|^2+|C_N-j|^2)/N^2, where j = 1,2,...,(N/2-1)
+        for (unsigned int i = 1; i < inHalfNumElements; i++) {
+            inAbs1 = cabs(inVec[i]);
+            inAbs2 = cabs(inVec[inNumElements - i]);
+            outVec[i] = (inAbs1 * inAbs1 + inAbs2 * inAbs2) / inNumElementsSquared;
+        }
+
+        // from ADD: P_N/2 = |C_N/2|^2/N^2
+        inAbs1 = cabs(inVec[inHalfNumElements]);
+        outVec[inHalfNumElements] = inAbs1 * inAbs1 / inNumElementsSquared;
+    } else {
+        char* typeStr;
+        PS_TYPE_NAME(typeStr,type);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorPowerSpectrum",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,
+                   typeStr);
+        psFree(out);
+        return NULL;
+    }
+
+    return out;
+
+}
Index: /trunk/psLib/src/image/psImageErrors.dat
===================================================================
--- /trunk/psLib/src/image/psImageErrors.dat	(revision 1863)
+++ /trunk/psLib/src/image/psImageErrors.dat	(revision 1864)
@@ -11,5 +11,5 @@
 psImage_NOT_AN_IMAGE                   The input psImage must have a PS_DIMEN_IMAGE dimension type.
 psImage_IMAGE_NULL                     Can not operate on a NULL psImage.
-psImage_IMAGE_TYPE_UNSUPPORTED         Specified psImage type (%s) is not supported.
+psImage_IMAGE_TYPE_UNSUPPORTED         Specified psImage type, %s, is not supported.
 psImage_INTERPOLATE_METHOD_INVALID     Specified interpolation method (%d) is not supported.
 psImage_SUBSET_RANGE_INVALID           Specified subset range, [%d:%d,%d:%d], lies outside psImage's boundaries, [0:%d,0:%d].
@@ -62,4 +62,8 @@
 psImageManip_SCALE_NOT_POSITIVE        Specified scale value, %d, must be a positive value.
 psImageManip_INTERPOLATION_MODE_UNSUPPORTED Specified interpolation mode, %d, is unsupported.
-psImageConvolve_SHIFT_NULL                Specified shift vectors can not be NULL.
-psImageConvolve_SHIFT_TYPE_MISMATCH    The X-shift vector type, %s, does not match the Y-shift vector type, %s.  Types must match.
+psImageConvolve_SHIFT_NULL             Specified shift vectors can not be NULL.
+psImageConvolve_KERNEL_NULL            Specified psKernel can not be NULL.
+psImageConvolve_SHIFT_TYPE_MISMATCH    Input t-, x-, and y-shift vector types (%s/%s/%s) must match.
+psImageConvolve_FFT_FAILED             Failed to perform a fourier transform of input image.
+psImageConvolve_KERNEL_FFT_FAILED      Failed to perform a fourier transform of kernel.
+psImageConvolve_KERNEL_TOO_LARGE       Specified psKernel size, %dx%d, can not be larger than input psImage size, %dx%d.  
Index: /trunk/psLib/src/image/psImageErrors.h
===================================================================
--- /trunk/psLib/src/image/psImageErrors.h	(revision 1863)
+++ /trunk/psLib/src/image/psImageErrors.h	(revision 1864)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-21 22:30:19 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -33,5 +33,5 @@
 #define PS_ERRORTEXT_psImage_NOT_AN_IMAGE "The input psImage must have a PS_DIMEN_IMAGE dimension type."
 #define PS_ERRORTEXT_psImage_IMAGE_NULL "Can not operate on a NULL psImage."
-#define PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED "Specified psImage type (%s) is not supported."
+#define PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED "Specified psImage type, %s, is not supported."
 #define PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID "Specified interpolation method (%d) is not supported."
 #define PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID "Specified subset range, [%d:%d,%d:%d], lies outside psImage's boundaries, [0:%d,0:%d]."
@@ -82,5 +82,9 @@
 #define PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED "Specified interpolation mode, %d, is unsupported."
 #define PS_ERRORTEXT_psImageConvolve_SHIFT_NULL "Specified shift vectors can not be NULL."
-#define PS_ERRORTEXT_psImageConvolve_SHIFT_TYPE_MISMATCH "The X-shift vector type, %s, does not match the Y-shift vector type, %s.  Types must match."
+#define PS_ERRORTEXT_psImageConvolve_KERNEL_NULL "Specified psKernel can not be NULL."
+#define PS_ERRORTEXT_psImageConvolve_SHIFT_TYPE_MISMATCH "Input t-, x-, and y-shift vector types (%s/%s/%s) must match."
+#define PS_ERRORTEXT_psImageConvolve_FFT_FAILED "Failed to perform a fourier transform of input image."
+#define PS_ERRORTEXT_psImageConvolve_KERNEL_FFT_FAILED "Failed to perform a fourier transform of kernel."
+#define PS_ERRORTEXT_psImageConvolve_KERNEL_TOO_LARGE "Specified psKernel size, %dx%d, can not be larger than input psImage size, %dx%d.  "
 //~End
 
Index: /trunk/psLib/src/image/psImageExtraction.c
===================================================================
--- /trunk/psLib/src/image/psImageExtraction.c	(revision 1863)
+++ /trunk/psLib/src/image/psImageExtraction.c	(revision 1864)
@@ -10,6 +10,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-21 22:30:19 $
+*  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-23 18:31:49 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -100,5 +100,6 @@
 }
 
-psImage* psImageSubsection(psImage* image, const char* section)
+psImage* psImageSubsection(psImage* image,
+                           const char* section)
 {
     int x1;
@@ -606,2 +607,31 @@
     return out;
 }
+
+psVector* psImageCut(psVector* out,
+                     psVector* coords,
+                     const psImage* input,
+                     const psImage* restrict mask,
+                     unsigned int maskVal,
+                     float startCol,
+                     float startRow,
+                     float endCol,
+                     float endRow,
+                     float nSamples,
+                     psImageInterpolateMode mode)
+{
+
+    return NULL;
+}
+
+psVector* psImageRadialCut(psVector* out,
+                           const psImage* input,
+                           const psImage* restrict mask,
+                           unsigned int maskVal,
+                           float centerCol,
+                           float centerRow,
+                           const psVector* radii,
+                           const psStats* stats)
+{
+
+    return NULL;
+}
Index: /trunk/psLib/src/image/psImageExtraction.h
===================================================================
--- /trunk/psLib/src/image/psImageExtraction.h	(revision 1863)
+++ /trunk/psLib/src/image/psImageExtraction.h	(revision 1864)
@@ -10,6 +10,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-25 00:04:01 $
+*  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-23 18:31:49 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -145,4 +145,5 @@
 psVector* psImageCut(
     psVector* out,                     ///< psVector to recycle, or NULL.
+    psVector* coords,                  ///< if not NULL, the calculated coordinates along the slice (output)
     const psImage* input,              ///< the input image in which to perform the cut
     const psImage* restrict mask,      ///< the mask for the input image.
@@ -152,6 +153,6 @@
     float endCol,                      ///< the column of the end of the cut line
     float endRow,                      ///< the row of the end of the cut line
-    float width,                       ///< the distance about the line to perform the statistics
-    const psStats* stats               ///< the statistic to perform in operation
+    float nSamples,                    ///< the number of samples along the cut
+    psImageInterpolateMode mode        ///< the interpolation method to use
 );
 
Index: /trunk/psLib/src/image/psImageFFT.c
===================================================================
--- /trunk/psLib/src/image/psImageFFT.c	(revision 1863)
+++ /trunk/psLib/src/image/psImageFFT.c	(revision 1864)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-21 22:30:19 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-23 18:31:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,5 +24,5 @@
 #include "psImageErrors.h"
 
-#define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE
+#define PS_FFTW_PLAN_RIGOR FFTW_ESTIMATE
 
 static bool p_fftwWisdomImported = false;
@@ -90,5 +90,5 @@
     plan = fftwf_plan_dft_2d(numCols, numRows,
                              (fftwf_complex *) out->data.C32[0],
-                             (fftwf_complex *) out->data.C32[0], direction, P_FFTW_PLAN_RIGOR);
+                             (fftwf_complex *) out->data.C32[0], direction, PS_FFTW_PLAN_RIGOR);
 
     /* check if a plan exists now -- if not, it is a real problem */
@@ -422,6 +422,6 @@
 
             for (unsigned int col = 0; col < numCols; col++) {
-                real = crealf(inRow[col]);
-                imag = cimagf(inRow[col]);
+                real = creal(inRow[col]);
+                imag = cimag(inRow[col]);
                 outRow[col] = real * real + imag * imag / numElementsSquared;
             }
