FFTInv

Declaration: [1] FFTInv(var DataReal, DataImag: TDoubleArray; Weighting: TFastFourierWgtWin): integer;
[2] FFTInv2(var DataReal, DataImag: TDoubleArray; Weighting: TFastFourierWgtWin; param: double): integer;
Calculates the inverse fast Fourier transform of the signal stored in the array parameters DataReal and DataImag. The length of both arrays has to be equal and a power of two. Before the transformation takes place the signal is weighted by a function specified by the parameter Weighting. Version [2] allows to pass a value in the parameter param which is interpreted as alpha of the Tukey window if Weighting = fwTukey, otherwise it is ignored. The valid range for alpha is 0...1 and is automatically confined to this range. For version [1] the Tukey alpha parameter is set internally to a value of 0.5.

The result of the transformation replaces the original data in the arrays DataReal and DataImag.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the size of the data array is not a power of 2
-2 ... the real and imaginary parts are not of the same size