Code |
def li_hex_wutte(E, A1, A2, A3, A4, A5, A6, I):
"""
This function calculates proton impact excitation cross sections (in cm2) of
Li.
param E: requested electron-impact energy in eV
type E: float, np.ndarray
param Ai: fit coefficient
type Ai: float
param I: threshold energy in eV
type I: float
"""
energy = np.logspace(np.log10(I), 5, num=500)
sigma_e = 5.984e-16/E * ((energy-I)/energy)**A6 * (A1/((energy/I)**0) + A2/((energy/I)**1) + A3/((energy/I)**2) + A4/((energy/I)**3) + A5*np.log(energy/I))
ref_E = 0.918*energy*(1-I/(1.15*energy) + np.sqrt(1-I/energy))
sigma_p = sp.interpolate.interp1d(ref_E, sigma_e, kind='linear', fill_value='extrapolate')
return sigma_p(E) |