3 import matplotlib.pyplot
as plt
4 from scipy.interpolate
import interp1d
9 talys_t = np.array([1.0e-4,5.0e-4,1.0e-3,5.0e-3,1.0e-2,5.0e-2,1.0e-1,1.5e-1,2.0e-1,2.5e-1,
10 3.0e-1,4.0e-1,5.0e-1,6.0e-1,7.0e-1,8.0e-1,9.0e-1,1.0e+0,1.5e+0,2.0e+0,
11 2.5e+0,3.0e+0,3.5e+0,4.0e+0,5.0e+0,6.0e+0,7.0e+0,8.0e+0,9.0e+0,1.0e+1 ])
21 T9,adopt,exp = np.loadtxt(
"ne22amg26_angulo1999",unpack=
True,skiprows=1,)
23 f =
interp1d(np.log10(T9),np.log10(rate),fill_value=-99,bounds_error=
False,kind=
"cubic")
24 rates = 10**
f(np.log10(talys_t))
30 rate_file +=
" he4 ne22 mg26 an99 1.06148e+01 \n"
31 stringlist = [
"{:.3e}".
format(ytmp)
for ytmp
in rates ]
32 rate_file +=
" "+
" ".join(stringlist)+
"\n"
36 T9,adopt,exp = np.loadtxt(
"o17agne21_cf88",unpack=
True,skiprows=1,)
39 f =
interp1d(np.log10(T9),np.log10(rate),fill_value=-98,bounds_error=
False,kind=
"cubic")
40 rates = 10**
f(np.log10(talys_t))
45 rate_file +=
" he4 o17 ne21 cf88n 7.35100e+00 \n"
46 stringlist = [
"{:.3e}".
format(ytmp*0.1)
for ytmp
in rates ]
47 rate_file +=
" "+
" ".join(stringlist)+
"\n"
51 a = np.array([4.04,2.302e-4,6900,1.881e7])
52 b = np.array([0,-0.6,3.19,0.358])
53 c = np.array([7.74,6.14,11.3,26.7])
54 func =
lambda T: np.sum(a*T**b*np.exp(-c/T))
55 y = np.array([
func(ttmp)
for ttmp
in talys_t])
62 rate_file +=
" he4 ne22 n mg25 ja01 -4.78290e-01 \n"
63 stringlist = [
"{:.3e}".
format(ytmp)
for ytmp
in y ]
64 rate_file +=
" "+
" ".join(stringlist)+
"\n"
68 T9,adopt,exp = np.loadtxt(
"017anne20_angulo1999",unpack=
True,skiprows=1,)
70 f =
interp1d(np.log10(T9),np.log10(rate),fill_value=-99,bounds_error=
False,kind=
"cubic")
71 rates = 10**
f(np.log10(talys_t))
72 rates[rates<1e-99]=1e-99
77 rate_file +=
" he4 o17 n ne20 an99 5.86000e-01 \n"
78 stringlist = [
"{:.3e}".
format(ytmp)
for ytmp
in rates ]
79 rate_file +=
" "+
" ".join(stringlist)+
"\n"
82 with open(
"tab_rates.dat",
"w")
as f: