Skip to content

Commit

Permalink
replace cls with cells for pyccl (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
itrharrison authored and Martina Gerbino committed Oct 4, 2023
1 parent e60c56d commit 148a2c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions soliket/cross_correlation/cross_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def _get_theory(self, **params_values):
)
tracer_k = ccl.CMBLensingTracer(cosmo, z_source=1060)

cl_gg = ccl.cls.angular_cl(cosmo, tracer_g, tracer_g, self.ell_auto) # + 1e-7
cl_kg = ccl.cls.angular_cl(cosmo, tracer_k, tracer_g, self.ell_cross)
cl_gg = ccl.cells.angular_cl(cosmo, tracer_g, tracer_g, self.ell_auto) # + 1e-7
cl_kg = ccl.cells.angular_cl(cosmo, tracer_k, tracer_g, self.ell_cross)

return np.concatenate([cl_gg, cl_kg])

Expand Down Expand Up @@ -225,7 +225,7 @@ def _get_theory(self, **params_values):
ells_theory = np.asarray(ells_theory, dtype=int)
w_bins = bpw.weight.T

cl_unbinned = ccl.cls.angular_cl(cosmo, tracer1, tracer2, ells_theory)
cl_unbinned = ccl.cells.angular_cl(cosmo, tracer1, tracer2, ells_theory)


if self.m_nuisance_mode is not None:
Expand Down
8 changes: 4 additions & 4 deletions soliket/tests/test_xcorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ def test_xcorr(theory):

tracer_k = ccl.CMBLensingTracer(cosmo, z_source=1100)

cl_gg_ccl = ccl.cls.angular_cl(cosmo, tracer_g, tracer_g, xcorr_lhood.ell_range)
cl_kappag_ccl = ccl.cls.angular_cl(cosmo, tracer_k, tracer_g, xcorr_lhood.ell_range)
cl_gg_ccl = ccl.cells.angular_cl(cosmo, tracer_g, tracer_g, xcorr_lhood.ell_range)
cl_kappag_ccl = ccl.cells.angular_cl(cosmo, tracer_k, tracer_g, xcorr_lhood.ell_range)

assert np.allclose(cl_gg_ccl, cl_gg)
assert np.allclose(cl_kappag_ccl, cl_kappag)

cl_obs_gg_ccl = ccl.cls.angular_cl(cosmo, tracer_g, tracer_g, ell_obs_gg)
cl_obs_kappag_ccl = ccl.cls.angular_cl(cosmo, tracer_k, tracer_g, ell_obs_kappag)
cl_obs_gg_ccl = ccl.cells.angular_cl(cosmo, tracer_g, tracer_g, ell_obs_gg)
cl_obs_kappag_ccl = ccl.cells.angular_cl(cosmo, tracer_k, tracer_g, ell_obs_kappag)

assert np.allclose(cl_obs_gg_ccl + Nell_obs_unwise_g, cl_obs_gg)
assert np.allclose(cl_obs_kappag_ccl, cl_obs_kappag)

0 comments on commit 148a2c8

Please sign in to comment.