diff options
author | Aaron LI <aly@aaronly.me> | 2018-11-01 23:48:08 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-11-01 23:48:08 +0800 |
commit | 3760624fc4a35a81d0d22c22c26282657826126c (patch) | |
tree | 2a144bab33516ef813936b2473b4cc2f6932f294 /fg21sim/extragalactic | |
parent | 056d116db845bc7162e148cb5a9849360d949f0d (diff) | |
download | fg21sim-3760624fc4a35a81d0d22c22c26282657826126c.tar.bz2 |
clusters/halo: Improve cluster temperature calculation
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 0db0b0d..7343cb1 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -290,18 +290,16 @@ class RadioHalo: return helper.kT_cluster(self.M_obs, z=self.z_obs, configs=self.configs) - def kT(self, t=None): + @lru_cache() + def kT(self, t): """ - The ICM mean temperature of the main cluster at cosmic time - ``t`` (default: ``self.age_begin``). - + The ICM mean temperature of the merged cluster. Unit: [keV] """ - if t is None: - t = self.age_begin - mass = self.mass_main(t) + M_main = self.mass_main(t) + M_sub = self.mass_sub(t) z = COSMO.redshift(t) - return helper.kT_cluster(mass=mass, z=z, configs=self.configs) + return helper.kT_cluster(mass=M_main+M_sub, z=z, configs=self.configs) def tau_acceleration(self, t): """ |