aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-29 15:23:57 +0800
committerAaron LI <aly@aaronly.me>2019-01-29 15:23:57 +0800
commite02dbad25018386e9ebe38e1495a95b46633ec70 (patch)
treeaaf32f60b92e0f5262b1a2cc91fe1028b6cb476e /fg21sim/extragalactic
parent579da3bd096785458370bcc2b14d967b573cfe5b (diff)
downloadfg21sim-e02dbad25018386e9ebe38e1495a95b46633ec70.tar.bz2
clusters/main: Do not require "age" in _simulate_mergers()
Thus _simulate_mergers() can be called without _process_catalog().
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r--fg21sim/extragalactic/clusters/main.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index c623104..e81828e 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -236,8 +236,8 @@ class GalaxyClusters:
ii = i + 1
if ii % 100 == 0:
logger.info("[%d/%d] %.1f%% ..." % (ii, num, 100*ii/num))
- z0, M0, age0 = cdict["z"], cdict["mass"], cdict["age"]
- zmax = COSMO.redshift(age0 - self.time_traceback)
+ z0, M0 = cdict["z"], cdict["mass"]
+ zmax = COSMO.redshift(COSMO.age(z0) - self.time_traceback)
clform = ClusterFormation(M0=M0*fdm, z0=z0, zmax=zmax,
merger_mass_min=self.merger_mass_min)
clform.simulate_mtree(main_only=True)
@@ -287,8 +287,7 @@ class GalaxyClusters:
The calculated radio halo information.
"""
merger_num = clinfo["merger_num"]
- M_obs = clinfo["mass"]
- z_obs = clinfo["z"]
+ M_obs, z_obs = clinfo["mass"], clinfo["z"]
M1 = clinfo["merger_mass1"][merger_num-1]
z1 = clinfo["merger_z"][merger_num-1]
logger.info("M(%.2e)@z(%.3f) -> M(%.2e)@z(%.3f) with %d merger(s)" %