Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
CIGALE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cigale
CIGALE
Commits
f27ff5bb
Commit
f27ff5bb
authored
Jul 03, 2014
by
BURGARELLA Denis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional correction of a bug in the attenuation law
parent
97e690ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
pcigale/creation_modules/dustatt_calzleit.py
pcigale/creation_modules/dustatt_calzleit.py
+3
-2
pcigale/creation_modules/dustatt_powerlaw.py
pcigale/creation_modules/dustatt_powerlaw.py
+9
-7
No files found.
pcigale/creation_modules/dustatt_calzleit.py
View file @
f27ff5bb
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Centre de données Astrophysiques de Marseille
# Copyright (C) 2014 Laboratoire d'Astrophysique de Marseille
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly
# Author: Yannick Roehlly
, Denis Burgarella
"""
Calzetti et al. (2000) and Leitherer et al. (2002) attenuation module
...
...
@@ -171,7 +172,7 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
class
CalzLeit
(
CreationModule
):
"""Calzetti + Leitherer attenuation module
This module computes the
Cardelli, Clayton and Mathis
attenuation using the
This module computes the
dust
attenuation using the
formulae from Calzetti et al. (2000) and Leitherer et al. (2002).
The attenuation can be computed on the whole spectrum or on a specific
...
...
pcigale/creation_modules/dustatt_powerlaw.py
View file @
f27ff5bb
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Centre de données Astrophysiques de Marseille
# Copyright (C) 2014 Laboratoire d'Astrophysique de Marseille
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly
# Author: Yannick Roehlly
, Denis Burgarella
"""
Charlot and Fall (2000) power law attenuation module
...
...
@@ -64,7 +65,7 @@ def uv_bump(wavelength, central_wave, gamma, ebump):
def
alambda_av
(
wavelength
,
delta
,
bump_wave
,
bump_width
,
bump_ampl
):
"""Compute the complete attenuation curve A(λ)/Av
The continuum is a power law (λ / λv) ** δ to w
it
h is added a UV bump.
The continuum is a power law (λ / λv) ** δ to w
hic
h is added a UV bump.
Parameters
----------
...
...
@@ -97,8 +98,8 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl):
class
PowerLawAtt
(
CreationModule
):
"""Power law attenuation module
This module computes the
Cardelli, Clayton and Mathis attenuation using
a
power law a
s defined in Charlot and Fall (2000).
This module computes the
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.
...
...
@@ -173,7 +174,7 @@ class PowerLawAtt(CreationModule):
self
.
sel_attenuation
=
None
def
process
(
self
,
sed
):
"""Add the
CCM
dust attenuation to the SED.
"""Add the dust attenuation to the SED.
Parameters
----------
...
...
@@ -202,6 +203,7 @@ class PowerLawAtt(CreationModule):
self
.
sel_attenuation
=
alambda_av
(
wavelength
,
powerlaw_slope
,
uv_bump_wavelength
,
uv_bump_width
,
uv_bump_amplitude
)
attenuation_total
=
0.
for
contrib
in
list
(
sed
.
contribution_names
):
age
=
contrib
.
split
(
'.'
)[
-
1
].
split
(
'_'
)[
-
1
]
...
...
@@ -223,8 +225,8 @@ class PowerLawAtt(CreationModule):
attenuation_spectrum
)
# Bump and slope of the dust attenuation
sed
.
add_info
(
"attenuation.uv_bump_amplitude"
,
uv_bump_amplitude
,
True
)
sed
.
add_info
(
"attenuation.powerlaw_slope"
,
powerlaw_slope
,
True
)
sed
.
add_info
(
"attenuation.uv_bump_amplitude"
,
uv_bump_amplitude
)
sed
.
add_info
(
"attenuation.powerlaw_slope"
,
powerlaw_slope
)
# Total attenuation
sed
.
add_info
(
"dust.luminosity"
,
attenuation_total
,
True
)
...
...
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