Giter Site home page Giter Site logo

minhmpa / pyfftlog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prisae/pyfftlog

0.0 1.0 0.0 97 KB

Python version of the logarithmic FFT Fortran code FFTLog by Andrew Hamilton.

License: Creative Commons Zero v1.0 Universal

Python 100.00%

pyfftlog's Introduction

pyfftlog - 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 casa.colorado.edu/~ajsh/FFTLog.

A simple f2py-wrapper (fftlog) can be found on github.com/prisae/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.

Be aware that pyfftlog has not been tested extensively. It works fine for the attached test, which is 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= (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 casa.colorado.edu/~ajsh/FFTLog.

References

[Hamilton_2000](1, 2) Hamilton, A. J. S., 2000, Uncorrelated modes of the non-linear power spectrum: Monthly Notices of the Royal Astronomical Society, 312, pages 257-284; DOI: 10.1046/j.1365-8711.2000.03071.x; Website of FFTLog: casa.colorado.edu/~ajsh/FFTLog.
[Talman_1978]Talman, J. D., 1978, Numerical Fourier and Bessel transforms in logarithmic variables: Journal of Computational Physics, 29, pages 35-48; DOI: 10.1016/0021-9991(78)90107-9.

License and Credits

Released to the public domain under the CC0 1.0 License. Be kind and give credits to [Hamilton_2000].

pyfftlog's People

Contributors

prisae avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.