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"],Planck18out of the box) is returned.- Parameters:
cosmology (
FLRW, optional) – Cosmology to use. IfNone, the configured default is returned.- Returns:
Cosmology object used for subsequent calculations.
- Return type:
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.