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
b6c85bed
Commit
b6c85bed
authored
Jul 02, 2013
by
Yannick Roehlly
Browse files
Slight change to filter integration
If the SED is redshifted, apply the redshift before checking the boundaries.
parent
30b11265
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/sed/__init__.py
View file @
b6c85bed
...
...
@@ -359,21 +359,22 @@ class SED(object):
The integrated Fν density in mJy.
"""
# Filter limits
lambda_min
=
min
(
transmission
[
0
])
lambda_max
=
max
(
transmission
[
0
])
# FIXME Shouldn't it be the reverse
wavelength
=
self
.
wavelength_grid
l_lambda
=
self
.
luminosity
if
apply_redshift
:
wavelength
,
l_lambda
=
utils
.
redshift_lambda_l_lambda
(
(
wavelength
,
l_lambda
),
redshift
)
# Test if the spectrum cover all the filter extend
if
((
min
(
self
.
wavelength_grid
)
>
lambda_min
)
or
(
max
(
self
.
wavelength_grid
)
<
lambda_max
)):
f_nu
=
-
99.
else
:
wavelength
=
self
.
wavelength_grid
l_lambda
=
self
.
luminosity
if
apply_redshift
:
wavelength
,
l_lambda
=
utils
.
redshift_lambda_l_lambda
(
(
wavelength
,
l_lambda
),
redshift
)
# We regrid both spectrum and filter to the best wavelength grid
# to avoid interpolating a high wavelength density curve to a low
# density one. Also, we limit the work wavelength domain to the
...
...
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