binny.cosmology package#
Cosmological distance and volume utilities.
- binny.cosmology.comoving_radial_distance_mpc(cosmo: Cosmology, z: NDArray[float64]) NDArray[float64]#
Return comoving radial distance in Mpc.
- Parameters:
cosmo – PyCCL cosmology object.
z – Redshift value or array.
- Returns:
Comoving radial distance in Mpc.
- binny.cosmology.comoving_volume_weight(cosmo: Cosmology, z: NDArray[float64]) NDArray[float64]#
Return comoving volume element per redshift and steradian.
PyCCL’s
comoving_volume_elementreturns the comoving volume element per unit scale factor and steradian,\[\frac{dV}{da\,d\Omega}.\]This helper converts it to a redshift weight using
\[\frac{dV}{dz\,d\Omega} = \left|\frac{dV}{da\,d\Omega}\right| \left|\frac{da}{dz}\right| = \left|\frac{dV}{da\,d\Omega}\right| a^2.\]- Parameters:
cosmo – PyCCL cosmology object.
z – Redshift value or array.
- Returns:
Comoving volume element per redshift and steradian in Mpc^3.
- binny.cosmology.luminosity_distance_mpc(cosmo: Cosmology, z: NDArray[float64]) NDArray[float64]#
Return luminosity distance in Mpc.
- Parameters:
cosmo – PyCCL cosmology object.
z – Redshift value or array.
- Returns:
Luminosity distance in Mpc.
- binny.cosmology.requires_ccl(requirer: callable)#
Throws an exception if CCL is not found.
- binny.cosmology.scale_factor_from_redshift(z: NDArray[float64]) NDArray[float64]#
Return scale factor from redshift.
- Parameters:
z – Redshift value or array.
- Returns:
Scale factor values.
- Raises:
ValueError – If any redshift is negative.