Pfa235Convolution Type

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).

Constructors

Constructor Description

Pfa235Convolution()

Full Usage: Pfa235Convolution()

Uninitialized setup.

Pfa235Convolution(n1)

Full Usage: Pfa235Convolution(n1)

Parameters:
    n1 : int

1-dimensional setup

Setup fast Fourier transform / back-transform for one dimensions. The dimension n1 must be of the form n = (2**p) * (3**q) * (5**r)

n1 : int

Pfa235Convolution(n1, n2)

Full Usage: Pfa235Convolution(n1, n2)

Parameters:
    n1 : int
    n2 : int

2-dimensional setup.

Setup fast Fourier transform / back-transform for two dimensions. The dimensions n1 andn2 must be of the form n = (2**p) * (3**q) * (5**r)

n1 : int
n2 : int

Pfa235Convolution(n1, n2, n3)

Full Usage: Pfa235Convolution(n1, n2, n3)

Parameters:
    n1 : int
    n2 : int
    n3 : int

3-dimensional setup

Setup fast Fourier transform / back-transform for three dimensions. The dimensions n1,n2,and n3 must be of the form n = (2**p) * (3**q) * (5**r)

n1 : int
n2 : int
n3 : int

Instance members

Instance member Description

this.Convolute

Full Usage: this.Convolute

Parameters:
    data : float[] - 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 : float[] - 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 : float[] - The result array. It must have at least the size of the data array.
    scratch : float[] - 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.

Returns: bool 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.

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). ///

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 !!!

data : float[]

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 : float[]

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 : float[]

The result array. It must have at least the size of the data array.

scratch : float[]

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.

Returns: bool

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.

this.Convolute

Full Usage: this.Convolute

Parameters:
    datare : float[] - The splitted complex-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!!
    dataim : float[] - The imaginary part of the data array.
    responsere : float[] - 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.
    responseim : float[] - The imaginary part of the response array.
    resultre : float[] - The real part of the result array. It must have at least the size of the data array.
    resultim : float[] - The imaginary part of the result array.
    scratchre : float[] - 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.
    scratchim : float[] - 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.

Returns: bool 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.

Convolves or deconvolves a splitted complex-valued data set data[] (including any user supplied zero padding) with a response function response[]. The result is returned in the splitted complex arrays resultre[] and resultim[]. All arrays including the scratch[] arrays 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.

datare : float[]

The splitted complex-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!!

dataim : float[]

The imaginary part of the data array.

responsere : float[]

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.

responseim : float[]

The imaginary part of the response array.

resultre : float[]

The real part of the result array. It must have at least the size of the data array.

resultim : float[]

The imaginary part of the result array.

scratchre : float[]

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.

scratchim : float[]

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.

Returns: bool

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.

this.CyclicCorrelation

Full Usage: this.CyclicCorrelation

Parameters:
    src1real : float[] - The real part of the first input array (will be destroyed).
    src1imag : float[] - The imaginary part of the first input array (will be destroyed).
    src2real : float[] - The real part of the second input array (will be destroyed).
    src2imag : float[] - The imaginary part of the second input array (will be destroyed).
    resultreal : float[] - The real part of the result. (may be identical with arr1 or arr2).
    resultimag : float[] - The imaginary part of the result (may be identical with arr1 or arr2).
    n : int - The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!

Performs a cyclic correlation of two complex arrays which are in splitted form. The input arrays will leave intact.

Two helper arrays of length n are automatially allocated and freed during the operation.

src1real : float[]

The real part of the first input array (will be destroyed).

src1imag : float[]

The imaginary part of the first input array (will be destroyed).

src2real : float[]

The real part of the second input array (will be destroyed).

src2imag : float[]

The imaginary part of the second input array (will be destroyed).

resultreal : float[]

The real part of the result. (may be identical with arr1 or arr2).

resultimag : float[]

The imaginary part of the result (may be identical with arr1 or arr2).

n : int

The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!

this.CyclicCorrelation

Full Usage: this.CyclicCorrelation

Parameters:
    src1real : float[] - The real part of the first input array (will be destroyed).
    src1imag : float[] - The imaginary part of the first input array (will be destroyed).
    src2real : float[] - The real part of the second input array (will be destroyed).
    src2imag : float[] - The imaginary part of the second input array (will be destroyed).
    resultreal : float[] - The real part of the result. (may be identical with arr1 or arr2).
    resultimag : float[] - The imaginary part of the result (may be identical with arr1 or arr2).
    n : int - The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!
    scratchreal : byref<float[]> - A helper array. Must be at least of length n. If null is provided here, a new scatch array will be allocated.
    scratchimag : byref<float[]> - A helper array. Must be at least of length n. If null is provided here, a new scatch array will be allocated.

Performs a cyclic correlation of two complex arrays which are in splitted form. The input arrays will leave intact.

src1real : float[]

The real part of the first input array (will be destroyed).

src1imag : float[]

The imaginary part of the first input array (will be destroyed).

src2real : float[]

The real part of the second input array (will be destroyed).

src2imag : float[]

The imaginary part of the second input array (will be destroyed).

resultreal : float[]

The real part of the result. (may be identical with arr1 or arr2).

resultimag : float[]

The imaginary part of the result (may be identical with arr1 or arr2).

n : int

The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!

scratchreal : byref<float[]>

A helper array. Must be at least of length n. If null is provided here, a new scatch array will be allocated.

scratchimag : byref<float[]>

A helper array. Must be at least of length n. If null is provided here, a new scatch array will be allocated.

this.CyclicCorrelation

Full Usage: this.CyclicCorrelation

Parameters:
    data : float[]
    response : float[]
    result : float[]
    nn : int
    scratch : float[]

Returns: bool

data : float[]
response : float[]
result : float[]
nn : int
scratch : float[]
Returns: bool

this.CyclicCorrelationDestructive

Full Usage: this.CyclicCorrelationDestructive

Parameters:
    src1real : float[] - The real part of the first input array (will be destroyed).
    src1imag : float[] - The imaginary part of the first input array (will be destroyed).
    src2real : float[] - The real part of the second input array (will be destroyed).
    src2imag : float[] - The imaginary part of the second input array (will be destroyed).
    resultreal : float[] - The real part of the result. (may be identical with arr1 or arr2).
    resultimag : float[] - The imaginary part of the result (may be identical with arr1 or arr2).
    n : int - The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!

Performs a correlation of two comlex arrays which are in splitted form (i.e. real and imaginary part are separate arrays). Attention: the data into the input arrays will be destroyed!

src1real : float[]

The real part of the first input array (will be destroyed).

src1imag : float[]

The imaginary part of the first input array (will be destroyed).

src2real : float[]

The real part of the second input array (will be destroyed).

src2imag : float[]

The imaginary part of the second input array (will be destroyed).

resultreal : float[]

The real part of the result. (may be identical with arr1 or arr2).

resultimag : float[]

The imaginary part of the result (may be identical with arr1 or arr2).

n : int

The length of the convolution. Has to be equal or smaller than the array size. Has to be a power of 2!