Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cigale
CIGALE
Commits
4a8bc160
Commit
4a8bc160
authored
Feb 25, 2014
by
Médéric Boquien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port the nubular emission module to the new interface to get metallicities.
parent
696b451f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
pcigale/creation_modules/nebular.py
pcigale/creation_modules/nebular.py
+4
-2
pcigale/data/__init__.py
pcigale/data/__init__.py
+0
-11
No files found.
pcigale/creation_modules/nebular.py
View file @
4a8bc160
...
...
@@ -79,13 +79,15 @@ class NebularEmission(CreationModule):
db
.
get_nebular_lines
(
m
,
self
.
parameters
[
'logU'
])
for
m
in
db
.
get_nebular_metallicities
()
for
m
in
db
.
get_nebular_lines_parameters
()
[
'metallicity'
]
}
self
.
cont_template
=
{
m
:
db
.
get_nebular_continuum
(
m
,
self
.
parameters
[
'logU'
])
for
m
in
db
.
get_nebular_metallicities
()
for
m
in
db
.
get_nebular_continuum_parameters
()
[
'metallicity'
]
}
lines_width
=
self
.
parameters
[
'nebular_lines_width'
]
*
1e3
...
...
pcigale/data/__init__.py
View file @
4a8bc160
...
...
@@ -724,17 +724,6 @@ class Database(object):
else
:
return
None
def
get_nebular_metallicities
(
self
):
"""Get the list of metallicities for the nebular emission.
Returns
-------
metallicities: list
list of the nebular emission metallicities
"""
result
=
self
.
session
.
query
(
_NebularLines
.
metallicity
).
all
()
return
[
_
[
0
]
for
_
in
result
]
def
_get_parameters
(
self
,
schema
):
"""Generic function to get parameters from an arbitrary schema.
...
...
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