From db856eb2db2f5632b5648223b05d57bad2d153d9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 28 Jan 2019 17:29:01 +0800 Subject: clusters/main: Fix calling of magnetic_field() and kT_cluster() --- fg21sim/extragalactic/clusters/main.py | 12 +++++++++--- 1 file 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] -- cgit v1.2.2