{"id":18202589,"url":"https://github.com/emsig/fftlog","last_synced_at":"2025-04-07T18:44:02.417Z","repository":{"id":56339197,"uuid":"69481721","full_name":"emsig/fftlog","owner":"emsig","description":"A Python wrapper (using f2py) for the logarithmic FFT Fortran code FFTLog by Andrew Hamilton.","archived":false,"fork":false,"pushed_at":"2024-12-31T08:58:19.000Z","size":180,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T07:16:22.721Z","etag":null,"topics":["f2py","fftlog","fourier-transform","python-wrapper"],"latest_commit_sha":null,"homepage":"http://casa.colorado.edu/~ajsh/FFTLog","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emsig.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-28T16:20:13.000Z","updated_at":"2025-02-24T21:13:55.000Z","dependencies_parsed_at":"2024-11-03T10:41:56.570Z","dependency_job_id":"6e4f88ed-a865-4e07-a649-a1ffe34fe28b","html_url":"https://github.com/emsig/fftlog","commit_stats":null,"previous_names":["emsig/fftlog","prisae/fftlog"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsig%2Ffftlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsig%2Ffftlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsig%2Ffftlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsig%2Ffftlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emsig","download_url":"https://codeload.github.com/emsig/fftlog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247711053,"owners_count":20983460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["f2py","fftlog","fourier-transform","python-wrapper"],"created_at":"2024-11-03T10:41:08.551Z","updated_at":"2025-04-07T18:44:02.374Z","avatar_url":"https://github.com/emsig.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/emsig/fftlog/actions/workflows/pytest.yml/badge.svg?branch=main\n   :target: https://github.com/emsig/fftlog/actions/workflows/pytest.yml\n   :alt: GitHub Actions\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3830534.svg\n   :target: https://doi.org/10.5281/zenodo.3830534\n   :alt: Zenodo DOI\n\n\n`fftlog` - A python wrapper for FFTLog\n======================================\n\nThis is a simple `f2py`-wrapper for the logarithmic FFT code *FFTLog* as\npresented in Appendix B of [Hami00]_ and published at\n`casa.colorado.edu/~ajsh/FFTLog \u003chttp://casa.colorado.edu/~ajsh/FFTLog\u003e`_.\n\nA pure python version (`pyfftlog`) can be found on `github.com/emsig/pyfftlog\n\u003chttps://github.com/emsig/pyfftlog\u003e`_. Tests have shown that `fftlog` is a bit\nfaster than `pyfftlog`, but `pyfftlog` is easier to implement, as you only need\n`NumPy` and `SciPy`, without the need to compile anything.\n\nI hope that `FFTLog` will make it into `SciPy` in the future, which will make\nthis project redundant. (If you have the bandwidth and are willing to chip in\nhave a look at `SciPy PR #7310 \u003chttps://github.com/scipy/scipy/pull/7310\u003e`_.)\n\nBe aware that `pyfftlog` has not been tested extensively. It works fine for the\ntest from the original code, and my use case, which is `pyfftlog.fftl` with\n`mu=0.5` (sine-transform), `q=0` (unbiased), `k=1`, `kropt=1`, and `tdir=1`\n(forward). Please let me know if you encounter any issues.\n\n- **Documentation**: https://pyfftlog.readthedocs.io\n- **Source Code**: https://github.com/emsig/fftlog\n\n**Note** that the documentation is for the pure python version `pyfftlog`, but\nequally applies to `fftlog`.\n\nDescription of FFTLog from the FFTLog-Website\n---------------------------------------------\n\nFFTLog is a set of fortran subroutines that compute the fast Fourier or Hankel\n(= Fourier-Bessel) transform of a periodic sequence of logarithmically spaced\npoints.\n\nFFTLog can be regarded as a natural analogue to the standard Fast Fourier\nTransform (FFT), in the sense that, just as the normal FFT gives the exact (to\nmachine precision) Fourier transform of a linearly spaced periodic sequence, so\nalso FFTLog gives the exact Fourier or Hankel transform, of arbitrary order m,\nof a logarithmically spaced periodic sequence.\n\nFFTLog shares with the normal FFT the problems of ringing (response to sudden\nsteps) and aliasing (periodic folding of frequencies), but under appropriate\ncircumstances FFTLog may approximate the results of a continuous Fourier or\nHankel transform.\n\nThe FFTLog algorithm was originally proposed by [Talm78]_.\n\n*For the full documentation, see* `casa.colorado.edu/~ajsh/FFTLog\n\u003chttp://casa.colorado.edu/~ajsh/FFTLog\u003e`_.\n\n\nInstallation\n------------\n\nYou can install fftlog either via **conda**:\n\n.. code-block:: console\n\n   conda install -c conda-forge fftlog\n\nor via **pip**:\n\n.. code-block:: console\n\n   pip install fftlog\n\n\nCreation\n--------\n\nThe power of `f2py` did most of the work.\n\nThe *src*-directory contains the original fortran files as downloaded from\n`casa.colorado.edu/~ajsh/FFTLog \u003chttp://casa.colorado.edu/~ajsh/FFTLog\u003e`_.  The\nonly change I made was to recode the coding of *fftlog.f*, as `f2py` struggled\nwith a few characters in the description part:\n\n.. code:: bash\n\n   recode latin1..UTF-8 fftlog.f\n\nThereafter I used `f2py` to produce the `pyf`-instructions with the following\ncommand, generating only hooks for the functions `fhti`, `fttl`, `fht`, and\n`fhtq`:\n\n.. code:: bash\n\n   f2py src/* -m fftlog -h fftlog.pyf only: fhti fftl fht fhtq :\n\nLastly I amended the `pyf`-instructions, mainly with some `intent` and\n`optional` statements as well as the corresponding default values.\n\n\nNotes\n'''''\n1. `kropt=3` (interactive adjusting) is not possible with `fftlog`\n2. `wsave`-dimension is set to `2*n+3*(n/2)+19`, the biggest of the four\n   minimum sizes described in `fftlog.f`.\n\n\nReferences\n----------\n\n.. [Hami00] Hamilton, A. J. S., 2000, Uncorrelated modes of the non-linear\n    power spectrum: Monthly Notices of the Royal Astronomical Society, 312,\n    pages 257-284; DOI: `10.1046/j.1365-8711.2000.03071.x\n    \u003chttp://dx.doi.org/10.1046/j.1365-8711.2000.03071.x\u003e`_; Website of FFTLog:\n    `casa.colorado.edu/~ajsh/FFTLog \u003chttp://casa.colorado.edu/~ajsh/FFTLog\u003e`_.\n\n.. [Talm78] Talman, J. D., 1978, Numerical Fourier and Bessel transforms in\n    logarithmic variables: Journal of Computational Physics, 29, pages 35-48;\n    DOI: `10.1016/0021-9991(78)90107-9\n    \u003chttp://dx.doi.org/10.1016/0021-9991(78)90107-9\u003e`_.\n\n\nLicense, Citation, and Credits\n------------------------------\n\nThese additions to the original FFTLog-code are released to the public domain\nunder the `CC0 1.0 License\n\u003chttp://creativecommons.org/publicdomain/zero/1.0\u003e`_.\n\nAll releases have a Zenodo-DOI, which can be found on `10.5281/zenodo.3830364\n\u003chttps://doi.org/10.5281/zenodo.3830534\u003e`_.\n\nPermission to distribute the original Fortran `FFTLog` code with this Python\n`fftlog` package has been granted (email from Andrew Hamilton to Dieter\nWerthmüller dated 28 September 2016).\n\nCredits commented in the original code:\n\n`FFTLog` uses the NCAR suite of FFT routines, and a modified version of the\ncomplex Gamma function from the gamerf package at\n`momonga.t.u-tokyo.ac.jp/~ooura/gamerf.html\n\u003chttp://momonga.t.u-tokyo.ac.jp/~ooura/gamerf.html\u003e`_.\nThe original gamerf copyright statement states::\n\n   Copyright(C) 1996 Takuya OOURA (email: ooura@mmm.t.u-tokyo.ac.jp).\n   You may use, copy, modify this code for any purpose and\n   without fee. You may distribute this ORIGINAL package.\n\nPermission to distribute the modified gamma function code with the FFTLog\npackage has been granted (email from Takuya Ooura to Andrew Hamilton dated 16\nMarch 1999).\n\nBe kind and give credits by citing Hamilton (2000).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femsig%2Ffftlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femsig%2Ffftlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femsig%2Ffftlog/lists"}