3 import matplotlib.pyplot
as plt
8 sys.path.append(
'../../bin')
9 from class_files.nucleus_multiple_class
import nucleus_multiple
13 Function to sum up mass fractions or abundances over equal A.
18 Y_new = np.zeros([max_A+1,])
19 for i
in range(len(A)):
20 Y_new[int(A[i])] += Y[i]
21 return np.array(range(max_A+1)),Y_new
24 fig = plt.figure(figsize=(5,2.5))
27 fig2 = plt.figure(figsize=(5,2.5))
31 A,X = np.loadtxt(
"../../data/Example_data/Example_AGB_nishimura/iniab1.4E-02As09.ppn",
32 unpack=
True,usecols=[2,3])
34 ax2.plot(Asum,Xsum,label=
"Initial")
37 A,Z,N,Y,X = np.loadtxt(
"finab.dat",unpack=
True,usecols=[0,1,2,3,4])
43 nm_winnet = nucleus_multiple(A=A,Z=Z,Y=Y)
45 Asum,Xsum = nm_winnet.A_X
46 ax2.plot(Asum,Xsum,label=
"Final")
49 Z,A,Y=np.loadtxt(
"solar_abu_lodders.txt",unpack=
True)
53 nm_solar = nucleus_multiple(A=A,Z=Z,Y=Y)
55 Asum,Xsum = nm_solar.A_X
56 ax2.plot(Asum,Xsum,label=
"Solar",lw=0.5)
59 nm_overprod= nm_winnet/nm_solar
62 Z = np.unique(nm_overprod.Z)
65 elementnames = (
'neutron',
'h',
'he',
'li',
'be',
'b',
'c',
'n',
'o',
'f',
'ne',
'na',
'mg',
'al',
'si',
'p',
's',
'cl',
'ar',
'k',
'ca',
'sc',
'ti',
'v',
'cr',
'mn',
'fe',
66 'co',
'ni',
'cu',
'zn',
'ga',
'ge',
'as',
'se',
'br',
'kr',
'rb',
'sr',
'y',
'zr',
'nb',
'mo',
'tc',
'ru',
'rh',
'pd',
'ag',
'cd',
'in',
'sn',
'sb',
67 'te',
'i',
'xe',
'cs',
'ba',
'la',
'ce',
'pr',
'nd',
'pm',
'sm',
'eu',
'gd',
'tb',
'dy',
'ho',
'er',
'tm',
'yb',
'lu',
'hf',
'ta',
'w',
're',
'os',
68 'ir',
'pt',
'au',
'hg',
'tl',
'pb',
'bi',
'po',
'at',
'rn',
'fr',
'ra',
'ac',
'th',
'pa',
'u',
'np',
'pu',
'am',
'cm',
'bk',
'cf',
'es',
'fm',
'md',
69 'no',
'lr',
'rf',
'db',
'sg',
'bh',
'hs',
'mt',
'ds',
'rg',
'ub',
'ut',
'uq',
'up',
'uh',
'us',
'uo')
74 Y = nm_overprod.Y[(nm_overprod.Z==Ztmp) & (nm_overprod.Y>=1e-2)]
75 A = nm_overprod.A[(nm_overprod.Z==Ztmp) & (nm_overprod.Y>=1e-2)]
78 maxY_arg = np.argmax(Y)
81 ion_name = elementnames[Ztmp][0].upper()+elementnames[Ztmp][1:]
84 ax.text(A[maxY_arg],Y[maxY_arg]*1.1,ion_name,clip_on=
True,ha=
"center",color=p[0].get_color())
87 ax.axhline(1e-1,color=
"lightgrey",zorder=-1,lw=0.8,ls=
"--")
88 ax.axhline(1e0 ,color=
"lightgrey",zorder=-1,lw=0.8,ls=
"dotted")
89 ax.axhline(1e1 ,color=
"lightgrey",zorder=-1,lw=0.8,ls=
"--")
96 ax.set_ylabel(
r"Overproduction X/X$_\odot$")
97 ax.set_xlabel(
"Mass number")
100 ax2.set_yscale(
"log")
101 ax2.set_ylim(1e-11,1)
103 ax2.set_xlabel(
"Mass number")
104 ax2.set_ylabel(
"Mass fraction")
107 fig.savefig(
"overproduction.pdf",bbox_inches=
"tight")
108 fig2.savefig(
"mass_fractions.pdf",bbox_inches=
"tight")