From 1f21e9e5a4ad8290bf53187ffe978e74ad94e50d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 8 Nov 2018 18:18:46 +0800 Subject: clusters/halo: Add radius_stripping() method --- fg21sim/extragalactic/clusters/halo.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'fg21sim/extragalactic') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 21e3374..81a185c 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -254,10 +254,20 @@ class RadioHalo: """ z = COSMO.redshift(t) M_main = self.mass_main(t) - M_sub = self.mass_sub(t) - rs = helper.radius_stripping(M_main, M_sub, z, configs=self.configs) R_vir = helper.radius_virial(M_main, z) - return (R_vir + rs) / 2 + r_s = self.radius_stripping(t) + return (R_vir + r_s) / 2 + + @lru_cache() + def radius_stripping(self, t): + """ + The stripping radius of the in-falling sub-cluster at time t. + Unit: [kpc] + """ + z = COSMO.redshift(t) + M_main = self.mass_main(t) + M_sub = self.mass_sub(t) + return helper.radius_stripping(M_main, M_sub, z, configs=self.configs) @property def angular_radius(self): -- cgit v1.2.2