diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-17 15:16:12 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-17 15:16:12 +0800 |
commit | 576bdca6372710bdd52107e57e944d843bd89a11 (patch) | |
tree | 790087506b46d11333afc998b67ae226ce4ec21b /fg21sim/extragalactic | |
parent | ab00ba4ff010e11d40e292186d5bc15a52a9b90a (diff) | |
download | fg21sim-576bdca6372710bdd52107e57e944d843bd89a11.tar.bz2 |
clusters/main: Account for baryon fraction in _simulate_catalog()
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 14 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/psformalism.py | 3 |
2 files changed, 11 insertions, 6 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 2f27c07..52e179c 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -115,9 +115,17 @@ class GalaxyClusters: psform.write() counts = psform.calc_cluster_counts(coverage=self.sky.area) z, mass, self.comments = psform.sample_z_m(counts) - self.catalog = [] - for z_, m_ in zip(z, mass): - self.catalog.append(OrderedDict([("z", z_), ("mass", m_)])) + dm_frac = 1 - COSMO.baryon_fraction + self.catalog = [OrderedDict([("z", z_), + ("mass_dm", m_), + ("mass", m_ / dm_frac)]) + for z_, m_ in zip(z, mass)] + self.comments += [ + "", + "z - redshift", + "mass_dm - [Msun] dark matter halo mass", + "mass - [Msun] cluster total mass", + ] logger.info("Simulated a catalog of %d clusters" % counts) def _process_catalog(self): diff --git a/fg21sim/extragalactic/clusters/psformalism.py b/fg21sim/extragalactic/clusters/psformalism.py index dff69a5..d5c9fa5 100644 --- a/fg21sim/extragalactic/clusters/psformalism.py +++ b/fg21sim/extragalactic/clusters/psformalism.py @@ -298,8 +298,5 @@ class PSFormalism: "cluster minimum mass: %.2e [Msun]" % self.Mmin, "cluster counts: %d" % counts, "boost factor for cluster counts: %s" % self.boost, - "", - "z - redshift", - "mass - [Msun] cluster total mass", ] return (z, mass, comment) |