Click or drag to resize

Pfa235ConvolutionConvolute(Double, Double, Double, Double, FourierDirection) Method

Convolves or deconvolves a real-valued data set data[] (including any user supplied zero padding) with a response function response[]. The result is returned in the array result[]. All arrays including the scratch[] array must have the same dimensions (or larger). The data set (and of course the other arrays) can be either one-dimensional, two-dimensional, or three-dimensional, d = 1,2,3. Each dimension must be of the form n = (2**p) * (3**q) * (5**r), because of the underlying FFT. The d-dimensional data can be either single precision (FLOAT := float) or double precision (FLOAT := double). ///

Namespace: Altaxo.Calc.Fourier
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public bool Convolute(
	double[] data,
	double[] response,
	double[] result,
	double[] scratch,
	FourierDirection isign
)

Parameters

data  Double
The real-valued data set. Note, that you have to care for end effects by zero padding. This means, that you have to pad the data with a number of zeros on one end equal to the maximal positive duration or maximal negative duration of the response function, whichever is larger!! ///
response  Double
The response function must be stored in wrap-around order. This means that the first half of the array response[] (in each dimension) contains the impulse response function at positive times, while the second half of the array contains the impulse response function at negative times, counting down from the element with the highest index. The array must have at least the size of the data array.
result  Double
The result array. It must have at least the size of the data array.
scratch  Double
A work array. If a NULL pointer is passed the work array is allocated and freed auotomatically. If the array is given by the user it must have at least the size of the data array.
isign  FourierDirection
If isign == forward a convolution is performed. If isign == inverse then a deconvolution is performed.

Return Value

Boolean
In the case of a convolution (isign == forward) the value "true" is returned always. In the case of deconvolution (isign == inverse) the value "false" is returned if the FFT transform of the response function is exactly zero for some value. This indicates that the original convolution has lost all information at this particular frequency, so that a reconstruction is not possible. If the transform of the response function is non-zero everywhere the deconvolution can be performed and the value "true" is returned.
Remarks
Implementation notes -------------------- The FFT of the real-valued data array and the real-valued response array is calculated in one step. This is done by regarding the two arrays as the real part and the imaginary part of one complex-valued array. Possible improvements --------------------- * When doing the backtransform only a real transform is necessary. The upper half of the result/scratch arrays is redundant. (comment: "symmetry"). This should be used to speed-up the backtransform. * 2D and 3D versions are not yet available !!!
See Also