From b0c8f1de53249964d00602bea81dcf55dfc7a1f6 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 26 Jan 2019 15:55:33 +0800 Subject: clusters/halo: Remove *_avg and *_fraction methods --- fg21sim/extragalactic/clusters/halo.py | 50 ---------------------------------- fg21sim/extragalactic/clusters/main.py | 4 --- 2 files changed, 54 deletions(-) diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index ed73a47..458c1d0 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -852,56 +852,6 @@ class RadioHaloAM(RadioHalo1M): rate = (mass0 - mass1) / (t0 - t1) return (mass1 + rate * (t - t1)) - @property - def duration_turb_avg(self): - """ - Calculate the time-averaged turbulence acceleration active time - within the period from ``age_begin`` to ``age_obs``. - - Unit: [Gyr] - """ - dt = self.time_step - xt = np.arange(self.age_begin, self.age_obs+dt/2, step=dt) - t_turb = np.array([self.duration_turb(t) for t in xt]) - return np.sum(t_turb * dt) / (len(xt) * dt) - - @property - def mach_turbulence_avg(self): - """ - Calculate the time-averaged turbulence Mach number within the - period from ``age_begin`` to ``age_obs``. - """ - dt = self.time_step - xt = np.arange(self.age_begin, self.age_obs+dt/2, step=dt) - mach = np.array([self.mach_turbulence(t) for t in xt]) - return np.sum(mach * dt) / (len(xt) * dt) - - @property - def tau_acceleration_avg(self): - """ - Calculate the time-averaged turbulence acceleration timescale - (i.e., efficiency) within the period from ``age_begin`` to - ``age_obs``. - - Unit: [Gyr] - """ - dt = self.time_step - xt = np.arange(self.age_begin, self.age_obs+dt/2, step=dt) - tau = np.array([self.tau_acceleration(t) for t in xt]) - return np.sum(tau * dt) / (len(xt) * dt) - - @property - def time_acceleration_fraction(self): - """ - Calculate the fraction of time within the period from - ``age_begin`` to ``age_obs`` that the turbulence acceleration - is active. - """ - dt = self.fpsolver.tstep - xt = np.arange(self.age_begin, self.age_obs+dt/2, step=dt) - active = np.array([self._is_turb_active(t) for t in xt], dtype=int) - return active.mean() - class RadioHalo: """ diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 061b8ef..e169ab9 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -304,10 +304,6 @@ class GalaxyClusters: n_e=n_e, # [cm^-3] gamma=halo.gamma, # Lorentz factors Ke=halo.injection_rate, # [cm^-3 Gyr^-1] - Mach_turb=halo.mach_turbulence_avg, # Mach number - tau_turb=halo.duration_turb_avg, # [Gyr] - tau_acc=halo.tau_acceleration_avg, # [Gyr] - tfrac_acc=halo.time_acceleration_fraction, ) return haloinfo -- cgit v1.2.2