Commit dd430087 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

Add a lines property to the SED

It's a dictionnary to hold the spectral lines associated with the SED.
We use a disctionnary to be able to differentiate several sets of lines
(e.g. lines from old and young populations).

TODO: Complete the code to add the line contributions to the integrated flux.
parent 84ec7cd1
......@@ -23,6 +23,11 @@ Such SED is characterised by:
the contribution (in the contribution_names list) and the index of the
second axis corresponds to the wavelength in the wavelength grid.
- lines: a dictionnary containing the emission lines associated with the SED.
A dictionnary is used to allow the storage of various sets of lines. The
lines are stored in lists of tuples (wavelength [nm], luminosity [W], width
- info: a dictionnary containing various information about the SED.
- mass_proportional_info: the list of keys in the info dictionnary whose value
......@@ -58,6 +63,7 @@ class SED(object):
self.wavelength_grid = None
self.contribution_names = []
self.luminosities = None
self.lines = {} = {}
self.mass_proportional_info = []
......@@ -366,6 +372,11 @@ class SED(object):
# Add the Fλ fluxes from the spectral lines.
for line in chain(*self.lines.values()):
if (line[0] >= lambda_min) and (line[0] <= lambda_max):
pass # TODO write the code
# Fν in W/m²/Hz. The 1.e-9 factor is because λ is in nm.
f_nu = lambda_eff * f_lambda * lambda_eff * 1.e-9 / c
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