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
Guang
x-cigale
Commits
97e18b77
Commit
97e18b77
authored
Jul 08, 2019
by
Guang
Committed by
Guang
Oct 23, 2019
Browse files
optimize IGM for speed
parent
54834293
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/sed_modules/redshifting.py
View file @
97e18b77
...
...
@@ -125,8 +125,9 @@ def igm_transmission(wavelength, redshift):
tau_norm_l_igm
=
np
.
interp
(
0
,
z_l
,
tau_l_igm
)
tau_norm_l_lls
=
np
.
interp
(
0
,
z_l
,
tau_l_lls
)
# Calculate tau_l_igm & tau_l_lls, assuming cross section ~ lambda^2.75 (O'Meara et al. 2013)
tau_l_igm
[
w
]
=
tau_norm_l_igm
*
(
z_l
[
w
]
+
1
)
**
2.75
tau_l_lls
[
w
]
=
tau_norm_l_lls
*
(
z_l
[
w
]
+
1
)
**
2.75
damp_factor
=
(
z_l
[
w
]
+
1
)
**
2.75
tau_l_igm
[
w
]
=
tau_norm_l_igm
*
damp_factor
tau_l_lls
[
w
]
=
tau_norm_l_lls
*
damp_factor
tau_taun
=
np
.
sum
(
tau_n
[
2
:
n_transitions_max
,
:],
axis
=
0
)
...
...
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