diff options
author | Aaron LI <aly@aaronly.me> | 2019-02-21 22:52:12 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-02-21 22:52:12 +0800 |
commit | b8bb0ecbcb56ba467c2767534b7e6f9367ba2a2a (patch) | |
tree | 9b340b4b0064e9f9f5c210b2f3c19d70998977c7 /fg21sim | |
parent | adab9d6a380d51bd5dafe6fa32d3ef8661de4458 (diff) | |
download | fg21sim-b8bb0ecbcb56ba467c2767534b7e6f9367ba2a2a.tar.bz2 |
clusters/halo: Clean up _is_turb_active()
Do not check 'self._acceleration_disabled'. This will be reworked in a
moment.
Clean up the code.
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 11 |
1 files changed, 4 insertions, 7 deletions
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): """ |