From 10beeb3bd425335a3f6c340ad0cadbd50cf255a9 Mon Sep 17 00:00:00 2001 From: Philipp Misof Date: Sun, 26 Jan 2025 21:23:16 +0100 Subject: [PATCH 1/2] Fixed documentation regarding storing convention of SO(3) (#249) --- s2fft/sampling/so3_samples.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s2fft/sampling/so3_samples.py b/s2fft/sampling/so3_samples.py index 194c2c4d..1731606c 100644 --- a/s2fft/sampling/so3_samples.py +++ b/s2fft/sampling/so3_samples.py @@ -13,8 +13,8 @@ def f_shape( :math:`SO(3)`. Note: - Importantly, the convention adopted for storage of f is :math:`[\beta, \alpha, - \gamma]`, for Euler angles :math:`(\alpha, \beta, \gamma)` following the + Importantly, the convention adopted for storage of :math:`f` is :math:`[\gamma, + \beta, \alpha]`, for Euler angles :math:`(\alpha, \beta, \gamma)` following the :math:`zyz` Euler convention, in order to simplify indexing for internal use. For a given :math:`\gamma` we thus recover a signal on the sphere indexed by :math:`[\theta, \phi]`, i.e. we associate :math:`\beta` with :math:`\theta` and From e7fade98af115d03626835bc5c2596aa4c05b5b5 Mon Sep 17 00:00:00 2001 From: Philipp Misof Date: Sun, 26 Jan 2025 22:01:56 +0100 Subject: [PATCH 2/2] Fixed docstring to render example code properly (#263) --- s2fft/utils/signal_generator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/s2fft/utils/signal_generator.py b/s2fft/utils/signal_generator.py index 407e9614..799de9b9 100644 --- a/s2fft/utils/signal_generator.py +++ b/s2fft/utils/signal_generator.py @@ -39,11 +39,11 @@ def complex_el_and_m_indices(L: int, min_el: int) -> tuple[np.ndarray, np.ndarra Equivalent to nested list-comprehension based implementation - ``` - el_indices, m_indices = np.array( - [(el, m) for el in range(min_el, L) for m in range(1, el + 1)] - ).T - ``` + .. code-block:: python + + el_indices, m_indices = np.array( + [(el, m) for el in range(min_el, L) for m in range(1, el + 1)] + ).T For `L, min_el = 1024, 0`, this implementation is around 80x quicker in benchmarks compared to list-comprehension implementation.