Commit 9a1a2d13 authored by Médéric Boquien's avatar Médéric Boquien

Preserve the order of the parameters in the analysis modules.

parent 0907b7e5
......@@ -24,6 +24,7 @@
- The mass-dependent physical properties are computed assuming the redshift of the model. However because we round the observed redshifts to two decimals, there can be a difference of 0.005 in redshift between the models and the actual observation if CIGALE computes the list of redshifts itself. At low redshift, this can cause a discrepancy in the mass-dependent physical properties: ~0.35 dex at z=0.010 vs 0.015 for instance. Therefore we now evaluate these physical quantities at the observed redshift at full precision. (Médéric Boquien, issue reported by Samir Salim)
- In the sfhfromfile module, an extraneous offset in the column index made that it took the previous column as the SFR rather than the selected column. (Médéric Boquien)
- In sfhfromfile, if the SFR is made of integers cigale crashed. Now we systematically convert it to float. (Médéric Boquien)
- The order of the parameters for the analysis modules would change each time a new pcigale.ini was generated. Now the order is fixed. (Médéric Boquien)
### Optimised
- Prior to version 0.7.0, we needed to maintain the list of redshifts for all the computed models. Past 0.7.0 we just infer the redshift from a list unique redshifts. This means that we can now discard the list of redshifts for all the models and only keep the list of unique redshifts. This saves ~8 MB of memory for every 10⁶ models. the models should be computed slightly faster but it is in the measurement noise. (Médéric Boquien)
......
......@@ -25,6 +25,7 @@ reduced χ²) is given for each observation.
"""
from collections import OrderedDict
import ctypes
import multiprocessing as mp
from multiprocessing.sharedctypes import RawArray
......@@ -50,7 +51,7 @@ TOLERANCE = 1e-12
class PdfAnalysis(AnalysisModule):
"""PDF analysis module"""
parameter_list = dict([
parameter_list = OrderedDict([
("analysed_variables", (
"array of strings",
"List of the physical properties to estimate. Leave empty to "
......
......@@ -14,6 +14,8 @@ parameters.
The data file is used only to get the list of fluxes to be computed.
"""
from collections import OrderedDict
import ctypes
import multiprocessing as mp
from multiprocessing.sharedctypes import RawArray
......@@ -36,7 +38,7 @@ class SaveFluxes(AnalysisModule):
"""
parameter_list = dict([
parameter_list = OrderedDict([
("variables", (
"array of strings",
"List of the physical properties to save. Leave empty to save all "
......
......@@ -18,6 +18,8 @@ is changed, this module may need to be adapted.
"""
from collections import OrderedDict
import numpy as np
from scipy.constants import parsec
from scipy.misc import factorial
......@@ -141,7 +143,7 @@ class Redshifting(CreationModule):
"""
parameter_list = dict([
parameter_list = OrderedDict([
("redshift", (
"float",
"Redshift to apply to the galaxy. Leave empty to use the redshifts"
......
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