|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.FFT2D
public class FFT2D
FFT2D computes the FFT of 2 dimensional complex, double precision data. This class has been copied from Bruce Miller's FFT package for use in the Open Source Physics Project. The original package contains code for other transformations and other data types. The data is stored in a 1-dimensional array in Row-Major order. The physical layout in the array data, of the mathematical data d[i,j] is as follows:
Re(d[i,j]) = data[i*rowspan + 2*j] Im(d[i,j]) = data[i*rowspan + 2*j + 1]where
rowspan
must be at least 2*ncols (it defaults to 2*ncols).
The transformed data is returned in the original data array in
wrap-around order along each dimension.
Constructor Summary | |
---|---|
FFT2D(int nrows,
int ncols)
Create an FFT for transforming nrows*ncols points of Complex, double precision data. |
Method Summary | |
---|---|
void |
backtransform(double[] data)
Compute the (unnomalized) inverse FFT of data, leaving it in place. |
protected void |
checkData(double[] data,
int rowspan)
|
double |
getFreqMax(double min,
double max,
int n)
Gets the maximum frequency given the domain and the number of points. |
double |
getFreqMin(double min,
double max,
int n)
Gets the minimum frequency given the domain and the number of points. |
double[] |
getNaturalFreqX(double delta)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalFreqX(double xmin,
double xmax)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalFreqY(double delta)
Gets an array containing the frequencies in natural order if samples in the orginal data are separated by delta in y. |
double[] |
getNaturalFreqY(double ymin,
double ymax)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalModes(int n)
Gets an array containing the mode numbers in natural order. |
double[] |
getNaturalOmegaX(double delta)
Gets an array containing the angular frequencies (wavenumbers) in natural order. |
double[] |
getNaturalOmegaX(double xmin,
double xmax)
Gets an array containing the angular frequencies (wavenumbers) in natural order. |
double[] |
getNaturalOmegaY(double delta)
Gets an array containing the frequencies in natural order if samples in the orginal data are separated by delta in y. |
double[] |
getNaturalOmegaY(double ymin,
double ymax)
Gets an array containing the frequencies in natural order. |
double[] |
getWrappedFreq(double delta,
int n)
Gets an array containing the frequencies in wrap-around order. |
double[] |
getWrappedModes(int n)
Gets an array containing the mode numbers in wrap-around order. |
double[] |
getWrappedOmegaX(double xmin,
double xmax)
Gets an array containing the angular frequencies (wavenumbers) in natural order. |
double[] |
getWrappedOmegaY(double ymin,
double ymax)
Gets an array containing the angular frequencies (wavenumbers) in natural order. |
void |
inverse(double[] data)
Compute the (nomalized) inverse FFT of data, leaving it in place. |
void |
toNaturalOrder(double[] data)
Reorder and normalize the transformed data from most negative frequency to most positive frequency leaving the result in data. |
void |
transform(double[] data)
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 |
---|
public FFT2D(int nrows, int ncols)
nrows
- ncols
- Method Detail |
---|
protected void checkData(double[] data, int rowspan)
public void transform(double[] data)
data
- public void backtransform(double[] data)
data
- public void inverse(double[] data)
data
- public double getFreqMin(double min, double max, int n)
min
- doublemax
- doublen
- int
public double getFreqMax(double min, double max, int n)
min
- doublemax
- doublen
- int
public double[] getNaturalModes(int n)
public double[] getWrappedModes(int n)
public double[] getWrappedOmegaX(double xmin, double xmax)
xmin
- xmax
-
public double[] getWrappedOmegaY(double ymin, double ymax)
ymin
- ymax
-
public double[] getWrappedFreq(double delta, int n)
delta
-
public double[] getNaturalFreqX(double delta)
delta
-
public double[] getNaturalFreqX(double xmin, double xmax)
xmin
- xmax
-
public double[] getNaturalOmegaX(double delta)
delta
-
public double[] getNaturalOmegaX(double xmin, double xmax)
xmin
- xmax
-
public double[] getNaturalFreqY(double delta)
delta
-
public double[] getNaturalFreqY(double ymin, double ymax)
ymin
- ymax
-
public double[] getNaturalOmegaY(double delta)
delta
-
public double[] getNaturalOmegaY(double ymin, double ymax)
ymin
- ymax
-
public void toNaturalOrder(double[] data)
data
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |