Package de.gsi.math.spectra
Class Convolution
- java.lang.Object
-
- de.gsi.math.spectra.Convolution
-
- Direct Known Subclasses:
HilbertTransform
public class Convolution extends java.lang.Objectimplementation of the discrete convolution algorithm via the fourier transform- Author:
- rstein
-
-
Field Summary
Fields Modifier and Type Field Description org.jtransforms.fft.DoubleFFT_1Df1dFFT
-
Constructor Summary
Constructors Constructor Description Convolution()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcomplexMultiply(double[] data1, double[] data2)static double[]getDerivativeFilter(int length)computes derivative filter (Fourier Domain)static double[]getHilbertFilter(int length)computes the Hilbert transform filter (Fourier Domain)static double[]getIdentityFilter(int length)computes the identity filterstatic double[]getLowPassFilter(int length, double frequency)computes low-pass filter (Fourier Domain)static double[]getMorletFilter(int length, double f0, double width)static voidmain(java.lang.String[] args)protected static doubleMorletWaveletFunctionFourier(double frequency, double f0, double width)voidTest()double[]transform(double[] data, double[] filter, boolean cyclicBoundary)implements convolution via FFT transform only the real part of the signal is computeddouble[]transformFull(double[] data, double[] filter, boolean cyclicBoundary)implements convolution via FFT transform only the real and imaginary part of the signal is returned
-
-
-
Method Detail
-
Test
public void Test()
-
transform
public double[] transform(double[] data, double[] filter, boolean cyclicBoundary)implements convolution via FFT transform only the real part of the signal is computed- Parameters:
data- the data setfilter- the convolution filtercyclicBoundary- true: cyclic boundary condition; false: ZOH at boundaries- Returns:
- the convoluted data
-
transformFull
public double[] transformFull(double[] data, double[] filter, boolean cyclicBoundary)implements convolution via FFT transform only the real and imaginary part of the signal is returned- Parameters:
data- the data setfilter- the convolution filtercyclicBoundary- true: cyclic boundary condition; false: ZOH at boundaries- Returns:
- the convoluted data
-
complexMultiply
public static void complexMultiply(double[] data1, double[] data2)
-
getDerivativeFilter
public static double[] getDerivativeFilter(int length)
computes derivative filter (Fourier Domain)- Parameters:
length- the length of the filter- Returns:
- array containing derivative filter kernel
-
getHilbertFilter
public static double[] getHilbertFilter(int length)
computes the Hilbert transform filter (Fourier Domain)- Parameters:
length- the length of the filter- Returns:
- vector containing Hilbert filter kernel
-
getIdentityFilter
public static double[] getIdentityFilter(int length)
computes the identity filter- Parameters:
length- the length of the filter- Returns:
- vector containing identy filter
-
getLowPassFilter
public static double[] getLowPassFilter(int length, double frequency)computes low-pass filter (Fourier Domain)- Parameters:
length- the length of the filterfrequency- cut-off frequency- Returns:
- array containing low-pass filter kernel
-
getMorletFilter
public static double[] getMorletFilter(int length, double f0, double width)
-
main
public static void main(java.lang.String[] args)
-
MorletWaveletFunctionFourier
protected static double MorletWaveletFunctionFourier(double frequency, double f0, double width)
-
-