aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-28 10:30:57 +0800
committerAaron LI <aly@aaronly.me>2019-01-28 10:30:57 +0800
commitc982158603c0fdad37fb8b0eb596eeba28470b83 (patch)
tree02232b8288c1d4551d82267e8d828e2f86e7f749 /fg21sim
parent590d32543e36f88afb195d1128895e5f2de81bd3 (diff)
downloadfg21sim-c982158603c0fdad37fb8b0eb596eeba28470b83.tar.bz2
clusters/halo: calc_acc_factor() accepts the fiducial spectrum
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 5fd00f7..6cde5ca 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -488,7 +488,7 @@ class RadioHalo1M:
return n_e
- def calc_acc_factor(self, n_e):
+ def calc_acc_factor(self, n_e, n_e_fiducial=None):
"""
Calculate the turbulence acceleration factor, which is estimated
as the ratio of the bolometric emissivity between the accelerated
@@ -500,6 +500,9 @@ class RadioHalo1M:
n_e : float 1D `~numpy.ndarray`
The derived (accelerated) electron spectrum.
Unit: [cm^-3]
+ n_e_fiducial : float 1D `~numpy.ndarray`, optional
+ The fiducial electron spectrum.
+ Unit: [cm^-3]
Returns
-------
@@ -509,8 +512,9 @@ class RadioHalo1M:
haloem = HaloEmission(gamma=self.gamma, n_e=n_e, B=1)
em = haloem.calc_emissivity_bolo()
- ne_fiducial = self.calc_electron_spectrum(fiducial=True)
- haloem.n_e = ne_fiducial
+ 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()
return em / em_fiducial