Commit b0f4a3dd authored by Médéric Boquien's avatar Médéric Boquien
Browse files

PEP8-fication of mbb.py

parent 8818ce40
......@@ -8,11 +8,11 @@
Modified Black Body module
======================================
This module implements a modified black body (MBB). This MMB can be
a stand-alone IR emission or it can come as an additional component.
The energy balance can be set to check the presence of a component
or not to account for the emission of a region completely embedded
in dust and not visible in the wavelength range.
This module implements a modified black body (MBB). This MMB can be a
stand-alone IR emission or it can come as an additional component. The energy
balance can be set to check the presence of a component or not to account for
the emission of a region completely embedded in dust and not visible in the
wavelength range.
"""
......@@ -104,24 +104,27 @@ class MBB(CreationModule):
energy_balance = (self.parameters["energy_balance"].lower() == "true")
if energy_balance:
# Since we can have another contribution to L_dust and the modified black body
# enters into the energy budget, energy balance, we have to save a new negative
# component for each one, previously existing as:
# Since we can have another contribution to L_dust and the modified
# black body enters into the energy budget, energy balance, we have
# to save a new negative component for each one, previously
# existing as:
# luminosity_other_balance = -luminosity_other * (1-epsilon);
# epsilon being the contribution of the present MBB to L_dust.
other_dust_contributions = [contrib for contrib in sed.contribution_names
if "dust" in contrib]
other_dust_contributions = [contrib for contrib in
sed.contribution_names if
"dust" in contrib]
for item in other_dust_contributions:
item_balance = item + '_balance'
lumin = sed.get_lumin_contribution(item)
wavelength = sed.wavelength_grid
sed.add_info(item_balance, 1., True)
sed.add_contribution(item_balance, wavelength, -lumin * epsilon)
sed.add_contribution(item_balance, wavelength, -lumin *
epsilon)
# If the modified black body does not enter into the energy budget,
# we do not change the luminosity of other dust contributions.
# The luminosity of the modified black body L_MBB = epsilon * L_dust.
# The total dust luminosity will be : L_dust(inside energy budget) + L_MBB.
# Luminosity of the modified black body: L_MBB = epsilon * L_dust.
# Total dust luminosity: L_dust(inside energy budget) + L_MBB.
# We add the contribution of the MBB to L_dust.
sed.add_contribution('dust.mbb', self.wave,
......
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