From 99b906360564d68b149d3e35e990e73c82676bf6 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 27 Jan 2019 11:46:47 +0800 Subject: clusters/halo: Add 'radius_turb_max' property --- fg21sim/extragalactic/clusters/halo.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'fg21sim/extragalactic') 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): -- cgit v1.2.2