Skip to content

Commit f17f9af

Browse files
authored
Merge pull request #167 from astro-informatics/release/v1.0.0
PreRelease/v1.0.0
2 parents 5566eb7 + fa1309b commit f17f9af

24 files changed

+161
-195
lines changed

.coveragerc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
[paths]
2-
source =
3-
../s2fft
4-
*/site-packages/s2fft
5-
6-
[run]
7-
branch = true
8-
parallel = true
9-
source =
10-
s2fft
11-
121
[report]
13-
show_missing = true
14-
precision = 2
152
omit =
163
*test_*
174
*__init__*

.github/workflows/docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
# Add following in for testing
8-
# - feature/deploy_docs
9-
7+
108
jobs:
119
build:
1210

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
3535
- name: Run tests
3636
run: |
37-
pytest --cov-report term --cov=s2wav --cov-config=.coveragerc
37+
pytest --cov-report term --cov=s2fft --cov-config=.coveragerc
3838
codecov --token 298dc7ee-bb9f-4221-b31f-3576cc6cb702

.pip_readme.rst

Lines changed: 63 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,90 @@
1-
.. image:: https://img.shields.io/badge/GitHub-PyTemplate-brightgreen.svg?style=flat
2-
:target: https://github.com/astro-informatics/s2fft
31
.. image:: https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml/badge.svg?branch=main
42
:target: https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml
5-
.. image:: https://readthedocs.org/projects/ansicolortags/badge/?version=latest
6-
:target: https://astro-informatics.github.io/s2fft
3+
.. image:: https://img.shields.io/badge/GitHub-PyTemplate-brightgreen.svg?style=flat
4+
:target: https://github.com/astro-informatics/s2fft
75
.. image:: https://codecov.io/gh/astro-informatics/s2fft/branch/main/graph/badge.svg?token=7QYAFAAWLE
86
:target: https://codecov.io/gh/astro-informatics/s2fft
97
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
108
:target: https://opensource.org/licenses/MIT
119
.. image:: http://img.shields.io/badge/arXiv-xxxx.xxxxx-orange.svg?style=flat
1210
:target: https://arxiv.org/abs/xxxx.xxxxx
11+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
12+
:target: https://github.com/psf/black
13+
.. image:: https://colab.research.google.com/assets/colab-badge.svg
14+
:target: https://colab.research.google.com/drive/1YmJ2ljsF8HBvhPmD4hrYPlyAKc4WPUgq?usp=sharing
1315

14-
S2FFT: JAX accelerated spin-spherical harmonic transforms
16+
Differentiable and accelerated spherical transforms with JAX
1517
=================================================================================================================
1618

17-
Add some basic discussion about ``S2FFT`` here.
19+
`S2FFT` is a JAX package for computing Fourier transforms on the sphere
20+
and rotation group. It leverages autodiff to provide differentiable
21+
transforms, which are also deployable on hardware accelerators
22+
(e.g. GPUs and TPUs).
1823

19-
Installation
20-
============
24+
More specifically, `S2FFT` provides support for spin spherical harmonic
25+
and Wigner transforms (for both real and complex signals), with support
26+
for adjoint transformations where needed, and comes with different
27+
optimisations (precompute or not) that one may select depending on
28+
available resources and desired angular resolution $L$.
2129

