aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py8
-rw-r--r--fg21sim/extragalactic/clusters/helper.py2
2 files changed, 6 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index fd6f13a..9c6c70e 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -266,7 +266,8 @@ class RadioHalo:
Unit: [uG]
"""
- return helper.magnetic_field(mass=self.M_obs, z=self.z_obs)
+ return helper.magnetic_field(mass=self.M_obs, z=self.z_obs,
+ configs=self.configs)
@property
@lru_cache()
@@ -374,7 +375,8 @@ class RadioHalo:
Ref.[cassano2005],Eqs.(31,32,33)
"""
s = self.injection_index
- e_thermal = helper.density_energy_thermal(self.M_obs, self.z_obs)
+ e_thermal = helper.density_energy_thermal(self.M_obs, self.z_obs,
+ configs=self.configs)
term1 = (s-2) * self.eta_e * e_thermal # [erg cm^-3]
term2 = self.gamma_min**(s-2)
term3 = AU.mec2 * self.age_obs # [erg Gyr]
@@ -769,7 +771,7 @@ class RadioHalo:
"""
z = COSMO.redshift(t)
mass = self._mass(t) # [Msun]
- B = helper.magnetic_field(mass=mass, z=z) # [uG]
+ B = helper.magnetic_field(mass=mass, z=z, configs=self.configs)
return B
def _loss_ion(self, gamma, t):
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py
index 2e27b11..2ce3e4a 100644
--- a/fg21sim/extragalactic/clusters/helper.py
+++ b/fg21sim/extragalactic/clusters/helper.py
@@ -237,7 +237,7 @@ def magnetic_field(mass, z=0.0, configs=CONFIGS):
"""
key = "extragalactic/clusters/eta_b"
eta_b = configs.getn(key)
- e_th = density_energy_thermal(mass=mass, z=z)
+ e_th = density_energy_thermal(mass=mass, z=z, configs=configs)
B = np.sqrt(8*np.pi * eta_b * e_th) * 1e6 # [G] -> [uG]
return B