uvex_transients.utils.cosmology.get_cosmology#

uvex_transients.utils.cosmology.get_cosmology(cosmology: Cosmology | None = None) → Cosmology[source]#

Return the cosmology to be used for calculations.

If no cosmology is provided, the configured default (config["physics.default_cosmology"], Planck18 out of the box) is returned.

Parameters:

cosmology (FLRW, optional) – Cosmology to use. If None, the configured default is returned.

Returns:

Cosmology object used for subsequent calculations.

Return type:

FLRW

Notes

This helper ensures that all parts of the framework consistently use the same default cosmology unless explicitly overridden. The default itself is set via config["physics.default_cosmology"]; see uvex_transients.utils.config.