Skip to content

Commit

Permalink
syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhbye committed May 31, 2024
1 parent aac9f04 commit b43715d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions croissant/jax/tests/test_alm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ def test_total_power(lmax):
alm = jnp.zeros(shape, dtype=jnp.complex128)
a00_idx = crojax.alm.getidx(lmax, 0, 0)
alm = alm.at[a00_idx].set(1 / Y00)
power = crojax.alm.total_power(alm)
power = crojax.alm.total_power(alm, lmax)
assert jnp.isclose(power, 4 * jnp.pi)

# m(theta) = cos(theta)**2
alm = jnp.zeros(shape, dtype=jnp.complex128)
alm = alm.at[a00_idx].set(1 / (3 * Y00))
a20_idx = crojax.alm.getidx(lmax, 2, 0)
alm = alm.at[a20_idx].set(4 * jnp.sqrt(jnp.pi / 5) * 1 / 3)
power = crojax.alm.total_power(alm)
power = crojax.alm.total_power(alm, lmax)
expected_power = 4 * jnp.pi / 3
assert jnp.isclose(power, expected_power)

Expand Down

0 comments on commit b43715d

Please sign in to comment.