aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters/helper.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-23 21:11:07 +0800
committerAaron LI <aly@aaronly.me>2017-10-23 21:11:07 +0800
commitc1a561a8c05a7e59cdf3a34ac2112eed5ea7c406 (patch)
treedc187a7b7d24f50c9d1a765b2f78be9e827bd301 /fg21sim/extragalactic/clusters/helper.py
parent6fa552dca1ad74f39a7d1d44e55d9eb8eaa4a9b9 (diff)
downloadfg21sim-c1a561a8c05a7e59cdf3a34ac2112eed5ea7c406.tar.bz2
clusters/halo: Use "lru_cache()", also improves some performance
Diffstat (limited to 'fg21sim/extragalactic/clusters/helper.py')
-rw-r--r--fg21sim/extragalactic/clusters/helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py
index 86662e1..df7809d 100644
--- a/fg21sim/extragalactic/clusters/helper.py
+++ b/fg21sim/extragalactic/clusters/helper.py
@@ -311,7 +311,7 @@ def velocity_impact(M_main, M_sub, z=0.0):
----------
Ref.[cassano2005],Eq.(9)
"""
- eta_v = 4 * (1 + M_main/M_sub) ** (1/3)
+ eta_v = 4 * (1 + M_main/M_sub) ** 0.333333
R_vir = radius_virial(M_main, z) * AUC.kpc2cm # [cm]
vi = np.sqrt(2*AC.G * (1-1/eta_v) *
(M_main+M_sub)*AUC.Msun2g / R_vir) # [cm/s]