jnt.FFT
Class RealFloat2DFFT_Even

java.lang.Object
  |
  +--jnt.FFT.RealFloat2DFFT_Even

public class RealFloat2DFFT_Even
extends java.lang.Object

EXPERIMENTAL! (till I think of something better): Computes the FFT of 2 dimensional real, single precision data. The data is stored in a 1-dimensional array in almost Row-Major order. The number of columns MUST be even, and there must be two extra elements per row! The physical layout in the real input data array, of the mathematical data d[i,j] is as follows:

    d[i,j]) = data[i*rowspan+j]
where rowspan >= ncols+2.

WARNING! Note that rowspan must be greater than the number of columns, and the next 2 values, as well as the data itself, are overwritten in order to store enough of the complex transformation in place. (In fact, it can be done completely in place, but where one has to look for various real and imaginary parts is quite complicated).

The physical layout in the transformed (complex) array data, of the mathematical data D[i,j] is as follows:

    Re(D[i,j]) = data[2*(i*rowspan+j)]
    Im(D[i,j]) = data[2*(i*rowspan+j)+1]

The transformed data in each row is complex for frequencies from 0, 1/(n delta), ... 1/(2 delta), where delta is the time difference between the column values.

The transformed data for columns is in `wrap-around' order; that is from 0, 1/(n delta)... +/- 1/(2 delta) ... -1/(n delta)


Constructor Summary
RealFloat2DFFT_Even(int nrows, int ncols)
          Create an FFT for transforming nrows*ncols points of Complex, double precision data.
 
Method Summary
 void backtransform(float[] data)
          Compute the (unnomalized) inverse FFT of data, leaving it in place.
 void backtransform(float[] data, int rowspan)
          Compute the (unnomalized) inverse FFT of data, leaving it in place.
protected  void checkData(float[] data, int rowspan)
           
 void inverse(float[] data)
          Compute the (nomalized) inverse FFT of data, leaving it in place.
 void inverse(float[] data, int rowspan)
          Compute the (nomalized) inverse FFT of data, leaving it in place.
 float normalization()
          Return the normalization factor.
 float[] toWraparoundOrder(float[] data, int rowspan)
          Return data in wraparound order.
 void transform(float[] data)
          Compute the Fast Fourier Transform of data leaving the result in data.
 void transform(float[] data, int rowspan)
          Compute the Fast Fourier Transform of data leaving the result in data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealFloat2DFFT_Even

public RealFloat2DFFT_Even(int nrows,
                           int ncols)
Create an FFT for transforming nrows*ncols points of Complex, double precision data.
Method Detail

checkData

protected void checkData(float[] data,
                         int rowspan)

transform

public void transform(float[] data)
Compute the Fast Fourier Transform of data leaving the result in data.

transform

public void transform(float[] data,
                      int rowspan)
Compute the Fast Fourier Transform of data leaving the result in data.

toWraparoundOrder

public float[] toWraparoundOrder(float[] data,
                                 int rowspan)
Return data in wraparound order.
See Also:
wraparound format

backtransform

public void backtransform(float[] data)
Compute the (unnomalized) inverse FFT of data, leaving it in place.

backtransform

public void backtransform(float[] data,
                          int rowspan)
Compute the (unnomalized) inverse FFT of data, leaving it in place.

normalization

public float normalization()
Return the normalization factor. Multiply the elements of the backtransform'ed data to get the normalized inverse.

inverse

public void inverse(float[] data)
Compute the (nomalized) inverse FFT of data, leaving it in place.

inverse

public void inverse(float[] data,
                    int rowspan)
Compute the (nomalized) inverse FFT of data, leaving it in place.