diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-26 15:55:33 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-26 15:55:33 +0800 |
commit | b0c8f1de53249964d00602bea81dcf55dfc7a1f6 (patch) | |
tree | 0d2f34d656c7ddd4fbaa27b9223beb04664d6ba2 /fg21sim | |
parent | 5b3c99ad46b6fd141ea1aa30d9e436ee564d04e8 (diff) | |
download | fg21sim-b0c8f1de53249964d00602bea81dcf55dfc7a1f6.tar.bz2 |
clusters/halo: Remove *_avg and *_fraction methods
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 50 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 4 |
2 files changed, 0 insertions, 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 |