aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-29 18:58:10 +0800
committerAaron LI <aly@aaronly.me>2019-01-29 18:58:10 +0800
commit54434d4b24104457d04af79a1a75ecf713c07bc1 (patch)
tree4ca127d88a8ddbe0b1923e8fc651abda1fcff534
parent25f2c500cba5b4395cfbd5910efe8fccd0cc3fce (diff)
downloadfg21sim-54434d4b24104457d04af79a1a75ecf713c07bc1.tar.bz2
clusters/halo: Add options bolo_freq_{min,max,num}
Update the default bolometric frequency band to: 10 MHz -- 100 GHz.
-rw-r--r--fg21sim/configs/config.spec8
-rw-r--r--fg21sim/extragalactic/clusters/emission.py2
-rw-r--r--fg21sim/extragalactic/clusters/halo.py11
3 files changed, 18 insertions, 3 deletions
diff --git a/fg21sim/configs/config.spec b/fg21sim/configs/config.spec
index 25c972a..2faac91 100644
--- a/fg21sim/configs/config.spec
+++ b/fg21sim/configs/config.spec
@@ -437,3 +437,11 @@ stream = option("stderr", "stdout", "", default="stderr")
f_rc = float(default=0.1)
# The slope parameter (i.e., beta).
beta = float(default=0.8)
+
+ # The minimum and maximum frequencies as well as the number of frequency
+ # points for calculating the total radio emissivity, which is used to
+ # approximate the bolometric emissivity.
+ # Unit: [MHz]
+ bolo_freq_min = float(default=10)
+ bolo_freq_max = float(default=1e5)
+ bolo_freq_num = integer(default=256)
diff --git a/fg21sim/extragalactic/clusters/emission.py b/fg21sim/extragalactic/clusters/emission.py
index 5e92f36..0767159 100644
--- a/fg21sim/extragalactic/clusters/emission.py
+++ b/fg21sim/extragalactic/clusters/emission.py
@@ -305,7 +305,7 @@ class HaloEmission:
emissivity = syncem.emissivity(frequencies)
return emissivity
- def calc_emissivity_bolo(self, freq_min=100, freq_max=1e5, freq_num=256):
+ def calc_emissivity_bolo(self, freq_min=10, freq_max=1e5, freq_num=256):
"""
Calculate the bolometric emissivity, which is approximated as the
integration over a finite but broad enough frequency band.
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index e3521fe..2078ad1 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -166,6 +166,9 @@ class RadioHalo1M:
self.injection_index = configs.getn(comp+"/injection_index")
self.f_rc = configs.getn(comp+"/f_rc")
self.beta = configs.getn(comp+"/beta")
+ self.bolo_freq_min = configs.getn(comp+"/bolo_freq_min")
+ self.bolo_freq_max = configs.getn(comp+"/bolo_freq_max")
+ self.bolo_freq_num = configs.getn(comp+"/bolo_freq_num")
def _set_solver(self):
self.fpsolver = FokkerPlanckSolver(
@@ -510,12 +513,16 @@ class RadioHalo1M:
Acceleration factor of the bolometric emissivity.
"""
haloem = HaloEmission(gamma=self.gamma, n_e=n_e, B=1)
- em = haloem.calc_emissivity_bolo()
+ em = haloem.calc_emissivity_bolo(freq_min=self.bolo_freq_min,
+ freq_max=self.bolo_freq_max,
+ freq_num=self.bolo_freq_num)
if n_e_fiducial is None:
n_e_fiducial = self.calc_electron_spectrum(fiducial=True)
haloem.n_e = n_e_fiducial
- em_fiducial = haloem.calc_emissivity_bolo()
+ em_fiducial = haloem.calc_emissivity_bolo(
+ freq_min=self.bolo_freq_min, freq_max=self.bolo_freq_max,
+ freq_num=self.bolo_freq_num)
return em / em_fiducial