Document lsst_specs.py
+"""
+The functions in lsst_specs provide useful routines
+for making predictions for LSST-specific observables.
+These include routines for predicting the linear bias
+of the clustering sample, the dispersion of photometric
+redshifts for clustering and lensing samples, and for
+predicting the redshift distribution of a given tomographic
+photometric redshift bin. We also provide functionality
+for the user to incorporate their own photo-z model
+and to split the redshift distributions in tomographic
+bins based on photo-z cuts.
+
+These routines are based on the LSST Science book
+and the Chang et al. (2013) paper. These provide several
+options to model the expected redshift distributions
+of LSST galaxies that we use for the tomographic photo-z binning.
+The options are as follows.
+
+dNdz options
+ - 'nc': redshift distribution for number counts, i.e., the clustering sample.
+ - 'wl_cons': redshift distribution for galaxies with shapes for lensing. This
+ option adopts a conservative cut on shape quality criteria.
+ - 'wl_fid': redshift distribution for galaxies with shapes for lensing. This
+ option adopts a fiducial cut on shape quality criteria.
+ - 'wl_opt': redshift distribution for galaxies with shapes for lensing. This
+ option adopts an optimistic cut on shape quality criteria.
+
+"""
from pyccl import ccllib as lib
from pyccl.pyutils import _vectorize_fn, _vectorize_fn_simple, np, check
@@ -11,7 +39,9 @@ dNdz_types = {
class PhotoZFunction(object):
"""A user-defined photo-z function.
-
+ This functions allows the user to create (or
+ delete) a function that returns the likelihood of measuring
+ a certain z_ph given a z_spec, allowing for user-defined arguments.
"""
def __init__(self, func, args=None):
@@ -64,8 +94,12 @@ class PhotoZGaussian(PhotoZFunction):
def bias_clustering(cosmo, a):
- """Bias clustering, b(z), at a scale
+ """Bias clustering, b(a), at a scale
factor, a, of the clustering sample.
+ This function outputs the expected linear bias
+ of galaxies in the LSST clustering sample
+ at a given scale factor a. The function is
+ taken from the LSST Science Book (arXiv:0912.0201).
Args:
cosmo (:obj:`ccl.cosmology`): Cosmological parameters.
@@ -80,13 +114,16 @@ def bias_clustering(cosmo, a):
def sigmaz_clustering(z):
"""Photo-z dispersion, sigma(z), for the clustering sample
- at `a`.
+ at a given redshift. This function returns the expected
+ photometric redshift dispersion at a given redshift for
+ galaxies in the LSST clustering sample. Taken from the
+ LSST Science Book (arXiv:0912.0201).
.. note:: assumes Gaussian uncertainties.
Args:
cosmo (:obj:`ccl.cosmology`): Cosmological parameters.
- a (float or array_like): Scale factor(s), normalized to 1 today.
+ z (float or array_like): Redshift(s).
Returns:
specs_sigmaz_clustering (float or array_like): Dispersion at each scale factor.
@@ -98,12 +135,16 @@ def sigmaz_clustering(z):
def sigmaz_sources(z):
"""Photo-z dispersion, sigma(z), for the lensing sample.
+ This function returns the expected
+ photometric redshift dispersion at a given redshift for
+ galaxies in the LSST weak lensing gold sample. Taken from the
+ LSST Science Book (arXiv:0912.0201).
.. note:: assumes Gaussian uncertainties.
Args:
cosmo (:obj:`ccl.cosmology`): Cosmological parameters.
- a (float or array_like): Scale factor(s), normalized to 1 today.
+ z (float or array_like): Redshift(s).
Returns:
specs_sigmaz_sources (float or array_like): Dispersion at each scale factor.
