Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 825)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 826)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.48 2004-05-27 02:34:32 eugene Exp $
+%%% $Id: psLibSDRS.tex,v 1.49 2004-06-02 01:22:02 price Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -2339,21 +2339,21 @@
 
 \begin{verbatim}
-psVector *psVectorFFT(const psVector *in, int direction);
+psVector *psVectorFFT(psVector *out, const psVector *in, psFFTFlags direction);
 psVector *psVectorReal(psVector *out, const psVector *in);
 psVector *psVectorImaginary(psVector *out, const psVector *in);
-psVector *psVectorComplex(psVector *real, psVector *imag);
+psVector *psVectorComplex(psVector *out, psVector *real, psVector *imag);
 psVector *psVectorConjugate(psVector *out, const psVector *in);
-psVector *psVectorPowerSpectrum(const psVector *in);
+psVector *psVectorPowerSpectrum(psVector *out, const psVector *in);
 \end{verbatim}
 
 The forward and reverse FFT is calculated using \code{psVectorFFT},
 which takes as input the vector of interest (\code{in}) and the
-direction (\code{direction}; 1 is forward, -1 is reverse).  The input
-vector may be of type \code{psF32} or \code{psC32}, the result is
-always \code{psC32}.  If the input vector is \code{psF32}, the
-direction must be forward.  Neither the forward or inverse transforms
-must multiply by $1/N$ (or $1/N^{1/2}$), and so it falls to the
-responsibility of the user to multiply a vector that has been forward-
-and reverse-transformed by $1/N$.
+direction (\code{direction}), which is specified by an enumerated type
+defined below.  The input vector may be of type \code{psF32} or
+\code{psC32}, the result is always \code{psC32}.  If the input vector
+is \code{psF32}, the direction must be forward.  Neither the forward
+or inverse transforms must multiply by $1/N$ (or $1/N^{1/2}$), and so
+it falls to the responsibility of the user to multiply a vector that
+has been forward- and reverse-transformed by $1/N$.
 
 Conversions between complex and real vectors requires the functions
@@ -2370,13 +2370,37 @@
 (\code{psF32}) vectors of the input complex vector (\code{psC32}).
 
+The direction of an FFT performed by \code{psVectorFFT} is specified
+by an enumerated type, \code{psFFTFlags}:
+
+\begin{verbatim}
+/** Specify direction of FFT, and if the result is real or not */
+typedef enum {
+    PS_FFT_FORWARD = 0,                 ///< psImageFFT/psVectorFFT should perform a forward FFT.
+    PS_FFT_REVERSE = 1,                 ///< psImageFFT/psVectorFFT should perform a reverse FFT.
+    PS_FFT_REAL_RESULT = 2		///< psImageFFT/psVectorFFT should return a real image. This is valid
+					///< for only reverse FFT, i.e., the psImageFFT/psVectorFFT flag
+					///< parameter should appear as PS_FFT_REVERSE+PS_FFT_REAL_RESULT.
+} psFFTFlags;
+\end{verbatim}
+
+The entry \code{PS_FFT_REAL_RESULT} means that the output of an
+inverse FFT is to be purely real.  An example of its use is:
+\begin{verbatim}
+out = psImageFFT(in, PS_FFT_REVERSE | PS_FFT_REAL_RESULT);
+\end{verbatim}
+
+The output from a FFT and power spectrum shall be of the same size as
+the input.  In the future, if this adversely affects performance, this
+will be revised so that the redundant information will be neglected.
+
 In analogy with the vector FFT operations, we also define matching
 image operations as follows:
 \begin{verbatim}
-psImage *psImageFFT(const psImage *image, int direction);
+psImage *psImageFFT(psImage *out, const psImage *image, psFFTFlags direction);
 psImage *psImageReal(psImage *out, const psImage *in);
 psImage *psImageImaginary(psImage *out, const psImage *in);
-psImage *psImageComplex(psImage *real, const psImage *imag);
+psImage *psImageComplex(psImage *out, psImage *real, const psImage *imag);
 psImage *psImageConjugate(psImage *out, const psImage *in);
-psImage *psImagePowerSpectrum(const psImage *in);
+psImage *psImagePowerSpectrum(psImage *out, const psImage *in);
 \end{verbatim}
 
