diff options
author | Aaron LI <aly@aaronly.me> | 2018-01-05 15:44:47 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-01-05 15:44:47 +0800 |
commit | 3508da9c0d3cd179c84e193c632df732a6ab6404 (patch) | |
tree | 72737e516ca1b4f645d62a38f6784165a592bfc9 | |
parent | 339daa8b276c52755eb635acf5771652a422a088 (diff) | |
download | fg21sim-3508da9c0d3cd179c84e193c632df732a6ab6404.tar.bz2 |
clusters/halo: add _merger_time() and mass_sub() methods
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index f8902a3..1f9e6b2 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -600,6 +600,13 @@ class RadioHalo: (self.fp_diffusion(gamma, t) * 2 / gamma)) return advection + def _merger_time(self, t=None): + """ + The (cosmic) time when the merger begins. + Unit: [Gyr] + """ + return self.age_begin + def mass_merged(self, t=None): """ The mass of the merged cluster. @@ -607,6 +614,13 @@ class RadioHalo: """ return self.M_main + self.M_sub + def mass_sub(self, t=None): + """ + The mass of the sub cluster. + Unit: [Msun] + """ + return self.M_sub + def mass_main(self, t): """ Calculate the main cluster mass at the given (cosmic) time. @@ -785,6 +799,14 @@ class RadioHaloAM(RadioHalo): """ return (self.age_merger > t).sum() + def _merger_time(self, t): + """ + Determine the beginning time of the merger event within which + the given time is located. + """ + idx = self._merger_idx(t) + return self.age_merger[idx] + def _merger(self, idx): """ Return the properties of the idx-th merger event. @@ -808,6 +830,15 @@ class RadioHaloAM(RadioHalo): merger = self._merger(idx) return (merger["M_main"] + merger["M_sub"]) + def mass_sub(self, t): + """ + The mass of the sub cluster at the given (cosmic) time. + Unit: [Msun] + """ + idx = self._merger_idx(t) + merger = self._merger(idx) + return merger["M_sub"] + def mass_main(self, t): """ Calculate the main cluster mass at the given (cosmic) time. |