Commit 80e32dc3 authored by Guang's avatar Guang
Browse files

allow user set gamma for lmxb and hmxb

parent 1f6f4ad2
......@@ -30,7 +30,7 @@ class Xray(SedModule):
parameter_list = OrderedDict([
("gam", (
"cigale_list()",
"The photon index (Gamma) of intrinsic X-ray spectrum.",
"The photon index (Gamma) of AGN intrinsic X-ray spectrum.",
1.8
)),
("max_dev_alpha_ox", (
......@@ -39,9 +39,19 @@ class Xray(SedModule):
"i.e. |alpha_ox-alpha_ox(Lnu_2500A)| <= max_dev_alpha_ox. "
"alpha_ox is the power-law slope connecting L_nu at rest-frame 2500 A and 2 keV, "
"defined as alpha_ox = 0.3838*log(Lnu_2keV/Lnu_2500A), "
"which is often modeled as a function of Lnu_2500A."
"which is often modeled as a function of Lnu_2500A. "
"The alpha_ox-Lnu_2500A relation has a 1-sigma scatter of ~ 0.1.",
0.2
)),
("gam_lmxb", (
"cigale_list()",
"The photon index of AGN low-mass X-ray binaries.",
1.56
)),
("gam_hmxb", (
"cigale_list()",
"The photon index of AGN high-mass X-ray binaries.",
2.0
))
])
......@@ -49,6 +59,8 @@ class Xray(SedModule):
"""Build the model for a given set of parameters."""
self.gam = float(self.parameters["gam"])
self.gam_lmxb = float(self.parameters["gam_lmxb"])
self.gam_hmxb = float(self.parameters["gam_hmxb"])
self.max_dev_alpha_ox = float(self.parameters["max_dev_alpha_ox"])
# We define various constants necessary to compute the model. For
......@@ -79,11 +91,13 @@ class Xray(SedModule):
# also have two components:
# 2.1 high-mass X-ray binaries (HMXB)
# 2.2 low-mass X-ray binaries (LMXB)
# Assuming gamma=2. for both components (Wu & Gu 2008)
# Assuming E_cut=100 keV for both components (Wu & Gu 2008)
# normalized such that L(2-10 keV) = 1.
self.lumin_xrb = self.wave**-1 * np.exp(-lam_100keV/self.wave)
self.lumin_lmxb = self.wave**(self.gam_lmxb - 3.) * np.exp(-lam_100keV/self.wave)
self.lumin_hmxb = self.wave**(self.gam_hmxb - 3.) * np.exp(-lam_100keV/self.wave)
lam_idxs = (self.wave<=self.lam_2keV) & (self.wave>=self.lam_10keV)
self.lumin_xrb /= np.trapz(self.lumin_xrb[lam_idxs], x=self.wave[lam_idxs])
self.lumin_lmxb /= np.trapz(self.lumin_lmxb[lam_idxs], x=self.wave[lam_idxs])
self.lumin_hmxb /= np.trapz(self.lumin_hmxb[lam_idxs], x=self.wave[lam_idxs])
# We compute the unobscured AGN corona X-ray emission
# The shape is power-law with high-E exp. cutoff
......@@ -125,6 +139,8 @@ class Xray(SedModule):
# Add the configuration for X-ray module
sed.add_module(self.name, self.parameters)
sed.add_info("xray.gam", self.gam)
sed.add_info("xray.gam_lmxb", self.gam_lmxb)
sed.add_info("xray.gam_hmxb", self.gam_hmxb)
sed.add_info("xray.max_dev_alpha_ox", self.max_dev_alpha_ox)
sed.add_info("xray.alpha_ox", self.parameters['alpha_ox'])
......@@ -158,7 +174,8 @@ class Xray(SedModule):
# Add the SED components
sed.add_contribution('xray.galaxy', self.wave,
self.lumin_hotgas*l_hotgas_xray_0p5to2keV + \
self.lumin_xrb*(l_hmxb_xray_2to10keV+l_lmxb_xray_2to10keV) )
self.lumin_lmxb*l_lmxb_xray_2to10keV + \
self.lumin_hmxb*l_hmxb_xray_2to10keV)
sed.add_contribution('xray.agn', self.wave, self.lumin_corona * L_lam_2keV)
# SedModule to be returned by get_module
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment