SciLib.SP.Transform
Class Fourier

java.lang.Object
  extended by SciLib.SP.Transform.Fourier

public class Fourier
extends java.lang.Object

This class contains some methods to handle a Fourier transform of a signal.


Field Summary
 double PI
          Pi = 3.141592
 double SQH
          Square root of 1/2
 
Constructor Summary
Fourier()
          Make a Fourier Object
 
Method Summary
 void bitrevi(complexVector x)
          reverse indices of x by bit reversal
 void bitrevi(complexVector x, complexVector y)
          reverse indices of x by bit reversal and store the result in y
 void decibelPlot()
          plot the decibel magnitude of the FT spectrum.
 void fft(complexVector f)
          The Fast Fourier Transform of a given complex vector f of arbitrary length.
 void fft(vector f)
          The Fast Fourier Transform of a given real vector f of arbitrary length.
 complexVector getY()
          Get a complex vector that is the Fourier transform of a given signal.
 complexVector ifft()
          The Inverse Fourier Transform of the complex vector that is contained in the Fourier object.
 complexVector ifft(complexVector fhat)
          The Inverse Fourier Transform of a given complex vector.
 vector imaginary()
          Get the imaginary part of the Fourier transform of a given signal.
 vector magnitude()
          Get the magnitude of the Fourier transform of a given signal.
 vector phase()
          Get the phase of the Fourier transform of a given signal.
 void plot()
          plot the magnitude, the real part, and the imaginary part of the FT.
 void plot(java.lang.String specific)
          plot a specific component of the FT.
 void plot(java.lang.String specific, java.lang.String specific2)
          plot the FT where specific2 is "half", "whole", of "shift" spectrum.
 vector real()
          Get the real part of the Fourier transform of a given signal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQH

public final double SQH
Square root of 1/2

See Also:
Constant Field Values

PI

public final double PI
Pi = 3.141592

See Also:
Constant Field Values
Constructor Detail

Fourier

public Fourier()
Make a Fourier Object

Method Detail

getY

public complexVector getY()
Get a complex vector that is the Fourier transform of a given signal.

Returns:
A complex vector

real

public vector real()
Get the real part of the Fourier transform of a given signal.

Returns:
A real vector

imaginary

public vector imaginary()
Get the imaginary part of the Fourier transform of a given signal.

Returns:
A real vector

magnitude

public vector magnitude()
Get the magnitude of the Fourier transform of a given signal.

Returns:
A real vector

phase

public vector phase()
Get the phase of the Fourier transform of a given signal.

Returns:
A real vector

bitrevi

public void bitrevi(complexVector x)
reverse indices of x by bit reversal

Parameters:
x - A complex vector

bitrevi

public void bitrevi(complexVector x,
                    complexVector y)
reverse indices of x by bit reversal and store the result in y

Parameters:
x - The original complex vector
y - The result complex vector after bit reversal

fft

public void fft(complexVector f)
The Fast Fourier Transform of a given complex vector f of arbitrary length. If the length of f is a power of 2, a faster Fourier Tranform of radix 2 will be used.

Parameters:
f - A complex vector

fft

public void fft(vector f)
The Fast Fourier Transform of a given real vector f of arbitrary length.

Parameters:
f - A real vector

ifft

public complexVector ifft(complexVector fhat)
The Inverse Fourier Transform of a given complex vector.

Parameters:
fhat - A complex vector

ifft

public complexVector ifft()
The Inverse Fourier Transform of the complex vector that is contained in the Fourier object.


plot

public void plot(java.lang.String specific)
plot a specific component of the FT.

Parameters:
specific - A string that can have these values "magnitude", "phase", "real", "imaginary".

plot

public void plot(java.lang.String specific,
                 java.lang.String specific2)
plot the FT where specific2 is "half", "whole", of "shift" spectrum.

Parameters:
specific - A string that can have these values "magnitude", "real", "imaginary".
specific2 - A string that can have these values "half", "shift", "whole".

plot

public void plot()
plot the magnitude, the real part, and the imaginary part of the FT.


decibelPlot

public void decibelPlot()
plot the decibel magnitude of the FT spectrum.