Commit 272c8703 authored by Yannick Roehlly's avatar Yannick Roehlly

Add spectral line attenuation to dustatt_* modules

parent 73d84a1f
......@@ -321,7 +321,22 @@ class Module(common.SEDCreationModule):
else:
attenuation_old = 0
# Total attenuation
# Attenuation of spectral lines
if young_contrib in sed.lines:
line_attenuation = a_vs_ebv(sed.lines[young_contrib][0],
uv_bump_wavelength, uv_bump_width,
uv_bump_amplitude, powerlaw_slope)
sed.lines[young_contrib][1] *= 10 ** (ebvs_young *
line_attenuation / -2.5)
if old_contrib in sed.lines:
line_attenuation = a_vs_ebv(sed.lines[old_contrib][0],
uv_bump_wavelength, uv_bump_width,
uv_bump_amplitude, powerlaw_slope)
sed.lines[old_contrib][1] *= 10 ** (ebvs_old *
line_attenuation / -2.5)
# Total attenuation (we don't take into account the energy attenuated
# in the spectral lines)
sed.add_info(name + "_attenuation",
attenuation_young + attenuation_old)
......
......@@ -240,7 +240,22 @@ class Module(common.SEDCreationModule):
else:
attenuation_old = 0
# Total attenuation
# Attenuation of spectral lines
if young_contrib in sed.lines:
line_attenuation = alambda_av(sed.lines[young_contrib][0],
powerlaw_slope, uv_bump_wavelength,
uv_bump_width, uv_bump_amplitude)
sed.lines[young_contrib][1] *= 10 ** (av_young *
line_attenuation / -2.5)
if old_contrib in sed.lines:
line_attenuation = alambda_av(sed.lines[old_contrib][0],
powerlaw_slope, uv_bump_wavelength,
uv_bump_width, uv_bump_amplitude)
sed.lines[old_contrib][1] *= 10 ** (av_old *
line_attenuation / -2.5)
# Total attenuation (we don't take into account the energy attenuated
# in the spectral lines)
sed.add_info(name + "_attenuation",
attenuation_young + attenuation_old)
......
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