aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-27 11:46:47 +0800
committerAaron LI <aly@aaronly.me>2019-01-27 11:46:47 +0800
commit99b906360564d68b149d3e35e990e73c82676bf6 (patch)
tree58504d9cd7cdd0d5c0df84b0bc00a4c2432e4759
parent7eca59bde1b32b0f10cd8c2dad9c760838469709 (diff)
downloadfg21sim-99b906360564d68b149d3e35e990e73c82676bf6.tar.bz2
clusters/halo: Add 'radius_turb_max' property
-rw-r--r--fg21sim/extragalactic/clusters/halo.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index a0c49a2..94cb1c0 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -767,8 +767,16 @@ class RadioHaloAM(RadioHalo1M):
The halo radius estimated by using the maximum turbulence radius.
Unit: [kpc]
"""
- r_turb = [self.radius_turb(tm) for tm in self.t_merger]
- return self.f_radius * max(r_turb)
+ return self.f_radius * self.radius_turb_max
+
+ @property
+ @lru_cache()
+ def radius_turb_max(self):
+ """
+ The maximum turbulence radius.
+ Unit: [kpc]
+ """
+ return max([self.radius_turb(tm) for tm in self.t_merger])
@property
def t_begin(self):