Commit 8df2e55e authored by Médéric Boquien's avatar Médéric Boquien

Do not crash when trying to compute equivalent widths when the nebular...

Do not crash when trying to compute equivalent widths when the nebular component emission is missing.
parent 5411c647
......@@ -10,6 +10,7 @@
### Fixed
- Corrected a typo that prevented `restframe\_parameters` from being listed among the available modules. (Médéric Boquien)
- The filters in the residual plot of `pcigale-plots sed` are now drawn in order of increasing wavelength so that the line joining all the filters does not make loops. (Médéric Boquien)
- In the absence of a nebular component `restframe\_parameters` would crash when attempting to compute the equivalent widths of the lines listed in `EW_lines`. Now they are simply ignored. (Médéric Boquien)
### Optimised
- The cache architecture has been simplified, making it somewhat faster. It speeds up the model generation by ~1%. (Médéric Boquien)
......
......@@ -206,8 +206,9 @@ class RestframeParam(SedModule):
sed.add_info("param.IRX", np.log10(sed.info['dust.luminosity'] /
(fluxes['FUV'] * self.to_lumin * c / 154e-9)))
for line, EW in self.EW(sed).items():
sed.add_info("param.EW({}/{})".format(*line), EW)
if 'nebular.lines_young' in sed.contribution_names:
for line, EW in self.EW(sed).items():
sed.add_info("param.EW({}/{})".format(*line), EW)
for filt in self.lumin_filters:
sed.add_info("param.restframe_Lnu({})".format(filt),
......
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