In [7]:
import numpy as np
import matplotlib.pyplot as plt
In [8]:
%%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()
CPU times: user 442 ms, sys: 12.4 ms, total: 454 ms
Wall time: 453 ms
In [9]:
%%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()
CPU times: user 54.4 s, sys: 609 ms, total: 55 s
Wall time: 55 s
In [ ]: