Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cigale
CIGALE
Commits
157a6c3e
Commit
157a6c3e
authored
Dec 26, 2013
by
Yannick Roehlly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docstring to modules
parent
0e10ca3d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
140 additions
and
38 deletions
+140
-38
pcigale/analysis_modules/psum.py
pcigale/analysis_modules/psum.py
+4
-4
pcigale/analysis_modules/savefluxes.py
pcigale/analysis_modules/savefluxes.py
+8
-4
pcigale/creation_modules/bc03.py
pcigale/creation_modules/bc03.py
+14
-2
pcigale/creation_modules/casey2012.py
pcigale/creation_modules/casey2012.py
+9
-3
pcigale/creation_modules/dale2014.py
pcigale/creation_modules/dale2014.py
+9
-3
pcigale/creation_modules/dh2002.py
pcigale/creation_modules/dh2002.py
+9
-3
pcigale/creation_modules/dl2007.py
pcigale/creation_modules/dl2007.py
+9
-3
pcigale/creation_modules/dustatt_calzleit.py
pcigale/creation_modules/dustatt_calzleit.py
+15
-4
pcigale/creation_modules/dustatt_powerlaw.py
pcigale/creation_modules/dustatt_powerlaw.py
+12
-2
pcigale/creation_modules/igmattenuation.py
pcigale/creation_modules/igmattenuation.py
+11
-2
pcigale/creation_modules/loadfile.py
pcigale/creation_modules/loadfile.py
+8
-0
pcigale/creation_modules/m2005.py
pcigale/creation_modules/m2005.py
+12
-4
pcigale/creation_modules/sfh2exp.py
pcigale/creation_modules/sfh2exp.py
+12
-4
pcigale/creation_modules/sfhfromfile.py
pcigale/creation_modules/sfhfromfile.py
+8
-0
No files found.
pcigale/analysis_modules/psum.py
View file @
157a6c3e
...
...
@@ -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"
,
(
...
...
pcigale/analysis_modules/savefluxes.py
View file @
157a6c3e
...
...
@@ -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.
...
...
pcigale/creation_modules/bc03.py
View file @
157a6c3e
...
...
@@ -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
([
...
...
pcigale/creation_modules/casey2012.py
View file @
157a6c3e
...
...
@@ -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
...
...
pcigale/creation_modules/dale2014.py
View file @
157a6c3e
...
...
@@ -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)
...
...
pcigale/creation_modules/dh2002.py
View file @
157a6c3e
...
...
@@ -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)
...
...
pcigale/creation_modules/dl2007.py
View file @
157a6c3e
...
...
@@ -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)
...
...
pcigale/creation_modules/dustatt_calzleit.py
View file @
157a6c3e
...
...
@@ -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.
"""
...
...
pcigale/creation_modules/dustatt_powerlaw.py
View file @
157a6c3e
...
...
@@ -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
([
...
...
pcigale/creation_modules/igmattenuation.py
View file @
157a6c3e
...
...
@@ -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.
"""
...
...
pcigale/creation_modules/loadfile.py
View file @
157a6c3e
...
...
@@ -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
...
...
pcigale/creation_modules/m2005.py
View file @
157a6c3e
...
...
@@ -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
...
...
pcigale/creation_modules/sfh2exp.py
View file @
157a6c3e
...
...
@@ -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 d
ouble decreasing exponential Star Formation History
"""
D
ouble 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.
"""
...
...
pcigale/creation_modules/sfhfromfile.py
View file @
157a6c3e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment