Commit 98561c86 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Switch back to ordered dictionaries for the input parameters after all. That...

Switch back to ordered dictionaries for the input parameters after all. That way the list of parameters is kept into a logical order when building the configuration file. The impact on performance is negligible.
parent 2e2bf8da
...@@ -12,6 +12,7 @@ Populations. ...@@ -12,6 +12,7 @@ Populations.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
from ..data import Database from ..data import Database
...@@ -25,7 +26,7 @@ class BC03(CreationModule): ...@@ -25,7 +26,7 @@ class BC03(CreationModule):
component to the SED. component to the SED.
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("imf", ( ("imf", (
"int", "int",
"Initial mass function: 0 (Salpeter) or 1 (Chabrier).", "Initial mass function: 0 (Salpeter) or 1 (Chabrier).",
......
...@@ -12,6 +12,7 @@ This module implements the Casey (2012) infra-red models. ...@@ -12,6 +12,7 @@ This module implements the Casey (2012) infra-red models.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
import scipy.constants as cst import scipy.constants as cst
from . import CreationModule from . import CreationModule
...@@ -26,7 +27,7 @@ class Casey2012(CreationModule): ...@@ -26,7 +27,7 @@ class Casey2012(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("temperature", ( ("temperature", (
"float", "float",
"Temperature of the dust in K.", "Temperature of the dust in K.",
......
...@@ -11,6 +11,7 @@ This module implements the Dale (2014) infra-red models. ...@@ -11,6 +11,7 @@ This module implements the Dale (2014) infra-red models.
""" """
from collections import OrderedDict
from pcigale.data import Database from pcigale.data import Database
from . import CreationModule from . import CreationModule
...@@ -27,7 +28,7 @@ class Dale2014(CreationModule): ...@@ -27,7 +28,7 @@ class Dale2014(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('fracAGN', ( ('fracAGN', (
'float', 'float',
"AGN fraction. It is not recommended to combine this AGN emission " "AGN fraction. It is not recommended to combine this AGN emission "
......
...@@ -12,6 +12,7 @@ This module implements the Draine and Li (2007) infra-red models. ...@@ -12,6 +12,7 @@ This module implements the Draine and Li (2007) infra-red models.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from pcigale.data import Database from pcigale.data import Database
from . import CreationModule from . import CreationModule
...@@ -29,7 +30,7 @@ class DL2007(CreationModule): ...@@ -29,7 +30,7 @@ class DL2007(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('qpah', ( ('qpah', (
'float', 'float',
"Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, " "Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, "
......
...@@ -12,6 +12,7 @@ This module implements the updated Draine and Li (2007) infrared models. ...@@ -12,6 +12,7 @@ This module implements the updated Draine and Li (2007) infrared models.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from pcigale.data import Database from pcigale.data import Database
from . import CreationModule from . import CreationModule
...@@ -29,7 +30,7 @@ class DL2014(CreationModule): ...@@ -29,7 +30,7 @@ class DL2014(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('qpah', ( ('qpah', (
'float', 'float',
"Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, " "Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, "
......
...@@ -13,6 +13,7 @@ attenuation formulae, adding an UV-bump and a power law. ...@@ -13,6 +13,7 @@ attenuation formulae, adding an UV-bump and a power law.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -178,7 +179,7 @@ class CalzLeit(CreationModule): ...@@ -178,7 +179,7 @@ class CalzLeit(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("E_BVs_young", ( ("E_BVs_young", (
"float", "float",
"E(B-V)*, the colour excess of the stellar continuum light for " "E(B-V)*, the colour excess of the stellar continuum light for "
......
...@@ -13,6 +13,7 @@ in Charlot and Fall (2000) with a UV bump added. ...@@ -13,6 +13,7 @@ in Charlot and Fall (2000) with a UV bump added.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -104,7 +105,7 @@ class PowerLawAtt(CreationModule): ...@@ -104,7 +105,7 @@ class PowerLawAtt(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("Av_young", ( ("Av_young", (
"float", "float",
"V-band attenuation of the young population.", "V-band attenuation of the young population.",
......
...@@ -10,6 +10,7 @@ Fritz et al. (2006) AGN dust torus emission module ...@@ -10,6 +10,7 @@ Fritz et al. (2006) AGN dust torus emission module
This module implements the Fritz et al. (2006) models. This module implements the Fritz et al. (2006) models.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from pcigale.data import Database from pcigale.data import Database
from . import CreationModule from . import CreationModule
...@@ -38,7 +39,7 @@ class Fritz2006(CreationModule): ...@@ -38,7 +39,7 @@ class Fritz2006(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('r_ratio', ( ('r_ratio', (
'float', 'float',
"Ratio of the maximum to minimum radii of the dust torus. " "Ratio of the maximum to minimum radii of the dust torus. "
......
...@@ -12,6 +12,7 @@ This module reads a SED spectrum from a file. ...@@ -12,6 +12,7 @@ This module reads a SED spectrum from a file.
""" """
from astropy.table import Table from astropy.table import Table
from collections import OrderedDict
from ..utils import read_table from ..utils import read_table
from . import CreationModule from . import CreationModule
...@@ -21,7 +22,7 @@ class LoadSpecFile(CreationModule): ...@@ -21,7 +22,7 @@ class LoadSpecFile(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("filename", ( ("filename", (
'str', 'str',
"Name of the file to load and to add to the SED table. This " "Name of the file to load and to add to the SED table. This "
......
...@@ -11,6 +11,7 @@ This module implements the Maraston (2005) Single Stellar Populations. ...@@ -11,6 +11,7 @@ This module implements the Maraston (2005) Single Stellar Populations.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
from ..data import Database from ..data import Database
...@@ -38,7 +39,7 @@ class M2005(CreationModule): ...@@ -38,7 +39,7 @@ class M2005(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('imf', ( ('imf', (
'int', 'int',
"Initial mass function: 0 (Salpeter) or 1 (Kroupa)", "Initial mass function: 0 (Salpeter) or 1 (Kroupa)",
......
...@@ -16,6 +16,7 @@ in dust and not visible in the wavelength range. ...@@ -16,6 +16,7 @@ in dust and not visible in the wavelength range.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
import scipy.constants as cst import scipy.constants as cst
from . import CreationModule from . import CreationModule
...@@ -31,7 +32,7 @@ class MBB(CreationModule): ...@@ -31,7 +32,7 @@ class MBB(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("epsilon_mbb", ( ("epsilon_mbb", (
"float", "float",
"Fraction [>= Ø] of L_dust(energy balance) in the MBB", "Fraction [>= Ø] of L_dust(energy balance) in the MBB",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt # Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Médéric Boquien <mboquien@ast.cam.ac.uk> # Author: Médéric Boquien <mboquien@ast.cam.ac.uk>
from collections import OrderedDict
import numpy as np import numpy as np
from pcigale.data import Database from pcigale.data import Database
import scipy.constants as cst import scipy.constants as cst
...@@ -24,7 +25,7 @@ class NebularEmission(CreationModule): ...@@ -24,7 +25,7 @@ class NebularEmission(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
('logU', ( ('logU', (
'float', 'float',
"Ionisation parameter", "Ionisation parameter",
......
...@@ -15,6 +15,7 @@ for all the physical processes at play to build the received total emission. ...@@ -15,6 +15,7 @@ for all the physical processes at play to build the received total emission.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -28,7 +29,7 @@ class Param(CreationModule): ...@@ -28,7 +29,7 @@ class Param(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("OK", ( ("OK", (
"boolean", "boolean",
"Are you here?.", "Are you here?.",
......
...@@ -17,6 +17,7 @@ This module implements the radio emission of galaxies, taking into account only ...@@ -17,6 +17,7 @@ This module implements the radio emission of galaxies, taking into account only
""" """
from collections import OrderedDict
import numpy as np import numpy as np
import scipy.constants as cst import scipy.constants as cst
from . import CreationModule from . import CreationModule
...@@ -31,7 +32,7 @@ class Radio(CreationModule): ...@@ -31,7 +32,7 @@ class Radio(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("qir", ( ("qir", (
"float", "float",
"The value of the FIR/radio correlation coefficient.", "The value of the FIR/radio correlation coefficient.",
......
...@@ -12,6 +12,7 @@ decreasing exponentials. ...@@ -12,6 +12,7 @@ decreasing exponentials.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -28,7 +29,7 @@ class Sfh2Exp(CreationModule): ...@@ -28,7 +29,7 @@ class Sfh2Exp(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("tau_main", ( ("tau_main", (
"float", "float",
"e-folding time of the main stellar population model in Myr.", "e-folding time of the main stellar population model in Myr.",
......
...@@ -21,6 +21,7 @@ and interpolate the values of a, b and c. ...@@ -21,6 +21,7 @@ and interpolate the values of a, b and c.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -38,7 +39,7 @@ class SfhBuat08(CreationModule): ...@@ -38,7 +39,7 @@ class SfhBuat08(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("velocity", ( ("velocity", (
"float", "float",
"Rotational velocity of the galaxy in km/s. Must be between 80 " "Rotational velocity of the galaxy in km/s. Must be between 80 "
......
...@@ -14,6 +14,7 @@ constant. ...@@ -14,6 +14,7 @@ constant.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -29,7 +30,7 @@ class SfhQuench(CreationModule): ...@@ -29,7 +30,7 @@ class SfhQuench(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("quenching_age", ( ("quenching_age", (
"integer", "integer",
"Age of the galaxy at which the quenching happens in Myr.", "Age of the galaxy at which the quenching happens in Myr.",
......
...@@ -12,6 +12,7 @@ regularly-spaced short constant SF events. ...@@ -12,6 +12,7 @@ regularly-spaced short constant SF events.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -28,7 +29,7 @@ class SfhComb(CreationModule): ...@@ -28,7 +29,7 @@ class SfhComb(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("N_events", ( ("N_events", (
"integer", "integer",
"Number of individual star formation events. ", "Number of individual star formation events. ",
......
...@@ -12,6 +12,7 @@ regularly-spaced short regularly-spaced delayed-SFH SF events. ...@@ -12,6 +12,7 @@ regularly-spaced short regularly-spaced delayed-SFH SF events.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -28,7 +29,7 @@ class SfhComb(CreationModule): ...@@ -28,7 +29,7 @@ class SfhComb(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("N_events", ( ("N_events", (
"integer", "integer",
"Number of individual star formation events. ", "Number of individual star formation events. ",
......
...@@ -13,6 +13,7 @@ rise of the SFR up to a maximum, followed by an exponential decrease. ...@@ -13,6 +13,7 @@ rise of the SFR up to a maximum, followed by an exponential decrease.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
from . import CreationModule from . import CreationModule
...@@ -29,7 +30,7 @@ class SFHDelayed(CreationModule): ...@@ -29,7 +30,7 @@ class SFHDelayed(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("tau_main", ( ("tau_main", (
"float", "float",
"e-folding time of the main stellar population model in Myr.", "e-folding time of the main stellar population model in Myr.",
......
...@@ -12,6 +12,7 @@ This module reads the star formation history in a file. ...@@ -12,6 +12,7 @@ This module reads the star formation history in a file.
""" """
from astropy.table import Table from astropy.table import Table
from collections import OrderedDict
import numpy as np import numpy as np
from ..utils import read_table from ..utils import read_table
from . import CreationModule from . import CreationModule
...@@ -28,7 +29,7 @@ class SfhFromFile(CreationModule): ...@@ -28,7 +29,7 @@ class SfhFromFile(CreationModule):
""" """
parameter_list = dict([ parameter_list = OrderedDict([
("filename", ( ("filename", (
"str", "str",
"Name of the file containing the SFH. The first column must be " "Name of the file containing the SFH. The first column must be "
......
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