From e1341262420209935d1e679fa046c01cd85ce809 Mon Sep 17 00:00:00 2001
From: CosmoMatt <32554533+CosmoMatt@users.noreply.github.com>
Date: Tue, 27 Feb 2024 16:48:37 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20astro-in?=
=?UTF-8?q?formatics/s2fft@f17ac17c04466c9848d45e0d4b9005b3aa1460a3=20?=
=?UTF-8?q?=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.buildinfo | 2 +-
.../api/precompute_transforms/index.rst.txt | 16 +-
_sources/api/utility/index.rst.txt | 22 +-
_sources/api/utility/quadrature_torch.rst.txt | 7 +
_sources/api/utility/resampling_torch.rst.txt | 7 +
_sources/index.rst.txt | 4 +
_sources/tutorials/index.rst.txt | 1 +
.../torch_frontend/torch_frontend.nblink.txt | 3 +
_static/documentation_options.js | 2 +-
api/base_transforms/index.html | 32 +-
.../spin_spherical_transform.html | 32 +-
api/base_transforms/wigner_transform.html | 32 +-
api/index.html | 38 +-
api/precompute_transforms/construct.html | 38 +-
api/precompute_transforms/index.html | 64 +-
api/precompute_transforms/spin_spherical.html | 96 +-
api/precompute_transforms/wigner.html | 96 +-
api/recursions/index.html | 32 +-
api/recursions/price_mcewen.html | 32 +-
api/recursions/risbo.html | 32 +-
api/recursions/risbo_jax.html | 30 +-
api/recursions/trapani.html | 32 +-
api/recursions/turok.html | 32 +-
api/recursions/turok_jax.html | 32 +-
api/sampling/index.html | 32 +-
api/sampling/spherical_samples.html | 32 +-
api/sampling/wigner_samples.html | 32 +-
api/transforms/index.html | 32 +-
api/transforms/on_the_fly_recursions.html | 32 +-
api/transforms/spin_spherical_transform.html | 32 +-
api/transforms/wigner.html | 32 +-
api/utility/healpix_ffts.html | 141 ++-
api/utility/index.html | 66 +-
api/utility/logs.html | 32 +-
api/utility/quadrature.html | 38 +-
api/utility/quadrature_jax.html | 42 +-
api/utility/quadrature_torch.html | 851 ++++++++++++++++++
api/utility/resampling.html | 32 +-
api/utility/resampling_jax.html | 38 +-
api/utility/resampling_torch.html | 850 +++++++++++++++++
api/utility/rotation.html | 32 +-
api/utility/signal_generator.html | 38 +-
api/utility/utils.html | 32 +-
genindex.html | 112 ++-
index.html | 33 +-
objects.inv | Bin 6034 -> 6753 bytes
py-modindex.html | 40 +-
search.html | 30 +-
searchindex.js | 2 +-
tutorials/index.html | 31 +-
tutorials/rotation/rotation.html | 37 +-
.../spherical_harmonic_transform.html | 31 +-
tutorials/torch_frontend/torch_frontend.html | 679 ++++++++++++++
tutorials/torch_frontend/torch_frontend.ipynb | 170 ++++
tutorials/wigner/wigner_transform.html | 31 +-
user_guide/install.html | 30 +-
56 files changed, 4124 insertions(+), 232 deletions(-)
create mode 100644 _sources/api/utility/quadrature_torch.rst.txt
create mode 100644 _sources/api/utility/resampling_torch.rst.txt
create mode 100644 _sources/tutorials/torch_frontend/torch_frontend.nblink.txt
create mode 100644 api/utility/quadrature_torch.html
create mode 100644 api/utility/resampling_torch.html
create mode 100644 tutorials/torch_frontend/torch_frontend.html
create mode 100644 tutorials/torch_frontend/torch_frontend.ipynb
diff --git a/.buildinfo b/.buildinfo
index baacfc04..ea2d58d4 100644
--- a/.buildinfo
+++ b/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: d5cfbde0f5681c2a4849252cb24db821
+config: 8200bdad04fa182aadbb4e935d2e10d6
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/_sources/api/precompute_transforms/index.rst.txt b/_sources/api/precompute_transforms/index.rst.txt
index 6873383a..13b04726 100644
--- a/_sources/api/precompute_transforms/index.rst.txt
+++ b/_sources/api/precompute_transforms/index.rst.txt
@@ -11,17 +11,21 @@ Precompute Functions
* - Function Name
- Description
* - :func:`~s2fft.precompute_transforms.spherical.inverse`
- - Wrapper function around NumPy/JAX inverse methods
+ - Wrapper function around NumPy/JAX/Torch inverse methods
* - :func:`~s2fft.precompute_transforms.spherical.inverse_transform`
- Inverse spherical harmonic transform (NumPy)
* - :func:`~s2fft.precompute_transforms.spherical.inverse_transform_jax`
- Inverse spherical harmonic transform (JAX)
+ * - :func:`~s2fft.precompute_transforms.spherical.inverse_transform_torch`
+ - Inverse spherical harmonic transform (Torch)
* - :func:`~s2fft.precompute_transforms.spherical.forward`
- - Wrapper function around NumPy/JAX forward methods
+ - Wrapper function around NumPy/JAX/Torch forward methods
* - :func:`~s2fft.precompute_transforms.spherical.forward_transform`
- Forward spherical harmonic transform (NumPy)
* - :func:`~s2fft.precompute_transforms.spherical.forward_transform_jax`
- Forward spherical harmonic transform (JAX)
+ * - :func:`~s2fft.precompute_transforms.spherical.forward_transform_torch`
+ - Forward spherical harmonic transform (Torch)
.. list-table:: Wigner transforms.
:widths: 25 25
@@ -30,17 +34,21 @@ Precompute Functions
* - Function Name
- Description
* - :func:`~s2fft.precompute_transforms.wigner.inverse`
- - Wrapper function around NumPy/JAX inverse methods
+ - Wrapper function around NumPy/JAX/Torch inverse methods
* - :func:`~s2fft.precompute_transforms.wigner.inverse_transform`
- Inverse Wigner transform (NumPy)
* - :func:`~s2fft.precompute_transforms.wigner.inverse_transform_jax`
- Inverse Wigner transform (JAX)
+ * - :func:`~s2fft.precompute_transforms.wigner.inverse_transform_torch`
+ - Inverse Wigner transform (Torch)
* - :func:`~s2fft.precompute_transforms.wigner.forward`
- - Wrapper function around NumPy/JAX forward methods
+ - Wrapper function around NumPy/JAX/Torch forward methods
* - :func:`~s2fft.precompute_transforms.wigner.forward_transform`
- Forward Wigner transform (NumPy)
* - :func:`~s2fft.precompute_transforms.wigner.forward_transform_jax`
- Forward Wigner transform (JAX)
+ * - :func:`~s2fft.precompute_transforms.wigner.forward_transform_torch`
+ - Forward Wigner transform (Torch)
.. list-table:: Constructing Kernels for precompute transforms.
:widths: 25 25
diff --git a/_sources/api/utility/index.rst.txt b/_sources/api/utility/index.rst.txt
index a86f9db8..f5ca6065 100644
--- a/_sources/api/utility/index.rst.txt
+++ b/_sources/api/utility/index.rst.txt
@@ -16,20 +16,28 @@ Utility Functions
- Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (NumPy).
* - :func:`~s2fft.utils.healpix_ffts.healpix_ifft_jax`
- Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (JAX).
+ * - :func:`~s2fft.utils.healpix_ffts.healpix_ifft_torch`
+ - Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (Torch).
* - :func:`~s2fft.utils.healpix_ffts.healpix_fft`
- Wrapper function for the Forward Fast Fourier Transform with spectral back-projection in the polar regions to manually enforce Fourier periodicity.
* - :func:`~s2fft.utils.healpix_ffts.healpix_fft_numpy`
- Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (NumPy).
* - :func:`~s2fft.utils.healpix_ffts.healpix_fft_jax`
- - Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (NumPy).
+ - Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (JAX).
+ * - :func:`~s2fft.utils.healpix_ffts.healpix_fft_torch`
+ - Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (Torch).
* - :func:`~s2fft.utils.healpix_ffts.spectral_folding`
- Folds higher frequency Fourier coefficients back onto lower frequency coefficients (NumPy).
* - :func:`~s2fft.utils.healpix_ffts.spectral_folding_jax`
- Folds higher frequency Fourier coefficients back onto lower frequency coefficients (JAX).
+ * - :func:`~s2fft.utils.healpix_ffts.spectral_folding_torch`
+ - Folds higher frequency Fourier coefficients back onto lower frequency coefficients (Torch).
* - :func:`~s2fft.utils.healpix_ffts.spectral_periodic_extension`
- Extends lower frequency Fourier coefficients onto higher frequency coefficients (NumPy).
* - :func:`~s2fft.utils.healpix_ffts.spectral_periodic_extension_jax`
- Extends lower frequency Fourier coefficients onto higher frequency coefficients (JAX).
+ * - :func:`~s2fft.utils.healpix_ffts.spectral_periodic_extension_torch`
+ - Extends lower frequency Fourier coefficients onto higher frequency coefficients (Torch).
.. list-table:: Quadrature functions.
@@ -61,8 +69,9 @@ Utility Functions
.. note::
- JAX versions of these functions share an almost identical function trace and
- are simply accessed by the sub-module :func:`~s2fft.utils.quadrature_jax`.
+ JAX and Torch versions of these functions share an almost identical function trace and
+ are simply accessed by the sub-modules :func:`~s2fft.utils.quadrature_jax` and
+ :func:`~s2fft.utils.quadrature_torch` respectively.
.. list-table:: Periodic resampling functions
:widths: 25 25
@@ -102,8 +111,9 @@ Utility Functions
.. note::
- JAX versions of these functions share an almost identical function trace and
- are simply accessed by the sub-module :func:`~s2fft.utils.resampling_jax`.
+ JAX and Torch versions of these functions share an almost identical function trace and
+ are simply accessed by the sub-modules :func:`~s2fft.utils.resampling_jax` and
+ :func:`~s2fft.utils.resampling_torch` respectively.
.. list-table:: Rotation functions
:widths: 25 25
@@ -124,8 +134,10 @@ Utility Functions
signal_generator
resampling
resampling_jax
+ resampling_torch
quadrature
quadrature_jax
+ quadrature_torch
healpix_ffts
utils
rotation
diff --git a/_sources/api/utility/quadrature_torch.rst.txt b/_sources/api/utility/quadrature_torch.rst.txt
new file mode 100644
index 00000000..7090094f
--- /dev/null
+++ b/_sources/api/utility/quadrature_torch.rst.txt
@@ -0,0 +1,7 @@
+:html_theme.sidebar_secondary.remove:
+
+**************************
+quadrature_torch
+**************************
+.. automodule:: s2fft.utils.quadrature_torch
+ :members:
\ No newline at end of file
diff --git a/_sources/api/utility/resampling_torch.rst.txt b/_sources/api/utility/resampling_torch.rst.txt
new file mode 100644
index 00000000..4720cc62
--- /dev/null
+++ b/_sources/api/utility/resampling_torch.rst.txt
@@ -0,0 +1,7 @@
+:html_theme.sidebar_secondary.remove:
+
+**************************
+resampling_torch
+**************************
+.. automodule:: s2fft.utils.resampling_torch
+ :members:
\ No newline at end of file
diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt
index fd8a6614..9271b3e0 100644
--- a/_sources/index.rst.txt
+++ b/_sources/index.rst.txt
@@ -10,6 +10,10 @@ transforms (for both real and complex signals), with support for adjoint transfo
where needed, and comes with different optimisations (precompute or not) that one
may select depending on available resources and desired angular resolution :math:`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.
+
Algorithms |:zap:|
-------------------
diff --git a/_sources/tutorials/index.rst.txt b/_sources/tutorials/index.rst.txt
index 80c5ce69..12ce7955 100644
--- a/_sources/tutorials/index.rst.txt
+++ b/_sources/tutorials/index.rst.txt
@@ -68,3 +68,4 @@ the case for many other methods that scale linearly with spin).
spherical_harmonic/spherical_harmonic_transform.nblink
wigner/wigner_transform.nblink
rotation/rotation.nblink
+ torch_frontend/torch_frontend.nblink
diff --git a/_sources/tutorials/torch_frontend/torch_frontend.nblink.txt b/_sources/tutorials/torch_frontend/torch_frontend.nblink.txt
new file mode 100644
index 00000000..4509676c
--- /dev/null
+++ b/_sources/tutorials/torch_frontend/torch_frontend.nblink.txt
@@ -0,0 +1,3 @@
+{
+ "path": "../../../notebooks/torch_frontend.ipynb"
+}
\ No newline at end of file
diff --git a/_static/documentation_options.js b/_static/documentation_options.js
index d94acc6b..e15aace2 100644
--- a/_static/documentation_options.js
+++ b/_static/documentation_options.js
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
- VERSION: '1.0.1',
+ VERSION: '1.0.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/api/base_transforms/index.html b/api/base_transforms/index.html
index 398635ce..ce5bdbaf 100644
--- a/api/base_transforms/index.html
+++ b/api/base_transforms/index.html
@@ -8,7 +8,7 @@
-
Reference Transforms — S2FFT 1.0.1 documentation
+ Reference Transforms — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/base_transforms/spin_spherical_transform.html b/api/base_transforms/spin_spherical_transform.html
index 5cf7d4c9..54bccbe7 100644
--- a/api/base_transforms/spin_spherical_transform.html
+++ b/api/base_transforms/spin_spherical_transform.html
@@ -8,7 +8,7 @@
- Spherical Harmonic Transform — S2FFT 1.0.1 documentation
+ Spherical Harmonic Transform — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/base_transforms/wigner_transform.html b/api/base_transforms/wigner_transform.html
index 9490b504..5ae5018d 100644
--- a/api/base_transforms/wigner_transform.html
+++ b/api/base_transforms/wigner_transform.html
@@ -8,7 +8,7 @@
- Wigner Transform — S2FFT 1.0.1 documentation
+ Wigner Transform — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/index.html b/api/index.html
index 0820e33c..df5edb82 100644
--- a/api/index.html
+++ b/api/index.html
@@ -8,7 +8,7 @@
- API — S2FFT 1.0.1 documentation
+ API — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -53,7 +53,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -517,12 +541,12 @@ API
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -530,7 +554,7 @@
-s2fft.precompute_transforms.construct. spin_spherical_kernel ( L : int , spin : int = 0 , reality : bool = False , sampling : str = 'mw' , nside : int | None = None , forward : bool = False )
+s2fft.precompute_transforms.construct. spin_spherical_kernel ( L : int , spin : int = 0 , reality : bool = False , sampling : str = 'mw' , nside : int | None = None , forward : bool = False , using_torch : bool = False )
Precompute the wigner-d kernel for spin-spherical transform. This can be
drastically faster but comes at a \(\mathcal{O}(L^3)\) memory overhead, making
it infeasible for \(L\geq 512\) .
@@ -548,6 +572,7 @@
if sampling=”healpix”.
forward (bool , optional ) – Whether to provide forward or inverse shift.
Defaults to False.
+using_torch (bool , optional ) – Desired frontend functionality. Defaults to False.
Returns:
@@ -592,7 +617,7 @@
-s2fft.precompute_transforms.construct. wigner_kernel ( L : int , N : int , reality : bool = False , sampling : str = 'mw' , nside : int | None = None , forward : bool = False )
+s2fft.precompute_transforms.construct. wigner_kernel ( L : int , N : int , reality : bool = False , sampling : str = 'mw' , nside : int | None = None , forward : bool = False , using_torch : bool = False )
Precompute the wigner-d kernels required for a Wigner transform. This can be
drastically faster but comes at a \(\mathcal{O}(NL^3)\) memory overhead, making
it infeasible for \(L \geq 512\) .
@@ -610,6 +635,7 @@
if sampling=”healpix”.
forward (bool , optional ) – Whether to provide forward or inverse shift.
Defaults to False.
+using_torch (bool , optional ) – Desired frontend functionality. Defaults to False.
Returns:
diff --git a/api/precompute_transforms/index.html b/api/precompute_transforms/index.html
index c25333f9..9e2e9a51 100644
--- a/api/precompute_transforms/index.html
+++ b/api/precompute_transforms/index.html
@@ -8,7 +8,7 @@
- Precompute Functions — S2FFT 1.0.1 documentation
+ Precompute Functions — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -514,7 +538,7 @@ Precompute Functions
@@ -546,7 +576,7 @@ Precompute Functions
diff --git a/api/precompute_transforms/spin_spherical.html b/api/precompute_transforms/spin_spherical.html
index f89c4d5f..17ffcc59 100644
--- a/api/precompute_transforms/spin_spherical.html
+++ b/api/precompute_transforms/spin_spherical.html
@@ -8,7 +8,7 @@
- Spherical Harmonic Transform — S2FFT 1.0.1 documentation
+ Spherical Harmonic Transform — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -520,7 +544,8 @@ Spherical Harmonic Transform
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -525,7 +549,8 @@
reality (bool , optional ) – Whether the signal on the sphere is real. If so,
conjugate symmetry is exploited to reduce computational costs.
Defaults to False.
-method (str , optional ) – Execution mode in {“numpy”, “jax”}. Defaults to “jax”.
+method (str , optional ) – Execution mode in {“numpy”, “jax”, “torch”}.
+Defaults to “jax”.
nside (int ) – HEALPix Nside resolution parameter. Only required
if sampling=”healpix”.
@@ -606,6 +631,35 @@
+
+
+s2fft.precompute_transforms.wigner. forward_transform_torch ( f : tensor , kernel : tensor , L : int , N : int , sampling : str , reality : bool , nside : int ) → tensor
+Compute the forward Wigner transform, i.e. Fourier transform on
+\(SO(3)\) .
+
+Parameters:
+
+f (torch.tensor ) – Signal on the sphere.
+kernel (torch.tensor ) – Wigner-d kernel.
+L (int ) – Harmonic band-limit.
+N (int ) – Directional band-limit.
+sampling (str ) – Sampling scheme. Supported sampling schemes include
+{“mw”, “mwss”, “dh”, “healpix”}.
+reality (bool , optional ) – Whether the signal on the sphere is real. If so,
+conjugate symmetry is exploited to reduce computational costs.
+nside (int ) – HEALPix Nside resolution parameter. Only required
+if sampling=”healpix”.
+
+
+Returns:
+Wigner space coefficients.
+
+Return type:
+torch.tensor
+
+
+
+
s2fft.precompute_transforms.wigner. inverse ( flmn : ndarray , L : int , N : int , kernel : ndarray | None = None , sampling : str = 'mw' , reality : bool = False , method : str = 'jax' , nside : int | None = None ) → ndarray
@@ -623,7 +677,8 @@
reality (bool , optional ) – Whether the signal on the sphere is real. If so,
conjugate symmetry is exploited to reduce computational costs.
Defaults to False.
-method (str , optional ) – Execution mode in {“numpy”, “jax”}. Defaults to “jax”.
+method (str , optional ) – Execution mode in {“numpy”, “jax”, “torch”}.
+Defaults to “jax”.
nside (int ) – HEALPix Nside resolution parameter. Only required
if sampling=”healpix”.
@@ -706,6 +761,35 @@
+
+
+s2fft.precompute_transforms.wigner. inverse_transform_torch ( flmn : tensor , kernel : tensor , L : int , N : int , sampling : str , reality : bool , nside : int ) → tensor
+Compute the inverse Wigner transform, i.e. inverse Fourier transform on
+\(SO(3)\) .
+
+Parameters:
+
+flmn (torch.tensor ) – Wigner coefficients with shape \([2N-1, L, 2L-1]\) .
+kernel (torch.tensor ) – Wigner-d kernel.
+L (int ) – Harmonic band-limit.
+N (int ) – Directional band-limit.
+sampling (str ) – Sampling scheme. Supported sampling schemes include
+{“mw”, “mwss”, “dh”, “healpix”}.
+reality (bool , optional ) – Whether the signal on the sphere is real. If so,
+conjugate symmetry is exploited to reduce computational costs.
+nside (int ) – HEALPix Nside resolution parameter. Only required
+if sampling=”healpix”.
+
+
+Returns:
+Pixel-space coefficients.
+
+Return type:
+torch.tensor
+
+
+
+
diff --git a/api/recursions/index.html b/api/recursions/index.html
index 1759d114..46b2c924 100644
--- a/api/recursions/index.html
+++ b/api/recursions/index.html
@@ -8,7 +8,7 @@
- Wigner-d recursions — S2FFT 1.0.1 documentation
+ Wigner-d recursions — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/recursions/price_mcewen.html b/api/recursions/price_mcewen.html
index 9a852d39..04f60c1e 100644
--- a/api/recursions/price_mcewen.html
+++ b/api/recursions/price_mcewen.html
@@ -8,7 +8,7 @@
- Price & McEwen — S2FFT 1.0.1 documentation
+ Price & McEwen — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/recursions/risbo.html b/api/recursions/risbo.html
index bbb85d2c..811081ca 100644
--- a/api/recursions/risbo.html
+++ b/api/recursions/risbo.html
@@ -8,7 +8,7 @@
- Risbo — S2FFT 1.0.1 documentation
+ Risbo — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/recursions/risbo_jax.html b/api/recursions/risbo_jax.html
index dd80f3d2..d44036fc 100644
--- a/api/recursions/risbo_jax.html
+++ b/api/recursions/risbo_jax.html
@@ -8,7 +8,7 @@
- Risbo JAX — S2FFT 1.0.1 documentation
+ Risbo JAX — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
diff --git a/api/recursions/trapani.html b/api/recursions/trapani.html
index 8c020456..4eb86541 100644
--- a/api/recursions/trapani.html
+++ b/api/recursions/trapani.html
@@ -8,7 +8,7 @@
- Trapani — S2FFT 1.0.1 documentation
+ Trapani — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/recursions/turok.html b/api/recursions/turok.html
index 416fddfe..ad89f0fa 100644
--- a/api/recursions/turok.html
+++ b/api/recursions/turok.html
@@ -8,7 +8,7 @@
- Turok & Bucher — S2FFT 1.0.1 documentation
+ Turok & Bucher — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/recursions/turok_jax.html b/api/recursions/turok_jax.html
index 090c5e4e..a1d2c860 100644
--- a/api/recursions/turok_jax.html
+++ b/api/recursions/turok_jax.html
@@ -8,7 +8,7 @@
- Turok & Bucher JAX — S2FFT 1.0.1 documentation
+ Turok & Bucher JAX — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/sampling/index.html b/api/sampling/index.html
index e4242e57..f4feaf9e 100644
--- a/api/sampling/index.html
+++ b/api/sampling/index.html
@@ -8,7 +8,7 @@
- Sampling Functions — S2FFT 1.0.1 documentation
+ Sampling Functions — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/sampling/spherical_samples.html b/api/sampling/spherical_samples.html
index fbf7cc59..5c5de001 100644
--- a/api/sampling/spherical_samples.html
+++ b/api/sampling/spherical_samples.html
@@ -8,7 +8,7 @@
- Spherical samples — S2FFT 1.0.1 documentation
+ Spherical samples — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/sampling/wigner_samples.html b/api/sampling/wigner_samples.html
index ad7c46fc..235231b5 100644
--- a/api/sampling/wigner_samples.html
+++ b/api/sampling/wigner_samples.html
@@ -8,7 +8,7 @@
- Wigner samples — S2FFT 1.0.1 documentation
+ Wigner samples — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/transforms/index.html b/api/transforms/index.html
index 82fe51f0..8e628d89 100644
--- a/api/transforms/index.html
+++ b/api/transforms/index.html
@@ -8,7 +8,7 @@
- Transforms — S2FFT 1.0.1 documentation
+ Transforms — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/transforms/on_the_fly_recursions.html b/api/transforms/on_the_fly_recursions.html
index 337af397..bbd9b7f7 100644
--- a/api/transforms/on_the_fly_recursions.html
+++ b/api/transforms/on_the_fly_recursions.html
@@ -8,7 +8,7 @@
- On-the-fly (OTF) recursions — S2FFT 1.0.1 documentation
+ On-the-fly (OTF) recursions — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/transforms/spin_spherical_transform.html b/api/transforms/spin_spherical_transform.html
index e72fbb4e..60a0b04b 100644
--- a/api/transforms/spin_spherical_transform.html
+++ b/api/transforms/spin_spherical_transform.html
@@ -8,7 +8,7 @@
- Spherical Harmonic Transform — S2FFT 1.0.1 documentation
+ Spherical Harmonic Transform — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/transforms/wigner.html b/api/transforms/wigner.html
index 6634deb4..68699f53 100644
--- a/api/transforms/wigner.html
+++ b/api/transforms/wigner.html
@@ -8,7 +8,7 @@
- Wigner Transform — S2FFT 1.0.1 documentation
+ Wigner Transform — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/utility/healpix_ffts.html b/api/utility/healpix_ffts.html
index 18c6c83f..411dcf21 100644
--- a/api/utility/healpix_ffts.html
+++ b/api/utility/healpix_ffts.html
@@ -8,7 +8,7 @@
- healpix functions — S2FFT 1.0.1 documentation
+ healpix functions — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -517,7 +541,7 @@
f (np.ndarray ) – HEALPix pixel-space array.
L (int ) – Harmonic band-limit.
nside (int ) – HEALPix Nside resolution parameter.
-method (str , optional ) – Evaluation method in {“numpy”, “jax”}.
+
method (str , optional ) – Evaluation method in {“numpy”, “jax”, “torch”}.
Defaults to “numpy”.
reality (bool ) – Whether the signal on the sphere is real. If so,
conjugate symmetry is exploited to reduce computational costs.
@@ -525,7 +549,7 @@
Raises:
-ValueError – Deployment method not in {“numpy”, “jax”}.
+ValueError – Deployment method not in {“numpy”, “jax”, “torch”}.
Returns:
Array of Fourier coefficients for all latitudes.
@@ -586,6 +610,31 @@
+
+
+s2fft.utils.healpix_ffts. healpix_fft_torch ( f : tensor , L : int , nside : int , reality : bool ) → tensor
+Computes the Forward Fast Fourier Transform with spectral back-projection
+in the polar regions to manually enforce Fourier periodicity. Torch specific
+implementation of healpix_fft_numpy()
.
+
+Parameters:
+
+f (torch.tensor ) – HEALPix pixel-space array.
+L (int ) – Harmonic band-limit.
+nside (int ) – HEALPix Nside resolution parameter.
+reality (bool ) – Whether the signal on the sphere is real. If so,
+conjugate symmetry is exploited to reduce computational costs.
+
+
+Returns:
+Array of Fourier coefficients for all latitudes.
+
+Return type:
+torch.tensor
+
+
+
+
s2fft.utils.healpix_ffts. healpix_ifft ( ftm : ndarray , L : int , nside : int , method : str = 'numpy' , reality : bool = False ) → ndarray
@@ -597,7 +646,7 @@
ftm (np.ndarray ) – Array of Fourier coefficients for all latitudes.
L (int ) – Harmonic band-limit.
nside (int ) – HEALPix Nside resolution parameter.
-method (str , optional ) – Evaluation method in {“numpy”, “jax”}.
+
method (str , optional ) – Evaluation method in {“numpy”, “jax”, “torch”}.
Defaults to “numpy”.
reality (bool ) – Whether the signal on the sphere is real. If so,
conjugate symmetry is exploited to reduce computational costs.
@@ -605,7 +654,7 @@
Raises:
-ValueError – Deployment method not in {“numpy”, “jax”}.
+ValueError – Deployment method not in {“numpy”, “jax”, “torch”}.
Returns:
HEALPix pixel-space array.
@@ -665,6 +714,31 @@
+
+
+s2fft.utils.healpix_ffts. healpix_ifft_torch ( ftm : tensor , L : int , nside : int , reality : bool ) → tensor
+Computes the Inverse Fast Fourier Transform with spectral folding in the polar
+regions to mitigate aliasing. Torch specific implementation of
+healpix_ifft_numpy()
.
+
+Parameters:
+
+ftm (torch.tensor ) – Array of Fourier coefficients for all latitudes.
+L (int ) – Harmonic band-limit.
+nside (int ) – HEALPix Nside resolution parameter.
+reality (bool ) – Whether the signal on the sphere is real. If so,
+conjugate symmetry is exploited to reduce computational costs.
+
+
+Returns:
+HEALPix pixel-space array.
+
+Return type:
+torch.tensor
+
+
+
+
s2fft.utils.healpix_ffts. p2phi_rings ( t : ndarray , nside : int ) → ndarray
@@ -803,6 +877,29 @@
+
+
+s2fft.utils.healpix_ffts. spectral_folding_torch ( fm : tensor , nphi : int , L : int ) → tensor
+Folds higher frequency Fourier coefficients back onto lower frequency
+coefficients, i.e. aliasing high frequencies. Torch specific implementation of
+spectral_folding()
.
+
+Parameters:
+
+fm (torch.tensor ) – Slice of Fourier coefficients corresponding to ring at latitute t.
+nphi (int ) – Total number of pixel space phi samples for latitude t.
+L (int ) – Harmonic band-limit.
+
+
+Returns:
+Lower resolution set of aliased Fourier coefficients.
+
+Return type:
+torch.tensor
+
+
+
+
s2fft.utils.healpix_ffts. spectral_periodic_extension ( fm : ndarray , nphi : int , L : int ) → ndarray
@@ -847,6 +944,28 @@
+
+
+s2fft.utils.healpix_ffts. spectral_periodic_extension_torch ( fm : tensor , L : int ) → tensor
+Extends lower frequency Fourier coefficients onto higher frequency
+coefficients, i.e. imposed periodicity in Fourier space. Based on
+spectral_periodic_extension()
.
+
+Parameters:
+
+
+Returns:
+Higher resolution set of periodic Fourier coefficients.
+
+Return type:
+torch.tensor
+
+
+
+
@@ -860,12 +979,12 @@
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -524,14 +548,20 @@ Utility Functionshealpix_ifft_jax()
Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (JAX).
-healpix_fft()
+healpix_ifft_torch()
+Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (Torch).
+
+healpix_fft()
Wrapper function for the Forward Fast Fourier Transform with spectral back-projection in the polar regions to manually enforce Fourier periodicity.
-healpix_fft_numpy()
+healpix_fft_numpy()
Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (NumPy).
-healpix_fft_jax()
-Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (NumPy).
+healpix_fft_jax()
+Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (JAX).
+
+healpix_fft_torch()
+Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (Torch).
spectral_folding()
Folds higher frequency Fourier coefficients back onto lower frequency coefficients (NumPy).
@@ -539,12 +569,18 @@ Utility Functionsspectral_folding_jax()
Folds higher frequency Fourier coefficients back onto lower frequency coefficients (JAX).
-spectral_periodic_extension()
+spectral_folding_torch()
+Folds higher frequency Fourier coefficients back onto lower frequency coefficients (Torch).
+
+spectral_periodic_extension()
Extends lower frequency Fourier coefficients onto higher frequency coefficients (NumPy).
-spectral_periodic_extension_jax()
+spectral_periodic_extension_jax()
Extends lower frequency Fourier coefficients onto higher frequency coefficients (JAX).
+spectral_periodic_extension_torch()
+Extends lower frequency Fourier coefficients onto higher frequency coefficients (Torch).
+
@@ -593,8 +629,9 @@ Utility Functions
Periodic resampling functions
@@ -659,8 +696,9 @@ Utility Functions
Rotation functions
diff --git a/api/utility/logs.html b/api/utility/logs.html
index 4d787b87..c5ff64e5 100644
--- a/api/utility/logs.html
+++ b/api/utility/logs.html
@@ -8,7 +8,7 @@
- logs — S2FFT 1.0.1 documentation
+ logs — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -135,8 +135,8 @@
-
-
+
+
@@ -228,6 +228,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -361,6 +372,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -433,8 +455,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/utility/quadrature.html b/api/utility/quadrature.html
index 0cefd6f8..598a2fed 100644
--- a/api/utility/quadrature.html
+++ b/api/utility/quadrature.html
@@ -8,7 +8,7 @@
- quadrature — S2FFT 1.0.1 documentation
+ quadrature — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -748,12 +772,12 @@
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -661,7 +685,7 @@
Weights computed for each \(\theta\) .
Return type:
-np.ndarray
+jnp.ndarray
@@ -704,7 +728,7 @@
Weights computed for each \(\theta\) .
Return type:
-np.ndarray
+jnp.ndarray
@@ -763,11 +787,11 @@
next
-
healpix functions
+
quadrature_torch
diff --git a/api/utility/quadrature_torch.html b/api/utility/quadrature_torch.html
new file mode 100644
index 00000000..3258daf3
--- /dev/null
+++ b/api/utility/quadrature_torch.html
@@ -0,0 +1,851 @@
+
+
+
+
+
+
+
+
+
+
+ quadrature_torch — S2FFT 1.0.2 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+quadrature_torch
+
+
+s2fft.utils.quadrature_torch. mw_weights ( m : int ) → float
+Compute MW weights given as a function of index m.
+MW weights are defined by
+
+\[w(m^\prime) = \int_0^\pi \text{d} \theta \sin \theta \exp(i m^\prime\theta),\]
+which can be computed analytically.
+
+Parameters:
+m (int ) – Harmonic weight index.
+
+Returns:
+MW weight.
+
+Return type:
+float
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weight_dh_theta_only ( theta : float , L : int ) → float
+Compute DH quadrature weight for \(\theta\) integration (only), for given
+\(\theta\) . Torch implementation of s2fft.quadrature.quad_weights_dh_theta_only()
.
+
+Parameters:
+
+
+Returns:
+Weight computed for each \(\theta\) .
+
+Return type:
+float
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights ( L : int | None = None , sampling : str = 'mw' , nside : int | None = None ) → tensor
+Compute quadrature weights for \(\theta\) and \(\phi\)
+integration for various sampling schemes. Torch implementation of
+quad_weights()
.
+
+Parameters:
+
+L (int , optional ) – Harmonic band-limit. Required if sampling not healpix.
+Defaults to None.
+sampling (str , optional ) – Sampling scheme. Supported sampling schemes include
+{“mw”, “mwss”, “dh”, “healpix”}. Defaults to “mw”.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+nside (int , optional ) – HEALPix Nside resolution parameter. Only required
+if sampling=”healpix”. Defaults to None.
+
+
+Raises:
+ValueError – Invalid sampling scheme.
+
+Returns:
+Quadrature weights for sampling scheme for each \(\theta\)
+(weights are identical as \(\phi\) varies for given \(\theta\) ).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_dh ( L : int ) → tensor
+Compute DH quadrature weights for \(\theta\) and \(\phi\) integration.
+Torch implementation of s2fft.quadrature.quad_weights_dh()
.
+
+Parameters:
+L (int ) – Harmonic band-limit.
+
+Returns:
+Weights computed for each \(\theta\) (weights are identical
+as \(\phi\) varies for given \(\theta\) ).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_hp ( nside : int ) → tensor
+Compute HEALPix quadrature weights for \(\theta\) and \(\phi\)
+integration. Torch implementation of s2fft.quadrature.quad_weights_hp()
.
+
+
Note
+
HEALPix weights are identical for all pixels. Nevertheless, an array of
+weights is returned (with identical values) for consistency of interface
+across other sampling schemes.
+
+
+Parameters:
+nside (int ) – HEALPix Nside resolution parameter.
+
+Returns:
+Weights computed for each \(\theta\) (all weights in array are
+identical).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_mw ( L : int ) → tensor
+Compute MW quadrature weights for \(\theta\) and \(\phi\) integration.
+Torch implementation of s2fft.quadrature.quad_weights_mw()
.
+
+Parameters:
+
+
+Returns:
+Weights computed for each \(\theta\) (weights are identical
+as \(\phi\) varies for given \(\theta\) ).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_mw_theta_only ( L : int ) → tensor
+Compute MW quadrature weights for \(\theta\) integration (only).
+Torch implementation of s2fft.quadrature.quad_weights_mw_theta_only()
.
+
+Parameters:
+
+
+Returns:
+Weights computed for each \(\theta\) .
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_mwss ( L : int ) → tensor
+Compute MWSS quadrature weights for \(\theta\) and \(\phi\) integration.
+JAX implementation of s2fft.quadrature.quad_weights_mwss()
.
+
+Parameters:
+
+
+Returns:
+Weights computed for each \(\theta\) (weights are identical
+as \(\phi\) varies for given \(\theta\) ).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_mwss_theta_only ( L : int ) → tensor
+Compute MWSS quadrature weights for \(\theta\) integration (only).
+Torch implementation of s2fft.quadrature.quad_weights_mwss_theta_only()
.
+
+Parameters:
+
+
+Returns:
+Weights computed for each \(\theta\) .
+
+Return type:
+np.ndarray
+
+
+
+
+
+
+s2fft.utils.quadrature_torch. quad_weights_transform ( L : int , sampling : str = 'mwss' , nside : int = 0 ) → tensor
+Compute quadrature weights for \(\theta\) and \(\phi\)
+integration to use in transform for various sampling schemes. Torch implementation of
+quad_weights_transform()
.
+Quadrature weights to use in transform for MWSS correspond to quadrature weights
+are twice the base resolution, i.e. 2 * L.
+
+Parameters:
+
+L (int ) – Harmonic band-limit.
+sampling (str , optional ) – Sampling scheme. Supported sampling schemes include
+{“mwss”, “dh”, “healpix}. Defaults to “mwss”.
+nside (int , optional ) – HEALPix Nside resolution parameter. Only required
+if sampling=”healpix”. Defaults to None.
+
+
+Raises:
+ValueError – Invalid sampling scheme.
+
+Returns:
+Quadrature weights to use in transform for sampling scheme for
+each \(\theta\) (weights are identical as \(\phi\) varies for given
+\(\theta\) ).
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/utility/resampling.html b/api/utility/resampling.html
index 5fa3ae29..72655976 100644
--- a/api/utility/resampling.html
+++ b/api/utility/resampling.html
@@ -8,7 +8,7 @@
- resampling — S2FFT 1.0.1 documentation
+ resampling — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/utility/resampling_jax.html b/api/utility/resampling_jax.html
index a42f2049..a4e656e6 100644
--- a/api/utility/resampling_jax.html
+++ b/api/utility/resampling_jax.html
@@ -8,7 +8,7 @@
- resampling_jax — S2FFT 1.0.1 documentation
+ resampling_jax — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -54,7 +54,7 @@
-
+
@@ -138,8 +138,8 @@
-
-
+
+
@@ -231,6 +231,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -364,6 +375,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -436,8 +458,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -762,11 +786,11 @@
next
-
quadrature
+
resampling_torch
diff --git a/api/utility/resampling_torch.html b/api/utility/resampling_torch.html
new file mode 100644
index 00000000..aad4b39a
--- /dev/null
+++ b/api/utility/resampling_torch.html
@@ -0,0 +1,850 @@
+
+
+
+
+
+
+
+
+
+
+ resampling_torch — S2FFT 1.0.2 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+resampling_torch
+
+
+s2fft.utils.resampling_torch. mw_to_mwss ( f_mw : tensor , L : int , spin : int = 0 ) → tensor
+Convert signal on the sphere from MW sampling to MWSS sampling.
+Conversion is performed by first performing a period extension in
+\(\theta\) to \(2\pi\) , followed by zero padding in harmonic space. The
+resulting signal is then unextend back to the \(\theta\) domain of
+\([0,\pi]\) . Second, zero padding in harmonic space corresponding to
+\(\phi\) is performed.
+Torch implementation of mw_to_mwss()
.
+
+Parameters:
+
+f_mw (torch.tensor ) – Signal on the sphere sampled with MW sampling.
+L (int ) – Harmonic band-limit.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+
+
+Returns:
+Signal on the sphere sampled with MWSS sampling.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. mw_to_mwss_phi ( f_mw : tensor , L : int ) → tensor
+Convert \(\phi\) component of signal on the sphere from MW sampling to
+MWSS sampling.
+Conversion is performed by zero padding in harmonic space.
+Torch implementation of mw_to_mwss_phi()
.
+
+
Note
+
Can work with arbitrary number of \(\theta\) samples. Hence, to convert
+both \((\theta,\phi)\) sampling to MWSS, can use mw_to_mwss_theta()
+to first convert \(\theta\) sampling before using this function to convert
+the \(\phi\) sampling.
+
+
+Parameters:
+
+
+Raises:
+ValueError – Input spherical signal must have number of samples in \(\phi\)
+ matching MW sampling.
+
+Returns:
+Signal on the sphere with MWSS sampling in \(\phi\) and
+sampling in \(\theta\) of the input signal.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. mw_to_mwss_theta ( f_mw : tensor , L : int , spin : int = 0 ) → tensor
+Convert \(\theta\) component of signal on the sphere from MW sampling to
+MWSS sampling.
+Conversion is performed by first performing a period extension in
+\(\theta\) to \(2\pi\) , followed by zero padding in harmonic space. The
+resulting signal is then unextend back to the \(\theta\) domain of
+\([0,\pi]\) .
+Torch implementation of mw_to_mwss_theta()
.
+
+Parameters:
+
+f_mw (torch.tensor ) – Signal on the sphere sampled with MW sampling.
+L (int ) – Harmonic band-limit.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+
+
+Raises:
+ValueError – Input spherical signal must have shape matching MW sampling.
+
+Returns:
+Signal on the sphere with MWSS sampling in \(\theta\) and MW
+sampling in \(\phi\) .
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. periodic_extension ( f : tensor , L : int , spin : int = 0 , sampling : str = 'mw' ) → tensor
+Perform period extension of MW/MWSS signal on the sphere in harmonic
+domain, extending \(\theta\) domain from \([0,\pi]\) to \([0,2\pi]\) .
+Torch implementation of periodic_extension()
.
+
+Parameters:
+
+f (torch.tensor ) – Signal on the sphere sampled with MW/MWSS sampling scheme.
+L (int ) – Harmonic band-limit.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+sampling (str , optional ) – Sampling scheme. Supported sampling schemes include
+{“mw”, “mwss”}. Defaults to “mw”.
+
+
+Raises:
+ValueError – Only MW/MWW sampling schemes supported.
+
+Returns:
+Signal on the sphere extended to \(\theta\) domain
+\([0,2\pi]\) , in same scheme (MW/MWSS) as input.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. periodic_extension_spatial_mwss ( f : tensor , L : int , spin : int = 0 ) → tensor
+Perform period extension of MWSS signal on the sphere in spatial domain,
+extending \(\theta\) domain from \([0,\pi]\) to \([0,2\pi]\) .
+For the MWSS sampling scheme, it is possible to do the period extension in
+\(\theta\) in the spatial domain. This is not possible for the MW sampling
+scheme.
+Torch implementation of periodic_extension_spatial_mwss()
.
+
+Parameters:
+
+f (torch.tensor ) – Signal on the sphere sampled with MWSS sampling scheme.
+L (int ) – Harmonic band-limit.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+
+
+Returns:
+Signal on the sphere extended to \(\theta\) domain
+\([0,2\pi]\) , in MWSS sampling scheme.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. unextend ( f_ext : tensor , L : int , sampling : str = 'mw' ) → tensor
+Unextend MW/MWSS sampled signal from \(\theta\) domain
+\([0,2\pi]\) to \([0,\pi]\) .
+
+Parameters:
+
+f_ext (torch.tensor ) – Signal on the sphere sampled on extended \(\theta\)
+domain \([0,2\pi]\) .
+L (int ) – Harmonic band-limit.
+sampling (str , optional ) – Sampling scheme. Supported sampling schemes include
+{“mw”, “mwss”}. Defaults to “mw”.
+
+
+Raises:
+
+
+Returns:
+Signal on the sphere sampled on \(\theta\) domain
+\([0,\pi]\) .
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. upsample_by_two_mwss ( f : tensor , L : int , spin : int = 0 ) → tensor
+Upsample MWSS sampled signal on the sphere defined on domain \([0,\pi]\)
+by a factor of two.
+Upsampling is performed by a periodic extension in \(\theta\) to
+\([0,2\pi]\) , followed by zero-padding in harmonic space, followed by
+unextending \(\theta\) domain back to \([0,\pi]\) .
+Torch implementation of upsample_by_two_mwss()
.
+
+Parameters:
+
+f (torch.tensor ) – Signal on the sphere sampled with MWSS sampling scheme, sampled
+at resolution L.
+L (int ) – Harmonic band-limit.
+spin (int , optional ) – Harmonic spin. Defaults to 0.
+
+
+Returns:
+Signal on the sphere sampled with MWSS sampling scheme, sampling at
+resolution 2*L.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+s2fft.utils.resampling_torch. upsample_by_two_mwss_ext ( f_ext : tensor , L : int ) → tensor
+Upsample an extended MWSS sampled signal on the sphere defined on domain
+\([0,2\pi]\) by a factor of two.
+Upsampling is performed by zero-padding in harmonic space. Torch implementation of
+upsample_by_two_mwss_ext()
.
+
+Parameters:
+
+f_ext (torch.tensor ) – Signal on the sphere sampled on extended MWSS sampling
+scheme on domain \([0,2\pi]\) , sampled at resolution L.
+L (int ) – Harmonic band-limit.
+
+
+Returns:
+Signal on the sphere sampled on extended MWSS sampling scheme on
+domain \([0,2\pi]\) , sampling at resolution 2*L.
+
+Return type:
+torch.tensor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/utility/rotation.html b/api/utility/rotation.html
index 6213d74d..76b215fb 100644
--- a/api/utility/rotation.html
+++ b/api/utility/rotation.html
@@ -8,7 +8,7 @@
- rotations — S2FFT 1.0.1 documentation
+ rotations — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/api/utility/signal_generator.html b/api/utility/signal_generator.html
index 6ba28a0c..35c6f9ad 100644
--- a/api/utility/signal_generator.html
+++ b/api/utility/signal_generator.html
@@ -8,7 +8,7 @@
- signal generator — S2FFT 1.0.1 documentation
+ signal generator — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
@@ -506,7 +530,7 @@
signal generator
-s2fft.utils.signal_generator. generate_flm ( rng : Generator , L : int , L_lower : int = 0 , spin : int = 0 , reality : bool = False ) → ndarray
+s2fft.utils.signal_generator. generate_flm ( rng : Generator , L : int , L_lower : int = 0 , spin : int = 0 , reality : bool = False , using_torch : bool = False ) → ndarray
Generate a 2D set of random harmonic coefficients.
Note
@@ -520,6 +544,7 @@
L_lower (int , optional ) – Harmonic lower bound. Defaults to 0.
spin (int , optional ) – Harmonic spin. Defaults to 0.
reality (bool , optional ) – Reality of signal. Defaults to False.
+
using_torch (bool , optional ) – Desired frontend functionality. Defaults to False.
Returns:
@@ -533,7 +558,7 @@
-s2fft.utils.signal_generator. generate_flmn ( rng : Generator , L : int , N : int = 1 , L_lower : int = 0 , reality : bool = False ) → ndarray
+s2fft.utils.signal_generator. generate_flmn ( rng : Generator , L : int , N : int = 1 , L_lower : int = 0 , reality : bool = False , using_torch : bool = False ) → ndarray
Generate a 3D set of random Wigner coefficients.
.. note:: Real signals are explicitly produced from conjugate symmetry.
@@ -545,6 +570,7 @@
(i.e. directionality). Defaults to 1.
L_lower (int , optional ) – Harmonic lower bound. Defaults to 0.
reality (bool , optional ) – Reality of signal. Defaults to False.
+using_torch (bool , optional ) – Desired frontend functionality. Defaults to False.
Returns:
diff --git a/api/utility/utils.html b/api/utility/utils.html
index 47a35b41..001f7d68 100644
--- a/api/utility/utils.html
+++ b/api/utility/utils.html
@@ -8,7 +8,7 @@
- utils — S2FFT 1.0.1 documentation
+ utils — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -136,8 +136,8 @@
-
-
+
+
@@ -229,6 +229,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -434,8 +456,10 @@
signal generator
resampling
resampling_jax
+resampling_torch
quadrature
quadrature_jax
+quadrature_torch
healpix functions
utils
rotations
diff --git a/genindex.html b/genindex.html
index b93fc792..715be928 100644
--- a/genindex.html
+++ b/genindex.html
@@ -7,7 +7,7 @@
- Index — S2FFT 1.0.1 documentation
+ Index — S2FFT 1.0.2 documentation
@@ -42,7 +42,7 @@
-
+
@@ -134,8 +134,8 @@
-
-
+
+
@@ -227,6 +227,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -362,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -554,10 +576,10 @@ F
flmn_shape() (in module s2fft.sampling.so3_samples)
-
-
+
@@ -771,10 +809,14 @@ M
s2fft.utils.quadrature
s2fft.utils.quadrature_jax
+
+ s2fft.utils.quadrature_torch
s2fft.utils.resampling
s2fft.utils.resampling_jax
+
+ s2fft.utils.resampling_torch
s2fft.utils.rotation
@@ -787,24 +829,32 @@ M
mw_to_mwss_phi() (in module s2fft.utils.resampling)
mw_to_mwss_theta() (in module s2fft.utils.resampling)
mw_weights() (in module s2fft.utils.quadrature)
@@ -845,6 +895,8 @@ P
@@ -853,6 +905,8 @@ P
phis_equiang() (in module s2fft.sampling.s2_samples)
@@ -869,30 +923,40 @@ Q
quad_weights() (in module s2fft.utils.quadrature)
quad_weights_dh() (in module s2fft.utils.quadrature)
quad_weights_hp() (in module s2fft.utils.quadrature)
quad_weights_mw() (in module s2fft.utils.quadrature)
@@ -901,24 +965,32 @@ Q
quad_weights_mwss() (in module s2fft.utils.quadrature)
quad_weights_mwss_theta_only() (in module s2fft.utils.quadrature)
quad_weights_transform() (in module s2fft.utils.quadrature)
@@ -1043,8 +1115,6 @@ S
module
-
-
s2fft.transforms.otf_recursions
@@ -1059,6 +1129,8 @@ S
module
+
+
@@ -1172,6 +1266,8 @@ U
diff --git a/index.html b/index.html
index f9e57e6a..a3eeb4b1 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
- Differentiable and accelerated spherical transforms — S2FFT 1.0.1 documentation
+ Differentiable and accelerated spherical transforms — S2FFT 1.0.2 documentation
@@ -43,7 +43,7 @@
-
+
@@ -137,8 +137,8 @@
-
-
+
+
@@ -230,6 +230,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -369,6 +380,17 @@
+
+
+
+
+
+
+
+
+
+
+
GitHub
@@ -432,6 +454,9 @@ Differentiable and accelerated spherical transforms