Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfan1996 committed Aug 26, 2023
1 parent 761b738 commit 64f19c5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions clmm/theory/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class CCLCLMModeling(CLMModeling):
backend: str
Name of the backend being used
massdef : str
Profile mass definition (`mean`, `critical`, `virial` - letter case independent)
Profile mass definition ("mean", "critical", "virial" - letter case independent)
delta_mdef : int
Mass overdensity definition.
halo_profile_model : str
Profile model parameterization (`nfw`, `einasto`, `hernquist` - letter case independent)
Profile model parameterization ("nfw", "einasto", "hernquist" - letter case independent)
cosmo: Cosmology
Cosmology object
hdpm: Object
Expand Down
6 changes: 3 additions & 3 deletions clmm/theory/cluster_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class CTCLMModeling(CLMModeling):
backend: str
Name of the backend being used
massdef : str
Profile mass definition (`mean`, `critical` - letter case independent)
Profile mass definition ("mean", "critical" - letter case independent)
delta_mdef : int
Mass overdensity definition.
halo_profile_model : str
Profile model parameterization (`nfw`, `einasto`, `hernquist` - letter case independent)
Profile model parameterization ("nfw", "einasto", "hernquist" - letter case independent)
cosmo: Cosmology
Cosmology object
hdpm: Object
Expand Down Expand Up @@ -144,7 +144,7 @@ def _eval_surface_density(self, r_proj, z_cl):
) # pc**-2 to Mpc**-2

def _eval_mean_surface_density(self, r_proj, z_cl):
r"""Computes the mean value of surface density inside radius r_proj
r"""Computes the mean value of surface density inside radius `r_proj`
Parameters
----------
Expand Down
22 changes: 11 additions & 11 deletions clmm/theory/func_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pylint: disable=invalid-name
# Thin functonal layer on top of the class implementation of CLMModeling .
# The functions expect a global instance of the actual CLMModeling named
# `_modeling_object'.
# "_modeling_object".

import numpy as np

