gphist.distance module¶
Cosmological distance model.
-
class
gphist.distance.
HubbleDistanceModel
(evol)¶ Bases:
object
Models expansion history as multiplicative correction to the fiducial DH(z).
Parameters: evol – evolution parameter to use, which must have a zvalues attribute and implement a get_DC method. -
get_DH
(samples)¶ Build expansion histories from Gaussian process samples.
Each sample gamma(z) generates a Hubble distance function DH(z) = DH0(z)*exp(gamma(z)).
Parameters: samples (ndarray) – 2D array with shape (num_samples,num_steps) of num_samples samples gamma(z) tabulated at the num_steps redshifts z given in zvalues. Returns: 1D array with shape (num_steps,) of tabulated DH(z) values. Return type: ndarray
-
-
gphist.distance.
convert_DC_to_DA
(DH, DC, omega_k)¶ Applies curvature to convert DC(z) into DA(z).
Parameters: - DH (ndarray) – input array with shape (nh,nz) of nh comoving distance functions DC(z) each tabulated at nz redshifts. Only the slice DH[:,0] corresponding to z=0 is actually used.
- DC (ndarray) – input array with shape (nh,nz) of nh comoving distance functions DC(z) each tabulated at nz redshifts starting with z=0. The input values are overwritten with DA values.
- omega_k (float) – curvature parameter Omega_k.
Returns: - a reference to the input array DC which now contains
values of DA.
Return type: ndarray