Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
8325609e
Commit
8325609e
authored
Dec 27, 2013
by
Yannick Roehlly
Browse files
Give name to module classes
It will make the documentation clearer.
parent
157a6c3e
Changes
15
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/psum.py
View file @
8325609e
...
...
@@ -48,7 +48,7 @@ PLOT_L_MIN = 91
PLOT_L_MAX
=
1e6
class
Module
(
AnalysisModule
):
class
Psum
(
AnalysisModule
):
"""psum analysis"""
parameter_list
=
OrderedDict
([
...
...
@@ -661,3 +661,6 @@ def bin_evenly(values, max_bins):
bin_digits
=
np
.
digitize
(
values
,
digitize_boundaries
)
return
(
boundaries
,
bin_digits
)
# AnalysisModule to be returned by get_module
Module
=
Psum
pcigale/analysis_modules/savefluxes.py
View file @
8325609e
...
...
@@ -26,7 +26,7 @@ from ..warehouse import SedWarehouse
from
..data
import
Database
class
Module
(
AnalysisModule
):
class
SaveFluxes
(
AnalysisModule
):
"""Save fluxes analysis module
This module saves a table containing all the parameters and desired fluxes
...
...
@@ -147,3 +147,6 @@ class Module(AnalysisModule):
# The zip call is to convert the list of rows to a list of columns.
out_table
=
Table
(
zip
(
*
out_rows
),
names
=
out_columns
)
out_table
.
write
(
out_file
,
format
=
out_format
)
# AnalysisModule to be returned by get_module
Module
=
SaveFluxes
pcigale/creation_modules/bc03.py
View file @
8325609e
...
...
@@ -18,7 +18,7 @@ from . import CreationModule
from
..data
import
Database
class
Module
(
CreationModule
):
class
BC03
(
CreationModule
):
"""Bruzual and Charlot (2003) stellar emission module
This SED creation module convolves the SED star formation history with a
...
...
@@ -132,3 +132,6 @@ class Module(CreationModule):
sed
.
add_contribution
(
"ssp_young"
+
self
.
postfix
,
young_wave
,
young_lumin
)
# CreationModule to be returned by get_module
Module
=
BC03
pcigale/creation_modules/casey2012.py
View file @
8325609e
...
...
@@ -17,7 +17,7 @@ from collections import OrderedDict
from
.
import
CreationModule
class
Module
(
CreationModule
):
class
Casey2012
(
CreationModule
):
"""Casey (2012) templates IR re-emission
Given an amount of attenuation (e.g. resulting from the action of a dust
...
...
@@ -128,3 +128,6 @@ class Module(CreationModule):
self
.
wave
,
sed
.
info
[
attenuation
]
*
self
.
lumin_blackbody
)
# CreationModule to be returned by get_module
Module
=
Casey2012
pcigale/creation_modules/dale2014.py
View file @
8325609e
...
...
@@ -16,7 +16,7 @@ from pcigale.data import Database
from
.
import
CreationModule
class
Module
(
CreationModule
):
class
Dale2014
(
CreationModule
):
"""Dale et al. (2014) templates IR re-emission
Given an amount of attenuation (e.g. resulting from the action of a dust
...
...
@@ -102,3 +102,6 @@ class Module(CreationModule):
self
.
model_quasar
.
wave
,
frac_agn
*
sed
.
info
[
attenuation
]
*
self
.
model_quasar
.
lumin
)
# CreationModule to be returned by get_module
Module
=
Dale2014
pcigale/creation_modules/dh2002.py
View file @
8325609e
...
...
@@ -16,7 +16,7 @@ from . import CreationModule
from
..data
import
Database
class
Module
(
CreationModule
):
class
DH2002
(
CreationModule
):
"""Dale and Helou (2002) templates IR re-emission module
Given an amount of attenuation (e.g. resulting from the action of a dust
...
...
@@ -76,3 +76,6 @@ class Module(CreationModule):
self
.
dh2002
.
wavelength_grid
,
sed
.
info
[
attenuation
]
*
ir_template
)
# CreationModule to be returned by get_module
Module
=
DH2002
pcigale/creation_modules/dl2007.py
View file @
8325609e
...
...
@@ -17,7 +17,7 @@ from pcigale.data import Database
from
.
import
CreationModule
class
Module
(
CreationModule
):
class
DL2007
(
CreationModule
):
"""Draine and Li (2007) templates IR re-emission module
Given an amount of attenuation (e.g. resulting from the action of a dust
...
...
@@ -128,3 +128,6 @@ class Module(CreationModule):
self
.
model_minmax
.
wave
,
sed
.
info
[
attenuation
]
*
self
.
model_minmax
.
lumin
)
# CreationModule to be returned by get_module
Module
=
DL2007
pcigale/creation_modules/dustatt_calzleit.py
View file @
8325609e
...
...
@@ -168,7 +168,7 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
return
attenuation
class
Module
(
CreationModule
):
class
CalzLeit
(
CreationModule
):
"""Calzetti + Leitherer attenuation module
This module computes the Cardelli, Clayton and Mathis attenuation using the
...
...
@@ -363,3 +363,6 @@ class Module(CreationModule):
sed
.
add_info
(
filter_name
+
"_attenuation"
+
self
.
postfix
,
-
2.5
*
np
.
log
(
flux_att
[
filter_name
]
/
flux_noatt
[
filter_name
]))
# CreationModule to be returned by get_module
Module
=
CalzLeit
pcigale/creation_modules/dustatt_powerlaw.py
View file @
8325609e
...
...
@@ -94,7 +94,7 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl):
return
attenuation
class
Module
(
CreationModule
):
class
PowerLawAtt
(
CreationModule
):
"""Power law attenuation module
This module computes the Cardelli, Clayton and Mathis attenuation using
...
...
@@ -285,3 +285,6 @@ class Module(CreationModule):
sed
.
add_info
(
filter_name
+
"_attenuation"
+
self
.
postfix
,
-
2.5
*
np
.
log
(
flux_att
[
filter_name
]
/
flux_noatt
[
filter_name
]))
# CreationModule to be returned by get_module
Module
=
PowerLawAtt
pcigale/creation_modules/igmattenuation.py
View file @
8325609e
...
...
@@ -20,7 +20,7 @@ from ..sed import utils
from
..extern.lsst
import
Sed
as
lsst
class
Module
(
CreationModule
):
class
IGMAtt
(
CreationModule
):
"""Redshift a SED and add IGM attenuation
This module adds both the effect of redshift and inter-galactic medium
...
...
@@ -102,3 +102,6 @@ class Module(CreationModule):
new_wavelen
,
igm_effect
)
# CreationModule to be returned by get_module
Module
=
IGMAtt
pcigale/creation_modules/lines.py
View file @
8325609e
...
...
@@ -9,7 +9,7 @@ from scipy.constants import c
from
.
import
CreationModule
class
Module
(
CreationModule
):
class
Lines
(
CreationModule
):
parameter_list
=
OrderedDict
([
(
"Nly_key"
,
(
...
...
@@ -92,3 +92,6 @@ class Module(CreationModule):
intensity
=
ratio
*
flow_H
sed
.
add_lines
(
self
.
parameters
[
"set_name"
],
wav
,
intensity
,
sigma
)
# CreationModule to be returned by get_module
Module
=
Lines
pcigale/creation_modules/loadfile.py
View file @
8325609e
...
...
@@ -16,7 +16,7 @@ from collections import OrderedDict
from
.
import
CreationModule
class
Modu
le
(
CreationModule
):
class
LoadSpecFi
le
(
CreationModule
):
"""Module reading a spectrum from a file and adding it to the SED.
Note that this module uses the atpy module, which is not automatically
...
...
@@ -62,3 +62,6 @@ class Module(CreationModule):
table
[
self
.
parameters
[
'lambda_column'
]],
table
[
self
.
parameters
[
'l_lambda_column'
]]
)
# CreationModule to be returned by get_module
Module
=
LoadSpecFile
pcigale/creation_modules/m2005.py
View file @
8325609e
...
...
@@ -17,7 +17,7 @@ from . import CreationModule
from
..data
import
Database
class
M
odule
(
CreationModule
):
class
M
2005
(
CreationModule
):
"""Maraston (2005) stellar emission module
This SED creation module convolves the SED star formation history with
...
...
@@ -189,3 +189,6 @@ class Module(CreationModule):
sed
.
add_contribution
(
"ssp_young"
+
self
.
postfix
,
ssp
.
wavelength_grid
,
young_spectrum
)
# CreationModule to be returned by get_module
Module
=
M2005
pcigale/creation_modules/sfh2exp.py
View file @
8325609e
...
...
@@ -21,7 +21,7 @@ from . import CreationModule
AGE_LAPSE
=
1
class
Module
(
CreationModule
):
class
Sfh2Exp
(
CreationModule
):
"""Double decreasing exponential Star Formation History
This module sets the SED star formation history (SFH) as a combination of
...
...
@@ -115,3 +115,6 @@ class Module(CreationModule):
sed
.
add_info
(
"sfh_tau_burst"
+
self
.
postfix
,
tau_burst
)
sed
.
add_info
(
"sfh_f_burst"
+
self
.
postfix
,
f_burst
)
sed
.
add_info
(
"sfh_burst_age"
+
self
.
postfix
,
burst_age
)
# CreationModule to be returned by get_module
Module
=
Sfh2Exp
pcigale/creation_modules/sfhfromfile.py
View file @
8325609e
...
...
@@ -17,7 +17,7 @@ from collections import OrderedDict
from
.
import
CreationModule
class
Modu
le
(
CreationModule
):
class
SfhFromFi
le
(
CreationModule
):
"""Module reading the SFH from a file
This module is used to read the Star Formation Histories from a FITS or
...
...
@@ -88,3 +88,6 @@ class Module(CreationModule):
sed
.
add_module
(
self
.
name
,
self
.
parameters
)
sed
.
sfh
=
(
time_grid
,
sfr
)
sed
.
add_info
(
"sfh_id"
+
self
.
postfix
,
sfr_column_name
)
# CreationModule to be returned by get_module
Module
=
SfhFromFile
Write
Preview
Supports
Markdown
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