Skip to content

Commit f785349

Browse files
author
CosmoMatt
committed
configure python package for main merge and pypi deployment
1 parent 1ffb67e commit f785349

File tree

6 files changed

+171
-87
lines changed

6 files changed

+171
-87
lines changed

.github/workflows/cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Flag-C
1+
name: Tests
22

33
on: [push]
44

README

Lines changed: 0 additions & 63 deletions
This file was deleted.

README.rst

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
.. image:: https://img.shields.io/badge/GitHub-src_flag-brightgreen.svg?style=flat
2+
:target: https://github.com/astro-informatics/src_flag
3+
.. image:: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml/badge.svg
4+
:target: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml
5+
.. image:: https://readthedocs.org/projects/ansicolortags/badge/?version=latest
6+
:target: https://astro-informatics.github.io/src_flag/
7+
.. image:: https://img.shields.io/badge/License-GPL-blue.svg
8+
:target: http://perso.crans.org/besson/LICENSE.html
9+
.. image:: http://img.shields.io/badge/arXiv-1205.0792-orange.svg?style=flat
10+
:target: https://arxiv.org/abs/1205.0792
11+
.. image:: http://img.shields.io/badge/arXiv-1110.6298-orange.svg?style=flat
12+
:target: https://arxiv.org/abs/1110.6298
13+
.. image:: http://img.shields.io/badge/arXiv-2105.05518-orange.svg?style=flat
14+
:target: https://arxiv.org/abs/2105.05518
15+
16+
|logo| FLAG: Fourier-LAGuerre transform
17+
================================
18+
19+
.. |logo| raw:: html
20+
21+
<img src="./doc/images/logo.jpg" align="center" height="52" width="52">
22+
23+
DESCRIPTION
24+
================================
25+
The FLAG code provides functionality to perform fast and exact Fourier-Laguerre and Fourier-Bessel transforms on the ball.
26+
27+
C INSTALLATION
28+
================================
29+
The primary C version of this code can be installed from source by running
30+
31+
.. code-block:: bash
32+
33+
git clone git@github.com:astro-informatics/src_flag.git
34+
cd src_flag
35+
mkdir build && cd build
36+
cmake .. && make
37+
38+
Following which one can check the installation by running
39+
40+
.. code-block:: bash
41+
42+
ctest
43+
44+
within the build directory.
45+
46+
PYTHON INSTALLATION
47+
================================
48+
This package can easily be installed from PyPi by running
49+
50+
.. code-block:: bash
51+
52+
pip install pyflag
53+
pip list
54+
55+
or alternatively from source by first compiling the C code and running
56+
57+
.. code-block:: bash
58+
59+
pip install .
60+
61+
from the root directory, following which the package may be tested by running
62+
63+
.. code-block:: bash
64+
65+
pytest
66+
67+
within the root directory.
68+
69+
MATLAB INSTALLATION
70+
================================
71+
Mex wrappers are available, however they are currently being sunsetted, so installing previously tagged versions is advised.
72+
73+
BASIC USAGE (PYTHON)
74+
================================
75+
First install flag for python, then you can call it from any python script to perform forward and inverse flag transforms and their adjoints by
76+
77+
.. code-block:: python
78+
79+
import pyflag as flag
80+
import numpy as np
81+
82+
L = 10 # Angular bandlimit
83+
P = 5 # Radial bandlimit
84+
tau = 1 # Laguerre scaling factor
85+
spin = 0 # Spin of signal
86+
reality = 0 # Real or complex signals
87+
88+
# Create a random complex signal (c indexing)
89+
f = np.random.rand(P, L, 2*L-1) + 1j*np.random.rand(P, L, 2*L-1)
90+
f = f.flatten('C')
91+
92+
# Compute e.g. the Forward transform
93+
flmp = flag.flag_analysis(f, L, tau, P, spin, reality)
94+
95+
AUTHORS
96+
================================
97+
98+
`B. Leistedt <www.ixkael.com/blog>`_,
99+
`J. D. McEwen <www.jasonmcewen.org>`_, and
100+
`M. A. Price <https://scholar.google.com/citations?user=w7_VDLQAAAAJ&hl=en&authuser=1>`_
101+
102+
REFERENCES
103+
================================
104+
105+
.. code-block::
106+
107+
@article{price:2021:bayesian,
108+
author = {Matthew~A.~Price and Jason~D.~McEwen},
109+
title = {Bayesian variational regularization on the ball},
110+
journal = {ArXiv},
111+
eprint = {arXiv:2105.05518},
112+
year = 2021
113+
}
114+
115+
.. code-block::
116+
117+
@article{leistedt:2012:exact,
118+
author = {Boris~Leistedt and Jason~D.~McEwen},
119+
title = {Exact Wavelets on the Ball},
120+
journal = {IEEE Trans. Sig. Proc.},
121+
year = 2012,
122+
volume = {60},
123+
number = {12},
124+
pages = {6257-6269},
125+
doi = {10.1109/TSP.2012.2215030},
126+
}
127+
128+
.. code-block::
129+
130+
@article{McEwen:2011:novel,
131+
author = {Jason~D.~McEwen and Yves~Wiaux},
132+
title = {A novel sampling theorem on the sphere},
133+
journal = {IEEE Trans. Sig. Proc.},
134+
year = 2011,
135+
volume = {59},
136+
number = {12},
137+
pages = {5876-5887},
138+
doi = {10.1109/TSP.2011.2166394},
139+
}
140+
141+
LICENSE
142+
================================
143+
144+
FLAG package to perform fast wavelet transform on the sphere<br>
145+
Copyright (C) 2012 Boris Leistedt & Jason McEwen
146+
147+
This program is free software; you can redistribute it and/or
148+
modify it under the terms of the GNU General Public License
149+
as published by the Free Software Foundation; either version 2
150+
of the License, or (at your option) any later version.
151+
152+
This program is distributed in the hope that it will be useful,
153+
but WITHOUT ANY WARRANTY; without even the implied warranty of
154+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
155+
GNU General Public License for more details (LICENSE.txt).
156+
157+
You should have received a copy of the GNU General Public License
158+
along with this program; if not, write to the Free Software
159+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
160+
MA 02110-1301, USA.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
setup(
1111
name="pyflag",
12-
version="0.0.1",
13-
author="Boris Leistedt & Jason McEwen",
12+
version="1.0.0",
13+
author="Boris Leistedt & Jason McEwen & Matthew Price",
1414
install_requires=["numpy", "cython", "scipy"],
1515
extras_require={
1616
"dev": [

src/main/pyflag/.FLAG_Python_Documentation.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
1-
*********************************
2-
FLAG: Fourier-LAGuerre transform
3-
*********************************
4-
51
.. image:: https://img.shields.io/badge/GitHub-src_flag-brightgreen.svg?style=flat
62
:target: https://github.com/astro-informatics/src_flag
7-
83
.. image:: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml/badge.svg
94
:target: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml
10-
115
.. image:: https://readthedocs.org/projects/ansicolortags/badge/?version=latest
126
:target: https://astro-informatics.github.io/src_flag/
13-
147
.. image:: https://img.shields.io/badge/License-GPL-blue.svg
158
:target: http://perso.crans.org/besson/LICENSE.html
16-
179
.. image:: http://img.shields.io/badge/arXiv-1205.0792-orange.svg?style=flat
1810
:target: https://arxiv.org/abs/1205.0792
19-
2011
.. image:: http://img.shields.io/badge/arXiv-1110.6298-orange.svg?style=flat
2112
:target: https://arxiv.org/abs/1110.6298
22-
2313
.. image:: http://img.shields.io/badge/arXiv-2105.05518-orange.svg?style=flat
2414
:target: https://arxiv.org/abs/2105.05518
2515

src/main/pyflag/README.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
*********************************
2-
FLAG: Fourier-LAGuerre transform
3-
*********************************
4-
51
.. image:: https://img.shields.io/badge/GitHub-src_flag-brightgreen.svg?style=flat
62
:target: https://github.com/astro-informatics/src_flag
7-
83
.. image:: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml/badge.svg
94
:target: https://github.com/astro-informatics/src_flag/actions/workflows/cpp.yml
10-
115
.. image:: https://readthedocs.org/projects/ansicolortags/badge/?version=latest
126
:target: https://astro-informatics.github.io/src_flag/
13-
147
.. image:: https://img.shields.io/badge/License-GPL-blue.svg
158
:target: http://perso.crans.org/besson/LICENSE.html
16-
179
.. image:: http://img.shields.io/badge/arXiv-1205.0792-orange.svg?style=flat
1810
:target: https://arxiv.org/abs/1205.0792
19-
2011
.. image:: http://img.shields.io/badge/arXiv-1110.6298-orange.svg?style=flat
2112
:target: https://arxiv.org/abs/1110.6298
22-
2313
.. image:: http://img.shields.io/badge/arXiv-2105.05518-orange.svg?style=flat
2414
:target: https://arxiv.org/abs/2105.05518
2515

16+
|logo| FLAG: Fourier-LAGuerre transform
17+
================================
18+
19+
.. |logo| raw:: html
20+
21+
<img src="./doc/images/logo.jpg" align="center" height="52" width="52">
22+
2623
DESCRIPTION
2724
================================
2825
The FLAG code provides functionality to perform fast and exact Fourier-Laguerre and Fourier-Bessel transforms on the ball. More details may be found in the extensive `documentation <https://astro-informatics.github.io/flag/>`_.
@@ -36,7 +33,7 @@ This package can easily be installed from PyPi by running
3633
pip install pyflag
3734
pip list
3835
39-
or alternatively from source by first compiling the C++ code and running
36+
or alternatively from source by first compiling the C code and running
4037

4138
.. code-block:: bash
4239

0 commit comments

Comments
 (0)