Skip to main content

pyfftlog - A python version of FFTLog

This is a python version of the logarithmic FFT code FFTLog as presented in Appendix B of Hamilton (2000) and published at jila.colorado.edu/~ajsh/FFTLog.

A simple f2py-wrapper (fftlog) can be found on github.com/emsig/fftlog. Tests have shown that fftlog is a bit faster than pyfftlog, but pyfftlog is easier to implement, as you only need NumPy and SciPy, without the need to compile anything.

I hope that FFTLog will make it into SciPy in the future, which will make this project redundant. (If you have the bandwidth and are willing to chip in have a look at SciPy PR #7310.)

Be aware that pyfftlog has not been tested extensively. It works fine for the test from the original code, and my use case, which is pyfftlog.fftl with mu=0.5 (sine-transform), q=0 (unbiased), k=1, kropt=1, and tdir=1 (forward). Please let me know if you encounter any issues.

Description of FFTLog from the FFTLog-Website

FFTLog is a set of fortran subroutines that compute the fast Fourier or Hankel (= Fourier-Bessel) transform of a periodic sequence of logarithmically spaced points.

FFTLog can be regarded as a natural analogue to the standard Fast Fourier Transform (FFT), in the sense that, just as the normal FFT gives the exact (to machine precision) Fourier transform of a linearly spaced periodic sequence, so also FFTLog gives the exact Fourier or Hankel transform, of arbitrary order m, of a logarithmically spaced periodic sequence.

FFTLog shares with the normal FFT the problems of ringing (response to sudden steps) and aliasing (periodic folding of frequencies), but under appropriate circumstances FFTLog may approximate the results of a continuous Fourier or Hankel transform.

The FFTLog algorithm was originally proposed by Talman (1978).

For the full documentation, see jila.colorado.edu/~ajsh/FFTLog.

Installation

You can install pyfftlog either via conda:

conda install -c conda-forge pyfftlog

or via pip:

pip install pyfftlog

License, Citation, and Credits

Released to the public domain under the CC0 1.0 License.

All releases have a Zenodo-DOI, which can be found on 10.5281/zenodo.3830364.

Be kind and give credits by citing Hamilton (2000). See the references-section in the manual for full references.

Metadata

Release files for pyfftlog 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfftlog 0.2.1
File Size Uploaded
pyfftlog-0.2.1.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyfftlog 0.2.1
File Interpreter ABI Platform
pyfftlog-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.0 kB

Release files / pyfftlog-0.2.1.tar.gz

Download URL pyfftlog-0.2.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
00811ee6be5b59c7da4fce31292ab308a992d6e4455fbe33a05112a3e66211c9
BLAKE2b-256 checksum
How to use checksums
3b5adfb84845bfd9e3fe6ce02996a5e6fea630cef3d22dcb8a9db7c68e9015b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / pyfftlog-0.2.1-py3-none-any.whl

Download URL pyfftlog-0.2.1-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b7e0790e1b055aa0795e001d3ad3d55b64a89b6c8edea96c37edd0fa17265d1
BLAKE2b-256 checksum
How to use checksums
1207a81d9232f2873fc53eecd86ad70981f84b70ec8a73d0a9871c81ad1d6c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page