FFTL — Generalised FFTLog for Python#
The FFTL package for Python contains a routine to calculate integral transforms of the type
for arbitrary kernels \(T\). It uses a generalisation of the FFTLog [2] method of Hamilton [1] to efficiently compute the transform on logarithmic input and output grids.
The package supports any array implementation such as Numpy, JAX, Torch, dask,
etc. as long as it provides a reasonable set of standard Array API functions
(e.g. log()
, exp()
, linspace()
, etc.) and Fast Fourier Transforms
(fft.rfft()
and fft.irfft()
).
Besides the generalised FFTLog algorithm, the package also provides a number of standard integral transforms implemented using SciPy.
Installation#
Install with pip:
pip install fftl
For development, it is recommended to clone the GitHub repository, and perform an editable pip installation.
The core package only requires numpy
.
The standard integral transforms in the fftl.scipy
module additionally
require scipy
. You can install FFTL with these additional dependencies
using pip install fftl[scipy]
.
Usage#
The core functionality of the package is provided by the fftl
module.
The fftl()
routine computes the generalised FFTLog integral
transform for a given kernel.
For convenience, a number of standard integral transforms are implemented in
the fftl.scipy
module.