aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-27 17:19:09 +0800
committerAaron LI <aly@aaronly.me>2019-01-27 17:19:09 +0800
commit51d9937db622315727486d0bb8164b6890e9beba (patch)
tree8738676e0461334d94036b113f470315f55cbcbf
parent8f3c8d56cb31cf84ff3bebe60af5676cc9431fbd (diff)
downloadfg21sim-51d9937db622315727486d0bb8164b6890e9beba.tar.bz2
clusters/halo: Rewrite is_genuine() to be calc_acc_factor()
Calculate the bolometric emissivity instead of the emissivity at a certain frequency. This should capture the acceleration effect more effectively. In addition, remove the now obsolete config options "fiducial_freq" and "fiducial_factor".
-rw-r--r--fg21sim/configs/config.spec7
-rw-r--r--fg21sim/extragalactic/clusters/halo.py26
2 files changed, 10 insertions, 23 deletions
diff --git a/fg21sim/configs/config.spec b/fg21sim/configs/config.spec
index 3d6bca8..17aa07b 100644
--- a/fg21sim/configs/config.spec
+++ b/fg21sim/configs/config.spec
@@ -431,13 +431,6 @@ stream = option("stderr", "stdout", "", default="stderr")
# Unit: [Gyr]
time_init = float(default=1, min=0)
- # The frequency and factor used to determine the existence of the radio
- # halo, i.e., the emissivity at ``fiducial_freq`` is at least
- # ``fiducial_factor`` times the fiducial value.
- # Unit: [MHz]
- fiducial_freq = float(default=150)
- fiducial_factor = float(default=3, min=1)
-
# Parameters of the beta-model that is used to describe the gas density
# profile of the cluster.
# The fraction of the core radius to cluster's virial radius.
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index d0bce9e..4b40e35 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -164,8 +164,6 @@ class RadioHalo1M:
self.time_step = configs.getn(comp+"/time_step")
self.time_init = configs.getn(comp+"/time_init")
self.injection_index = configs.getn(comp+"/injection_index")
- self.fiducial_freq = configs.getn(comp+"/fiducial_freq")
- self.fiducial_factor = configs.getn(comp+"/fiducial_factor")
self.f_rc = configs.getn(comp+"/f_rc")
self.beta = configs.getn(comp+"/beta")
@@ -492,36 +490,32 @@ class RadioHalo1M:
return n_e
- def is_genuine(self, n_e):
+ def calc_acc_factor(self, n_e):
"""
- Check whether the radio halo is genuine/observable by comparing the
- emissivity to the corresponding fiducial value, which is calculated
- from the fiducial electron spectrum derived with turbulent
- acceleration turned off.
+ Calculate the turbulence acceleration factor, which is estimated
+ as the ratio of the bolometric emissivity between the accelerated
+ electron spectrum and the fiducial electron spectrum derived with
+ turbulent acceleration turned off.
Parameters
----------
n_e : float 1D `~numpy.ndarray`
- The finally derived electron spectrum.
+ The derived (accelerated) electron spectrum.
Unit: [cm^-3]
Returns
-------
- genuine : bool
- Whether the radio halo is genuine?
factor : float
- Acceleration factor of the flux.
+ Acceleration factor of the bolometric emissivity.
"""
- # NOTE: The emissivity is linearly proportional to 'B'.
haloem = HaloEmission(gamma=self.gamma, n_e=n_e, B=1)
- em = haloem.calc_emissivity(self.fiducial_freq)
+ em = haloem.calc_emissivity_bolo()
ne_fiducial = self.calc_electron_spectrum(fiducial=True)
haloem.n_e = ne_fiducial
- em_fiducial = haloem.calc_emissivity(self.fiducial_freq)
+ em_fiducial = haloem.calc_emissivity_bolo()
- factor = em / em_fiducial
- return (factor >= self.fiducial_factor, factor)
+ return em / em_fiducial
def fp_injection(self, gamma, t=None):
"""