Commit 97e18b77 authored by Guang's avatar Guang Committed by Guang
Browse files

optimize IGM for speed

parent 54834293
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment