yaw.cosmology.CustomCosmology#

class yaw.cosmology.CustomCosmology[source]#

Bases: ABC

Meta-class that defines the interface for custom cosmologies.

Custom cosmology must either be an astropy cosmological model or must be a subclass of this meta-class to be compatible with yet_another_wizz.

Methods

__init__()

angular_diameter_distance(z)

Compute the angular diameter distance at the given redshift.

comoving_distance(z)

Compute the comoving distance at the given redshift.

abstract angular_diameter_distance(z: ArrayLike) ArrayLike[source]#

Compute the angular diameter distance at the given redshift.

Parameters:

z – A single or an array of redshifts.

Returns:

Float or numpy array with angular diameter distance in Mpc for given input redshifts.

abstract comoving_distance(z: ArrayLike) ArrayLike[source]#

Compute the comoving distance at the given redshift.

Parameters:

z – A single or an array of redshifts.

Returns:

Float or numpy array with comoving distance in Mpc for given input redshifts.