Commit 7b84e236 authored by Muriel Bonetto's avatar Muriel Bonetto

Correccion de ionstatistics.py, flashie con las labels

parent d3d7f584
...@@ -11,8 +11,8 @@ import seaborn as sns ...@@ -11,8 +11,8 @@ import seaborn as sns
colors1=sns.color_palette("rocket", 10) colors1=sns.color_palette("rocket", 10)
colors2=sns.color_palette("mako", 10) colors2=sns.color_palette("mako", 10)
color1 = colors1[3] color1 = colors1[5]
color2 = colors1[2] color2 = colors1[3]
color3 = colors1[1] color3 = colors1[1]
plt.rcParams.update({ plt.rcParams.update({
...@@ -74,25 +74,28 @@ bins2 = np.arange(10,50,1) ...@@ -74,25 +74,28 @@ bins2 = np.arange(10,50,1)
bins3 = np.arange(30,100,1) bins3 = np.arange(30,100,1)
plt.figure(figsize = (4.5,3)) 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[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[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[3], bins=bins2, histtype='step',density = True)
#plt.hist(Stat_Heigths[4], 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,color = color3,label = 'Ion') plt.hist(Stat_Heigths[2], bins=bins3, histtype='step',density = True,color = color3)#,label = 'Ion')
poisson1= sts.poisson.pmf(bins1,np.mean(Stat_Heigths[0])) poisson1= sts.poisson.pmf(bins1,np.mean(Stat_Heigths[0]))
poisson2= sts.poisson.pmf(bins2,np.mean(Stat_Heigths[1])) poisson2= sts.poisson.pmf(bins2,np.mean(Stat_Heigths[1]))
poisson3= sts.poisson.pmf(bins3,np.mean(Stat_Heigths[2])) poisson3= sts.poisson.pmf(bins3,np.mean(Stat_Heigths[2]))
plt.plot(bins1+0.5,poisson1,color = color1,alpha = 0.9)
plt.plot(bins2+0.5,poisson2,color = color2,alpha = 0.9)
plt.plot(bins3+0.5,poisson3,color = color3,alpha = 0.9)
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.legend()
plt.grid() plt.grid()
plt.tight_layout() plt.tight_layout()
plt.xlabel('Counts')
plt.ylabel('Event frequency')
#poissoneidad = np.var(Stat_Heigths)/np.mean(Stat_Heigths) #poissoneidad = np.var(Stat_Heigths)/np.mean(Stat_Heigths)
#plt.title('Varianza/media = {:.4f}'.format(poissoneidad)) #plt.title('Varianza/media = {:.4f}'.format(poissoneidad))
plt.savefig('bg_laser_ion_stats.pdf',dpi = 600 ) 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