aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-29 20:38:29 +0800
committerAaron LI <aly@aaronly.me>2019-01-29 20:38:29 +0800
commit8387ab1ac665b0683881ad5dde21d246668afbe2 (patch)
tree5d26b857908e92b2c796860d7c39ae6744cc5ae6 /fg21sim/extragalactic
parent54434d4b24104457d04af79a1a75ecf713c07bc1 (diff)
downloadfg21sim-8387ab1ac665b0683881ad5dde21d246668afbe2.tar.bz2
clusters/psformalism: Count for dark matter fraction for M_min
Diffstat (limited to 'fg21sim/extragalactic')
-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,
]