Skip to content

Commit 76bc05e

Browse files
committed
explicitly add dh to quadrature tests
1 parent c3ba92d commit 76bc05e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.pip_readme.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ available resources and desired angular resolution $L$.
2929

3030
As of version 1.0.2 `S2FFT` also provides PyTorch implementations of underlying
3131
precompute transforms. In future releases this support will be extended to our
32-
recursion based algorithms.
32+
on-the-fly algorithms.
3333

3434
Documentation
3535
=============

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ available resources and desired angular resolution $L$.
2424

2525
As of version 1.0.2 `S2FFT` also provides PyTorch implementations of underlying
2626
precompute transforms. In future releases this support will be extended to our
27-
recursion based algorithms.
27+
on-the-fly algorithms.
2828

2929
## Algorithms :zap:
3030

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ may select depending on available resources and desired angular resolution :math
1212

1313
As of version 1.0.2 ``S2FFT`` also provides PyTorch implementations of underlying
1414
precompute transforms. In future releases this support will be extended to our
15-
recursion based algorithms.
15+
on-the-fly algorithms.
1616

1717
Algorithms |:zap:|
1818
-------------------

s2fft/utils/quadrature_torch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ def quad_weight_dh_theta_only(theta: float, L: int) -> float:
137137
"""
138138
w = 0.0
139139
for k in range(0, L):
140-
w += torch.sin((2 * k + 1) * theta) / (2 * k + 1)
140+
w += torch.sin((2 * k + 1) * torch.from_numpy(theta)) / (2 * k + 1)
141141

142-
w *= 2 / L * torch.sin(theta)
142+
w *= 2 / L * torch.sin(torch.from_numpy(theta))
143143

144144
return w
145145

tests/test_quadrature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@pytest.mark.parametrize("L", [5, 6])
12-
@pytest.mark.parametrize("sampling", ["mw", "mwss"])
12+
@pytest.mark.parametrize("sampling", ["mw", "mwss", "dh"])
1313
@pytest.mark.parametrize("method", ["numpy", "jax", "torch"])
1414
def test_quadrature_mw_weights(flm_generator, L: int, sampling: str, method: str):
1515
spin = 0

0 commit comments

Comments
 (0)