Flat Lambda CDM
flat_lambda_cdm
¶
Functions to compute cosmological quantities under flat lambda CDM model.
Functions¶
compute_normalized_hubble_parameter
¶
compute_normalized_hubble_parameter(redshift: Array, omega_m: Array) -> Array
Compute the normalized Hubble parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redshift
|
Array
|
Redshift. |
required |
omega_m
|
Array
|
Matter density. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Normalized Hubble parameter. |
compute_hubble_parameter
¶
compute_hubble_parameter(redshift: Array, hubble_constant: Array, omega_m: Array) -> Array
Compute the Hubble parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redshift
|
Array
|
Redshift. |
required |
hubble_constant
|
Array
|
Hubble constant in km / s / Mpc. |
required |
omega_m
|
Array
|
Matter density. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Hubble parameter in km / s/ Mpc. |
compute_comoving_distance
¶
compute_comoving_distance(redshift: Array, hubble_constant: Array, omega_m: Array, n_grid: int = 1000) -> Array
Compute the comoving distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redshift
|
Array
|
Redshift to evaluate the comoving distance. |
required |
hubble_constant
|
Array
|
Hubble constant in km / s / Mpc. |
required |
omega_m
|
Array
|
Matter density. |
required |
n_grid
|
int
|
Number of grid points to perform the numerical integration. |
1000
|
Returns:
| Type | Description |
|---|---|
Array
|
Comoving distance in Mpc. |
compute_differential_comoving_volume
¶
compute_differential_comoving_volume(redshift: Array, hubble_constant: Array, omega_m: Array, n_grid: int = 1000) -> Array
Compute the differential comoving volume.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redshift
|
Array
|
Redshift. |
required |
hubble_constant
|
Array
|
Hubble constant in km / s / Mpc. |
required |
omega_m
|
Array
|
Matter density. |
required |
n_grid
|
int
|
Number of grid points to perform the numerical integration. |
1000
|
Returns:
| Type | Description |
|---|---|
Array
|
Differential comoving volume in Mpc^{3}. |
compute_luminosity_distance
¶
compute_luminosity_distance(redshift: Array, hubble_constant: Array, omega_m: Array, n_grid: int = 1000) -> Array
Compute the luminosity distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redshift
|
Array
|
Redshift to evaluate the luminosity distance. |
required |
hubble_constant
|
Array
|
Hubble constant in km / s / Mpc. |
required |
omega_m
|
Array
|
Matter density. |
required |
n_grid
|
int
|
Number of grid points to perform the numerical integration. |
1000
|
Returns:
| Type | Description |
|---|---|
Array
|
Luminosity distance in Mpc. |
build_distance_lookup
¶
build_distance_lookup(*, hubble_constant: float = PLANCK18_H0_KM_S_MPC, omega_m: float = PLANCK18_OMEGA_M, max_redshift: float = DEFAULT_MAX_REDSHIFT, n_grid: int = DEFAULT_LOOKUP_GRID_SIZE) -> tuple[Array, Array, Array]
Build flat-ΛCDM lookup tables for redshift, comoving distance, and luminosity distance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hubble_constant
|
float
|
Hubble constant in km / s / Mpc. |
PLANCK18_H0_KM_S_MPC
|
omega_m
|
float
|
Matter density. |
PLANCK18_OMEGA_M
|
max_redshift
|
float
|
Largest redshift tabulated by the lookup. |
DEFAULT_MAX_REDSHIFT
|
n_grid
|
int
|
Number of tabulation points. |
DEFAULT_LOOKUP_GRID_SIZE
|
Returns:
| Type | Description |
|---|---|
tuple[Array, Array, Array]
|
Tuple |
compute_redshift_from_luminosity_distance
¶
compute_redshift_from_luminosity_distance(luminosity_distance: Array, *, hubble_constant: float = PLANCK18_H0_KM_S_MPC, omega_m: float = PLANCK18_OMEGA_M, max_redshift: float = DEFAULT_MAX_REDSHIFT, n_grid: int = DEFAULT_LOOKUP_GRID_SIZE) -> Array
Invert a luminosity distance to redshift via a flat-ΛCDM lookup table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
luminosity_distance
|
Array
|
Luminosity distance in Mpc. |
required |
hubble_constant
|
float
|
Hubble constant in km / s / Mpc. |
PLANCK18_H0_KM_S_MPC
|
omega_m
|
float
|
Matter density. |
PLANCK18_OMEGA_M
|
max_redshift
|
float
|
Largest redshift tabulated by the lookup. |
DEFAULT_MAX_REDSHIFT
|
n_grid
|
int
|
Number of tabulation points. |
DEFAULT_LOOKUP_GRID_SIZE
|
Returns:
| Type | Description |
|---|---|
Array
|
Redshift inferred from |