Commit 157a6c3e authored by Yannick Roehlly's avatar Yannick Roehlly

Add docstring to modules

parent 0e10ca3d
......@@ -4,6 +4,9 @@
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
CIGALE psum analysis module
===========================
This file implements the statistical analysis as performed by the calcX2_psum
programme of the Fortran Cigale code.
......@@ -46,10 +49,7 @@ PLOT_L_MAX = 1e6
class Module(AnalysisModule):
"""psum analysis
TODO: Description of the PSUM method.
"""
"""psum analysis"""
parameter_list = OrderedDict([
("analysed_variables", (
......
......@@ -4,9 +4,12 @@
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
This module was developed to use pcigale (in fact the *pcigale* script) to
generate a table with the fluxes of all the generated SED in a given set of
filters, without doing any statistical analysis.
Save fluxes analysis module
===========================
This module does not perform a statistical analysis. It computes and save the
fluxes in a set of filters for all the possible combinations of input SED
parameters.
The data file is used only to get the list of fluxes to be computed.
......@@ -24,7 +27,8 @@ from ..data import Database
class Module(AnalysisModule):
"""
"""Save fluxes analysis module
This module saves a table containing all the parameters and desired fluxes
for all the computed models.
......
......@@ -3,6 +3,15 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Bruzual and Charlot (2003) stellar emission module
==================================================
This module implements the Bruzual and Charlot (2003) Single Stellar
Populations.
"""
import numpy as np
from collections import OrderedDict
from . import CreationModule
......@@ -10,8 +19,11 @@ from ..data import Database
class Module(CreationModule):
"""Module computing the Star Formation History contribution bases on the
Bruzual and Charlot (2003) models.
"""Bruzual and Charlot (2003) stellar emission module
This SED creation module convolves the SED star formation history with a
Bruzual and Charlot (2003) single stellar population to add a stellar
component to the SED.
"""
parameter_list = OrderedDict([
......
......@@ -3,6 +3,14 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Médéric Boquien <mederic.boquien@oamp.fr>
"""
Casey (2012) IR models module
=============================
This module implements the Casey (2012) infra-red models.
"""
import numpy as np
import scipy.constants as cst
from collections import OrderedDict
......@@ -10,9 +18,7 @@ from . import CreationModule
class Module(CreationModule):
"""
Module computing the infra-red re-emission corresponding to an amount of
attenuation using the Casey (2012) model.
"""Casey (2012) templates IR re-emission
Given an amount of attenuation (e.g. resulting from the action of a dust
attenuation module) this module normalises the Casey (2012) template
......
......@@ -3,15 +3,21 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Laure Ciesla <ciesla@physics.uoc.gr>
"""
Dale et al. (2014) IR models module
===================================
This module implements the Dale (2014) infra-red models.
"""
from collections import OrderedDict
from pcigale.data import Database
from . import CreationModule
class Module(CreationModule):
"""
Module computing the infra-red re-emission corresponding to an amount of
attenuation using the Dale et al (2014) models.
"""Dale et al. (2014) templates IR re-emission
Given an amount of attenuation (e.g. resulting from the action of a dust
attenuation module) this module normalises the Dale et al (2014)
......
......@@ -3,15 +3,21 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Dale and Helou (2002) IR models module
======================================
This module implements the Dale and Helou (2002) infra-red models.
"""
from collections import OrderedDict
from . import CreationModule
from ..data import Database
class Module(CreationModule):
"""
Module computing the infra-red re-emission corresponding to an amount of
attenuation using the Dale and Helou (2002) templates.
"""Dale and Helou (2002) templates IR re-emission module
Given an amount of attenuation (e.g. resulting from the action of a dust
attenuation module) this module normalises the Dale and Helou (2002)
......
......@@ -3,6 +3,14 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Médéric Boquien <mederic.boquien@oamp.fr>
"""
Draine and Li (2007) IR models module
=====================================
This module implements the Draine and Li (2007) infra-red models.
"""
from collections import OrderedDict
import numpy as np
from pcigale.data import Database
......@@ -10,9 +18,7 @@ from . import CreationModule
class Module(CreationModule):
"""
Module computing the infra-red re-emission corresponding to an amount of
attenuation using the Draine and Li (2007) models.
"""Draine and Li (2007) templates IR re-emission module
Given an amount of attenuation (e.g. resulting from the action of a dust
attenuation module) this module normalises the Draine and Li (2007)
......
......@@ -3,6 +3,15 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Calzetti et al. (2000) and Leitherer et al. (2002) attenuation module
=====================================================================
This module implements the Calzetti et al. (2000) and Leitherer et al. (2002)
attenuation formulae, adding an UV-bump and a power law.
"""
import numpy as np
from collections import OrderedDict
from . import CreationModule
......@@ -160,11 +169,13 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
class Module(CreationModule):
"""Add CCM dust attenuation based on the Calzetti formula
"""Calzetti + Leitherer attenuation module
This module computes the Cardelli, Clayton and Mathis attenuation using the
formulae from Calzetti et al. (2000) and Leitherer et al. (2002).
If a contribution name is given in the parameter list, the attenuation
will be applied only to the flux of this contribution; else, it will be
applied to the whole spectrum.
The attenuation can be computed on the whole spectrum or on a specific
contribution and is added to the SED as a negative contribution.
"""
......
......@@ -4,7 +4,10 @@
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
This module implements the attenuation base on a power law as defined
Charlot and Fall (2000) power law attenuation module
====================================================
This module implements the attenuation based on a power law as defined
in Charlot and Fall (2000) with a UV bump added.
"""
......@@ -92,7 +95,14 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl):
class Module(CreationModule):
"""Add CCM dust attenuation based on Charlot and Fall (2000) power law.
"""Power law attenuation module
This module computes the Cardelli, Clayton and Mathis attenuation using
a power law as defined in Charlot and Fall (2000).
The attenuation can be computed on the whole spectrum or on a specific
contribution and is added to the SED as a negative contribution.
"""
parameter_list = OrderedDict([
......
......@@ -3,6 +3,16 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Redshift and IGM attenuation module
===================================
This module implements the effect of redshift and the attenuation caused by the
inter-galactic medium. It uses code developed for the Large Synoptic Survey
Telescope. http://dev.lsstcorp.org/trac/
"""
import numpy as np
from collections import OrderedDict
from . import CreationModule
......@@ -14,8 +24,7 @@ class Module(CreationModule):
"""Redshift a SED and add IGM attenuation
This module adds both the effect of redshift and inter-galactic medium
(IGM) attenuation to a SED object. It is based on the code from the Large
Synoptic Survey Telescope. http://dev.lsstcorp.org/trac/
(IGM) attenuation to a SED object.
"""
......
......@@ -3,6 +3,14 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Read spectrum from file module
==============================
This module reads a SED spectrum from a file.
"""
import atpy
from collections import OrderedDict
from . import CreationModule
......
......@@ -3,6 +3,14 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Maraston (2005) stellar emission module
=======================================
This module implements the Maraston (2005) Single Stellar Populations.
"""
import numpy as np
from collections import OrderedDict
from . import CreationModule
......@@ -10,11 +18,11 @@ from ..data import Database
class Module(CreationModule):
"""Module computing the Star Formation History contribution based on the
Maraston (2005) models.
"""Maraston (2005) stellar emission module
Implements the population synthesis based on the SSP described in Maraston,
2005, MNRAS, 362, 799.
This SED creation module convolves the SED star formation history with
a Maraston (2005) single stellar population to add a stellar component to
the SED.
Information added to the SED:
- imf, metallicity, galaxy_age
......
......@@ -3,6 +3,15 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Double decreasing exponential star formation history module
===========================================================
This module implements a star formation history (SFH) composed of two
decreasing exponentials.
"""
import numpy as np
from collections import OrderedDict
from . import CreationModule
......@@ -13,11 +22,10 @@ AGE_LAPSE = 1
class Module(CreationModule):
"""Create a double decreasing exponential Star Formation History
"""Double decreasing exponential Star Formation History
This module create a star formation history (star formation rate vs galaxy
age) composed of two exp(-t/τ). The SFH is added to the info dictionary of
the SED as a tuple (age, SFR).
This module sets the SED star formation history (SFH) as a combination of
two exp(-t/τ) exponentials.
"""
......
......@@ -3,6 +3,14 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly <yannick.roehlly@oamp.fr>
"""
Read star formation history from file module
============================================
This module reads the star formation history in a file.
"""
import atpy
import numpy as np
from collections import OrderedDict
......
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