FFTLog.jl
FFTLog is a Julia package which performs integrals involving Bessel functions, such as
\[F^{(n)}(y)=\int_{0}^{\infty} \frac{d x}{x} f(x) j^{(n)}_{\ell}(x y)\, ,\]
, where $j^{(n)}_{\ell}$ is the $n$-th derivative of the spherical Bessel function, or Hankel transform such as
\[F(y)=\int_{0}^{\infty} \mathrm{d}x f(x) J_{n}(x y)\, .\]
Actually it can handle:
- Integrals with a Bessel function
- Integrals with a Bessel derivative
- Hankel transforms
In our roadmap, we aim to include also:
- Automatic Differentiation
- GPU compatibility
- Integrals with multiple Bessel functions
Usage
In the remainder of the documentation, we explain the theory behind the FFTLog algorithm. However, using FFTLog.jl is quite easy.
If you have a an array fx evaluated over a logarithmically spaced array x, there are 4 steps to obtain its Hankel transform
- Instantiate an object
FFTLogPlan/HankelPlan, specifying thexarray
hankel_test = FFTLog.HankelPlan(x)- Specify the array
ellwith the order of the transform and perform some precomputations
prepare_Hankel!(hankel_test, ell)- Compute the FFTLog/Hankel transform
Fy = evaluate_Hankel(hankel_test, fx)- If needed, the array
y(the domain of theFyarray) can be obtained with
y = get_y(hankel_test)Quite easy, isn't it?
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Authors
- Marco Bonici, INAF - Institute of Space Astrophysics and Cosmic Physics (IASF), Milano
License
FFTLog.jl is licensed under the MIT "Expat" license; see LICENSE for the full license text.