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.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/fg21sim/utils/cosmology.py b/fg21sim/utils/cosmology.py
index d66de09..cc347e4 100644
--- a/fg21sim/utils/cosmology.py
+++ b/fg21sim/utils/cosmology.py
@@ -248,6 +248,16 @@ class Cosmology:
"""
return self.Ob0 / self.Om0
+ @property
+ def darkmatter_fraction(self):
+ """
+ The cosmological mean dark matter fraction (w.r.t. matter),
+ assumed to be *constant* regardless of redshifts!
+
+ See also: ``self.baryon_fraction``
+ """
+ return 1 - self.baryon_fraction
+
def overdensity_virial(self, z):
"""
Calculate the virial overdensity, which generally used to