From d1020804c2e63b136e48dd3cd94782a7c07c12cb Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 29 May 2017 17:06:28 +0800 Subject: configs: extragalactic/halos: change "radius_halo" to "radius" --- fg21sim/configs/20-extragalactic.conf.spec | 9 ++++----- fg21sim/extragalactic/clusters/halo.py | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/fg21sim/configs/20-extragalactic.conf.spec b/fg21sim/configs/20-extragalactic.conf.spec index 7ed9783..d479e7d 100644 --- a/fg21sim/configs/20-extragalactic.conf.spec +++ b/fg21sim/configs/20-extragalactic.conf.spec @@ -59,7 +59,7 @@ # Radius of the giant radio halo in clusters (unit: kpc) # XXX: currently only support a constant radius of halos - radius_halo = float(default=500, min=100) + radius = float(default=500, min=100) # Magnetic field assumed for the cluster (unit: uG) # XXX: currently only support a constant magnetic field @@ -100,11 +100,10 @@ # Output directory to save the simulated catelogues output_dir = string(default="PS_tables") # PS components to be simulated - pscomponents=string_list(default=list()) + pscomponents = string_list(default=list()) # Resolution [arcmin] - resolution=float(default=0.6, min=0.0) - # Number of each type of point source - # Star forming + resolution = float(default=0.6, min=0.0) + [[[starforming]]] # Number of samples numps = integer(default=1000) diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 02bd74b..3b62d66 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -82,7 +82,7 @@ class HaloSingle: self.zmax = self.configs.getn(comp+"/zmax") # Mass threshold of the sub-cluster for a significant merger self.merger_mass_th = self.configs.getn(comp+"/merger_mass_th") - self.radius_halo = self.configs.getn(comp+"/radius_halo") + self.radius = self.configs.getn(comp+"/radius") self.magnetic_field = self.configs.getn(comp+"/magnetic_field") self.eta_t = self.configs.getn(comp+"/eta_t") self.eta_e = self.configs.getn(comp+"/eta_e") @@ -493,7 +493,7 @@ class HaloSingle: XXX/NOTE -------- This coefficient may be very small and even zero, then the - diffusion coefficient of the Fokker-Planck equation is thus + diffusion coefficient of the Fokker-Planck equation is thus very small and even zero, which cause problems for calculating some quantities (e.g., w(x), C(x)) and wrong/invalid results. To avoid these problems, force the minimal value of this @@ -578,7 +578,7 @@ class HaloSingle: # Specified redshift already the last/smallest one zend_idx = zidx + 1 # - coef = 2.23e-16 * self.eta_t / (self.radius_halo/500)**3 # [s^-1] + coef = 2.23e-16 * self.eta_t / (self.radius/500)**3 # [s^-1] coef *= AUC.Gyr2s # [Gyr^-1] chi = 0.0 for ev in mevents[zidx:zend_idx]: @@ -590,10 +590,10 @@ class HaloSingle: kT = self.kT_mass(M_main) term1 = ((M_main+M_sub)/2e15 * (2.6e3/R_vir)) ** (3/2) term2 = (rs/500)**2 / np.sqrt(kT/7) - if rs <= self.radius_halo: + if rs <= self.radius: term3 = 1.0 else: - term3 = (self.radius_halo/rs) ** 2 + term3 = (self.radius/rs) ** 2 chi += coef * term1 * term2 * term3 return (chi, zbegin, zend) -- cgit v1.2.2