aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-29 20:53:31 +0800
committerAaron LI <aly@aaronly.me>2017-08-29 20:53:31 +0800
commitfea0272a343ec700505654c6d042538d0db590f9 (patch)
tree0693bf7fdbbfed64e802895bc4f6fa99fbb0f654 /fg21sim/utils
parent2379c84736f687e4ebc32583a3c2a34be0b88e98 (diff)
downloadfg21sim-fea0272a343ec700505654c6d042538d0db590f9.tar.bz2
clusters/psformalism: Remove config "f_darkmatter"
Use "1 - baryon_fraction = 1 - Ob0/Om0" to replace "f_darkmatter".
Diffstat (limited to 'fg21sim/utils')
-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