aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-10 23:58:12 +0800
committerAaron LI <aly@aaronly.me>2019-01-11 00:02:19 +0800
commit8b88004202b7be34e354879cc224a2d6ed72ecd7 (patch)
treeb21fd6f88cbdf8341162b3748a06db5fb9131d99 /fg21sim
parent9a4e307afed41d6c721980c0d8fc1bbdccbc79e4 (diff)
downloadfg21sim-8b88004202b7be34e354879cc224a2d6ed72ecd7.tar.bz2
clusters/halo: Implement calc_radius_turb()
Determine the effective radius of the turbulence region along the whole merging process (i.e., multiple merger events).
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index e0f4b4b..47895fe 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -945,6 +945,9 @@ class RadioHalo:
merger_num : int
Number of merger events traced for the cluster.
"""
+ # Effective radius of the turbulence region [kpc]
+ radius_turb_eff = None
+
def __init__(self, M_obs, z_obs, M_main, M_sub, z_merger,
merger_num, configs=CONFIGS):
self.M_obs, self.z_obs = M_obs, z_obs
@@ -953,3 +956,36 @@ class RadioHalo:
self.z_merger = np.asarray(z_merger[:merger_num])
self.merger_num = merger_num
self.configs = configs
+
+ def calc_radius_turb(self):
+ """
+ Determine the effective radius of the turbulence region along the
+ whole merging process. The effective size is determined by the
+ largest turbulence radius of a merger that is generating a genuine
+ radio halo.
+
+ Attributes
+ ----------
+ radius_turb_eff : float
+ Effective radius of the turbulence region
+ Unit: [kpc]
+ """
+ logger.info("Determining the effective turbulence radius ...")
+ halos = [RadioHalo1M(M_obs=self.M_obs, z_obs=self.z_obs,
+ M_main=self.M_main[i],
+ M_sub=self.M_sub[i],
+ z_merger=self.z_merger[i],
+ configs=self.configs)
+ for i in range(self.merger_num)]
+ halos.sort(key=lambda h: h.radius_turbulence(h.age_merger),
+ reverse=True)
+ for halo in halos:
+ logger.info("Checking merger: %.2e & %.2e @ %.3f ..." %
+ (halo.M_main, halo.M_sub, halo.z_merger))
+ n_e = halo.calc_electron_spectrum()
+ genuine, factor = halo.is_genuine(n_e)
+ if genuine:
+ self.radius_turb_eff = halo.radius_turbulence(halo.age_merger)
+ logger.info("Identified effective merger")
+ break
+ return self.radius_turb_eff