22-
Add some basic installation instructions here.
23-
2430
Documentation
2531
=============
26-
27-
Link to the full documentation (when deployed).
28-
29-
Contributors
30-
============
31-
Author names & Contributors
32+
Read the full documentation [here](https://astro-informatics.github.io/s2fft/#).
3233

3334
Attribution
3435
===========
35-
A BibTeX entry for <project-name> is:
36+
Should this code be used in any way, we kindly request that the following article is
37+
referenced. A BibTeX entry for this reference may look like:
38+
39+
.. code-block::
40+
41+
@article{price:s2fft,
42+
author = "Matthew A. Price and Jason D. McEwen and Contributors",
43+
title = "Differentiable and accelerated spherical harmonic and Wigner transforms",
44+
journal = "Journal of Computational Physics",
45+
year = "2023",
46+
eprint = "arXiv:0000.00000"
47+
}
48+
49+
You might also like to consider citing our related papers on which this
50+
code builds:
51+
52+
.. code-block::
53+
54+
@article{mcewen:fssht,
55+
author = "Jason D. McEwen and Yves Wiaux",
56+
title = "A novel sampling theorem on the sphere",
57+
journal = "IEEE Trans. Sig. Proc.",
58+
year = "2011",
59+
volume = "59",
60+
number = "12",
61+
pages = "5876--5887",
62+
eprint = "arXiv:1110.6298",
63+
doi = "10.1109/TSP.2011.2166394"
64+
}
65+
3666
3767
.. code-block::
3868
39-
@article{S2FFT,
40-
author = {Author~List},
41-
title = {"A totally amazing name"},
42-
journal = {ArXiv},
43-
eprint = {arXiv:0000.00000},
44-
year = {what year is it?!}
45-
}
69+
@article{mcewen:so3,
70+
author = "Jason D. McEwen and Martin B{\"u}ttner and Boris ~Leistedt and Hiranya V. Peiris and Yves Wiaux",
71+
title = "A novel sampling theorem on the rotation group",
72+
journal = "IEEE Sig. Proc. Let.",
73+
year = "2015",
74+
volume = "22",
75+
number = "12",
76+
pages = "2425--2429",
77+
eprint = "arXiv:1508.03101",
78+
doi = "10.1109/LSP.2015.2490676"
79+
}
4680
4781
License
4882
=======
4983

50-
``S2FFT`` is released under the MIT license (see
51-
`LICENSE.txt <https://github.com/astro-informatics/s2fft/blob/main/LICENCE.txt>`_).
52-
53-
.. code-block::
84+
We provide this code under an MIT open-source licence with the hope that
85+
it will be of use to a wider community.
5486

55-
S2FFT
56-
Copyright (C) 2022 Author names & contributors
87+
Copyright 2023 Matthew Price, Jason McEwen and contributors.
5788

58-
This program is released under the MIT license (see `LICENSE.txt`).
89+
`S2FFT` is free software made available under the MIT License. For
90+
details see the LICENSE file.

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ include .pip_readme.rst
77
include README.rst
88
include pytest.ini
99
include LICENCE.txt
10-
include LICENCE_EXT.txt
1110
include s2fft/default-logging-config.yaml
12-
include tox.ini
1311

1412
exclude .coveragerc
1513
exclude *.log

README.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[![image](https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml)
2-
[![image](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](https://astro-informatics.github.io/s2fft)
32
[![image](https://codecov.io/gh/astro-informatics/s2fft/branch/main/graph/badge.svg?token=7QYAFAAWLE)](https://codecov.io/gh/astro-informatics/s2fft)
43
[![image](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
54
[![image](http://img.shields.io/badge/arXiv-xxxx.xxxxx-orange.svg?style=flat)](https://arxiv.org/abs/xxxx.xxxxx)<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
65
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->
76
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
7+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1YmJ2ljsF8HBvhPmD4hrYPlyAKc4WPUgq?usp=sharing)
88

99
<img align="left" height="85" width="98" src="./docs/assets/sax_logo.png">
1010

1111
# Differentiable and accelerated spherical transforms with JAX
1212

1313
`S2FFT` is a JAX package for computing Fourier transforms on the sphere
1414
and rotation group. It leverages autodiff to provide differentiable
15-
transforms, which are also deployable on modern hardware accelerators
15+
transforms, which are also deployable on hardware accelerators
1616
(e.g. GPUs and TPUs).
1717

1818
More specifically, `S2FFT` provides support for spin spherical harmonic
@@ -30,7 +30,20 @@ algorithms are based on new Wigner-d recursions that are stable to high
3030
angular resolution $L$. The diagram below illustrates the recursions
3131
(for further details see Price & McEwen, in prep.).
3232

33-
![image](./docs/assets/figures/schematic.png)
33+
![image](./docs/assets/figures/Wigner_recursion_legend_darkmode.png)
34+
With this recursion to hand, the spherical harmonic coefficients of an
35+
isolatitudinally sampled map may be computed as a two step process. First,
36+
a 1D Fourier transform over longitude, for each latitudinal ring. Second,
37+
a projection onto the real polar-d functions. One may precompute and store
38+
all real polar-d functions for extreme acceleration, however this comes
39+
with an equally extreme memory overhead, which is infeasible at L ~ 1024.
40+
Alternatively, the real polar-d functions may calculated recursively,
41+
computing only a portion of the projection at a time, hence incurring
42+
negligible memory overhead at the cost of slightly slower execution. The
43+
diagram below illustrates the separable spherical harmonic transform
44+
(for further details see Price & McEwen, in prep.).
45+
46+
![image](./docs/assets/figures/sax_schematic_legend_darkmode.png)
3447

3548
## Sampling :earth_africa:
3649

@@ -70,8 +83,7 @@ from the root directory of the repository. Unit tests can then be
7083
executed to ensure the installation was successful by running
7184

7285
``` bash
73-
pytest tests/ # for pytest
74-
tox -e py38 # for tox
86+
pytest tests/
7587
```
7688

7789
In the very near future one will be able to install `S2FFT` directly
@@ -166,10 +178,11 @@ referenced. A BibTeX entry for this reference may look like:
166178

167179
```
168180
@article{price:s2fft,
169-
AUTHOR = "Matthew A. Price and Jason D. McEwen and Contributors",
170-
TITLE = "TBA",
171-
YEAR = "2023",
172-
EPRINT = "arXiv:0000.00000"
181+
author = "Matthew A. Price and Jason D. McEwen and Contributors",
182+
title = "Differentiable and accelerated spherical harmonic and Wigner transforms",
183+
journal = "Journal of Computational Physics",
184+
year = "2023",
185+
eprint = "arXiv:0000.00000"
173186
}
174187
```
175188

@@ -178,29 +191,29 @@ code builds:
178191

179192
```
180193
@article{mcewen:fssht,
181-
AUTHOR = "Jason D. McEwen and Yves Wiaux",
182-
TITLE = "A novel sampling theorem on the sphere",
183-
JOURNAL = "IEEE Trans. Sig. Proc.",
184-
YEAR = "2011",
185-
VOLUME = "59",
186-
NUMBER = "12",
187-
PAGES = "5876--5887",
188-
EPRINT = "arXiv:1110.6298",
189-
DOI = "10.1109/TSP.2011.2166394"
194+
author = "Jason D. McEwen and Yves Wiaux",
195+
title = "A novel sampling theorem on the sphere",
196+
journal = "IEEE Trans. Sig. Proc.",
197+
year = "2011",
198+
volume = "59",
199+
number = "12",
200+
pages = "5876--5887",
201+
eprint = "arXiv:1110.6298",
202+
doi = "10.1109/TSP.2011.2166394"
190203
}
191204
```
192205

193206
```
194207
@article{mcewen:so3,
195-
AUTHOR = "Jason D. McEwen and Martin B{\"u}ttner and Boris ~Leistedt and Hiranya V. Peiris and Yves Wiaux",
196-
TITLE = "A novel sampling theorem on the rotation group",
197-
JOURNAL = "IEEE Sig. Proc. Let.",
198-
YEAR = "2015",
199-
VOLUME = "22",
200-
NUMBER = "12",
201-
PAGES = "2425--2429",
202-
EPRINT = "arXiv:1508.03101",
203-
DOI = "10.1109/LSP.2015.2490676"
208+
author = "Jason D. McEwen and Martin B{\"u}ttner and Boris ~Leistedt and Hiranya V. Peiris and Yves Wiaux",
209+
title = "A novel sampling theorem on the rotation group",
210+
journal = "IEEE Sig. Proc. Let.",
211+
year = "2015",
212+
volume = "22",
213+
number = "12",
214+
pages = "2425--2429",
215+
eprint = "arXiv:1508.03101",
216+
doi = "10.1109/LSP.2015.2490676"
204217
}
205218
```
206219

799 KB
Loading
799 KB
Loading
1.33 MB
Loading
1.32 MB
Loading

0 commit comments

Comments
 (0)