Differentiable and accelerated spherical transforms with JAX
Project description
Differentiable and accelerated spherical transforms
S2FFT is a Python package for computing Fourier transforms on the sphere and rotation group using JAX and PyTorch. It leverages autodiff to provide differentiable transforms, which are also deployable on hardware accelerators (e.g. GPUs and TPUs).
More specifically, S2FFT provides support for spin spherical harmonic and Wigner transforms (for both real and complex signals), with support for adjoint transformations where needed, and comes with different optimisations (precompute or not) that one may select depending on available resources and desired angular resolution $L$.
As of version 1.0.2 S2FFT also provides PyTorch implementations of underlying precompute transforms. In future releases this support will be extended to our on-the-fly algorithms.
As of version 1.1.0 S2FFT also provides JAX support for existing C/C++ packages, specifically HEALPix and SSHT. This works by wrapping python bindings with custom JAX frontends. Note that currently this C/C++ to JAX interoperability is currently limited to CPU, however for many applications this is desirable due to memory constraints.
Documentation
Read the full documentation here.
Attribution
Should this code be used in any way, we kindly request that the following article is referenced. A BibTeX entry for this reference may look like:
@article{price:s2fft,
author = "Matthew A. Price and Jason D. McEwen",
title = "Differentiable and accelerated spherical harmonic and Wigner transforms",
journal = "Journal of Computational Physics",
year = "2023",
eprint = "arXiv:2311.14670"
}
You might also like to consider citing our related papers on which this code builds:
@article{mcewen:fssht,
author = "Jason D. McEwen and Yves Wiaux",
title = "A novel sampling theorem on the sphere",
journal = "IEEE Trans. Sig. Proc.",
year = "2011",
volume = "59",
number = "12",
pages = "5876--5887",
eprint = "arXiv:1110.6298",
doi = "10.1109/TSP.2011.2166394"
}
@article{mcewen:so3,
author = "Jason D. McEwen and Martin B{\"u}ttner and Boris ~Leistedt and Hiranya V. Peiris and Yves Wiaux",
title = "A novel sampling theorem on the rotation group",
journal = "IEEE Sig. Proc. Let.",
year = "2015",
volume = "22",
number = "12",
pages = "2425--2429",
eprint = "arXiv:1508.03101",
doi = "10.1109/LSP.2015.2490676"
}
License
We provide this code under an MIT open-source licence with the hope that it will be of use to a wider community.
Copyright 2023 Matthew Price, Jason McEwen and contributors.
S2FFT is free software made available under the MIT License. For details see the LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file s2fft-1.1.1.tar.gz
.
File metadata
- Download URL: s2fft-1.1.1.tar.gz
- Upload date:
- Size: 7.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b78190d9121e3e4326c22b83fab4cd6525d007ea0f0ac379386ad60ec611f53a |
|
MD5 | 0e710b3a89856888b202f92c592a9d81 |
|
BLAKE2b-256 | f7d9064305b04e78dd54f7cc1ff234ff6f48b64fe1c0a28898aadf913590c4e9 |
File details
Details for the file s2fft-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: s2fft-1.1.1-py3-none-any.whl
- Upload date:
- Size: 102.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cefd574d85089a9b60addaf685e701794b0c48c62bd1e1cc9527af8f765c6530 |
|
MD5 | 4c29945a56ddf325c09273d7e7b8ed5b |
|
BLAKE2b-256 | a57d22cbc08c76646e161058f44c84477dfb9b2d33ad5c7a7bbf0f602936dbce |