Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Oct 14, 2024
1 parent 6796268 commit 4c5b2c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bpd/pipelines/toy_ellips.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def pipeline_toy_ellips_samples(
do_inference,
sigma_e=sigma_e,
sigma_m=sigma_m,
interim_posterior=interim_prior,
interim_prior=interim_prior,
k=k,
)
)
Expand Down
8 changes: 6 additions & 2 deletions tests/test_shear_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jax.numpy as jnp
import pytest
from jax import random

from scripts.get_shear_from_post_ellips import pipeline_shear_inference
from scripts.get_toy_ellip_samples import pipeline_toy_ellips_samples
Expand All @@ -10,13 +11,16 @@
@pytest.mark.parametrize("seed", [1234, 4567])
def test_shear_inference_toy_ellipticities(seed):

key = random.key(seed)
k1, k2 = random.split(key)

g1 = 0.02
g2 = 0.0
sigma_e = 1e-3
sigma_m = 1e-4

e_post = pipeline_toy_ellips_samples(
seed,
k1,
g1=g1,
g2=g2,
sigma_e=sigma_e,
Expand All @@ -29,7 +33,7 @@ def test_shear_inference_toy_ellipticities(seed):
e_post_trimmed = e_post[:, ::10, :]

shear_samples = pipeline_shear_inference(
seed,
k2,
e_post_trimmed,
jnp.array([g1, g2]),
sigma_e=sigma_e,
Expand Down

0 comments on commit 4c5b2c0

Please sign in to comment.