aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/main.py4
-rw-r--r--fg21sim/extragalactic/clusters/psformalism.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index e81828e..e174db3 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -120,10 +120,10 @@ class GalaxyClusters:
psform.write()
counts = psform.calc_cluster_counts(coverage=self.sky.area)
z, mass, self.comments = psform.sample_z_m(counts)
- dm_frac = 1 - COSMO.baryon_fraction
+ fdm = 1 - COSMO.baryon_fraction
self.catalog = [OrderedDict([("z", z_),
("mass_dm", m_),
- ("mass", m_ / dm_frac)])
+ ("mass", m_ / fdm)])
for z_, m_ in zip(z, mass)]
self.comments += [
"",
diff --git a/fg21sim/extragalactic/clusters/psformalism.py b/fg21sim/extragalactic/clusters/psformalism.py
index d5c9fa5..328ba08 100644
--- a/fg21sim/extragalactic/clusters/psformalism.py
+++ b/fg21sim/extragalactic/clusters/psformalism.py
@@ -1,5 +1,5 @@
-# Copyright (c) 2017-2018 Weitian LI <weitian@aaronly.me>
-# MIT license
+# Copyright (c) 2017-2019 Weitian LI <wt@liwt.net>
+# MIT License
"""
Press-Schechter (PS) formalism
@@ -52,7 +52,8 @@ class PSFormalism:
self.dndlnm_outfile = self.configs.get_path(comp+"/dndlnm_outfile")
comp = "extragalactic/clusters"
- self.Mmin = self.configs.getn(comp+"/mass_min") # [Msun]
+ fdm = 1 - COSMO.baryon_fraction
+ self.Mmin = self.configs.getn(comp+"/mass_min") * fdm # [Msun]
self.boost = self.configs.getn(comp+"/boost")
self.clobber = self.configs.getn("output/clobber")
@@ -295,7 +296,8 @@ class PSFormalism:
mass = np.array(mass_list)
comment = [
"halo mass function model: %s" % self.hmf_model,
- "cluster minimum mass: %.2e [Msun]" % self.Mmin,
+ "halo minimum mass (dark matter): %.2e [Msun]" % self.Mmin,
+ "dark matter fraction: %.2f" % (1-COSMO.baryon_fraction),
"cluster counts: %d" % counts,
"boost factor for cluster counts: %s" % self.boost,
]