public class FFT extends Object
| Constructor and Description | 
|---|
FFT()  | 
| Modifier and Type | Method and Description | 
|---|---|
static double[] | 
autoCorrelate(double[] signal)
Compute the autocorrelation of a signal, by inverse transformation of its power spectrum. 
 | 
static double[] | 
autoCorrelateWithZeroPadding(double[] signal)
Compute the autocorrelation of a signal, by inverse transformation of its power spectrum. 
 | 
static double[] | 
computeAmplitudeSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the absolute value for each positive frequency, i.e. 
 | 
static double[] | 
computeAmplitudeSpectrum(double[] signal)
Convenience method for computing the absolute amplitude spectrum of a real signal. 
 | 
static double[] | 
computeLogAmplitudeSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the log amplitude for each positive frequency. 
 | 
static double[] | 
computeLogAmplitudeSpectrum(double[] signal)
Convenience method for computing the log amplitude spectrum of a real signal. 
 | 
static double[] | 
computeLogPowerSpectrum_FD(double[] fft)
From the result of the FFT, compute the log (dB) power for each positive frequency. 
 | 
static double[] | 
computeLogPowerSpectrum(double[] signal)
Convenience method for computing the log (dB) power spectrum of a real signal. 
 | 
static double[] | 
computePhaseSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the phase spectrum for each positive frequency. 
 | 
static double[] | 
computePowerSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the power for each positive frequency. 
 | 
static double[] | 
computePowerSpectrum(double[] signal)
Convenience method for computing the absolute power spectrum of a real signal. 
 | 
static double[] | 
convolve_FD(double[] signal1,
           double[] fft2)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
 | 
static double[] | 
convolve_FD(double[] signal1,
           double[] fft2,
           double deltaT)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
 | 
static double[] | 
convolve(double[] signal1,
        double[] signal2)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
 | 
static double[] | 
convolve(double[] signal1,
        double[] signal2,
        double deltaT)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
 | 
static double[] | 
convolveWithZeroPadding(double[] signal1,
                       double[] signal2)
Compute the convolution of two signals, by multipying them in the frequency domain. 
 | 
static double[] | 
convolveWithZeroPadding(double[] signal1,
                       double[] signal2,
                       double deltaT)
Compute the convolution of two signals, by multipying them in the frequency domain. 
 | 
static double[] | 
correlate(double[] signal1,
         double[] signal2)
Compute the correlation of two signals, by multiplying the transform of signal2 with the conjugate complex of the transform
 of signal1, in the frequency domain. 
 | 
static double[] | 
correlateWithZeroPadding(double[] signal1,
                        double[] signal2)
Compute the correlation of two signals, by multipying them in the frequency domain. 
 | 
static void | 
main(String[] args)  | 
static void | 
realTransform(double[] data,
             boolean inverse)
Calculates the Fourier transform of a set of n real-valued data points. 
 | 
static void | 
transform(double[] realAndImag,
         boolean inverse)
Carry out the FFT or inverse FFT, and return the result in the same arrays given as parameters. 
 | 
static void | 
transform(double[] real,
         double[] imag,
         boolean inverse)
Carry out the FFT or inverse FFT, and return the result in the same arrays given as parameters. 
 | 
public static double[] computeLogPowerSpectrum(double[] signal)
signal - the real signal for which to compute the power spectrum.public static double[] computeLogPowerSpectrum_FD(double[] fft)
fft - the array of real and imag parts of the complex number array, fft[0] = real[0], fft[1] = real[N/2], fft[2*i] =
            real[i], fft[2*i+1] = imag[i] for 1≤i<N/2public static double[] computePowerSpectrum(double[] signal)
signal - the real signal for which to compute the power spectrum.public static double[] computePowerSpectrum_FD(double[] fft)
fft - the array of real and imag parts of the complex number array, fft[0] = real[0], fft[1] = real[N/2], fft[2*i] =
            real[i], fft[2*i+1] = imag[i] for 1≤i<N/2public static double[] computeLogAmplitudeSpectrum(double[] signal)
