redshifts_from_comoving_density¶
- skypy.galaxies.redshift.redshifts_from_comoving_density(redshift, density, sky_area, cosmology, noise=True)[source] [edit on github]¶
Sample redshifts from a comoving density function.
Sample galaxy redshifts such that the resulting distribution matches a past lightcone with comoving galaxy number density
densityat redshiftsredshift. The comoving volume sampled corresponds to a sky areasky_areaand transverse comoving distance given by the cosmologycosmology.If the
noiseparameter is set to true, the number of galaxies has Poisson noise. Ifnoiseis false, the expected number of galaxies is used.- Parameters
- redshiftarray_like
Redshifts at which comoving number densities are provided.
- densityarray_like
Comoving galaxy number density at each redshift in Mpc-3.
- sky_area
Quantity Sky area over which galaxies are sampled. Must be in units of solid angle.
- cosmologyCosmology
Cosmology object for conversion to comoving volume.
- noisebool, optional
Poisson-sample the number of galaxies. Default is
True.
- Returns
- redshiftsarray_like
Sampled redshifts such that the comoving number density of galaxies corresponds to the input distribution.