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

Adapt pcigale-plot to handle the absorption of the Lyman continuum.

parent c79b3166
......@@ -170,6 +170,7 @@ class NebularEmission(CreationModule):
lines.ratio * NLy_old * self.conv_line)
sed.add_contribution('nebular.lines_young', lines.wave,
lines.ratio * NLy_young * self.conv_line)
print(lines.ratio, NLy_young, self.conv_line, lines.ratio * NLy_young * self.conv_line)
sed.add_contribution('nebular.continuum_old', cont.wave,
cont.lumin * NLy_old * self.conv_cont)
......
......@@ -164,14 +164,26 @@ def _sed_worker(obs, mod, filters, sed_type, nologo):
ax2 = plt.subplot(gs[1])
# Stellar emission
ax1.loglog(wavelength_spec[wsed],
(sed['stellar.young'][wsed] +
sed['attenuation.stellar.young'][wsed] +
sed['stellar.old'][wsed] +
sed['attenuation.stellar.old'][wsed]),
label="Stellar attenuated ", color='orange',
marker=None, nonposy='clip', linestyle='-',
linewidth=0.5)
if 'nebular.absorption_young' in sed.columns:
ax1.loglog(wavelength_spec[wsed],
(sed['stellar.young'][wsed] +
sed['attenuation.stellar.young'][wsed] +
sed['nebular.absorption_young'][wsed] +
sed['stellar.old'][wsed] +
sed['attenuation.stellar.old'][wsed] +
sed['nebular.absorption_old'][wsed]),
label="Stellar attenuated ", color='orange',
marker=None, nonposy='clip', linestyle='-',
linewidth=0.5)
else:
ax1.loglog(wavelength_spec[wsed],
(sed['stellar.young'][wsed] +
sed['attenuation.stellar.young'][wsed] +
sed['stellar.old'][wsed] +
sed['attenuation.stellar.old'][wsed]),
label="Stellar attenuated ", color='orange',
marker=None, nonposy='clip', linestyle='-',
linewidth=0.5)
ax1.loglog(wavelength_spec[wsed],
(sed['stellar.old'][wsed] +
sed['stellar.young'][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