From b8bb0ecbcb56ba467c2767534b7e6f9367ba2a2a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 21 Feb 2019 22:52:12 +0800 Subject: clusters/halo: Clean up _is_turb_active() Do not check 'self._acceleration_disabled'. This will be reworked in a moment. Clean up the code. --- fg21sim/extragalactic/clusters/halo.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index ab82a60..9e548ad 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -755,14 +755,11 @@ class RadioHalo1M: def _is_turb_active(self, t): """ - Is the turbulence acceleration is active at the given time? + Is the turbulence acceleration 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) + t_begin = self._merger_time(t) + t_end = t_begin + self.duration_turb(t_begin) + return (t >= t_begin) and (t <= t_end) def mass_merged(self, t=None): """ -- cgit v1.2.2