import numpy as np
import matplotlib.pyplot as plt
%%time
dati = np.load('run020006.npz')
count1 = dati['count1']
count1f=count1[(2000<count1)&(count1<14000)]
plt.hist(count1f,2000, histtype='step', ec='k')
plt.suptitle('ADC finestra spessa')
plt.xlabel('ADC finestra spessa')
plt.grid()
plt.show()
%%time
dati = np.loadtxt('/home/valerio/Desktop/run020006.dat', max_rows=7748980-1) # salto ultima linea del file perché scritta male
count1 = dati[:,2]
count1f=count1[(2000<count1)&(count1<14000)]
plt.hist(count1f,2000, histtype='step', ec='k')
plt.suptitle('ADC finestra spessa')
plt.xlabel('ADC finestra spessa')
plt.grid()
plt.show()