Commit 813afa0d authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto
parents 9619164c 7b84e236
......@@ -7,6 +7,20 @@ import ast
from scipy.optimize import curve_fit
import os
import scipy.stats as sts
import seaborn as sns
colors1=sns.color_palette("rocket", 10)
colors2=sns.color_palette("mako", 10)
color1 = colors1[5]
color2 = colors1[3]
color3 = colors1[1]
plt.rcParams.update({
"font.family": "STIXGeneral"
})
plt.rcParams.update({
"font.size": 14
})
# Solo levanto algunos experimentos
Stat_files = [8731, 8738, 8745]
......@@ -53,26 +67,37 @@ for i, fname in enumerate(Stat_files):
#plt.figure()
#plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
#plot figuras papers
bins1 = np.arange(100,350, 1)
bins2 = np.arange(10,50,1)
bins3 = np.arange(30,100,1)
plt.figure()
plt.hist(Stat_Heigths[0], bins=bins1, histtype='step',density = True)
plt.figure(figsize = (4.5,3))
plt.hist(Stat_Heigths[0], bins=bins1, histtype='step',density = True,color = color1)#,label = 'BG')
#plt.hist(Stat_Heigths[1], bins=bins2, histtype='step',density = True)
plt.hist(Stat_Heigths[1], bins=bins2, histtype='step',density = True)
plt.hist(Stat_Heigths[1], bins=bins2, histtype='step',density = True,color = color2)#,label = 'UV laser')
#plt.hist(Stat_Heigths[3], bins=bins2, histtype='step',density = True)
#plt.hist(Stat_Heigths[4], bins=bins2, histtype='step',density = True)
plt.hist(Stat_Heigths[2], bins=bins3, histtype='step',density = True)
plt.hist(Stat_Heigths[2], bins=bins3, histtype='step',density = True,color = color3)#,label = 'Ion')
#%%
poisson = sts.poisson.pmf(bins,np.mean(Stat_Heigths))
plt.plot(bins+0.5,poisson)
poisson1= sts.poisson.pmf(bins1,np.mean(Stat_Heigths[0]))
poisson2= sts.poisson.pmf(bins2,np.mean(Stat_Heigths[1]))
poisson3= sts.poisson.pmf(bins3,np.mean(Stat_Heigths[2]))
poissoneidad = np.var(Stat_Heigths)/np.mean(Stat_Heigths)
plt.title('Varianza/media = {:.4f}'.format(poissoneidad))
plt.plot(bins2+0.5,poisson2,color = color2,alpha = 0.9,label = 'BG')
plt.plot(bins3+0.5,poisson3,color = color3,alpha = 0.9,label = 'UV laser')
plt.plot(bins1+0.5,poisson1,color = color1,alpha = 0.9,label = 'Ion')
plt.legend()
plt.grid()
plt.tight_layout()
plt.xlabel('Counts')
plt.ylabel('Event frequency')
#poissoneidad = np.var(Stat_Heigths)/np.mean(Stat_Heigths)
#plt.title('Varianza/media = {:.4f}'.format(poissoneidad))
plt.savefig('bg_laser_ion_stats.pdf',dpi = 600 )
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