aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-22 10:14:07 +0800
committerAaron LI <aly@aaronly.me>2017-07-22 10:14:07 +0800
commit4f31ff421a937b1ad5a188b39ceb8fb82c938ad0 (patch)
treeb9a46bc4be7de565d4666bb59b4465c933ba56c6
parent339ced0adb74da90a1ce6147314e1c3e58b0e0e7 (diff)
downloadfg21sim-4f31ff421a937b1ad5a188b39ceb8fb82c938ad0.tar.bz2
clusters/main.py: Add property "halo_configs"
And update the config specification accordingly with some cleanups. Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r--fg21sim/configs/20-extragalactic.conf.spec40
-rw-r--r--fg21sim/extragalactic/clusters/main.py32
2 files changed, 44 insertions, 28 deletions
diff --git a/fg21sim/configs/20-extragalactic.conf.spec b/fg21sim/configs/20-extragalactic.conf.spec
index b8af33b..320c3c1 100644
--- a/fg21sim/configs/20-extragalactic.conf.spec
+++ b/fg21sim/configs/20-extragalactic.conf.spec
@@ -41,8 +41,6 @@
# Unit: [Gyr]
tau_merger = float(default=3.0, min=1.0, max=5.0)
- # The fraction that a cluster hosts a radio halo
- halo_fraction = float(default=None, min=0.0, max=1.0)
# Magnetic field scaling relation for clusters
# Reference: Cassano et al. 2012, A&A, 548, A100, Eq.(1)
#
@@ -66,42 +64,30 @@
# Emission of giant radio halos from galaxy clusters
[[halos]]
- # Maximum redshift until where to tracing the cluster merging history
- # (e.g., when calculating the electron spectrum)
- zmax = float(default=3.0, min=0.0)
- # Redshift bin size for, e.g., calculating acceleration coefficients
- zbinsize = float(default=0.01, min=0.0, max=0.1)
+ # Fraction of the turbulence energy in the form of magneto-sonic waves,
+ # which will channel into relativistic electrons.
+ eta_turb = float(default=0.3, min=0.0, max=1.0)
- # Mass threshold of the sub-cluster to be regarded as a significant
- # merger. (unit: Msun)
- merger_mass_th = float(default=1e13, min=1e12)
-
- # Radius of the giant radio halo in clusters (unit: kpc)
- # XXX: currently only support a constant radius of halos
- radius = float(default=500.0, min=100.0)
-
- # Fraction of the turbulence energy in the form of magneto-sonic waves.
- eta_t = float(default=0.3, min=0.0, max=1.0)
-
- # Ratio of the total energy injected in cosmic-ray electrons during the
- # cluster life to the present-day total thermal energy of the cluster.
+ # Ratio of the total energy injected into cosmic-ray electrons during
+ # the cluster life to its total thermal energy.
eta_e = float(default=0.003, min=0.0, max=0.1)
# Minimum and maximum Lorentz factor (i.e., energy) of the relativistic
# electron spectrum.
- pmin = float(default=1e1)
- pmax = float(default=1e5)
-
- # Number of points for the grid used during solving the Fokker-Planck
- # equation to calculate the electron spectrum.
- pgrid_num = integer(default=100, min=10)
+ gamma_min = float(default=1e1)
+ gamma_max = float(default=1e5)
+ # Number of momentum points/cells for solving the Fokker-Planck
+ # equation.
+ gamma_np = integer(default=200, min=50)
# Number of grid points used as the buffer region near the lower
# boundary, and the value within this buffer region will be fixed to
# avoid unphysical pile-up of low-energy electrons.
+ # Reference: Donnert & Brunetti 2014, MNRAS, 443, 3564, Sec.(3.3)
buffer_np = integer(default=5, min=0)
- # Time step for solving the Fokker-Planck equation (unit: Gyr)
+ # Time step for solving the Fokker-Planck equation
+ # Unit: [Gyr]
time_step = float(default=0.01, min=1e-5, max=1.0)
# Index of the power-law spectrum assumed for the injected electrons.
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index b6c1022..8e37db1 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -41,9 +41,21 @@ class GalaxyClusters:
Currently, only the *giant radio halos* are considered, while
other types of extended emissions are missing, e.g., mini-halos,
elongated relics, roundish relics.
+
+ Attributes
+ ----------
+ configs : `~ConfigManager`
+ A `ConfigManager` instance containing default and user configurations.
+ For more details, see the example configuration specifications.
+ halo_configs : dict
+ A dictionary containing the configurations for halo simulation.
+ sky : `~SkyPatch` or `SkyHealpix`
+ The sky instance to deal with the simulation sky as well as the
+ output map.
+ XXX: current full-sky HEALPix map is NOT supported!
"""
# Component name
- name = "galaxy clusters"
+ name = "galaxy clusters (halos)"
def __init__(self, configs):
self.configs = configs
@@ -79,6 +91,24 @@ class GalaxyClusters:
logger.info("Loaded and set up configurations")
+ @property
+ def halo_configs(self):
+ """
+ Configurations for radio halo simulation as a dictionary.
+ """
+ comp = "extragalactic/halos"
+ haloconf = {
+ "eta_turb": self.configs.getn(comp+"/eta_turb"),
+ "eta_e": self.configs.getn(comp+"/eta_e"),
+ "gamma_min": self.configs.getn(comp+"/gamma_min"),
+ "gamma_max": self.configs.getn(comp+"/gamma_max"),
+ "gamma_np": self.configs.getn(comp+"/gamma_num"),
+ "buffer_np": self.configs.getn(comp+"/buffer_np"),
+ "time_step": self.configs.getn(comp+"/time_step"),
+ "injection_index": self.configs.getn(comp+"/injection_index"),
+ }
+ return haloconf
+
def _load_catalog(self):
"""
Load the sampled (z, mass) catalogs from the Press-Schechter