Skip to content

Commit

Permalink
Rename arg to use_projected_quad
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed Aug 25, 2023
1 parent 1e6f164 commit d291fcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions clmm/theory/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def __init__(
self.set_halo_density_profile(halo_profile_model, massdef, delta_mdef)
self.set_cosmo(None)

def _set_projected_quad(self, projected_quad):
def _set_projected_quad(self, use_projected_quad):
if hasattr(self.hdpm, "projected_quad"):
self.hdpm_opts["einasto"]["projected_quad"] = projected_quad
self.hdpm_opts["einasto"]["projected_quad"] = use_projected_quad
self._update_halo_density_profile()
else:
raise NotImplementedError("projected_quad is not available on this version of CCL.")
Expand Down
10 changes: 5 additions & 5 deletions clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _get_einasto_alpha(self, z_cl=None):
if defined"""
raise NotImplementedError

def _set_projected_quad(self, projected_quad):
def _set_projected_quad(self, use_projected_quad):
"""Implemented for the CCL backend only"""
raise NotImplementedError

Expand Down Expand Up @@ -448,21 +448,21 @@ def get_einasto_alpha(self, z_cl=None):
raise ValueError(f"Wrong profile model. Current profile = {self.halo_profile_model}")
return self._get_einasto_alpha(z_cl)

def set_projected_quad(self, projected_quad):
def set_projected_quad(self, use_projected_quad):
r"""Control the use of quad_vec to calculate the surface density profile for
CCL Einasto profile.
Parameters
----------
projected_quad : bool
use_projected_quad : bool
Only available for Einasto profile with CCL as the backend. If True, CCL will use
quad_vec instead of default FFTLog to calculate the surface density profile.
"""
if self.halo_profile_model != "einasto" or self.backend != "ccl":
raise NotImplementedError("This option is only available for the CCL Einasto profile.")
if self.validate_input:
validate_argument(locals(), "projected_quad", bool)
self._set_projected_quad(projected_quad)
validate_argument(locals(), "use_projected_quad", bool)
self._set_projected_quad(use_projected_quad)

def eval_3d_density(self, r3d, z_cl, verbose=False):
r"""Retrieve the 3d density :math:`\rho(r)`.
Expand Down

0 comments on commit d291fcb

Please sign in to comment.