visad.math
Class FFT
- java.lang.Object
-
- visad.math.FFT
-
public class FFT extends java.lang.ObjectFFT is the VisAD class for Fourier Transforms, using the Fast Fourier Transform when the domain length is a power of two.
-
-
Constructor Summary
Constructors Constructor and Description FFT()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static FlatFieldbackwardFT(Data[] datums)for use by SpreadSheet only - ordinary applications should use other method signatures; invoke in SpreadSheet by: link(visad.math.FFT.backwardFT(A1))static double[][]FFT1D(double[][] x, boolean forward)compute 1-D FFT transform length (2nd dimension of x) must be a power of 2static float[][]FFT1D(float[][] x, boolean forward)compute 1-D FFT transform length (2nd dimension of x) must be a power of 2static FlatFieldforwardFT(Data[] datums)for use by SpreadSheet only - ordinary applications should use other method signatures; invoke in SpreadSheet by: link(visad.math.FFT.forwardFT(A1))static FlatFieldfourierTransform(Field field, boolean forward)return Fourier Transform of field, use FFT if domain dimension(s) are powers of 2static FlatFieldfourierTransform(Field field, boolean forward, FunctionType ftype, GriddedSet domain_set, CoordinateSystem range_coord_sys, Set[] range_sets, Unit[] units)return Fourier Transform of field, use FFT if domain dimension(s) are powers of 2static double[][]FT1D(double[][] x, boolean forward)compute 1-D Fourier transform use FFT if length (2nd dimension of x) is a power of 2static float[][]FT1D(float[][] x, boolean forward)compute 1-D Fourier transform use FFT if length (2nd dimension of x) is a power of 2static double[][]FT2D(int rows, int cols, double[][] x, boolean forward)compute 2-D Fourier transform, calling 1-D FT twice use FFT if rows and cols are powers of 2static float[][]FT2D(int rows, int cols, float[][] x, boolean forward)compute 2-D Fourier transform, calling 1-D FT twice use FFT if rows and cols are powers of 2static voidmain(java.lang.String[] args)test Fourier Transform methods
-
-
-
Method Detail
-
forwardFT
public static FlatField forwardFT(Data[] datums)
for use by SpreadSheet only - ordinary applications should use other method signatures; invoke in SpreadSheet by: link(visad.math.FFT.forwardFT(A1))
-
backwardFT
public static FlatField backwardFT(Data[] datums)
for use by SpreadSheet only - ordinary applications should use other method signatures; invoke in SpreadSheet by: link(visad.math.FFT.backwardFT(A1))
-
fourierTransform
public static FlatField fourierTransform(Field field, boolean forward) throws VisADException, java.rmi.RemoteException
return Fourier Transform of field, use FFT if domain dimension(s) are powers of 2- Parameters:
field- Field with domain dimension = 1 (1-D FT) or 2 (2-D FT) and 1 (real part) or 2 (real & imaginary) range RealTypesforward- true for forward and false for backward- Returns:
- Fourier transform of field
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
fourierTransform
public static FlatField fourierTransform(Field field, boolean forward, FunctionType ftype, GriddedSet domain_set, CoordinateSystem range_coord_sys, Set[] range_sets, Unit[] units) throws VisADException, java.rmi.RemoteException
return Fourier Transform of field, use FFT if domain dimension(s) are powers of 2- Parameters:
field- Field with domain dimension = 1 (1-D FT) or 2 (2-D FT) and 1 (real part) or 2 (real & imaginary) range RealTypesforward- true for forward and false for backwardftype- use for return Field (may be null)domain_set- use for return Field (may be null)range_coord_sys- use for return Field (may be null)range_sets- use for return Field (may be null)units- use for return Field (may be null)- Returns:
- Fourier transform of field
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
FT2D
public static float[][] FT2D(int rows, int cols, float[][] x, boolean forward) throws VisADExceptioncompute 2-D Fourier transform, calling 1-D FT twice use FFT if rows and cols are powers of 2- Parameters:
rows- first dimension for 2-Dcols- second dimension for 2-Dx- array for take Fourier transform of, dimensioned [2][length] where length = rows * cols, and the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
FT2D
public static double[][] FT2D(int rows, int cols, double[][] x, boolean forward) throws VisADExceptioncompute 2-D Fourier transform, calling 1-D FT twice use FFT if rows and cols are powers of 2- Parameters:
rows- first dimension for 2-Dcols- second dimension for 2-Dx- array for take Fourier transform of, dimensioned [2][length] where length = rows * cols, and the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
FT1D
public static float[][] FT1D(float[][] x, boolean forward) throws VisADExceptioncompute 1-D Fourier transform use FFT if length (2nd dimension of x) is a power of 2- Parameters:
x- array for take Fourier transform of, dimensioned [2][length], the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
FFT1D
public static float[][] FFT1D(float[][] x, boolean forward) throws VisADExceptioncompute 1-D FFT transform length (2nd dimension of x) must be a power of 2- Parameters:
x- array for take Fourier transform of, dimensioned [2][length], the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
FT1D
public static double[][] FT1D(double[][] x, boolean forward) throws VisADExceptioncompute 1-D Fourier transform use FFT if length (2nd dimension of x) is a power of 2- Parameters:
x- array for take Fourier transform of, dimensioned [2][length], the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
FFT1D
public static double[][] FFT1D(double[][] x, boolean forward) throws VisADExceptioncompute 1-D FFT transform length (2nd dimension of x) must be a power of 2- Parameters:
x- array for take Fourier transform of, dimensioned [2][length], the first index (2) is over real & imaginary partsforward- true for forward and false for backward- Returns:
- Fourier transform of x
- Throws:
VisADException- a VisAD error occurred
-
main
public static void main(java.lang.String[] args) throws VisADExceptiontest Fourier Transform methods- Throws:
VisADException
-
-
DMelt 3.0 © DataMelt by jWork.ORG