Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed Aug 6, 2023
1 parent ea68986 commit 2b62712
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions clmm/theory/_ccl_supported_versions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""@file _ccl_supported_versions.py
Versions of CCL supported by the current CLMM version
"""
VMIN = '2.7.1.dev10+gf81b59a4'
VMAX = '3'
VMIN = "2.7.1.dev10+gf81b59a4"
VMAX = "3"
14 changes: 6 additions & 8 deletions clmm/theory/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ def __init__(
self.set_cosmo(None)

def _use_projected_quad(self, use_quad):
if hasattr(self.hdpm, 'projected_quad'):
if hasattr(self.hdpm, "projected_quad"):
self.hdpm_opts["einasto"]["projected_quad"] = use_quad
self._update_halo_density_profile()
else:
raise NotImplementedError(
"projected_quad is not available on this version of CCL.")
raise NotImplementedError("projected_quad is not available on this version of CCL.")

# Functions implemented by child class

Expand All @@ -123,13 +122,12 @@ def _get_mass(self):
return self.__mdelta_cor * self.cor_factor

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

def _set_mass(self, mdelta):
"""set mass"""
Expand Down
3 changes: 1 addition & 2 deletions clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ def use_projected_quad(self, use_quad):
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.")
raise NotImplementedError("This option is only available for the CCL Einasto profile.")
if self.validate_input:
validate_argument(locals(), "use_quad", bool)
self._use_projected_quad(use_quad)
Expand Down

0 comments on commit 2b62712

Please sign in to comment.