diff options
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 07d0a9f..151e5c8 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -665,9 +665,8 @@ class RadioHalo: B = helper.magnetic_field(mass=mass, z=z, configs=self.configs) return B - @property @lru_cache() - def _gas_density_profile_f(self): + def _gas_density_profile_f(self, t=None): """ The gas density profile of the merged cluster. @@ -676,8 +675,11 @@ class RadioHalo: f(r) : function A function that calculates the gas density of unit [Msun/kpc^3]. """ - return helper.calc_gas_density_profile( - mass=self.M_main+self.M_sub, z=self.z_merger) + M_main = self.mass_main(t) + M_sub = self.mass_sub(t) + t_merger = self._merger_time(t) + z_merger = COSMO.redshift(t_merger) + return helper.calc_gas_density_profile(mass=M_main+M_sub, z=z_merger) @property @lru_cache |