schechter_lf¶
- skypy.galaxies.schechter_lf(redshift, M_star, phi_star, alpha, m_lim, sky_area, cosmology, noise=True)[source] [edit on github]¶
Sample redshifts and magnitudes from a Schechter luminosity function.
Sample the redshifts and magnitudes of galaxies following a Schechter luminosity function with potentially redshift-dependent parameters, limited by an apparent magnitude
m_lim
, for a sky areasky_area
.- Parameters:
- redshiftarray_like
Input redshift grid on which the Schechter function parameters are evaluated. Galaxies are sampled over this redshift range.
- M_stararray_like or function
Characteristic absolute magnitude of the Schechter function. Can be a single value, an array of values for each
redshift
, or a function of redshift.- phi_stararray_like or function
Normalisation of the Schechter function. Can be a single value, an array of values for each
redshift
, or a function of redshift.- alphaarray_like or function
Schechter function power law index. Can be a single value, an array of values for each
redshift
, or a function of redshift.- m_limfloat
Limiting apparent magnitude.
- sky_area
Quantity
Sky area over which galaxies are sampled. Must be in units of solid angle.
- cosmologyCosmology
Cosmology object to convert apparent to absolute magnitudes.
- noisebool, optional
Poisson-sample the number of galaxies. Default is
True
.
- Returns:
- redshifts, magnitudestuple of array_like
Redshifts and magnitudes of the galaxy sample described by the Schechter luminosity function.
Notes
Effectively calls
schechter_lf_redshift
andschechter_lf_magnitude
internally and returns the tuple of results.