XLPack 7.0
Python API Reference Manual
Loading...
Searching...
No Matches

◆ rfft1b()

def rfft1b ( ,
,
wsave  ,
inc  = 1 
)

One-dimensional real fast Fourier backward transform

Purpose
rfft1b computes the one-dimensional Fourier transform of a periodic sequence within a real array. This is referred to as the backward transform or Fourier synthesis, transforming the sequence from spectral to physical space.
When n is even:
r[k] = r[0] + (-1)^k r[n-1] + Σr[2j-1]cos(2πjk/n) + Σr[2j]sin(2πjk/n) (Σ for j = 1 to n/2-1) (k = 0 to n-1)
When n is odd:
r[k] = r[0] + Σr[2j-1]cos(2πjk/n) + Σr[2j]sin(2πjk/n) (Σ for j = 1 to (n-1)/2) (k = 0 to n-1)
This transform is normalized since a call to rfft1b followed by a call to rfft1f (or vice-versa) reproduces the original array subject to algorithmic constraints, roundoff error, etc.
Returns
info (int)
= 0: Successful exit
= -1: The argument n had an illegal value (n < 1)
= -2: The argument r is invalid
= -3: The argument wsave is invalid
= -4: The argument inc had an illegal value (inc < 1)
Parameters
[in]nThe length of the sequence to be transformed. (n >= 1)
The transform is most efficient when n is a product of small primes.
[in,out]rNumpy ndarray (1-dimensional, float, length inc*(n - 1) + 1)
[in] The sequence to be transformed.
[out] The Fourier backward transformed sequence of data.
[in]wsaveNumpy ndarray (1-dimensional, float, length n + ln(n)/ln(2) + 4)
Work data. Its contents must be initialized with a call to rfft1i before the first call to rfft1f or rfft1b for a given transform length n.
[in]inc(Optional)
Integer increment between the locations, in array r, of two consecutive elements within the sequence. (inc >= 1) (default = 1)
Reference
FFTPACK 5.1
Example Program
See example of rfft1f.