naginterfaces.library.sum.fft_​realherm_​1d_​multi_​row

naginterfaces.library.sum.fft_realherm_1d_multi_row(direct, m, n, x)[source]

fft_realherm_1d_multi_row computes the discrete Fourier transforms of sequences, each containing real data values or a Hermitian complex sequence stored in a complex storage format.

For full information please refer to the NAG Library document for c06pp

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/c06/c06ppf.html

Parameters
directstr, length 1

If the forward transform as defined in Notes is to be computed, must be set equal to ‘F’.

If the backward transform is to be computed, must be set equal to ‘B’.

mint

, the number of sequences to be transformed.

nint

, the number of real or complex values in each sequence.

xfloat, array-like, shape

The data must be stored such that consecutive elements of the same sequence are stored with a stride of and corresponding elements of different sequences are stored consecutively. An additional two spaces are reserved for each sequence to allow for the pairwise storage of real and imaginary parts in the transformed domain. In other words, if the data values of the th sequence to be transformed are denoted by , for :

if , must contain , for , for ;

if , and must contain the real and imaginary parts respectively of , for , for . (Note that for the sequence to be Hermitian, the imaginary part of , and of for even, must be zero.)

Returns
xfloat, ndarray, shape

If then and will contain the real and imaginary parts respectively of , for , for ;

if then will contain , for , for ;

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.

Notes

Given sequences of real data values , for , for , fft_realherm_1d_multi_row simultaneously calculates the Fourier transforms of all the sequences defined by

The transformed values are complex, but for each value of the form a Hermitian sequence (i.e., is the complex conjugate of ), so they are completely determined by real numbers (since is real, as is for even).

Alternatively, given Hermitian sequences of complex data values , this function simultaneously calculates their inverse (backward) discrete Fourier transforms defined by

The transformed values are real.

(Note the scale factor in the above definition.)

A call of fft_realherm_1d_multi_row with followed by a call with will restore the original data.

The function uses a variant of the fast Fourier transform (FFT) algorithm (see Brigham (1974)) known as the Stockham self-sorting algorithm, which is described in Temperton (1983). Special coding is provided for the factors , , and .

References

Brigham, E O, 1974, The Fast Fourier Transform, Prentice–Hall

Temperton, C, 1983, Fast mixed-radix real Fourier transforms, J. Comput. Phys. (52), 340–350