1
- `fftlog ` - python wrapper FFTLog
2
- ================================
1
+ .. image :: https://travis-ci.org/prisae/fftlog.svg?branch=master
2
+ :target: https://travis-ci.org/prisae/fftlog
3
+ :alt: Travis-CI
4
+ .. image :: https://zenodo.org/badge/DOI/10.5281/zenodo.3830534.svg
5
+ :target: https://doi.org/10.5281/zenodo.3830534
6
+ :alt: Zenodo DOI
7
+
8
+
9
+ `fftlog ` - A python wrapper for FFTLog
10
+ ======================================
3
11
4
12
This is a simple `f2py `-wrapper for the logarithmic FFT code *FFTLog * as
5
- presented in Appendix B of [Hamilton_2000 ]_ and published at
13
+ presented in Appendix B of [Hami00 ]_ and published at
6
14
`casa.colorado.edu/~ajsh/FFTLog <http://casa.colorado.edu/~ajsh/FFTLog >`_.
7
15
8
- A pure python version (`pyfftlog `) can be found on
9
- `github.com/prisae/pyfftlog <https://github.com/prisae/pyfftlog >`_.
10
- Tests have shown that `fftlog ` is a bit faster than `pyfftlog `, but `pyfftlog `
11
- is easier to implement, as you only need `NumPy ` and `SciPy `, without the
12
- need to compile anything.
16
+ A pure python version (`pyfftlog `) can be found on `github.com/prisae/pyfftlog
17
+ <https://github.com/prisae/pyfftlog> `_. Tests have shown that `fftlog ` is a bit
18
+ faster than `pyfftlog `, but `pyfftlog ` is easier to implement, as you only need
19
+ `NumPy ` and `SciPy `, without the need to compile anything.
13
20
14
21
I hope that `FFTLog ` will make it into `SciPy ` in the future, which will make
15
- this project redundant.
22
+ this project redundant. (If you have the bandwidth and are willing to chip in
23
+ have a look at `SciPy PR #7310 <https://github.com/scipy/scipy/pull/7310 >`_.)
24
+
25
+ Be aware that `pyfftlog ` has not been tested extensively. It works fine for the
26
+ test from the original code, and my use case, which is `pyfftlog.fftl ` with
27
+ `mu=0.5 ` (sine-transform), `q=0 ` (unbiased), `k=1 `, `kropt=1 `, and `tdir=1 `
28
+ (forward). Please let me know if you encounter any issues.
16
29
17
- Be aware that `pyfftlog ` has not been tested extensively. It works fine
18
- for the attached test, which is the test from the original code, and my use
19
- case, which is `pyfftlog.fftl ` with `mu=0.5 ` (sine-transform), `q=0 `
20
- (unbiased), `k=1 `, `kropt=1 `, and `tdir= ` (forward). Please let me know if you
21
- encounter any issues.
30
+ - **Documentation **: https://pyfftlog.readthedocs.io
31
+ - **Source Code **: https://github.com/prisae/fftlog
22
32
33
+ **Note ** that the documentation is for the pure python version `pyfftlog `, but
34
+ equally applies to `fftlog `.
23
35
24
36
Description of FFTLog from the FFTLog-Website
25
37
---------------------------------------------
@@ -39,32 +51,26 @@ steps) and aliasing (periodic folding of frequencies), but under appropriate
39
51
circumstances FFTLog may approximate the results of a continuous Fourier or
40
52
Hankel transform.
41
53
42
- The FFTLog algorithm was originally proposed by [Talman_1978 ]_.
54
+ The FFTLog algorithm was originally proposed by [Talm78 ]_.
43
55
44
- *For the full documentation, see *
45
- ` casa.colorado.edu/~ajsh/FFTLog <http://casa.colorado.edu/~ajsh/FFTLog >`_.
56
+ *For the full documentation, see * ` casa.colorado.edu/~ajsh/FFTLog
57
+ <http://casa.colorado.edu/~ajsh/FFTLog> `_.
46
58
47
59
48
60
Installation
49
61
------------
50
62
51
- To install it in your python distribution :
63
+ You can install fftlog either via ** conda ** :
52
64
53
- .. code :: bash
65
+ .. code-block :: console
54
66
55
- python setup.py install
67
+ conda install -c conda-forge fftlog
56
68
69
+ or via **pip **:
57
70
58
- To just create the module that you can import locally:
71
+ .. code-block :: console
59
72
60
- .. code :: bash
61
-
62
- f2py -c fftlog.pyf src/*
63
-
64
- You need a fortran compiler for this to work.
65
-
66
- Check out the Jupyter Notebook `fftlogtest.ipynb ` in the root directory. It is
67
- a translation of the test-function `fftlogtest.f `, and should get you started.
73
+ pip install fftlog
68
74
69
75
70
76
Creation
@@ -89,39 +95,42 @@ command, generating only hooks for the functions `fhti`, `fttl`, `fht`, and
89
95
90
96
f2py src/* -m fftlog -h fftlog.pyf only: fhti fftl fht fhtq :
91
97
92
- Lastly I amended the `pyf `-instructions, mainly with some :code: `intent ` and
93
- :code: `optional ` statements as well as the corresponding default values.
98
+ Lastly I amended the `pyf `-instructions, mainly with some `intent ` and
99
+ `optional ` statements as well as the corresponding default values.
94
100
95
101
96
102
Notes
97
- -----
98
- 1. :code: `kropt = 3 ` (interactive adjusting) is not possible with `fftlog `
99
- 2. :code: `wsave `-dimension is set to :code: `2*n+3*(n/2)+19 `, the biggest of the
100
- four minimum sizes described in `fftlog.f `.
103
+ '''''
104
+ 1. `kropt= 3 ` (interactive adjusting) is not possible with `fftlog `
105
+ 2. `wsave `-dimension is set to `2*n+3*(n/2)+19 `, the biggest of the four
106
+ minimum sizes described in `fftlog.f `.
101
107
102
108
103
109
References
104
110
----------
105
111
106
- .. [Hamilton_2000 ] Hamilton, A. J. S., 2000, Uncorrelated modes of the
107
- non-linear power spectrum: Monthly Notices of the Royal Astronomical
108
- Society, 312, pages 257-284; DOI: `10.1046/j.1365-8711.2000.03071.x
112
+ .. [Hami00 ] Hamilton, A. J. S., 2000, Uncorrelated modes of the non-linear
113
+ power spectrum: Monthly Notices of the Royal Astronomical Society, 312,
114
+ pages 257-284; DOI: `10.1046/j.1365-8711.2000.03071.x
109
115
<http://dx.doi.org/10.1046/j.1365-8711.2000.03071.x> `_; Website of FFTLog:
110
116
`casa.colorado.edu/~ajsh/FFTLog <http://casa.colorado.edu/~ajsh/FFTLog >`_.
111
117
112
- .. [Talman_1978 ] Talman, J. D., 1978, Numerical Fourier and Bessel transforms
113
- in logarithmic variables: Journal of Computational Physics, 29, pages
114
- 35-48; DOI: `10.1016/0021-9991(78)90107-9
118
+ .. [Talm78 ] Talman, J. D., 1978, Numerical Fourier and Bessel transforms in
119
+ logarithmic variables: Journal of Computational Physics, 29, pages 35-48;
120
+ DOI: `10.1016/0021-9991(78)90107-9
115
121
<http://dx.doi.org/10.1016/0021-9991(78)90107-9> `_.
116
122
117
123
118
- License and Credits
119
- -------------------
124
+ License, Citation, and Credits
125
+ ------------------------------
120
126
121
127
These additions to the original FFTLog-code are released to the public domain
122
128
under the `CC0 1.0 License
123
129
<http://creativecommons.org/publicdomain/zero/1.0> `_.
124
130
131
+ All releases have a Zenodo-DOI, which can be found on `10.5281/zenodo.3830364
132
+ <https://doi.org/10.5281/zenodo.3830534> `_.
133
+
125
134
Permission to distribute the original Fortran `FFTLog ` code with this Python
126
135
`fftlog ` package has been granted (email from Andrew Hamilton to Dieter
127
136
Werthmüller dated 28 September 2016).
@@ -141,3 +150,5 @@ The original gamerf copyright statement states::
141
150
Permission to distribute the modified gamma function code with the FFTLog
142
151
package has been granted (email from Takuya Ooura to Andrew Hamilton dated 16
143
152
March 1999).
153
+
154
+ Be kind and give credits by citing Hamilton (2000).
0 commit comments