The abstarct class DataArray and the two extending classes RealDataArray and ComplexDataArray are for user who want the simplest use and are happy to write their programs to use theses supplied classes to handle their data. Such users should read-up about the Complex class and DataArray, and should not need to get their hands dirty with FFTW at all.
The DataArray classes also have extensive access methods with sanity checking of the supplied parameters. This does however have a significant efficiency overhead, but does increase the probability of your program actually working!
The three relavent classes are:
- Complex being a class for handling Complex numbers held at two doubles. This class has a full set of methods that implements just about every complex operation.
- ComplexDataArray class to hold, manipulate and Fourier transform complex data in one, two or three dimensions. This is the easyiest may to take Fourier transforms, novices should start here!
- RealDataArray class to hold, manipulate and Fourier transform real data. You really need to understand Hermition symmetry of Fourier transforms of real data to make use of this, read the general package document first.
Demo Programs Source
- Simple Complex data demo ComplexDemo.java shows basic use of the complex class and its most useful methods.
- One dimensional FFT using ComplexDataArray OneDimensionDemo.java
- Two dimensional FFT using ComplexDataArray TwoDimensionDemo.java
- Power spectrum of an image using ComplexDataArray ImageDemo.java
- Fourier transform of complex sine signal SineWave.java (uses ptplot)
- Fourier transform of two-dimensional checkerboard CheckerBoard.java (uses ptplot)