astro-informatics / s2fft Goto Github PK
View Code? Open in Web Editor NEWDifferentiable and accelerated spherical transforms with JAX
Home Page: https://astro-informatics.github.io/s2fft
License: MIT License
Differentiable and accelerated spherical transforms with JAX
Home Page: https://astro-informatics.github.io/s2fft
License: MIT License
Let's implement this stepwise, starting at the most simple (inefficient) implementation and then building up the to the more complicated (efficient) implementation. Steps should include the following:
Note the the full MW inverse transform with be considered in a separate issue (#17).
We should support Wigner transforms, i.e. Fourier transforms on SO(3), soon so that they can be used by s2wav
. In the first instance these can be pure Python and don't need to be JAX'ified.
There are various ways to do this but the simplest is to implement what is described in this paper (See Section V). Then we can just use the spin transforms already implemented and simply need to add an extra FFT over gamma.
Avoid using FFT in rings as a validation
At present not clear if modules are appearing in the documentation.
Also, let's deploy docs build from main to github branches. That will be public but that's not a problem.
JAX implementations no not necessarily run on the GPU. Our code should be device agnostic. So we should distinguish JAX or not. If a GPU is available JAX can run on that, otherwise it will run on a CPU. (Also, JAX can use TPUs, so we could potentially run on TPUs.)
Let's implement this stepwise, starting at the most simple (inefficient) implementation and then building up the to the more complicated (efficient) implementation. Steps should include the following:
At present we have a flip in the Wigner tests here when comparing the Turok slice approach to ssht. Why is that?
This may also relate to this comment in the docstring. We need to check the comment is correct (perhaps the ordering could be different).
I think we should adopt the MIT licence. We want this code to be very widely used so a permissible licence is probably best (rather than, e.g., GPL).
The operator method computes all m, m', for a given el and theta. There is no recurrsion over el. So the method is very well suited to acceleration.
See implementing in ssht here.
Currently the classifiers in setup.py
(weakly) suggest Python 3.6, 3.7 and 3.8 are supported
Lines 39 to 41 in 8ef91ce
while the tests are only run under Python 3.8 in the GitHub Actions continuous integration
s2fft/.github/workflows/tests.yml
Line 17 in 8ef91ce
Currently the tests fail when trying to run in a Python 3.6 environment (I think due to use of Python 3.7+ features in JAX) but do pass under Python 3.7.
I would suggest following NEP 29 in deciding which Python and NumPy versions to target, which would currently suggest supporting Python 3.8+ and NumPy 1.20+. It would be good to settle on a minimum version to target so we know what language features its safe to use.
The main concrete thing this would require changing is to add a python_requires
argument to setup
in the setup.py
script and making sure the Python version(s) we are testing against matches this.
We should double check we are consistent everywhere since in the 2d flm revisions we updated some of the healpix indexing to note that lmax = L - 1
.
Implement full MW inverse transform for complex signals. See naive implementations of #16 for comparisons.
Functions to compute vectors theta/phi in RING ordering.
Basically just install s2fft. No development really required for this but I thought I'd nevertheless capture this in an issue. Just shout if you have any problems or questions!
This would avoid the current L-1 offsets.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.