Skip to content

Commit

Permalink
Update to v3 api
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed May 6, 2023
1 parent 2218f11 commit 8232977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clmm/cosmology/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _eval_sigma_crit_core(self, z_len, z_src):
a_len = self.get_a_from_z(z_len)
a_src = self.get_a_from_z(z_src)

return self.be_cosmo.sigma_critical(a_len, a_src)*self.cor_factor
return self.be_cosmo.sigma_critical(a_lens=a_len, a_source=a_src)*self.cor_factor

def _eval_linear_matter_powerspectrum(self, k_vals, redshift):
return ccl.linear_matter_power(
Expand Down
8 changes: 4 additions & 4 deletions clmm/theory/ccl_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def _get_mass(self):

def _set_concentration(self, cdelta):
""""set concentration. Also sets/updates hdpm"""
self.conc = ccl.halos.ConcentrationConstant(c=cdelta, mdef=self.mdef)
self.conc = ccl.halos.ConcentrationConstant(c=cdelta, mass_def=self.mdef)
with ccl.UnlockInstance(self.mdef):
self.mdef.concentration = self.conc
self.hdpm = self.hdpm_dict[self.halo_profile_model](
self.conc, **self.hdpm_opts[self.halo_profile_model])
concentration=self.conc, **self.hdpm_opts[self.halo_profile_model])
self.hdpm.update_precision_fftlog(
padding_lo_fftlog=1e-4, padding_hi_fftlog=1e3)

Expand Down Expand Up @@ -167,14 +167,14 @@ def _call_ccl_profile_lens(self, ccl_hdpm_func, radius, z_lens, ndim=2):
a_lens = self.cosmo.get_a_from_z(z_lens)

return ccl_hdpm_func(self.cosmo.be_cosmo, radius/a_lens, self.__mdelta_cor,
a_lens, self.mdef)*self.cor_factor/a_lens**ndim
a_lens)*self.cor_factor/a_lens**ndim

def _call_ccl_profile_lens_src(self, ccl_hdpm_func, radius, z_lens, z_src):
""""call ccl profile functions that depend on the lens and the sources"""
a_lens = self.cosmo.get_a_from_z(z_lens)
a_src = self.cosmo.get_a_from_z(z_src)

return ccl_hdpm_func(self.cosmo.be_cosmo, radius/a_lens, self.__mdelta_cor,
a_lens, a_src, self.mdef)
a_lens=a_lens, a_source=a_src)

Modeling = CCLCLMModeling

0 comments on commit 8232977

Please sign in to comment.