Commit 4a8bc160 authored by Médéric Boquien's avatar Médéric Boquien

Port the nubular emission module to the new interface to get metallicities.

parent 696b451f
......@@ -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
......
......@@ -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.
......
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