diff --git a/skypy/galaxies/redshift.py b/skypy/galaxies/redshift.py index 19e0021e2..f048a3574 100644 --- a/skypy/galaxies/redshift.py +++ b/skypy/galaxies/redshift.py @@ -235,6 +235,13 @@ def redshifts_from_comoving_density(redshift, density, sky_area, cosmology, nois Sampled redshifts such that the comoving number density of galaxies corresponds to the input distribution. + Warnings + -------- + The inverse cumulative distribution function is approximated from the + number density and comoving volume calculated at the given `redshift` + values. The user must choose suitable `redshift` values to satisfy their + desired numerical accuracy. + ''' # redshift number density diff --git a/skypy/utils/random.py b/skypy/utils/random.py index 76ecde2bf..c301eeec0 100644 --- a/skypy/utils/random.py +++ b/skypy/utils/random.py @@ -41,6 +41,13 @@ def schechter(alpha, x_min, x_max, resolution=100, size=None, scale=1.): x_sample : array_like Samples drawn from the Schechter function. + Warnings + -------- + The inverse cumulative distribution function is approximated from the + Schechter function evaluated on a logarithmically-spaced grid. The user + must choose the `resolution` of this grid to satisfy their desired + numerical accuracy. + References ---------- .. [1] https://en.wikipedia.org/wiki/Luminosity_function_(astronomy)