Plotting
Class Fourier

java.lang.Object
  extended by Plotting.Fourier

public class Fourier
extends java.lang.Object

Class containing functions to compute fast fourier transform of data.


Constructor Summary
Fourier()
           
 
Method Summary
static float[] FFT2D(float[] data)
          Computes the fourier transform of a uniformly (discrete) sampled data.
static float[] InverseFFT2D(float[] data)
          Computes the inverse fourier transform of a uniformly (discrete) sampled data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fourier

public Fourier()
Method Detail

FFT2D

public static float[] FFT2D(float[] data)
Computes the fourier transform of a uniformly (discrete) sampled data.

Parameters:
data - data whose Fourier Transform needs to be calculated.
Returns:
float[] containing the fourier transform. Size of array is always a power of two ( size = 2 * size(data) , assuming data had a power of two number of observations, else it is the immediately next power of two greater than size(data). Time complexity: nlog(n) The algorithm uses non-recursive Cooley-Tukey algorithm. It consists of rearrangement (bit flipping) phase followed by Daniel Lancoz phase for computation of DFT.

InverseFFT2D

public static float[] InverseFFT2D(float[] data)
Computes the inverse fourier transform of a uniformly (discrete) sampled data.

Parameters:
data - data whose Inverse Fourier Transform needs to be calculated.
Returns:
float[] containing the fourier transform. Size of array is always a power of two ( size = 2 * size(data) , assuming data had a power of two number of observations, else it is the immediately next power of two greater than size(data). Time complexity: nlog(n) Just take the conjugate of twiddle factors and divide the final answer by data size. Everything else is exactly similar to FFT2D.