Package to compute integrals involving Bessels functions such as
or Hankel transforms
The integrals are performed using the FFTLog algorithm (Hamilton 2000).
Given an array logarithmically spaced r
and a function f
evaluated over this array, we
want to evaluate the Hankel transform for the multipole values contained in the array Ell
.
For instance, let us consider the following Hankel pair
Since we know the analytical transform, we can perform a check
- Instantiate an object
HankelPlan
HankelTest = FFTLog.HankelPlan(x = k)
- Perform some precomputations
prepare_Hankel!(HankelTest, Ell)
- Compute the Hankel transform
Fy = evaluate_Hankel(HankelTest, Pk)
- If needed, the array
y
(the counterpart of the arrayr
) can be obtained with
y = get_y(HankelTest)
Now, let us compare the numerical and the analytical transforms
We can also plot the relative difference
Quite good, isn't it?
Step | Status | Comment |
---|---|---|
Integrals with a Bessel function | ✅ | Implemented, needs some polishing |
Hankel Transforms | ✅ | Implemented, needs some polishing |
Multithreading | ✔️ | Implemented |
Integrals with a Bessel derivative | ✔️ | Implemented |
Automatic Differentiation | 🚧 | WIP |
GPU compatibility | 🚧 | WIP |
Integrals with two Bessel functions | 🚧 | WIP |
Python wrapper | 🚧 | WIP |
- Marco Bonici, PostoDoctoral Researcher at INAF-IASF Milano