Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions skypy/galaxies/_schechter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


@units.quantity_input(sky_area=units.sr)
def schechter_lf(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology, noise=True):
def schechter_lf(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology, shot_noise=True):
r'''Sample redshifts and magnitudes from a Schechter luminosity function.

Sample the redshifts and magnitudes of galaxies following a Schechter
Expand Down Expand Up @@ -42,8 +42,9 @@ def schechter_lf(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology,
Sky area over which galaxies are sampled. Must be in units of solid angle.
cosmology : Cosmology
Cosmology object to convert apparent to absolute magnitudes.
noise : bool, optional
Poisson-sample the number of galaxies. Default is `True`.
shot_noise : bool, optional
Wether to Poisson-sample the number of galaxies, or else use the mean
number. Default is `True`.

Notes
-----
Expand All @@ -61,7 +62,8 @@ def schechter_lf(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology,
'''

# sample galaxy redshifts
z = schechter_lf_redshift(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology, noise)
z = schechter_lf_redshift(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology,
shot_noise)

# if a function is NOT given for M_star, phi_star, alpha, interpolate to z
if not callable(M_star) and np.ndim(M_star) > 0:
Expand Down