naginterfaces.library.sum.fft_complex_multid_1d¶
- naginterfaces.library.sum.fft_complex_multid_1d(direct, l, nd, x)[source]¶
fft_complex_multid_1d
computes the discrete Fourier transform of one variable in a multivariate sequence of complex data values.For full information please refer to the NAG Library document for c06pf
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c06/c06pff.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’.
- lint
, the index of the variable (or dimension) on which the discrete Fourier transform is to be performed.
- ndint, array-like, shape
The elements of must contain the dimensions of the variables; that is, must contain the dimension of the th variable.
- xcomplex, array-like, shape
The complex data values. Data values are stored in using column-major ordering for storing multidimensional arrays; that is, is stored in .
- Returns
- xcomplex, ndarray, shape
The corresponding elements of the computed transform.
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: or .
- (errno )
On entry, .
Constraint: , for all .
- (errno )
On entry, , product of elements is .
Constraint: must equal the product of the dimensions held in array .
- (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
fft_complex_multid_1d
computes the discrete Fourier transform of one variable (the th say) in a multivariate sequence of complex data values , where , and so on. Thus the individual dimensions are , and the total number of data values is .The function computes one-dimensional transforms defined by
where . The plus or minus sign in the argument of the exponential terms in the above definition determine the direction of the transform: a minus sign defines the forward direction and a plus sign defines the backward direction.
(Note the scale factor of in this definition.)
A call of
fft_complex_multid_1d
with followed by a call with will restore the original data.The data values must be supplied in a one-dimensional complex array using column-major storage ordering of multidimensional data (i.e., with the first subscript varying most rapidly).
This 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).
- References
Brigham, E O, 1974, The Fast Fourier Transform, Prentice–Hall
Temperton, C, 1983, Self-sorting mixed-radix fast Fourier transforms, J. Comput. Phys. (52), 1–23