aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils/cosmology.py
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim/utils/cosmology.py')
-rw-r--r--fg21sim/utils/cosmology.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/fg21sim/utils/cosmology.py b/fg21sim/utils/cosmology.py
index 9da3d80..e4979b1 100644
--- a/fg21sim/utils/cosmology.py
+++ b/fg21sim/utils/cosmology.py
@@ -199,6 +199,15 @@ class Cosmology:
"""
return self.Om0 * (1+z)**3 / self.E(z)**2
+ @property
+ def baryon_fraction(self):
+ """
+ The cosmological mean baryon fraction (w.r.t. matter).
+
+ XXX: assumed to be *constant* regardless of redshifts!
+ """
+ return self.Ob0 / self.Om0
+
def overdensity_virial(self, z):
"""
Calculate the virial overdensity, which generally used to