def dage(self): """ Return the dimensionless age of the universe for the current cosmology (in units of 1/H_0). """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) return _cosmo.dage()
def dlbt(self, z): """ Return the dimensionless look-back time to redshift z (in units of 1/H_0). """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) return _cosmo.dlbt_z(z)
def ldist(self, z): """ Return the luminosity distance to redshift z, in Mpc. """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) try: len(z) ldvals = _cosmo.nldist(z) return ldvals / 1.e5 except TypeError: return _cosmo.ldist(z) / 1.e5
def mu(self, z): """ Return the distance modulus to redshift z. This will work for a vector of z values, as well as a scalar. """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) try: len(z) ldvals = _cosmo.nldist(z) return 5*log10(ldvals) except TypeError: return _cosmo.mu_z(z)
def mu(self, z): """ Return the distance modulus to redshift z. This will work for a vector of z values, as well as a scalar. """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) try: len(z) ldvals = _cosmo.nldist(z) return 5 * log10(ldvals) except TypeError: return _cosmo.mu_z(z)
def vol_elem(self, z): """ Return the volume per unit redshift per unit steradian. """ _cosmo.set_frw_cosmo(self.h, self.O_m, self.O_lambda) return _cosmo.vol_elem(z)