Commit c23b567d authored by Médéric Boquien's avatar Médéric Boquien

Test whether there is a nebular component before attempting to plot it.

parent 09fe7e6b
...@@ -176,17 +176,18 @@ def _sed_worker(obs, mod, filters, sed_type, nologo): ...@@ -176,17 +176,18 @@ def _sed_worker(obs, mod, filters, sed_type, nologo):
label="Stellar unattenuated", color='b', marker=None, label="Stellar unattenuated", color='b', marker=None,
nonposy='clip', linestyle='--', linewidth=0.5) nonposy='clip', linestyle='--', linewidth=0.5)
# Nebular emission # Nebular emission
ax1.loglog(wavelength_spec[wsed], if 'nebular.lines_young' in sed.columns:
(sed['nebular.lines_young'][wsed] + ax1.loglog(wavelength_spec[wsed],
sed['nebular.lines_old'][wsed] + (sed['nebular.lines_young'][wsed] +
sed['nebular.continuum_young'][wsed] + sed['nebular.lines_old'][wsed] +
sed['nebular.continuum_old'][wsed] + sed['nebular.continuum_young'][wsed] +
sed['attenuation.nebular.lines_young'][wsed] + sed['nebular.continuum_old'][wsed] +
sed['attenuation.nebular.lines_old'][wsed] + sed['attenuation.nebular.lines_young'][wsed] +
sed['attenuation.nebular.continuum_young'][wsed] + sed['attenuation.nebular.lines_old'][wsed] +
sed['attenuation.nebular.continuum_old'][wsed]), sed['attenuation.nebular.continuum_young'][wsed] +
label="Nebular emission", color='y', marker=None, sed['attenuation.nebular.continuum_old'][wsed]),
nonposy='clip', linewidth=.5) label="Nebular emission", color='y', marker=None,
nonposy='clip', linewidth=.5)
# Dust emission Draine & Li # Dust emission Draine & Li
if 'dust.Umin_Umin' in sed.columns: if 'dust.Umin_Umin' in sed.columns:
ax1.loglog(wavelength_spec[wsed], ax1.loglog(wavelength_spec[wsed],
......
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