aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-28 17:29:01 +0800
committerAaron LI <aly@aaronly.me>2019-01-28 17:29:01 +0800
commitdb856eb2db2f5632b5648223b05d57bad2d153d9 (patch)
tree58847b843972e2c8edf991368cc512bd5f3b7857 /fg21sim/extragalactic
parentfd0f784f5c9951543d06c5be8c6508fbfe0924e2 (diff)
downloadfg21sim-db856eb2db2f5632b5648223b05d57bad2d153d9.tar.bz2
clusters/main: Fix calling of magnetic_field() and kT_cluster()
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r--fg21sim/extragalactic/clusters/main.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index 7c0e727..cac30fd 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -84,16 +84,21 @@ class GalaxyClusters:
self.output_dir = configs.get_path(comp+"/output_dir")
self.merger_mass_min = configs.getn(comp+"/merger_mass_min")
self.time_traceback = configs.getn(comp+"/time_traceback")
+ self.kT_out = configs.getn(comp+"/kT_out")
+
self.frequencies = configs.frequencies
self.filename_pattern = configs.getn("output/filename_pattern")
self.clobber = configs.getn("output/clobber")
- logger.info("Loaded and set up configurations")
+
+ self.eta_b = configs.getn("extragalactic/halos/x_cr")
if self.use_dump_halos_data and (not self.use_dump_catalog_data):
self.use_dump_catalog_data = True
logger.warning("Forced to use existing cluster catalog, "
"due to 'use_dump_halos_data=True'")
+ logger.info("Loaded and set up configurations")
+
def _simulate_catalog(self):
"""
Simulate the (z, mass) catalog of the cluster distribution
@@ -191,8 +196,9 @@ class GalaxyClusters:
Rvir = helper.radius_virial(mass, z) # [kpc]
DA = COSMO.DA(z) # [Mpc]
theta = Rvir / (DA*1e3) * AUC.rad2arcsec # [arcsec]
- kT = helper.kT_cluster(mass, z, configs=self.configs) # [keV]
- B = helper.magnetic_field(mass, z, configs=self.configs) # [uG]
+ kT = helper.kT_cluster(mass, z, kT_out=self.kT_out) # [keV]
+ B = helper.magnetic_field(mass, z, eta_b=self.eta_b,
+ kT_out=self.kT_out) # [uG]
cdict.update([
("DA", DA), # [Mpc]
("Rvir", Rvir), # [kpc]