diff --git a/clmm/theory/ccl.py b/clmm/theory/ccl.py index 2bcdb4500..281728e0f 100644 --- a/clmm/theory/ccl.py +++ b/clmm/theory/ccl.py @@ -108,9 +108,8 @@ def _update_halo_density_profile(self): """updates halo density profile with set internal properties""" # prepare mdef object if self.massdef == "virial": - self.mdef = ccl.halos.MassDef("vir", self.mdef_dict[self.massdef]) - else: - self.mdef = ccl.halos.MassDef(self.delta_mdef, self.mdef_dict[self.massdef]) + self.__delta_mdef = "vir" + self.mdef = ccl.halos.MassDef(self.delta_mdef, self.mdef_dict[self.massdef]) # setting concentration (also updates hdpm) self.cdelta = self.cdelta if self.hdpm else 4.0 # ccl always needs an input concentration diff --git a/tests/test_theory_parent.py b/tests/test_theory_parent.py index 09bc8fa3a..dd26bbf2d 100644 --- a/tests/test_theory_parent.py +++ b/tests/test_theory_parent.py @@ -94,13 +94,13 @@ def test_instantiate(modeling_data): if theo.be_nick in ["nc", "ccl"]: mod.set_halo_density_profile(massdef="virial") - assert_equal(mod.massdef, "virial") + assert_equal(mod.delta_mdef, "vir") # reset mod.massdef = "mean" mod.massdef = "virial" - assert_equal(mod.massdef, "virial") + assert_equal(mod.delta_mdef, "vir") if theo.be_nick == "nc": import gi