aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-26 15:51:27 +0800
committerAaron LI <aly@aaronly.me>2019-01-26 15:54:17 +0800
commit5b3c99ad46b6fd141ea1aa30d9e436ee564d04e8 (patch)
tree89dbe43d3cd36896865b6ba516a217e1e196a74a /fg21sim/extragalactic/clusters
parent0ad0d16dd5b12b4f172a873673399106fa99b1fa (diff)
downloadfg21sim-5b3c99ad46b6fd141ea1aa30d9e436ee564d04e8.tar.bz2
clusters/halo: Use t_merger for duration_turb() and mach_turb()
Rename mach_turbulence() to mach_turb().
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index b480b9c..ed73a47 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -197,7 +197,8 @@ class RadioHalo1M:
"""
return self.age_merger
- def duration_turb(self, t=None):
+ @lru_cache()
+ def duration_turb(self, t_merger):
"""
The duration that the turbulence persists strong enough to be
able to effectively accelerate the electrons, which is
@@ -208,7 +209,7 @@ class RadioHalo1M:
Unit: [Gyr]
"""
- t_merger = self._merger_time(t)
+ self._validate_t_merger(t_merger)
z_merger = COSMO.redshift(t_merger)
M_main = self.mass_main(t=t_merger)
M_sub = self.mass_sub(t=t_merger)
@@ -217,11 +218,12 @@ class RadioHalo1M:
uconv = AUC.kpc2km * AUC.s2Gyr # [kpc]/[km/s] => [Gyr]
return uconv * 2*L_turb / vi # [Gyr]
- def mach_turbulence(self, t=None):
+ @lru_cache()
+ def mach_turb(self, t_merger):
"""
The turbulence Mach number determined from its velocity dispersion.
"""
- t_merger = self._merger_time(t)
+ self._validate_t_merger(t_merger)
cs = helper.speed_sound(self.kT(t_merger)) # [km/s]
v_turb = self._velocity_turb(t_merger) # [km/s]
return v_turb / cs