Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Nov 30, 2024
1 parent 456db6a commit 249ff22
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_shear_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,21 @@ def test_shear_inference_toy_ellipticities(seed):
assert shear_samples.shape == (1000, 2)
assert jnp.abs((jnp.mean(shear_samples[:, 0]) - g1) / g1) <= 3e-3
assert jnp.abs(jnp.mean(shear_samples[:, 1])) <= 3e-3
assert np.testing.assert_allclose(
assert np.allclose(
jnp.std(shear_samples[:, 0]), sigma_e / jnp.sqrt(1000), rtol=0.1, atol=0
)
assert np.testing.assert_allclose(
assert np.allclose(
jnp.std(shear_samples[:, 1]), sigma_e / jnp.sqrt(1000), rtol=0.1, atol=0
)
assert not np.allclose(
jnp.std(shear_samples[:, 0]),
sigma_e / jnp.sqrt(1000) / jnp.sqrt(2),
rtol=0.1,
atol=0,
)
assert not np.allclose(
jnp.std(shear_samples[:, 1]),
sigma_e / jnp.sqrt(1000) / jnp.sqrt(2),
rtol=0.1,
atol=0,
)

0 comments on commit 249ff22

Please sign in to comment.