yaw.core.cosmology.CustomCosmology#

class yaw.core.cosmology.CustomCosmology[source]#

Bases: ABC

Metaclass that defines the API to implement a custom cosmological model.

The two required methods should behave like the corresponding methods in astropy.cosmology.FLRW.

Methods

__init__()

comoving_distance(z)

Comoving line-of-sight distance in Mpc at a given redshift.

comoving_transverse_distance(z)

Comoving transverse distance in Mpc at a given redshift.

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

Comoving line-of-sight distance in Mpc at a given redshift.

The comoving distance along the line-of-sight between two objects remains constant with time for objects in the Hubble flow.

Parameters:

z (Quantity-like redshift, NDArray, or scalar number) – Input redshift.

Returns:

Comoving distance in Mpc to each input redshift.

Return type:

astropy.units.Quantity

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

Comoving transverse distance in Mpc at a given redshift.

This value is the transverse comoving distance at redshift \(z\) corresponding to an angular separation of 1 radian. This is the same as the comoving distance if \(\Omega_k\) is zero (as in the current concordance Lambda-CDM model).

Parameters:

z (Quantity-like redshift, NDArray, or scalar number) – Input redshift.

Returns:

Comoving transverse distance in Mpc at each input redshift.

Return type:

astropy.units.Quantity