Expand Down Expand Up @@ -365,7 +365,7 @@ def compute_excess_surface_density_2h(
.. math::
\Delta\Sigma_{\text{2h}}(R) = \frac{\rho_m(z)b(M)}{(1 + z)^3D_A(z)^2}
\int\frac{ldl}{(2\pi)} P_{\rm mm}(k_l, z)J_2(l\theta)
\int\frac{ldl}{(2\pi)} P_{\text{mm}}(k_l, z)J_2(l\theta)
where
Expand Down Expand Up @@ -431,13 +431,13 @@ def compute_surface_density_2h(
r"""Computes the 2-halo term surface density from eq.(13) of Oguri & Hamana (2011)
.. math::
\Sigma_{\rm 2h}(R) = \frac{\rho_m(z)b(M)}{(1 + z)^3D_A(z)^2} \int\frac{ldl}{(2\pi)}
P_{\rm mm}(k_l, z)J_0(l\theta)
\Sigma_{\text{2h}}(R) = \frac{\rho_\text{m}(z)b(M)}{(1 + z)^3D_A(z)^2}
\int\frac{ldl}{(2\pi)}P_{\text{mm}}(k_l, z)J_0(l\theta)
where
.. math::
k_l = \frac{l}{D_A(z)(1 +z)}
k_l = \frac{l}{D_A(z)(1 + z)}
and :math:`b(M)` is the halo bias
Expand Down Expand Up @@ -488,14 +488,14 @@ def compute_critical_surface_density_eff(cosmo, z_cluster, pzbins, pzpdf, valida
r"""Computes the 'effective critical surface density'
.. math::
\langle \Sigma_{\rm crit}^{-1}\rangle^{-1} = \left(\int \frac{1}{\Sigma_{\rm crit}(z)}
p(z) dz\right)^{-1}
\langle \Sigma_{\text{crit}}^{-1}\rangle^{-1} =
\left(\int \frac{1}{\Sigma_{\text{crit}}(z)}p(z) \mathrm{d}z\right)^{-1}
where :math:`p(z)` is the source photoz probability density function.
This comes from the maximum likelihood estimator for evaluating a :math:`\Delta\Sigma`
profile.
For the standard :math:`\Sigma_{\rm crit}(z)` definition, use the `eval_sigma_crit` method of
For the standard :math:`\Sigma_{\text{crit}}(z)` definition, use the `eval_sigma_crit` method of
the CLMM cosmology object.
Parameters
Expand Down Expand Up @@ -848,9 +848,9 @@ def compute_reduced_tangential_shear(
massdef : str, optional
Profile mass definition, with the following supported options (letter case independent):
* `mean` (default);
* `critical` - not in cluster_toolkit;
* `virial` - not in cluster_toolkit;
* 'mean' (default);
* 'critical' - not in cluster_toolkit;
* 'virial' - not in cluster_toolkit;
alpha_ein : float, None, optional
If `halo_profile_model=='einasto'`, set the value of the Einasto slope.
Expand Down
14 changes: 7 additions & 7 deletions clmm/theory/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def compute_rdelta(mdelta, redshift, cosmo, massdef="mean", delta_mdef=200):
cosmo : clmm.Cosmology
Cosmology object
massdef : str, None
Profile mass definition (`mean`, `critical`, `virial`).
Profile mass definition ("mean", "critical", "virial").
delta_mdef : int, None
Mass overdensity definition.
Expand Down Expand Up @@ -151,11 +151,11 @@ def compute_profile_mass_in_radius(
cdelta : float
Concentration of the profile.
massdef : str, None
Profile mass definition (`mean`, `critical`, `virial`).
Profile mass definition ("mean", "critical", "virial").
delta_mdef : int, None
Mass overdensity definition.
halo_profile_model : str
Profile model parameterization (`nfw`, `einasto`, `hernquist`).
Profile model parameterization ("nfw", "einasto", "hernquist").
alpha : float, None
Einasto slope, required when `halo_profile_model='einasto'`.
Expand Down Expand Up @@ -209,19 +209,19 @@ def convert_profile_mass_concentration(
cosmo : clmm.Cosmology
Cosmology object
massdef : str, None
Input profile mass definition (`mean`, `critical`, `virial`).
Input profile mass definition ("mean", "critical", "virial").
delta_mdef : int, None
Input mass overdensity definition.
halo_profile_model : str, None
Input profile model parameterization (`nfw`, `einasto`, `hernquist`).
Input profile model parameterization ("nfw", "einasto", "hernquist").
massdef2 : str, None
Profile mass definition to convert to (`mean`, `critical`, `virial`).
Profile mass definition to convert to ("mean", "critical", "virial").
If None, `massdef2=massdef`.
delta_mdef2 : int, None
Mass overdensity definition to convert to.
If None, `delta_mdef2=delta_mdef`.
halo_profile_model2 : str, None
Profile model parameterization to convert to (`nfw`, `einasto`, `hernquist`).
Profile model parameterization to convert to ("nfw", "einasto", "hernquist").
If None, `halo_profile_model2=halo_profile_model`.
alpha : float, None
Input Einasto slope when `halo_profile_model='einasto'`.
Expand Down
4 changes: 2 additions & 2 deletions clmm/theory/numcosmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class NumCosmoCLMModeling(CLMModeling):
backend: str
Name of the backend being used
massdef : str
Profile mass definition (`mean`, `critical`, `virial` - letter case independent)
Profile mass definition ("mean", "critical", "virial" - letter case independent)
delta_mdef : int
Mass overdensity definition.
halo_profile_model : str
Profile model parameterization (`nfw`, `einasto`, `hernquist` - letter case independent)
Profile model parameterization ("nfw", "einasto", "hernquist" - letter case independent)
cosmo: Cosmology
Cosmology object
hdpm: Object
Expand Down
8 changes: 4 additions & 4 deletions clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class CLMModeling:
cdelta: float
Concentration of the profile
massdef : str
Profile mass definition (`mean`, `critical`, `virial` - letter case independent)
Profile mass definition ("mean", "critical", "virial" - letter case independent)
delta_mdef : int
Mass overdensity definition.
halo_profile_model : str
Profile model parameterization (`nfw`, `einasto`, `hernquist` - letter case independent)
Profile model parameterization ("nfw", "einasto", "hernquist" - letter case independent)
cosmo: Cosmology
Cosmology object
hdpm: Object
Expand Down Expand Up @@ -1714,13 +1714,13 @@ def convert_mass_concentration(
z_cl: float
Redshift of the cluster
massdef : str, None
Profile mass definition to convert to (`mean`, `critical`, `virial`).
Profile mass definition to convert to ("mean", "critical", "virial").
If None, same value of current model is used.
delta_mdef : int, None
Mass overdensity definition to convert to.
If None, same value of current model is used.
halo_profile_model : str, None
Profile model parameterization to convert to (`nfw`, `einasto`, `hernquist`).
Profile model parameterization to convert to ("nfw", "einasto", "hernquist").
If None, same value of current model is used.
alpha : float, None
Einasto slope to convert to when `halo_profile_model='einasto'`.
Expand Down

0 comments on commit 64f19c5

Please sign in to comment.