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

The name creation_modules is a bit vague. For more clarity and consistency we...

The name creation_modules is a bit vague. For more clarity and consistency we rather use sed_modules now
parent a4e939be
......@@ -25,10 +25,10 @@ from collections import OrderedDict
import numpy as np
from . import CreationModule
from . import SedModule
class SfhBuat08(CreationModule):
class SfhBuat08(SedModule):
"""Chemical evolution motivated Star Formation History
This module implements a chemical evolution motivated star formation
......@@ -101,5 +101,5 @@ class SfhBuat08(CreationModule):
sed.add_info("sfh.integrated", self.sfr_integrated, True)
sed.add_info("sfh.velocity", self.velocity)
# CreationModule to be returned by get_module
# SedModule to be returned by get_module
Module = SfhBuat08
......@@ -18,10 +18,10 @@ from collections import OrderedDict
import numpy as np
from . import CreationModule
from . import SedModule
class SfhQuench(CreationModule):
class SfhQuench(SedModule):
"""Star Formation History Quenching
This module implements a quenching of the Star Formation History.
......@@ -94,5 +94,5 @@ class SfhQuench(CreationModule):
sed.add_info("sfh.quenching_age", self.quenching_age)
sed.add_info("sfh.quenching_factor", self.quenching_factor)
# CreationModule to be returned by get_module
# SedModule to be returned by get_module
Module = SfhQuench
......@@ -17,10 +17,10 @@ from collections import OrderedDict
import numpy as np
from . import CreationModule
from . import SedModule
class SFHDelayed(CreationModule):
class SFHDelayed(SedModule):
"""Delayed tau model for Star Formation History
This module sets the SED star formation history (SFH) proportional to time,
......@@ -87,5 +87,5 @@ class SFHDelayed(CreationModule):
sed.add_info("sfh.integrated", self.sfr_integrated, True)
sed.add_info("sfh.tau_main", self.tau_main)
# CreationModule to be returned by get_module
# SedModule to be returned by get_module
Module = SFHDelayed
......@@ -16,10 +16,10 @@ from collections import OrderedDict
import numpy as np
from ..utils import read_table
from . import CreationModule
from . import SedModule
class SfhFromFile(CreationModule):
class SfhFromFile(SedModule):
"""Module reading the SFH from a file
This module is used to read the Star Formation Histories from a FITS or
......@@ -98,5 +98,5 @@ class SfhFromFile(CreationModule):
sed.add_info("sfh.integrated", self.sfr_integrated, True)
sed.add_info("sfh.index", self.sfr_column_number)
# CreationModule to be returned by get_module
# SedModule to be returned by get_module
Module = SfhFromFile
......@@ -18,10 +18,10 @@ from collections import OrderedDict
import numpy as np
from . import CreationModule
from . import SedModule
class SfhPeriodic(CreationModule):
class SfhPeriodic(SedModule):
"""Several regularly-spaced short delayed-SFH SF events
This module sets the SED star formation history (SFH) as a combination of
......@@ -122,5 +122,5 @@ class SfhPeriodic(CreationModule):
sed.add_info("sfh.delta_bursts", self.delta_bursts)
sed.add_info("sfh.tau_bursts", self.tau_bursts)
# CreationModule to be returned by get_module
# SedModule to be returned by get_module
Module = SfhPeriodic
......@@ -17,7 +17,7 @@ import validate
from ..handlers.parameters_handler import ParametersHandler
from ..data import Database
from ..utils import read_table
from .. import creation_modules
from .. import sed_modules
from .. import analysis_modules
from ..warehouse import SedWarehouse
from . import validation
......@@ -87,8 +87,8 @@ class Configuration(object):
"They will be given only for information.")
self.spec['parameters_file'] = "string()"
self.config['creation_modules'] = []
self.config.comments['creation_modules'] = ([""] +
self.config['sed_modules'] = []
self.config.comments['sed_modules'] = ([""] +
["Order of the modules use for SED creation. Available modules:"] +
["SFH: sfh2exp, sfhdelayed, sfhfromfile, sfhperiodic"] +
["SSP: bc03, m2005"] +
......@@ -98,7 +98,7 @@ class Configuration(object):
["AGN: dale2014, fritz2006"] +
["Radio: radio"] +
["Redshift: redshifting (mandatory!)"])
self.spec['creation_modules'] = "cigale_string_list()"
self.spec['sed_modules'] = "cigale_string_list()"
self.config['analysis_method'] = ""
self.config.comments['analysis_method'] = [""] + wrap(
......@@ -168,14 +168,14 @@ class Configuration(object):
"Configuration of the SED creation modules.")
self.spec['sed_modules_params'] = {}
for module_name in self.config['creation_modules']:
for module_name in self.config['sed_modules']:
self.config['sed_modules_params'][module_name] = {}
self.spec['sed_modules_params'][module_name] = {}
sub_config = self.config['sed_modules_params'][module_name]
sub_spec = self.spec['sed_modules_params'][module_name]
for name, (typ, description, default) in \
creation_modules.get_module(
sed_modules.get_module(
module_name,
blank=True).parameter_list.items():
if default is None:
......@@ -184,7 +184,7 @@ class Configuration(object):
sub_config.comments[name] = wrap(description)
sub_spec[name] = typ
self.config['sed_modules_params'].comments[module_name] = [
creation_modules.get_module(module_name, blank=True).comments]
sed_modules.get_module(module_name, blank=True).comments]
self.check_modules()
......@@ -271,7 +271,7 @@ class Configuration(object):
for module in modules:
if all([user_module not in modules[module] for user_module in
self.config['creation_modules']]):
self.config['sed_modules']]):
print("{} Options are: {}.".
format(comments[module], ', '.join(modules[module])))
......
......@@ -6,7 +6,7 @@
import marshal
from ..sed import SED
from .. import creation_modules
from .. import sed_modules
class SedWarehouse(object):
......@@ -52,7 +52,7 @@ class SedWarehouse(object):
Returns
-------
a pcigale.creation_modules.Module instance
a pcigale.sed_modules.Module instance
"""
# Marshal a tuple (name, parameters) to be used as a key for storing
......@@ -62,7 +62,7 @@ class SedWarehouse(object):
if module_key in self.module_cache:
module = self.module_cache[module_key]
else:
module = creation_modules.get_module(name, **kwargs)
module = sed_modules.get_module(name, **kwargs)
self.module_cache[module_key] = module
return module
......
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