Commit 645891fa authored by Guang's avatar Guang
Browse files

bugs fixed for galaxy X-rays

parent e7f5033d
......@@ -68,7 +68,7 @@ class Xray(SedModule):
# X-ray emission from galaxies: 1.hot-gas & 2.X-ray binaries
# 1.Hot-gas, assuming power-law index gamma=3
# normalized such that L(0.5-2 keV) = 1
self.lumin_hotgas = 1./ (lam_0p5keV - lam_2keV)
self.lumin_hotgas = self.wave**0 / (lam_0p5keV - lam_2keV)
# 2. X-ray binaries (XRB)
# also have two components:
# 2.1 high-mass X-ray binaries (HMXB)
......@@ -99,14 +99,14 @@ class Xray(SedModule):
"""
# Stellar info.
# log stellar age, units: Gyr
logT = np.log10( sed.info['sfh.age']/1e3 )
# star formation rate, units: M_sun/yr
sfr = sed.info['sfh.sfr100Myrs']
# stellar mass, units: 1e10 M_sun
mstar = sed.info['stellar.m_star']/1e10
# log stellar age, units: Gyr
logT = np.log10( sed.info['stellar.age_m_star']/1e3 )
# metallicity, units: none
Z = sed.info['stellar.metallicity']
# stellar mass, units: 1e10 M_sun
mstar = sed.info['sfh.mass_total']/1e10
# AGN 2500A intrinsic luminosity
if 'agn.agn_intrin_Lnu_2500A' not in sed.info:
sed.add_info('agn.agn_intrin_Lnu_2500A', 1., True)
......@@ -123,11 +123,11 @@ class Xray(SedModule):
# Calculate 2-10 keV HMXB luminosities
# Mezcua et al. 2018, Eq. 1
l_hmxb_xray_2to10keV = sfr * \
10**(40.28 - 62.16*Z + 569.44*Z**2 - 1833.80*Z**3 + 1968.23*Z**4)
10**(33.28 - 62.16*Z + 569.44*Z**2 - 1833.80*Z**3 + 1968.33*Z**4)
# Calculate 2-10 keV LMXB luminosities
# Mezcua et al. 2018, Eq. 2
l_lmxb_xray_2to10keV = mstar * \
10**(40.276 - 1.503*logT - 0.423*logT**2 + 0.425*logT**3 + 0.136*logT**4)
10**(33.276 - 1.503*logT - 0.423*logT**2 + 0.425*logT**3 + 0.136*logT**4)
# Calculate total AGN corona X-ray luminosity
l_agn_xray_total = np.trapz(Lnu_2500A * self.lumin_corona,
x=self.wave)
......@@ -138,6 +138,7 @@ class Xray(SedModule):
x=self.wave[lam_idxs])
# Save the results
#import pdb; pdb.set_trace()
sed.add_info("xray.hotgas_Lx_0p5to2keV", l_hotgas_xray_0p5to2keV, True)
sed.add_info("xray.hmxb_Lx_2to10keV", l_hmxb_xray_2to10keV, True)
sed.add_info("xray.lmxb_Lx_2to10keV", l_lmxb_xray_2to10keV, True)
......
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