Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
x-cigale
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guang
x-cigale
Commits
ede07146
Commit
ede07146
authored
Oct 12, 2018
by
Guang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable the output of Lnu_2keV
parent
32e7293e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
pcigale/sed_modules/xray.py
pcigale/sed_modules/xray.py
+11
-12
No files found.
pcigale/sed_modules/xray.py
View file @
ede07146
...
...
@@ -53,12 +53,11 @@ class Xray(SedModule):
# Define wavelenght corresponding to some energy in units of nm.
lam_0p5keV
=
c
*
cst
.
h
/
(
5e2
*
cst
.
eV
)
lam_2keV
=
c
*
cst
.
h
/
(
2e3
*
cst
.
eV
)
self
.
lam_2keV
=
lam_2keV
lam_10keV
=
c
*
cst
.
h
/
(
1e4
*
cst
.
eV
)
self
.
lam_10keV
=
lam_10keV
lam_100keV
=
c
*
cst
.
h
/
(
1e5
*
cst
.
eV
)
self
.
lam_2keV
=
lam_2keV
self
.
lam_10keV
=
c
*
cst
.
h
/
(
1e4
*
cst
.
eV
)
# Define frequency corresponding to 2 keV in units of Hz.
nu_2keV
=
c
/
lam_2keV
self
.
nu_2keV
=
c
/
lam_2keV
# We define the wavelength range for the non thermal emission
# corresponding to 0.4-1200 keV
...
...
@@ -83,11 +82,6 @@ class Xray(SedModule):
# Normaliz the SED at 2 keV
self
.
lumin_corona
/=
lam_2keV
**
(
self
.
gam
-
3.
)
*
\
np
.
exp
(
-
lam_100keV
/
lam_2keV
)
# 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 W/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 X-ray contribution.
...
...
@@ -127,13 +121,17 @@ class Xray(SedModule):
# Mezcua et al. 2018, Eq. 2
l_lmxb_xray_2to10keV
=
mstar
*
\
10
**
(
33.276
-
1.503
*
logT
-
0.423
*
logT
**
2
+
0.425
*
logT
**
3
+
0.136
*
logT
**
4
)
# Calculate L_lam_2keV from Lnu_2500A
Lnu_2keV
=
10
**
(
self
.
alpha_ox
/
0.3838
)
*
Lnu_2500A
L_lam_2keV
=
Lnu_2keV
*
self
.
nu_2keV
**
2
/
c
# Calculate total AGN corona X-ray luminosity
l_agn_xray_total
=
np
.
trapz
(
L
nu_2500A
*
self
.
lumin_corona
,
l_agn_xray_total
=
np
.
trapz
(
L
_lam_2keV
*
self
.
lumin_corona
,
x
=
self
.
wave
)
# Calculate 2-10 keV AGN corona X-ray luminosity
lam_idxs
=
np
.
where
(
(
self
.
wave
>=
self
.
lam_10keV
)
&
\
(
self
.
wave
<=
self
.
lam_2keV
)
)
l_agn_xray_2to10keV
=
np
.
trapz
(
L
nu_2500A
*
self
.
lumin_corona
[
lam_idxs
],
l_agn_xray_2to10keV
=
np
.
trapz
(
L
_lam_2keV
*
self
.
lumin_corona
[
lam_idxs
],
x
=
self
.
wave
[
lam_idxs
])
# Save the results
...
...
@@ -143,11 +141,12 @@ class Xray(SedModule):
sed
.
add_info
(
"xray.lmxb_Lx_2to10keV"
,
l_lmxb_xray_2to10keV
,
True
)
sed
.
add_info
(
"xray.agn_Lx_total"
,
l_agn_xray_total
,
True
)
sed
.
add_info
(
"xray.agn_Lx_2to10keV"
,
l_agn_xray_2to10keV
,
True
)
sed
.
add_info
(
"xray.agn_Lnu_2keV"
,
Lnu_2keV
,
True
)
# Add the SED components
sed
.
add_contribution
(
'xray.hot_gas'
,
self
.
wave
,
self
.
lumin_hotgas
*
l_hotgas_xray_0p5to2keV
)
sed
.
add_contribution
(
'xray.high_mass_binary'
,
self
.
wave
,
self
.
lumin_xrb
*
l_hmxb_xray_2to10keV
)
sed
.
add_contribution
(
'xray.low_mass_binary'
,
self
.
wave
,
self
.
lumin_xrb
*
l_lmxb_xray_2to10keV
)
sed
.
add_contribution
(
'xray.agn_corona'
,
self
.
wave
,
self
.
lumin_corona
*
L
nu_2500A
)
sed
.
add_contribution
(
'xray.agn_corona'
,
self
.
wave
,
self
.
lumin_corona
*
L
_lam_2keV
)
# SedModule to be returned by get_module
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment