Skip to content

Commit

Permalink
ENH: add cosmology to CBC result object
Browse files Browse the repository at this point in the history
  • Loading branch information
mj-will authored and ColmTalbot committed Jan 23, 2025
1 parent 36470d5 commit a7d7465
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bilby/gw/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ def parameter_conversion(self):
return self.__get_from_nested_meta_data(
'likelihood', 'parameter_conversion')

@property
def cosmology(self):
"""The global cosmology used in the analysis.
If the cosmology is not set, the default cosmology is returned.
See :py:func:`bilby.gw.cosmology.get_cosmology` for details.
.. versionadded:: 2.5.0
"""
from .cosmology import get_cosmology
return get_cosmology()

def detector_injection_properties(self, detector):
""" Returns a dictionary of the injection properties for each detector
Expand Down

0 comments on commit a7d7465

Please sign in to comment.