Commit 94e32feb authored by Guang's avatar Guang
Browse files

xray module completed (not tested yet)

parent 82d2534a
......@@ -34,10 +34,11 @@ class Xray(SedModule):
"The photon index (Gamma) of intrinsic X-ray spectrum.",
1.8
)),
("k_bol", (
"cigale_list(minvalue=5.)",
"The AGN bolometric correction for 2-10 keV. Possible values are above 5.",
20.
("alpha_ox", (
"cigale_list()",
"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)",
-1.5
))
])
......@@ -45,40 +46,46 @@ class Xray(SedModule):
"""Build the model for a given set of parameters."""
self.gam = float(self.parameters["gam"])
self.k_bol = float(self.parameters["k_bol"])
self.alpha_ox = float(self.parameters["alpha_ox"])
# We define various constants necessary to compute the model. For
# consistency, we define the speed of light in nm s¯¹ rather than in
# m s¯¹.
# consistency, we define speed of light in units of nm s¯¹
c = cst.c * 1e9
# Define wavelenght corresponding to 2 keV in units of nm.
lam_2keV = c*cst.h / (2e3*cst.eV)
# Define wavelenght corresponding to 2 keV in units of Hz.
nu_2keV = c / lam_2keV
# We define the wavelength range for the non thermal emission
self.wave = np.logspace(5., 9., 1000.)
# We compute the synchrotron emission normalised at 21cm
self.lumin_nonthermal = ((1./self.wave)**(-self.alpha + 2.) /
(1./2.1e8)**(-self.alpha + 2.))
# Normalisation factor from the FIR/radio correlation to apply to the
# IR luminosity
S21cm = (1. / (10.**self.qir*3.75e12)) * (c/(2.1e8)**2)
self.lumin_nonthermal *= S21cm
self.wave = np.logspace(-2, 2., 1000.)
# We compute the unobscured AGN corona X-ray emission
# normalized at 2 keV
self.lumin_corona = self.wave**(self.gam - 3.) / \
lam_2keV**(self.gam - 3.)
# Normalisation factor from the optical/X-ray correlation to apply
# to the AGN 2500A intrinsic luminosity, i.e., L_lam_2keV value
# when L_nu_2500A = 1 erg/s/Hz
L_lam_2keV = 10**(self.alpha_ox/0.3838) * nu_2keV**2/c
self.lumin_corona *= L_lam_2keV
def process(self, sed):
"""Add the radio contribution.
"""Add the X-ray contribution.
Parameters
----------
sed: pcigale.sed.SED object
"""
if 'dust.luminosity' not in sed.info:
sed.add_info('dust.luminosity', 1., True)
luminosity = sed.info['dust.luminosity']
if 'agn.agn_intrin_Lnu_2500A' not in sed.info:
sed.add_info('agn.agn_intrin_Lnu_2500A', 1., True)
luminosity = sed.info['agn.agn_intrin_Lnu_2500A']
sed.add_module(self.name, self.parameters)
sed.add_info("radio.qir", self.qir)
sed.add_info("radio.alpha", self.alpha)
sed.add_contribution('radio_nonthermal', self.wave,
self.lumin_nonthermal * luminosity)
sed.add_info("xray.gam", self.gam)
sed.add_info("xray.alpha_ox", self.alpha_ox)
sed.add_contribution('xray_corona', self.wave,
self.lumin_corona * luminosity)
# SedModule to be returned by get_module
Module = Radio
Module = Xray
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