From e02dbad25018386e9ebe38e1495a95b46633ec70 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 29 Jan 2019 15:23:57 +0800 Subject: clusters/main: Do not require "age" in _simulate_mergers() Thus _simulate_mergers() can be called without _process_catalog(). --- fg21sim/extragalactic/clusters/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fg21sim') 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)" % -- cgit v1.2.2