Expand description
The fast Hankel transform by Hamilton’s FFTLog (SciPy’s fft.fht, fft.ifht and
fft.fhtoffset), and FFTs of Hermitian-symmetric signals (fft.hfft, fft.ihfft).
The Hankel transform A(k) = ∫₀^∞ a(r) J_μ(kr) k dr of a function sampled at logarithmically
spaced points becomes a convolution in ln r, which FFTLog evaluates with two real FFTs and a
multiplication by the Mellin transform of the Bessel kernel, a ratio of gamma functions.
See the book entry Real QZ, reordering and Hankel transforms.
Functions§
- fht
- The fast Hankel transform (SciPy’s
fht) ofa, sampled atr_j = r_c exp((j − j_c) dln),j_c = (n − 1)/2: approximatelyA(k_j) = ∫₀^∞ a(r) J_μ(k_j r) k_j dratk_j = exp(offset)/r_c · exp((j − j_c) dln). Withbias = qthe input is multiplied by(r/r_c)^{−q}and the output by(k/k_c)^{−q}, which can reduce ringing. FFTLog computes it exactly for the periodic, log-spaced interpolant ofa: an rFFT, multiplication byu_m = 2^{q} Γ((μ+1+q+iy_m)/2)/Γ((μ+1−q−iy_m)/2) · e^{i y_m (ln 2 − offset)}, an inverse rFFT and a reversal. - fhtoffset
- The offset closest to
initialthat satisfies Hamilton’s low-ringing condition for the given spacing, order and bias (SciPy’sfhtoffset). - hfft
- The FFT of a signal with Hermitian symmetry, given by its first half (SciPy’s
hfft): a real spectrum of lengthn(default2(m − 1)forminputs),n · irfft(conj(x), n). - ifht
- The inverse fast Hankel transform (SciPy’s
ifht), undoingfhtwith the same parameters. - ihfft
- The inverse of
hfft(SciPy’sihfft): the firstn/2 + 1bins of the Hermitian signal whose FFT is the realx,conj(rfft(x))/n. - ln_
gamma_ complex ln Γ(z)for complexzaway from the poles: the recurrenceΓ(z) = Γ(z + N)/(z(z+1)…)moves the argument to|z| ≥ 15, where Stirling’s series with eight terms is accurate to rounding. (The imaginary part is determined only modulo 2π, which is all FFTLog needs.)