Professional Documents
Culture Documents
Code For Jupyter
Code For Jupyter
pyplot as plt
from scipy import optimize
import numpy as np
V = [3.5,3.9]
E = [1.173,1.332]
#For Cs
L_Cs = [0.1,0.25,0.6]
E_Cs = []
for i in L_Cs:
E_Cs.append(f(i,*popt))
plt.scatter(L_Cs,E_Cs,marker = "o", c = "b", label = "Energy of other three peaks
of Cs-60")
#For Na-22
L_Na = [0.25,1.55,3.80]
E_Na = []
for i in L_Na:
E_Na.append(f(i,*popt))
#For Co-57
L_57 = [0.25,0.40]
E_57 = []
for i in L_57:
E_57.append(f(i,*popt))
plt.xlabel("LLD")
plt.ylabel("Energy in KeV")
plt.title("E vs LLD")
plt.plot(x,f(x,*popt),"--", label='Fitted function')
plt.scatter(L_Na,E_Na,marker = "o", c = "b", label = "Energy of all four peaks of
Na-22")
plt.scatter(L_57,E_57,marker = "*", c = "r", label = "Energy of all four peaks of
Co-57")
plt.legend(loc = "upper left")
plt.show()
print(str(L_Na)+ " and corresponding energies (for Na-22) " + str(E_Na))
print(str(L_57)+ " and corresponding energies (for Co-57) " + str(E_57))