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
CIGALE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cigale
CIGALE
Commits
9943776c
Commit
9943776c
authored
Sep 25, 2020
by
Médéric Boquien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the same spelling for λ throughout the module.
parent
7e3edf68
Pipeline
#3087
skipped with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
pcigale/sed_modules/skirtor2016.py
pcigale/sed_modules/skirtor2016.py
+13
-13
No files found.
pcigale/sed_modules/skirtor2016.py
View file @
9943776c
...
...
@@ -215,12 +215,12 @@ class SKIRTOR2016(SedModule):
raise
ValueError
(
"AGN fraction is exactly 1. Behaviour undefined."
)
lambda_fracAGN
=
str
(
self
.
parameters
[
"lambda_fracAGN"
]).
split
(
'/'
)
self
.
lambdamin_fracAGN
=
float
(
lambda_fracAGN
[
0
])
*
1e3
self
.
lamdamax_fracAGN
=
float
(
lambda_fracAGN
[
1
])
*
1e3
self
.
lam
b
damax_fracAGN
=
float
(
lambda_fracAGN
[
1
])
*
1e3
if
(
self
.
lambdamin_fracAGN
<
0
or
self
.
lambdamin_fracAGN
>
self
.
lamdamax_fracAGN
):
self
.
lambdamin_fracAGN
>
self
.
lam
b
damax_fracAGN
):
raise
ValueError
(
"lambda_fracAGN incorrect. Constrain "
f
"0 <
{
self
.
lambdamin_fracAGN
}
< "
f
"
{
self
.
lamdamax_fracAGN
}
not respected."
)
f
"
{
self
.
lam
b
damax_fracAGN
}
not respected."
)
self
.
law
=
int
(
self
.
parameters
[
"law"
])
self
.
EBV
=
float
(
self
.
parameters
[
"EBV"
])
self
.
temperature
=
float
(
self
.
parameters
[
"temperature"
])
...
...
@@ -304,17 +304,17 @@ class SKIRTOR2016(SedModule):
# Integrate AGN luminosity for different components
self
.
lumin_disk
=
np
.
trapz
(
self
.
SKIRTOR2016
.
disk
,
x
=
self
.
SKIRTOR2016
.
wave
)
if
self
.
lambdamin_fracAGN
<
self
.
lamdamax_fracAGN
:
if
self
.
lambdamin_fracAGN
<
self
.
lam
b
damax_fracAGN
:
w
=
np
.
where
((
self
.
SKIRTOR2016
.
wave
>=
self
.
lambdamin_fracAGN
)
&
(
self
.
SKIRTOR2016
.
wave
<=
self
.
lamdamax_fracAGN
))
(
self
.
SKIRTOR2016
.
wave
<=
self
.
lam
b
damax_fracAGN
))
wl
=
np
.
hstack
([
self
.
lambdamin_fracAGN
,
self
.
SKIRTOR2016
.
wave
[
w
],
self
.
lamdamax_fracAGN
])
self
.
lam
b
damax_fracAGN
])
spec
=
np
.
interp
(
wl
,
self
.
SKIRTOR2016
.
wave
,
self
.
SKIRTOR2016
.
dust
+
self
.
SKIRTOR2016
.
disk
)
self
.
AGNlumin
=
np
.
trapz
(
spec
,
x
=
wl
)
elif
(
self
.
lambdamin_fracAGN
==
0.
)
&
(
self
.
lamdamax_fracAGN
==
0.
):
elif
(
self
.
lambdamin_fracAGN
==
0.
)
&
(
self
.
lam
b
damax_fracAGN
==
0.
):
self
.
AGNlumin
=
1.
elif
self
.
lambdamin_fracAGN
==
self
.
lamdamax_fracAGN
:
elif
self
.
lambdamin_fracAGN
==
self
.
lam
b
damax_fracAGN
:
self
.
AGNlumin
=
np
.
interp
(
self
.
lambdamin_fracAGN
,
self
.
SKIRTOR2016
.
wave
,
self
.
SKIRTOR2016
.
dust
+
...
...
@@ -351,18 +351,18 @@ class SKIRTOR2016(SedModule):
sed
.
add_info
(
'agn.emissivity'
,
self
.
emissivity
)
# Compute the AGN luminosity
if
self
.
lambdamin_fracAGN
<
self
.
lamdamax_fracAGN
:
if
self
.
lambdamin_fracAGN
<
self
.
lam
b
damax_fracAGN
:
if
self
.
wl
is
None
:
w
=
np
.
where
((
sed
.
wavelength_grid
>=
self
.
lambdamin_fracAGN
)
&
(
sed
.
wavelength_grid
<=
self
.
lamdamax_fracAGN
))
(
sed
.
wavelength_grid
<=
self
.
lam
b
damax_fracAGN
))
self
.
wl
=
np
.
hstack
([
self
.
lambdamin_fracAGN
,
sed
.
wavelength_grid
[
w
],
self
.
lamdamax_fracAGN
])
self
.
lam
b
damax_fracAGN
])
spec
=
np
.
interp
(
self
.
wl
,
sed
.
wavelength_grid
,
sed
.
luminosity
)
scale
=
np
.
trapz
(
spec
,
x
=
self
.
wl
)
/
self
.
AGNlumin
elif
(
self
.
lambdamin_fracAGN
==
0.
)
and
(
self
.
lamdamax_fracAGN
==
0.
):
elif
(
self
.
lambdamin_fracAGN
==
0.
)
and
(
self
.
lam
b
damax_fracAGN
==
0.
):
scale
=
luminosity
elif
self
.
lambdamin_fracAGN
==
self
.
lamdamax_fracAGN
:
elif
self
.
lambdamin_fracAGN
==
self
.
lam
b
damax_fracAGN
:
scale
=
np
.
interp
(
self
.
lambdamin_fracAGN
,
sed
.
wavelength_grid
,
sed
.
luminosity
)
/
self
.
AGNlumin
...
...
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