Skip to content

Commit 6f8cd73

Browse files
committed
Tweak README formatting to make work when included in Sphinx docs
1 parent 4d4e37e commit 6f8cd73

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
<div style="text-align: center;" align="center">
2+
3+
<img class="dark-light" width="98" height="85" alt="s2fft logo - schematic representation of a tiled sphere" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/sax_logo.png">
4+
5+
# Differentiable and accelerated spherical transforms
6+
17
[![Tests status](https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/astro-informatics/s2fft/actions/workflows/tests.yml)
28
[![Linting status](https://github.com/astro-informatics/s2fft/actions/workflows/linting.yml/badge.svg?branch=main)](https://github.com/astro-informatics/s2fft/actions/workflows/linting.yml)
39
[![Documentation status](https://github.com/astro-informatics/s2fft/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/astro-informatics/s2fft/actions/workflows/docs.yml)
410
[![Codecov](https://codecov.io/gh/astro-informatics/s2fft/branch/main/graph/badge.svg?token=7QYAFAAWLE)](https://codecov.io/gh/astro-informatics/s2fft)
511
[![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
612
[![PyPI package](https://badge.fury.io/py/s2fft.svg)](https://badge.fury.io/py/s2fft)
713
[![arXiv](http://img.shields.io/badge/arXiv-2311.14670-orange.svg?style=flat)](https://arxiv.org/abs/2311.14670)
8-
[![All Contributors](https://img.shields.io/github/all-contributors/astro-informatics/s2fft?color=ee8449&style=flat-square)](#contributors-)
14+
![All Contributors](https://img.shields.io/github/all-contributors/astro-informatics/s2fft?color=ee8449&style=flat-square)
915
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/astro-informatics/s2fft/blob/main/notebooks/spherical_harmonic_transform.ipynb)
1016
[![Linter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1117

12-
<img align="left" height="85" width="98" alt="s2fft logo - schematic representation of a tiled sphere" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main//docs/assets/sax_logo.png">
13-
14-
# Differentiable and accelerated spherical transforms
18+
</div>
1519

1620
`S2FFT` is a Python package for computing Fourier transforms on the sphere
1721
and rotation group [(Price & McEwen 2024)](https://arxiv.org/abs/2311.14670) using
@@ -24,7 +28,6 @@ for adjoint transformations where needed, and comes with different
2428
optimisations (precompute or not) that one may select depending on
2529
available resources and desired angular resolution $L$.
2630

27-
2831
## Algorithms ⚡
2932

3033
`S2FFT` leverages new algorithmic structures that can he highly
@@ -34,7 +37,10 @@ algorithms are based on new Wigner-d recursions that are stable to high
3437
angular resolution $L$. The diagram below illustrates the recursions
3538
(for further details see [Price & McEwen 2024]((https://arxiv.org/abs/2311.14670))).
3639

37-
![Schematic of Wigner recursions](https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/Wigner_recursion_legend_darkmode.png)
40+
<div style="text-align: center;" align="center">
41+
<img class="dark-light" alt="Schematic of Wigner recursions" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/Wigner_recursion_legend_darkmode.png" />
42+
</div>
43+
3844
With this recursion to hand, the spherical harmonic coefficients of an
3945
isolatitudinally sampled map may be computed as a two step process. First,
4046
a 1D Fourier transform over longitude, for each latitudinal ring. Second,
@@ -47,7 +53,9 @@ negligible memory overhead at the cost of slightly slower execution. The
4753
diagram below illustrates the separable spherical harmonic transform
4854
(for further details see [Price & McEwen 2024]((https://arxiv.org/abs/2311.14670))).
4955

50-
![Schematic of forward and inverse spherical harmonic transforms](https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/sax_schematic_legend_darkmode.png)
56+
<div style="text-align: center;" align="center">
57+
<img class="dark-light" alt="Schematic of forward and inverse spherical harmonic transforms" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/sax_schematic_legend_darkmode.png" />
58+
</div>
5159

5260
## Sampling 🌍
5361

@@ -72,7 +80,9 @@ so the corresponding harmonic transforms do not achieve machine
7280
precision but exhibit some error. However, the HEALPix sampling provides
7381
pixels of equal areas, which has many practical advantages.
7482

75-
<p align="center"><img alt="Visualization of spherical sampling schemes" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/spherical_sampling.png" width="700"></p>
83+
<div style="text-align: center;" align="center">
84+
<img class="dark-light" alt="Visualization of spherical sampling schemes" src="https://raw.githubusercontent.com/astro-informatics/s2fft/main/docs/assets/figures/spherical_sampling.png" width="700">
85+
</div>
7686

7787
> [!NOTE]
7888
> For algorithmic reasons JIT compilation of HEALPix transforms can become slow at high bandlimits, due to XLA unfolding of loops which currently cannot be avoided. After compiling HEALPix transforms should execute with the efficiency outlined in the associated paper, therefore this additional time overhead need only be incurred once. We are aware of this issue and are working to fix it. A fix for CPU execution has now been implemented (see example [notebook](https://astro-informatics.github.io/s2fft/tutorials/spherical_harmonic/JAX_HEALPix_backend.html)).
@@ -181,7 +191,7 @@ For further details on usage see the [documentation](https://astro-informatics.g
181191
> [!NOTE]
182192
> We also provide PyTorch support for the precompute version of our transforms, as demonstrated in the [_Torch frontend_ tutorial notebook](https://astro-informatics.github.io/s2fft/tutorials/torch_frontend/torch_frontend.html).
183193
184-
## JAX wrappers for SSHT and HEALPix 💡
194+
## SSHT & HEALPix wrappers 💡
185195

186196
`S2FFT` also provides JAX support for existing C/C++ packages, specifically [`HEALPix`](https://healpix.jpl.nasa.gov) and [`SSHT`](https://github.com/astro-informatics/ssht). This works
187197
by wrapping Python bindings with custom JAX frontends. Note that this C/C++ to JAX interoperability is currently limited to CPU.
@@ -207,7 +217,6 @@ For further details on usage see the associated [notebooks](https://astro-inform
207217

208218
A suite of benchmark functions for both the on-the-fly and precompute versions of the spherical harmonic and Wigner transforms are available in the `benchmarks` directory, along with utilities for running the benchmarks and plotting the results.
209219

210-
211220
## Contributors ✨
212221

213222
Thanks goes to these wonderful people ([emoji
@@ -300,13 +309,13 @@ it will be of use to a wider community.
300309
Copyright 2023 Matthew Price, Jason McEwen and contributors.
301310

302311
`S2FFT` is free software made available under the MIT License. For
303-
details see the [`LICENCE.txt`](LICENCE.txt) file.
312+
details see the [`LICENCE.txt`](https://github.com/astro-informatics/s2fft/blob/main/LICENCE.txt) file.
304313

305-
The file [`lib/include/kernel_helpers.h`](lib/include/kernel_helpers.h) is adapted from
314+
The file [`lib/include/kernel_helpers.h`](https://github.com/astro-informatics/s2fft/blob/main/lib/include/kernel_helpers.h) is adapted from
306315
[code](https://github.com/dfm/extending-jax/blob/c33869665236877a2ae281f3f5dbff579e8f5b00/lib/kernel_helpers.h) in [a tutorial on extending JAX](https://github.com/dfm/extending-jax) by
307316
[Dan Foreman-Mackey](https://github.com/dfm) and licensed under a [MIT license](https://github.com/dfm/extending-jax/blob/371dca93c6405368fa8e71690afd3968d75f4bac/LICENSE).
308317

309-
The file [`lib/include/kernel_nanobind_helpers.h`](lib/include/kernel_nanobind_helpers.h)
318+
The file [`lib/include/kernel_nanobind_helpers.h`](https://github.com/astro-informatics/s2fft/blob/main/lib/include/kernel_nanobind_helpers.h)
310319
is adapted from [code](https://github.com/jax-ml/jax/blob/3d389a7fb440c412d95a1f70ffb91d58408247d0/jaxlib/kernel_nanobind_helpers.h)
311320
by the [JAX](https://github.com/jax-ml/jax) authors
312321
and licensed under a [Apache-2.0 license](https://github.com/jax-ml/jax/blob/3d389a7fb440c412d95a1f70ffb91d58408247d0/LICENSE).

0 commit comments

Comments
 (0)