Skip to content

Commit

Permalink
update docstrings (#424)
Browse files Browse the repository at this point in the history
* update docstrings

* rm ccl unavailable profiles from doctrings
  • Loading branch information
m-aguena committed Sep 17, 2021
1 parent 87e89b7 commit 48f47bd
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 54 deletions.
17 changes: 12 additions & 5 deletions clmm/support/mock_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ def generate_galaxy_catalog(
and H0
zsrc : float or str
Choose the source galaxy distribution to be fixed or drawn from a predefined distribution.
`float` : All sources galaxies at this fixed redshift;
`str` : Draws individual source gal redshifts from predefined distribution. Options are:
chang13, desc_srd;
* `float` : All sources galaxies at this fixed redshift;
* `str` : Draws individual source gal redshifts from predefined distribution. Options are:
* `chang13` - Chang et al. 2013 (arXiv:1305.0793);
* `desc_srd` - LSST/DESC Science Requirement Document (arxiv:1809.01669);
delta_so : float, optional
Overdensity density contrast used to compute the cluster mass and concentration. The
spherical overdensity mass is computed as the mass enclosed within the radius
Expand Down Expand Up @@ -348,8 +352,11 @@ def _draw_source_redshifts(zsrc, zsrc_min, zsrc_max, ngals):
zsrc : float or str
Choose the source galaxy distribution to be fixed or drawn from a predefined distribution.
float : All sources galaxies at this fixed redshift
str : Draws individual source gal redshifts from predefined distribution. Options
are: chang13 or desc_srd
str : Draws individual source gal redshifts from predefined distribution. Options are:
* `chang13` - Chang et al. 2013 (arXiv:1305.0793);
* `desc_srd` - LSST/DESC Science Requirement Document (arxiv:1809.01669);
zsrc_min : float
The minimum source redshift allowed.
zsrc_max : float, optional
Expand Down
109 changes: 67 additions & 42 deletions clmm/theory/func_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ def compute_3d_density(
Mass overdensity definition; defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
Returns
-------
Expand Down Expand Up @@ -97,14 +100,17 @@ def compute_surface_density(r_proj, mdelta, cdelta, z_cl, cosmo, delta_mdef=200,
Mass overdensity definition; defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
Returns
-------
Expand Down Expand Up @@ -154,14 +160,17 @@ def compute_excess_surface_density(r_proj, mdelta, cdelta, z_cl, cosmo, delta_md
Mass overdensity definition; defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
Returns
-------
Expand Down Expand Up @@ -238,14 +247,18 @@ def compute_tangential_shear(r_proj, mdelta, cdelta, z_cluster, z_source, cosmo,
Mass overdensity definition. Defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
z_src_model : str, optional
Source redshift model, with the following supported options:
`single_plane` (default) - all sources at one redshift (if
Expand Down Expand Up @@ -317,14 +330,18 @@ def compute_convergence(r_proj, mdelta, cdelta, z_cluster, z_source, cosmo, delt
Mass overdensity definition. Defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
z_src_model : str, optional
Source redshift model, with the following supported options:
`single_plane` (default) - all sources at one redshift (if
Expand Down Expand Up @@ -396,14 +413,18 @@ def compute_reduced_tangential_shear(
Mass overdensity definition. Defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
z_src_model : str, optional
Source redshift model, with the following supported options:
`single_plane` (default) - all sources at one redshift (if
Expand Down Expand Up @@ -481,14 +502,18 @@ def compute_magnification(r_proj, mdelta, cdelta, z_cluster, z_source, cosmo, de
Mass overdensity definition. Defaults to 200.
halo_profile_model : str, optional
Profile model parameterization (letter case independent):
`nfw` (default);
`einasto` - valid in numcosmo and ccl;
`hernquist` - valid in numcosmo and ccl;
* `nfw` (default);
* `einasto` - valid in numcosmo only;
* `hernquist` - valid in numcosmo only;
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;
z_src_model : str, optional
Source redshift model, with the following supported options:
`single_plane` (default) - all sources at one redshift (if
Expand Down
17 changes: 10 additions & 7 deletions clmm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ def compute_radial_averages(xvals, yvals, xbins, error_model='std/sqrt_n'):
xbins: array_like
Bin edges to sort into
error_model : str, optional
Error model to use for y uncertainties. (letter case independent)
`std/sqrt_n` - Standard Deviation/sqrt(Counts) (Default)
`std` - Standard deviation
Error model to use for y uncertainties (letter case independent):
* `std/sqrt_n` - Standard Deviation/sqrt(Counts) (Default)
* `std` - Standard deviation
Returns
-------
Expand Down Expand Up @@ -83,10 +84,12 @@ def make_bins(rmin, rmax, nbins=10, method='evenwidth', source_seps=None):
nbins : float
Number of bins you want to create, default to 10.
method : str, optional
Binning method to use (letter case independent)
`evenwidth` - Default, evenly spaced bins between rmin and rmax
`evenlog10width` - Logspaced bins with even width in log10 between rmin and rmax
`equaloccupation` - Bins with equal occupation numbers
Binning method to use (letter case independent):
* `evenwidth` - Default, evenly spaced bins between rmin and rmax
* `evenlog10width` - Logspaced bins with even width in log10 between rmin and rmax
* `equaloccupation` - Bins with equal occupation numbers
source_seps : array_like
Radial distance of source separations
Expand Down

0 comments on commit 48f47bd

Please sign in to comment.