Index: trunk/archive/pslib/include/psFFT.h
===================================================================
--- trunk/archive/pslib/include/psFFT.h	(revision 396)
+++ trunk/archive/pslib/include/psFFT.h	(revision 613)
@@ -14,87 +14,59 @@
  */
 
-/** Details on FFT implementation (private).  Example shown is for FFTW */
-typedef struct {
-    fftw_plan plan;			///< FFTW plan on how to do the FFT
-    char *filename;			///< File name for FFTW plan
-} p_psFFTDetails;
+/** Forward FFT an image.  Returns a complex float image. */
+psImage *
+psImageFFT(const psImage *image		///< Image to transform
+    );
 
-/** Fast Fourier Transform */
-typedef struct {
-    p_psFFTDetails *details;		///< Details on FFT implementation (private)
-    int nx, ny;				///< Size in x and y
-    float *real;			///< Data in real space: a 2D array using the [nx*y + x] stuff
-    void *fourier;			///< Data in fourier space; implementation dependent
-} psFFT;
+/** Forward FFT an array of floating-point numbers. */
+psFloatArray *
+psFloatArrayFFT(const psFloatArray *arr	///< Array to transform
+    );
 
-/** Constructor */
-psFFT *
-psFFTAlloc(psImage *image		///< Image to transform
-	   );
+/** Inverse FFT an image. */
+psImage *
+psImageInverseFFT(const psImage *fftImage ///< FFT-ed image to inverse-transform
+    );
 
-/** Constructor for 1D case */
-psFFT *
-psFFTAlloc1D(const psFloatArray *arr	///< Array to transform
-	     );
+/** Inverse FFT an array of complex floating-point numbers */
+psComplexArray *
+psComplexArrayInverseFFT(const psComplexArray *fftArray ///< FFT-ed array to inverse-transform
+    );
 
-/** Destructor. Returns the data in the real space as an image. */
+/** Calculate power spectrum of an image */
 psImage *
-psFFTFree(psImage *out,			///< Image to write the data to, or NULL
-	  psFFT *restrict fft		///< FFT to destroy
-	  );
+psImagePowerSpectrum(const psImage *image ///< Image to obtain power spectrum of
+    );
 
-/** Forward FFT: from real to fourier space */
-psFFT *
-psFFTForward(psFFT *fft			///< FFT to apply (input and output)
-	     );
+/** Calculate power spectrum of an array of floating-point numbers */
+psFloatArray *
+psFloatArrayPowerSpectrum(const psFloatArray *arr ///< Array to obtain power spectrum of
+    );
 
-/** Reverse FFT: from fourier to real space */
-psFFT *
-psFFTReverse(psFFT *fft			///< FFT to apply (input and output)
-	     );
+/* The below functions are provided to allow cross-correlations etc. */
 
-/** Apply filter function in fourier space */
-psFFT *
-psFFTFilter(psFFT *fft,			///< FFT to use (input and output)
-	    float (*filterFunc)(int kx, int ky)	///< External filter function
+/** Get the real part of an image */
+psImage *
+psImageReal(psImage *out,		///< Image for output (or NULL)
+	    const psImage *in		///< Image to get the real part of
 	    );
 
-/** Apply complex filter function */
-psFFT *
-psFFTFilterComplex(psFFT *fft,		///< FFT to use (input and output)
-		   float (*realFilterFunc)(int kx, int ky), ///< External filter function, real part
-		   float (*imagFilterFunc)(int kx, int ky) ///< External filter function, imaginary part
-		   );
+/** Get the real part of an array of complex floating-point numbers */
+psFloatArray *
+psComplexArrayReal(psFloatArray *out,	///< Array for output (or NULL)
+		   const psComplexArray *in ///< Array to get the real part of
+    );
 
-/** Calculate FFT of the cross-correlation.  Multiplication of the first FFT with the complex conjugate of
- *  the second.
- */
-psFFT *
-psFFTCrossCorrelate(psFFT *out,		///< Output FFT (or NULL)
-		    const psFFT *fft1, const psFFT *fft2 ///< FFTs to use in cross-correlation
-		    );
+/** Get the complex conjugate of an image */
+psImage *
+psImageConjugate(psImage *out,		///< Image for output (or NULL)
+		 const psImage *in	///< Image to get the complex conjugate of
+    );
 
-/** Calculate FFT of the convolution.  Straight multiplication of the FFTs */
-psFFT *
-psFFTConvolve(psFFT *out,		///< Output FFT (or NULL)
-	      const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply
-	      );
-
-/** Calculate power spectrum */
-psFloatArray *
-psFFTPowerSpec(psFFT *fft		///< FFT to use (input and output)
-	       );
-
-/* Convert the real data in the FFT struct to an image again */
-psImage *
-psFFTGetImage(psImage *out,		///< Image to write to (or NULL)
-	      const psFFT *fft		///< FFT to get image from
-	      );
-
-/** Convert the Fourier transform data in the FFT struct to an image of complex numbers */
-psImage *
-psFFTGetFT(psImage *out,		///< Image to write to (or NULL)
-	   const psFFT *fft		///< FFT to get Fourier transform from
-	   );
+/** Get the complex conjugate of an array of complex floating-point numbers */
+psComplexArray *
+psComplexArrayConjugate(psComplexArray *out, ///< Array for output (or NULL)
+			const psComplexArray *in ///< Array to get the complex conjugate of
+    );
 
 /* \} */ // End of MathGroup Functions
