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

When on a grid, make sure that the models are always computed in the same...

When on a grid, make sure that the models are always computed in the same order to facilitate comparisons between different runs.
parent dbd77d82
......@@ -10,6 +10,7 @@
- With the new sanity check of the input parameters, cigale did not handle the fact that the redshift could be given in the parameters file. Now this is handled properly. (Médéric Boquien)
- When giving the list of parameters through a file, cigale did not compute properly what parameter changed between to successive models. (Médéric Boquien)
- Using the m2005 module led to a crash. This is now fixed. (Yannick Roehlly)
- When computing models on a grid, the order could change from one run to the next, which is an issue when comparing the outputs of `savefluxes` for instance. Now models are always computed in the same order. The last parameter of the last module being in innermost loop and the first parameter of the first module being the outermost loop. (Médéric Boquien)
### Optimised
- A significant fraction of the total run time is spent computing integrals (e.g. fluxes in passbands). We can make the integration faster by rewriting the trapezoidal rule in terms of np.dot(). This allows to offload the computation to optimised libraries. The end result is that the integration is twice as fast, with a gain of ~10-15% on the total run time. (Médéric Boquien)
......
......@@ -68,7 +68,7 @@ class ParametersHandlerGrid(object):
"""
# We make a copy of the dictionary as we are modifying it.
dictionary = dict(dictionary)
dictionary = collections.OrderedDict(dictionary)
# First, we must ensure that all values are lists; when a value is a
# single element, we put it in a list.
......
......@@ -239,7 +239,7 @@ class Configuration(object):
return None
return self.config.dict()
return self.config.copy()
def check_modules(self):
"""Make a basic check to ensure that some required modules are present.
......
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