aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-02-21 20:37:33 +0800
committerAaron LI <aly@aaronly.me>2019-02-21 20:38:43 +0800
commit78be1f0735829491c7fb322c02feab46ce917d32 (patch)
tree4126123d667dd868f8094408b670fb379aa2739c /fg21sim/extragalactic
parent308442d1ca1a0f56889dd60f78d2b776ace2d81b (diff)
downloadfg21sim-78be1f0735829491c7fb322c02feab46ce917d32.tar.bz2
clusters/halo: Reorder '_is_turb_active()' a bit
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index e24a0c3..bcda7bb 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -684,6 +684,17 @@ class RadioHalo1M:
return
raise ValueError("Not a merger begin/end time: %f" % t)
+ def _is_turb_active(self, t):
+ """
+ Is the turbulence acceleration is active at the given time?
+ """
+ if self._acceleration_disabled:
+ return False
+
+ t_merger = self._merger_time(t)
+ tau_turb = self.duration_turb(t_merger)
+ return (t >= t_merger) and (t <= t_merger + tau_turb)
+
def mass_merged(self, t=None):
"""
The mass of the merged cluster.
@@ -733,17 +744,6 @@ class RadioHalo1M:
return helper.magnetic_field(mass=mass, z=z,
eta_b=self.eta_b, kT_out=self.kT_out)
- def _is_turb_active(self, t):
- """
- Is the turbulence acceleration is active at the given time?
- """
- if self._acceleration_disabled:
- return False
-
- t_merger = self._merger_time(t)
- tau_turb = self.duration_turb(t_merger)
- return (t >= t_merger) and (t <= t_merger + tau_turb)
-
class RadioHaloAM(RadioHalo1M):
"""