org.javaseis.fft
Class SeisFft3d

java.lang.Object
  extended by org.javaseis.fft.SeisFft3d

public class SeisFft3d
extends java.lang.Object

Sample 3D Fourier Transform for real data that illustrates usage of DistributedArray classes.

Author:
Chuck Mosher for JavaSeis.org

Constructor Summary
SeisFft3d(IParallelContext pc, int[] len, float[] pad)
          Allocate storage for a 3D distributed FFT
 
Method Summary
 void forward()
          Apply a forward Real to Complex 3D fft.
 DistributedArray getArray()
          Return the distributed array for the 3D FFT
 int[] getFftLengths()
           
 int[] getShape()
           
 void inverse()
          Apply inverse Complex to Real 3D fft.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeisFft3d

public SeisFft3d(IParallelContext pc,
                 int[] len,
                 float[] pad)
Allocate storage for a 3D distributed FFT

Parameters:
len - length of each axis for the transform
pad - transform padding factor in percent for each axis
Method Detail

forward

public void forward()
Apply a forward Real to Complex 3D fft. The input distributed array consists of real float values in "T,X,Y" order. On output, the distributed array is reshaped to complex float values (MultiArray element count of 2) in "Ky,Kx,F" order - the order of the transformed axes is the reverse of the input.


getArray

public DistributedArray getArray()
Return the distributed array for the 3D FFT

Returns:
array that will be used for forward/inverse transforms

getFftLengths

public int[] getFftLengths()

getShape

public int[] getShape()

inverse

public void inverse()
Apply inverse Complex to Real 3D fft. The input distributed array consists of complex float values in "Ky,Kx,F" order. On output, the distributed array is reshaped to real float values in "T,X,Y" order, which is the reverse of the input.


main

public static void main(java.lang.String[] args)
Parameters:
args -