Index: trunk/psLib/src/fft/psVectorFFT.h
===================================================================
--- trunk/psLib/src/fft/psVectorFFT.h	(revision 11248)
+++ trunk/psLib/src/fft/psVectorFFT.h	(revision 11703)
@@ -1,11 +1,12 @@
-/* @file  psVectorFFT.h
- * @brief Contains FFT transform related functions for psVector
- *
- * @author Robert DeSonia, MHPCC
- *
- * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-01-23 22:47:22 $
- * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- */
+/// @file  psVectorFFT.h
+/// @brief Contains FFT transform related functions for psVector
+///
+/// @author Paul Price, IfA
+/// @author Robert DeSonia, MHPCC
+///
+/// @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2007-02-08 04:17:58 $
+/// Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
+///
 
 #ifndef PS_VECTOR_FFT_H
@@ -17,77 +18,47 @@
 /// @{
 
-/** Specify direction of FFT */
-typedef enum {
-    /// psImageFFT/psVectorFFT should perform a forward FFT.
-    PS_FFT_FORWARD = 1,
+/// Forward FFT of a vector
+///
+/// Applies a forward FFT (exponent -1), with the result returned in both real and imaginary parts.  The FFT
+/// is not normalised (a forward followed by a reverse is the original scaled by the number of elements).  The
+/// FFT takes advantage of the fact that the input is purely real; hence the output size is N/2 + 1 (with
+/// division rounding down).  Only implemented for F32 input.
+bool psVectorForwardFFT(psVector **real,///< Real part of FFT
+                        psVector **imag,///< Imaginary part of FFT
+                        const psVector *in ///< Input vector (F32)
+    );
 
-    /// psImageFFT/psVectorFFT should perform a reverse FFT.
-    PS_FFT_REVERSE = 2,
+/// Backward FFT of a vector
+///
+/// Applies a backward FFT (exponent +1) from the real and imaginary parts with the (purely) real result
+/// returned.  The FFT is not normalised (a forward followed by a reverse is the original scaled by the number
+/// of elements).  The FFT takes advantage of the fact that the output will be purely real; hence the input
+/// size is N/2 + 1 (with division rounding down); to manage the redundancy (is the original size even or
+/// odd?), we need the original size (the size of the array that was input to psVectorForwardFFT) to be
+/// provided.  Only implemented for F32 input.
+bool psVectorBackwardFFT(psVector **out,///< Output vector
+                         const psVector *real, ///< Real input (F32)
+                         const psVector *imag, ///< Imaginary input (F32)
+                         int origN      ///< Original number of elements
+    );
 
-    /// psImageFFT/psVectorFFT should perform a reverse FFT with a real result.
-    PS_FFT_REAL_RESULT = 4
-} psFFTFlags;
+/// Power spectrum of a vector
+///
+/// Generates the power spectrum of a vector.  Only implemented for F32 input.
+psVector *psVectorPowerSpectrum(psVector *out, ///< Output power spectrum, or NULL
+                                const psVector* in ///< Input vector (F32)
+    );
 
-
-/** Forward and reverse FFT calculations.
- *
- *  This takes as input the vector of interest (in) and the direction
- *  (direction), which is specified by an enumerated type psFftDirection.
- *  The input vector may be of type psF32 or psC32, the result is always
- *  psC32. If the input vector is psF32, the direction must be forward.
- *
- *  @return psVector* the FFT transformation result
- */
-psVector* psVectorFFT(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* in,                ///< the vector to apply transform to
-    psFFTFlags direction               ///< the direction of the transform
-);
-
-/** extract the real portion of a complex vector
- *
- *  @return psVector*   real portion of the input vector.
- */
-psVector* psVectorReal(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* in                ///< the psVector to extract real portion from
-);
-
-/** extract the imaginary portion of a complex vector
- *
- *  @return psVector*   imaginary portion of the input vector.
- */
-psVector* psVectorImaginary(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* in                 ///< the psVector to extract imaginary portion from
-);
-
-/** creates a complex vector from separate real and imaginary vectors
- *
- *  @return psVector*   resulting complex vector
- */
-psVector* psVectorComplex(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* real,              ///< the real vector
-    const psVector* imag               ///< the imaginary vector
-);
-
-/** computes the complex conjugate of a vector
- *
- *  @return psVector*   the complex conjugate of the 'in' vector
- */
-psVector* psVectorConjugate(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* in                 ///< the psVector to compute conjugate of
-);
-
-/** computes the power spectrum of a vector
- *
- *  @return psVector*   the power spectrum of the 'in' vector
- */
-psVector* psVectorPowerSpectrum(
-    psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
-    const psVector* in                 ///< the psVector to power spectrum of
-);
+/// Multiply complex vectors
+///
+/// The input vectors are the real and imaginary parts of each of two vectors.  The real and imaginary parts
+/// of the output vector are returned.  Only implemented for F32 input.
+bool psVectorComplexMultiply(psVector **outReal, ///< Real part of output
+                             psVector **outImag, ///< Imaginary part of output
+                             const psVector *in1Real, ///< Real part of input 1
+                             const psVector *in1Imag, ///< Imaginary part of input 1
+                             const psVector *in2Real, ///< Real part of input 2
+                             const psVector *in2Imag ///< Imaginary part of input 2
+    );
 
 /// @}
