wcosmo.wcosmo#

Functional implementation of cosmological parameters.

Note

This module is intended to be used as a functional alternative to the astropy class-based method. In general, units will be propagated when using numpy, but all of the code can also be used without units. Special care is needed with hubble_distance() and hubble_time() as these functions use constants which have units unless wcosmo.utils.disable_units() has been called.

absorption_distance(z, Om0[, w0, method])

Compute the absorption distance using an analytic integral of the Pade approximation.

comoving_distance(z, H0, Om0[, w0, method])

Compute the comoving distance using an analytic integral of the Pade approximation.

comoving_volume(z, H0, Om0[, w0, method])

Compute the comoving volume out to redshift z.

detector_to_source_frame(m1z, m2z, dL, H0, Om0)

Convert masses and luminosity distance from the detector frame to source frame masses and redshift.

differential_comoving_volume(z, H0, Om0[, ...])

Compute the differential comoving volume element.

dDLdz(z, H0, Om0[, w0, method])

The Jacobian for the conversion of redshift to luminosity distance.

efunc(z, Om0[, w0])

Compute the \(E(z)\) function for a flat wCDM cosmology.

hubble_distance(H0, *[, xp])

Compute the Hubble distance \(D_H = c H_0^{-1}\) in Mpc.

hubble_parameter(z, H0, Om0[, w0])

Compute the Hubble parameter \(H(z)\) for a flat wCDM cosmology.

hubble_time(H0, *[, xp])

Compute the Hubble time \(t_H = H_0^{-1}\) in Gyr.

inv_efunc(z, Om0[, w0])

Compute the inverse of the E(z) function for a flat wCDM cosmology.

lookback_time(z, H0, Om0[, w0, method])

Compute the lookback time using an analytic integral of the Pade approximation.

luminosity_distance(z, H0, Om0[, w0, method])

Compute the luminosity distance using an analytic integral of the Pade approximation.

source_to_detector_frame(m1, m2, z, H0, Om0)

Convert masses and redshift from the source frame to the detector frame.

z_at_value(func, fval[, zmin, zmax])

Compute the redshift at which a function equals a given value.