signal - the real signal for which to compute the power spectrum.public static double[] computeLogAmplitudeSpectrum_FD(double[] fft)
fft - the array of real and imag parts of the complex number array, fft[0] = real[0], fft[1] = real[N/2], fft[2*i] =
            real[i], fft[2*i+1] = imag[i] for 1≤i<N/2public static double[] computeAmplitudeSpectrum(double[] signal)
signal - the real signal for which to compute the power spectrum.public static double[] computeAmplitudeSpectrum_FD(double[] fft)
fft - the array of real and imag parts of the complex number array, fft[0] = real[0], fft[1] = real[N/2], fft[2*i] =
            real[i], fft[2*i+1] = imag[i] for 1≤i<N/2public static double[] computePhaseSpectrum_FD(double[] fft)
fft - the array of real and imag parts of the complex number array, fft[0] = real[0], fft[1] = real[N/2], fft[2*i] =
            real[i], fft[2*i+1] = imag[i] for 1≤i<N/2public static void transform(double[] real,
             double[] imag,
             boolean inverse)
real - in "forward" FFT: as input=the time-domain signal to transform, as output=the real part of the complex
            frequencies; in inverse FFT: as input=the real part of the complex frequencies, as output= the time-domain
            signal.imag - in "forward" FFT: as input=an empty array, as output=the imaginary part of the complex frequencies; in inverse
            FFT: as input=the imaginary part of the complex frequencies, as output= not used.inverse - whether to calculate the FFT or the inverse FFT.public static void transform(double[] realAndImag,
             boolean inverse)
realAndImag - the array of complex numbers to transforminverse - whether to calculate the FFT or the inverse FFT.public static void realTransform(double[] data,
                 boolean inverse)
data - datainverse - inversepublic static double[] convolveWithZeroPadding(double[] signal1,
                               double[] signal2,
                               double deltaT)
signal1 - signal 1signal2 - signal 2deltaT - , the time difference between two samples (= 1/samplingrate)public static double[] convolveWithZeroPadding(double[] signal1,
                               double[] signal2)
signal1 - signal 1signal2 - signal 2public static double[] convolve(double[] signal1,
                double[] signal2,
                double deltaT)
signal1 - signal 1signal2 - signal 2deltaT - , the time difference between two samples (= 1/samplingrate)IllegalArgumentException - if the two input signals do not have the same length.public static double[] convolve(double[] signal1,
                double[] signal2)
signal1 - signal 1signal2 - signal 2IllegalArgumentException - if the two input signals do not have the same length.public static double[] convolve_FD(double[] signal1,
                   double[] fft2,
                   double deltaT)
signal1 - the first input signal, in the time domainfft2 - the complex transform of the second signal, in the frequency domain fft[0] = real[0], fft[1] = real[N/2],
            fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1≤i<N/2deltaT - , the time difference between two samples (= 1/samplingrate)IllegalArgumentException - if the two input signals do not have the same length.public static double[] convolve_FD(double[] signal1,
                   double[] fft2)
signal1 - the first input signal, in the time domainfft2 - the complex transform of the second signal, in the frequency domain fft[0] = real[0], fft[1] = real[N/2],
            fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1≤i<N/2IllegalArgumentException - if the two input signals do not have the same length.public static double[] correlateWithZeroPadding(double[] signal1,
                                double[] signal2)
signal1 - signal 1signal2 - signal 2public static double[] correlate(double[] signal1,
                 double[] signal2)
signal1 - signal 1signal2 - signal 2IllegalArgumentException - if the two input signals do not have the same length.public static double[] autoCorrelate(double[] signal)
signal - signalpublic static double[] autoCorrelateWithZeroPadding(double[] signal)
signal - signalCopyright © 2000–2016 DFKI GmbH. All rights reserved.