Commit 2001bd0d authored by Médéric Boquien's avatar Médéric Boquien

Enable plotting the SED of models computed without stellar populations.

parent eb23a453
......@@ -34,6 +34,7 @@
- Ensure that best models are properly computed when models are computed by blocks and that no fit could be made in one or more blocks. This can be case if all the models in the block are older than the age of the universe. (Médéric)
- Make sure that the parameters are saved with the proper scale (linear or logarithmic) in the χ² files. (Médéric Boquien)
- Some math libraries such as MKL or OpenBLAS sometime try to be (too) smart, starting computation threads on their own. As cigale is already parallel, this just oversubscribes the CPU and can lead to important slowdowns. An environment variable could be set by the user to disable this, but this is cumbersome. Rather, we set these variables directly in the code at the startup of cigale. (Yannick Roehlly & Médéric Boquien)
- Fix a crash in `pcigale-plots` when plotting the SED of models computed without stellar populations. (Médéric Boquien)
### Optimised
- Slight speedup of the computation of the likelihood from the χ² using a multiplication rather than a division. (Médéric Boquien)
- Speedup of the computation of the χ² by ~10% taking the opposite of a scalar rather than of an array. (Médéric Boquien)
......
......@@ -163,7 +163,8 @@ def _sed_worker(obs, mod, filters, sed_type, logo, xrange, yrange, series,
ax2 = plt.subplot(gs[1])
# Stellar emission
if 'stellar_attenuated' in series:
if ('stellar_attenuated' in series
and 'stellar.young' in sed.columns):
if 'nebular.absorption_young' in sed.columns:
ax1.loglog(wavelength_spec[wsed],
(sed['stellar.young'][wsed] +
......@@ -185,7 +186,8 @@ def _sed_worker(obs, mod, filters, sed_type, logo, xrange, yrange, series,
marker=None, nonposy='clip', linestyle='-',
linewidth=1.0)
if 'stellar_unattenuated' in series:
if ('stellar_unattenuated' in series
and 'stellar.young' in sed.columns):
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