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

Preserve the order of the parameters in the analysis modules.

parent 0907b7e5
...@@ -24,6 +24,7 @@ ...@@ -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) - 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 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) - 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 ### 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) - 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. ...@@ -25,6 +25,7 @@ reduced χ²) is given for each observation.
""" """
from collections import OrderedDict
import ctypes import ctypes
import multiprocessing as mp import multiprocessing as mp
from multiprocessing.sharedctypes import RawArray from multiprocessing.sharedctypes import RawArray
...@@ -50,7 +51,7 @@ TOLERANCE = 1e-12 ...@@ -50,7 +51,7 @@ TOLERANCE = 1e-12
class PdfAnalysis(AnalysisModule): class PdfAnalysis(AnalysisModule):
"""PDF analysis module""" """PDF analysis module"""
parameter_list = dict([ parameter_list = OrderedDict([
("analysed_variables", ( ("analysed_variables", (
"array of strings", "array of strings",
"List of the physical properties to estimate. Leave empty to " "List of the physical properties to estimate. Leave empty to "
......
...@@ -14,6 +14,8 @@ parameters. ...@@ -14,6 +14,8 @@ parameters.
The data file is used only to get the list of fluxes to be computed. The data file is used only to get the list of fluxes to be computed.
""" """
from collections import OrderedDict
import ctypes import ctypes
import multiprocessing as mp import multiprocessing as mp
from multiprocessing.sharedctypes import RawArray from multiprocessing.sharedctypes import RawArray
...@@ -36,7 +38,7 @@ class SaveFluxes(AnalysisModule): ...@@ -36,7 +38,7 @@ class SaveFluxes(AnalysisModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("variables", ( ("variables", (
"array of strings", "array of strings",
"List of the physical properties to save. Leave empty to save all " "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. ...@@ -18,6 +18,8 @@ is changed, this module may need to be adapted.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from scipy.constants import parsec from scipy.constants import parsec
from scipy.misc import factorial from scipy.misc import factorial
...@@ -141,7 +143,7 @@ class Redshifting(CreationModule): ...@@ -141,7 +143,7 @@ class Redshifting(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("redshift", ( ("redshift", (
"float", "float",
"Redshift to apply to the galaxy. Leave empty to use the redshifts" "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