Skip to content

Commit 84db7be

Browse files
committed
FIx pyccl usage of named argument
The WeakLensingTracer class now expects the `dndz` input argument as a named argument
1 parent 9bb04ca commit 84db7be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_angular_cl.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_lensing_cl():
4444
# Define a redshift distribution
4545
nz = smail_nz(1.0, 2.0, 1.0)
4646
z = np.linspace(0, 5.0, 1024)
47-
tracer_ccl = ccl.WeakLensingTracer(cosmo_ccl, (z, nz(z)), use_A_ia=False)
47+
tracer_ccl = ccl.WeakLensingTracer(cosmo_ccl, dndz=(z, nz(z)), use_A_ia=False)
4848
tracer_jax = probes.WeakLensing([nz])
4949

5050
# Get an ell range for the cls
@@ -90,8 +90,8 @@ def test_lensing_cl_delta():
9090
nz = delta_nz(z0)
9191
nz_smail1 = smail_nz(1.0, 2.0, 1.0)
9292
nz_smail2 = smail_nz(1.4, 2.0, 1.0)
93-
tracer_ccl = ccl.WeakLensingTracer(cosmo_ccl, (z, nzs_s(z)), use_A_ia=False)
94-
tracer_cclb = ccl.WeakLensingTracer(cosmo_ccl, (z, nz_smail2(z)), use_A_ia=False)
93+
tracer_ccl = ccl.WeakLensingTracer(cosmo_ccl, dndz=(z, nzs_s(z)), use_A_ia=False)
94+
tracer_cclb = ccl.WeakLensingTracer(cosmo_ccl, dndz=(z, nz_smail2(z)), use_A_ia=False)
9595
tracer_jax = probes.WeakLensing([nz])
9696
tracer_jaxb = probes.WeakLensing([nz, nz_smail1, nz_smail2])
9797

@@ -142,7 +142,7 @@ def test_lensing_cl_IA():
142142
bias = inverse_growth_linear_bias(10.0)
143143

144144
tracer_ccl = ccl.WeakLensingTracer(
145-
cosmo_ccl, (z, nz(z)), ia_bias=(z, bias(cosmo_jax, z))
145+
cosmo_ccl, dndz=(z, nz(z)), ia_bias=(z, bias(cosmo_jax, z))
146146
)
147147
tracer_jax = probes.WeakLensing([nz], bias)
148148

0 commit comments

Comments
 (0)