script for convert .t3pa files to .t3pa_cls
.t3pa file example:
Index $\quad$ Matrix $\quad$ Index $\quad$ ToA $\quad$ ToT $\quad$ FToA $\quad$ Overflow
0 $\quad$ 4574 $\quad$ 832 $\quad$ 29 $\quad$ 6 $\quad$ 0
1 $\quad$ 4831 $\quad$ 832 $\quad$ 35 $\quad$ 7 $\quad$ 0
2 $\quad$ 4575 $\quad$ 832 $\quad$ 100 $\quad$ 8 $\quad$ 0
3 $\quad$ 31031 $\quad$ 1745 $\quad$ 22 $\quad$ 11 $\quad$ 0
.
.
.
.t3pa_cls file example:
% Index $\quad$ Matrix Index $\quad$ [ RowNo, ClmNo ] $\quad$ ToA $\quad$ FToA $\quad$ ( ToA_in_ns ) $\quad$ ToT ( ToT_in_keV ) $\quad$ Overflow
# 1, $\quad$ Nunmasked = 3, $\quad$ Nmasked = 0, $\quad$ Ntot = 3 # Tfirst = 2.0787500000000000e+04 ns, $\quad$ Tlast = 2.0790625000000000e+04 ns, $\quad$ dT = 3.125000 ns, $\quad$ Etot = 64.428148 keV
2 $\quad$ 4575 $\quad$ [ 17, 223 ] $\quad$ 832 $\quad$ 8 $\quad$ ( 2.0787500000000000e+04 ns ) $\quad$ 100 $\quad$ ( 37.867914 keV ) $\quad$ 0
1 $\quad$ 4831 $\quad$ [ 18, 223 ] $\quad$ 832 $\quad$ 7 $\quad$ ( 2.0789062500000000e+04 ns ) $\quad$ 35 $\quad$ ( 14.733453 keV ) $\quad$ 0
0 $\quad$ 4574 $\quad$ [ 17, 222 ] $\quad$ 832 $\quad$ 6 $\quad$ ( 2.0790625000000000e+04 ns ) $\quad$ 29 $\quad$ ( 11.826781 keV ) $\quad$ 0
# 2, $\quad$ Nunmasked = 3, $\quad$ Nmasked = 0, $\quad$ Ntot = 3 # Tfirst = 4.3601562500000000e+04 ns, $\quad$ Tlast = 4.3607812500000000e+04 ns, $\quad$ dT = 6.250000 ns, $\quad$ Etot = 63.577435 keV
5 $\quad$ 30775 $\quad$ [ 120, 55 ] $\quad$ 1745 $\quad$ 15 $\quad$ ( 4.3601562500000000e+04 ns ) $\quad$ 99 $\quad$ ( 37.617059 keV ) $\quad$ 0
4 $\quad$ 30776 $\quad$ [ 120, 56 ] $\quad$ 1745 $\quad$ 13 $\quad$ ( 4.3604687500000000e+04 ns ) $\quad$ 44 $\quad$ ( 14.715446 keV ) $\quad$ 0
3 $\quad$ 31031 $\quad$ [ 121, 55 ] $\quad$ 1745 $\quad$ 11 $\quad$ ( 4.3607812500000000e+04 ns ) $\quad$2 2 $\quad$ ( 11.244929 keV ) $\quad$ 0
.
.
.
import numpy as np
import math
#import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as cm
#from matplotlib.mlab import griddata
from urllib.error import HTTPError # recognise the error stemming from missing data
#import urllib
import urllib.request
t3pa2cls_XII - upravena fce energy(a, b, c, t, ToT, pocet_udalosti, RowNo, ClmNo) - nyni je se pocita i s pripadem "nan" t3pa2cls_XV_pc - zkousim vyzobat vysoke energie (jednotlive interakce) - funkce single_interaction. Dale delam prumernou velikost stopy stopy interakce pro danou energii - funkce size_of_interactions_average. Dale delam spektra 2 casti vyboje podle zadaneho casu - primarne pro double breakdown, tj. funkce energy_spectra_doublebreakdown
#Define an exception which will be raised if the data is missing and stop the notebook execution
class StopExecution(Exception):
def _render_traceback_(self):
pass
#shot_no = 44395 #test discharge for which the notebook will definitely work
shot_no = 46398
shot = shot_no
identifier='H03-W0051_shot_'+str(shot)+'_450V'
detector = 'H03-W0051'
ds = np.DataSource('/tmp') # temporary storage for downloaded files
scalars_URL = 'http://golem.fjfi.cvut.cz/shots/{shot_no}/Diagnostics/PlasmaDetection/Results/{name}'
def get_scalar(shot_no, name):
return float(ds.open(scalars_URL.format(shot_no=shot_no, name=name)).read())
t_plasma_start = get_scalar(shot_no, 't_plasma_start')
t_plasma_end = get_scalar(shot_no, 't_plasma_end')
is_plasma = get_scalar(shot_no, 'b_plasma')
def get_file(shot, identifier):
#Pick the discharge to analyse
URL = 'http://golem.fjfi.cvut.cz/shots/{shot}/Diagnostics/TimepixDetector/H03/{identifier}.t3pa'
url = URL.format(shot=shot, identifier=identifier)
try:
file_name_t3pa=url
with urllib.request.urlopen(file_name_t3pa) as ft3pa:
line = ft3pa.readline()
line = line.decode('utf‐8')
ft3pa.close
except HTTPError:
print('File not found at %s. Aborting notebook execution.' % url)
raise StopExecution
return file_name_t3pa
def get_file_calib(name_calib):
#Pick the discharge to analyse
URL = 'http://golem.fjfi.cvut.cz/shots/{shot}/Diagnostics/TimepixDetector/calib_matrix_H03/{name_calib}.txt'
url = URL.format(shot=shot, name_calib=name_calib)
#print(url)
try:
file_calib=url
with urllib.request.urlopen(file_calib) as calib:
line = calib.readline()
line = line.decode('utf‐8')
calib.close
except HTTPError:
print('File not found at %s. Aborting notebook execution.' % url)
raise StopExecution
return file_calib
def load_calib(file_calib):
with urllib.request.urlopen(file_calib) as fc:
calib=[] #vytvoreni 1D pole
for i in range(0,256): #tj. rozsah 0-255
temp = [] # docasne pole
for j in range(0,256):
temp.append(0) #naplneni docasneho pole 0
calib.append(temp) #naplneni pole a[] docasnym polem temp
for i in range(0,256): #nacteni calib matice do pole calib
line = fc.readline()
line = line.decode('utf‐8')
word=line.strip().split(' ')
for j in range(0,256):
#calib[i][j]=float(word[j]) #i = radek, j = sloupec0
calib[j][i]=float(word[j]) #j = radek, i = sloupec0 - pouze pro stavajici kalibraci - verze XV
fc.close
return calib
def load_t3pa_file(file_t3pa):
index=[]
matrix_index=[]
ToA=[]
ToT=[]
FToA=[]
overflow=[]
pocet_udalosti = 0
with urllib.request.urlopen(file_t3pa) as ft3pa:
line = ft3pa.readline()
line = line.decode('utf‐8')
while True:
line = ft3pa.readline()
line = line.decode('utf‐8')
word=line.strip().split('\t') #v t3pa souboru je oddelovac \t
if line == '':
break
index.append(word[0])
matrix_index.append(word[1])
ToA.append(float(word[2]))
ToT.append(float(word[3]))
FToA.append(float(word[4]))
overflow.append(float(word[5]))
pocet_udalosti = pocet_udalosti + 1
ft3pa.close
return index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti
def noise(index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti): #tuto fci nemus9m explicitn2 volat - volam ji v fci load_t3pa
pocet=int(0) #pocet sumicich pixelu
konst=int(len(index)/1000)+1
noise_matrix_index=[]
for i in range(0,konst):
pom = [] # pomocne pole
k=0 #pomocna promenna - udava, kolik je v czklu ve skutecnosti udalosti - aby nebyla chyba 'list index out of range'
for j in range(0,1001):
if i*1000+j>=len(index):
break
pom.append(matrix_index[i*1000+j])
k=k+1
for m in range(0,k):
count=int(0) #pocet vvyskytu stejneho matrix index behem 1000 udalosti
index_=int(-1) #budu testovat, jestli pixel na ktery koukam je sumici (abych ho nezapocital 2x)
for p in range(0,pocet):
#index=int(p)
if pom[m]==noise_matrix_index[p]:
index_=p #pixel na ktery jsem uz koukal a byl sumici
break
if index_ >=0 and pom[m]==noise_matrix_index[index_]:
continue
for l in range(0,k):
if pom[m]==pom[l]:
count=count+1
####podminka na sumici pixely
if count>=50: #kdyz se pixel vyskytne behem tisice udalosti vicekrat nez toto cislo, je sumici
noise_matrix_index.append(pom[m])
#noise_matrix_index[pocet]=pom[i]
pocet=pocet+1
pom.clear()
pocet_udalosti=len(index)
for n in range (0,pocet_udalosti):
for o in range(0,len(noise_matrix_index)):
if n >=pocet_udalosti:
break
if(matrix_index[n]==noise_matrix_index[o]):
del matrix_index[n]
del index[n]
del ToA[n]
del ToT[n]
del FToA[n]
del overflow[n]
pocet_udalosti=pocet_udalosti-1
continue
return pocet_udalosti,index, matrix_index, ToA, ToT, FToA, overflow
def t3pa_data(pocet_udalosti,index, matrix_index, ToA, ToT, FToA, overflow):
#rovnou vyhodim sumici pixely
pocet_udalosti,index, matrix_index, ToA, ToT, FToA, overflow=noise(index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti)
RowNo=[]
ClmNo=[]
for i in range(0,len(matrix_index)):
#RowNo.append(int(int(matrix_index[i]))//int(256))
#ClmNo.append(int(int(matrix_index[i]))%int(256))
ClmNo.append(int(int(matrix_index[i]))//int(256)) #ver XV - bude pro novou kalibraci - nyn9 to bere 3patnou kalibraci jednotlivych pixelu (cislovani radku a sloupcu stejne jako v pixetu)
RowNo.append(int(int(matrix_index[i]))%int(256)) ##ver XV - bude super pro novou kalibraci - odpovida radkum a sloupcum v pixetu. Nyni bere spatne kalibrace pixelu (viz fce load_calib)
return index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti, RowNo, ClmNo
def hit_map(detector,hit_map_fig,RowNo,ClmNo):
plt.hist2d(RowNo,ClmNo,bins=(256,256),cmap='Blues')
cb=plt.colorbar()
cb.set_label('Counts in pixel')
plt.xlabel('x [pixel]')
plt.ylabel('y [pixel]')
plt.title(detector)
plt.savefig(hit_map_fig, dpi = 1000)
return
def energy(a, b, c, t, ToT, pocet_udalosti, RowNo, ClmNo):
E=[] #energy in keV
#for i in range (0,pocet_udalosti):
pom=0
for i in range (0,len(ToT)):
Sqrt=float(0.0)
e1=float(0.0)
e2=float(0.0)
# promenna sqrt je vnitrek odmocniny
Sqrt = (((float(b[RowNo[i]][ClmNo[i]])+float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]])-float(ToT[i])))*(((float(b[RowNo[i]][ClmNo[i]])+float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]])-float(ToT[i])))) + (float(4)*float(a[RowNo[i]][ClmNo[i]])*float(c[RowNo[i]][ClmNo[i]]))) #zmena oproti verzi VI
if float(Sqrt)<float(0):
E.append(float(0))
else:
'''
V kalibracni matici a se obcas vyskytne 0 -> ve vypoctu energie
je tim padem deleni nulou -> energie diverguje. Jak to vyresit?
zatim polozim energii = 0 (kdyz a=0), pak se uvidi
nakonec udelam limitu vyrazu energie pro a->0 (L'hopital)
'''
if a[RowNo[i]][ClmNo[i]]==0:
e1=((float(t[RowNo[i]][ClmNo[i]]))/float(2)) + ((((float(b[RowNo[i]][ClmNo[i]])+float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]])-float(ToT[i]))*(float(t[RowNo[i]][ClmNo[i]]))) - 2*(float(c[RowNo[i]][ClmNo[i]])))/(float(2)*np.sqrt(float(Sqrt))))
e2=((float(t[RowNo[i]][ClmNo[i]]))/float(2)) - ((((float(b[RowNo[i]][ClmNo[i]])+float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]])-float(ToT[i]))*(float(t[RowNo[i]][ClmNo[i]]))) - 2*(float(c[RowNo[i]][ClmNo[i]])))/(float(2)*np.sqrt(float(Sqrt))))
else:
e1=((-(float(b[RowNo[i]][ClmNo[i]]) - (float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]]))-float(ToT[i])))+np.sqrt(float(Sqrt)))/(float(2)*float(a[RowNo[i]][ClmNo[i]]))
e2=((-(float(b[RowNo[i]][ClmNo[i]]) - (float(a[RowNo[i]][ClmNo[i]])*float(t[RowNo[i]][ClmNo[i]]))-float(ToT[i])))-np.sqrt(float(Sqrt)))/(float(2)*float(a[RowNo[i]][ClmNo[i]]))
if a[RowNo[i]][ClmNo[i]]<0:
e1=-1
e2=-1
if math.isnan(e1):
e1=-1
if math.isnan(e2):
e2=-1
if e1<0 and e2<0:
E.append(float(0))
if e1>=0 and e1>e2:
E.append(float(e1))
if e2>=0 and e2>e1:
E.append(float(e2))
if e1>=0 and e2==e1:
E.append(float(e1))
return E
def Time(ToA, FToA, pocet_udalosti, RowNo, ClmNo):
T=[] #time in ns
for i in range (0,pocet_udalosti):
Time=float(0.0)
Time=(float(ToA[i])-((float(FToA[i])/float(16))))*float(25)
T.append(float(Time))
return T
def Timewalk_parameters_Si():
#SI - korekce na TimeWalk - parametry
A = -1.21988
B = 4.33638
C = 29.5075
D = 1
sigma_A=0.7013
sigma_B=0.1366
sigma_C=4.753
sigma_D=0
return A, B, C, D, sigma_A, sigma_B, sigma_C, sigma_D
def Timewalk(E,T):
i=0
A, B, C, D, sigma_A, sigma_B, sigma_C, sigma_D = Timewalk_parameters_Si()
while i < len(T):
timewalk=float(0)
timewalk = (C / (E[i] - B)) + A
if(timewalk<0):
timewalk=0
T[i]=T[i]-timewalk
i=i+1
return E,T
def remove_interactions_with_zero_energy(index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T):
i=0
treshold=5.015347
while i < len(T):
if E[i]<treshold: #E[i] < energy treshold
index.pop(i)
matrix_index.pop(i)
ToA.pop(i)
ToT.pop(i)
FToA.pop(i)
overflow.pop(i)
RowNo.pop(i)
ClmNo.pop(i)
E.pop(i)
T.pop(i)
continue
i=i+1
return index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T
def clustering_new(index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T):
dT=float(50)
indexCl, TCl,ECl, matrix_indexCl, ToACl,ToTCl,FToACl,RowNoCl,ClmNoCl,overflowCl=[],[],[],[],[],[],[],[],[],[]
StartLastElem=len(T)-1
indexCl.append(int(index[StartLastElem]))
TCl.append(float(T[StartLastElem]))
ECl.append(float(E[StartLastElem]))
matrix_indexCl.append(int(matrix_index[StartLastElem]))
RowNoCl.append(int(RowNo[StartLastElem]))
ClmNoCl.append(int(ClmNo[StartLastElem]))
ToACl.append(float(ToA[StartLastElem]))
ToTCl.append(float(ToT[StartLastElem]))
FToACl.append(float(FToA[StartLastElem]))
overflowCl.append(float(overflow[StartLastElem]))
del index[StartLastElem]
del T[StartLastElem]
del E[StartLastElem]
del matrix_index[StartLastElem]
del RowNo[StartLastElem]
del ClmNo[StartLastElem]
del ToA[StartLastElem]
del ToT[StartLastElem]
del FToA[StartLastElem]
del overflow[StartLastElem]
j=1
pom=float(TCl[0]+dT)
while(j >0):
if(len(T) == 0):
break
k=0
j=0
while (k<=(len(TCl)-1)):
i=len(T)-1
if(len(T) == 0):
break
pocet_sousedu=0 #pocet sousednich pixelu - mohou byt maximalne 4
delka=0
# verze X
count=0 #pomocna promanna, kterou urcuji, ze se ma nasledujici cyklus while projit jeste jednou, pokud je i = -1
while(float(T[i])<=(pom)):
delka=delka+1
if(((((int(RowNoCl[k]))==(int(RowNo[i])+1))or((int(RowNoCl[k]))==(int(RowNo[i])-1))) and ((int(ClmNoCl[k]))==(int(ClmNo[i])))) or (((int(RowNoCl[k]))==(int(RowNo[i]))) and (((int(ClmNoCl[k]))==(int(ClmNo[i])+1))or((int(ClmNoCl[k]))==(int(ClmNo[i])-1))))):
#beru jen pixely, které mají společnou jednu stranu.
#pixely, kter0 spolu sousedí přes roh neuvažuji
indexCl.append(int(index[i]))
TCl.append(float(T[i]))
ECl.append(float(E[i]))
matrix_indexCl.append(int(matrix_index[i]))
RowNoCl.append(int(RowNo[i]))
ClmNoCl.append(int(ClmNo[i]))
ToACl.append(float(ToA[i]))
ToTCl.append(float(ToT[i]))
FToACl.append(float(FToA[i]))
overflowCl.append(float(overflow[i]))
# Removes i-th Row
del index[i]
del T[i]
del E[i]
del matrix_index[i]
del RowNo[i]
del ClmNo[i]
del ToA[i]
del ToT[i]
del FToA[i]
del overflow[i]
j=j+1
i=len(T)-1
pocet_sousedu=pocet_sousedu+1
if(len(T) == 0):
break
if(pocet_sousedu==4):
break
continue
i=i-1
if(i==-1): # verze X
count=count+1
if(i<0 and len(T)>0): # verze X
i=0
if(count>1):
break
if(i>=len(T)):
break
k=k+1
if(len(TCl)>2):
indexCl, TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl = insertionSort(indexCl, TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl)
return T, indexCl,TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl
def insertionSort(indexCl, TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl):
# Function to do insertion sort
# Traverse through 1 to len(arr)
for i in range(1, len(TCl)):
key = TCl[i]
# Move elements of arr[0..i-1], that are
# greater than key, to one position ahead
# of their current position
#ostatni
key1 = indexCl[i]
key2 = ECl[i]
key3 = matrix_indexCl[i]
key4 = RowNoCl[i]
key5 = ClmNoCl[i]
key6 = ToACl[i]
key7 = ToTCl[i]
key8 = FToACl[i]
key9 = overflowCl[i]
j = i-1
while j >= 0 and key < TCl[j] :
TCl[j + 1] = TCl[j]
#ostatni
indexCl[j + 1] = indexCl[j]
ECl[j + 1] = ECl[j]
matrix_indexCl[j + 1] = matrix_indexCl[j]
RowNoCl[j + 1] = RowNoCl[j]
ClmNoCl[j + 1] = ClmNoCl[j]
ToACl[j + 1] = ToACl[j]
ToTCl[j + 1] = ToTCl[j]
FToACl[j + 1] = FToACl[j]
overflowCl[j + 1] = overflowCl[j]
j -= 1
TCl[j + 1] = key
#ostatni
indexCl[j + 1] = key1
ECl[j + 1] = key2
matrix_indexCl[j + 1] = key3
RowNoCl[j + 1] =key4
ClmNoCl[j + 1] = key5
ToACl[j + 1] = key6
ToTCl[j + 1] = key7
FToACl[j + 1] = key8
overflowCl [j + 1] = key9
return indexCl, TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl
def file_t3pa_cls_new(file_t3pa_cls,T):
with open(file_t3pa_cls, "w", encoding="utf-8") as t3pa_cls:
t3pa_cls.write('%\n')
t3pa_cls.write('% Index Matrix Index [ RowNo, ClmNo ] ToA FToA ( ToA_in_ns ) ToT ( ToT_in_keV ) Overflow\n')
t3pa_cls.write('\n')
i=1
T_first=[]
E_tot=[]
N_tot=[]
eventNo=0 #for high_energy_event function
while(len(T) > 0):
T, indexCl,TCl, ECl, matrix_indexCl, RowNoCl, ClmNoCl, ToACl, ToTCl, FToACl, overflowCl = clustering_new(index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T)
Tfirst=float(TCl[0])
Tlast=float(TCl[len(TCl)-1])
dT=Tlast-Tfirst
Etot=float(0)
for k in range(0,len(TCl)):
Etot=Etot+float(ECl[k])
T_first.append(float(Tfirst))
dT=Tlast-Tfirst
E_tot.append(float(Etot))
N_tot.append(len(TCl)) #new in ver. XV
t3pa_cls.write('# '+str(i)+', Nunmasked = '+str(len(TCl))+', Nmasked = 0, Ntot = '+str(len(TCl))+'\n')
t3pa_cls.write('# Tfirst = '+str(Tfirst)+' ns, Tlast = '+str(Tlast)+' ns, dT = '+str(dT)+' ns, Etot = '+str(Etot)+' keV\n')
for j in range(0,len(TCl)):
t3pa_cls.write(str(indexCl[j])+' '+str(matrix_indexCl[j])+' [ '+str(RowNoCl[j])+', '+str(ClmNoCl[j])+' ] '+str(ToACl[j])+' '+str(FToACl[j])+' ( '+str(TCl[j])+' ns ) '+str(ToTCl[j])+' ( '+str(ECl[j])+' keV ) '+str(overflowCl[j])+'\n')
t3pa_cls.write('\n')
#eventNo=single_interaction(eventNo,Etot, Tfirst, ECl, TCl, RowNoCl, ClmNoCl,path)
i=i+1
t3pa_cls.close
return T_first, E_tot, N_tot
def energy_spectrum_in_time(Tfirst, Etot): #dela histogram - energie zaznamenana v case
pom = 0
dt=100 #(ns) time width of 1 bin
T_first=0 #cas, kdy prisel trigger a yacalo mereni
T_last=(max(Tfirst)) #posledni z Tfirst
Delta_T = T_last - T_first
poc = int(int(Delta_T) / float(dt)) + 1 #pocet casovych oken
T_int_first=[] #cas
E=[] #energie
for i in range(0,poc):
T_int_first.append((i*dt) + dt/2)
E.append(0)
#XII
for j in range(0,len(Tfirst)):
time_index=0
time_index=int(((Tfirst[j]-T_first)/dt))
if float(Tfirst[j]-T_first) >= (T_int_first[time_index] - dt / 2) and float(Tfirst[j]-T_first) < (T_int_first[time_index] + dt / 2):
E[time_index]=float(E[time_index])+float(Etot[j])
pom=pom+1
for l in range(0,len(T_int_first)):
T_int_first[l]=T_int_first[l]+T_first
caption, T_int_first = energy_in_time_hist(T_int_first, E, figure_E_in_time_hist, t_plasma_start, t_plasma_end, is_plasma, dt)
return dt, caption, T_int_first, E
def energy_in_time_hist(T_int_first, E,figure_E_in_time_hist, t_plasma_start, t_plasma_end, is_plasma, dt):
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(figsize =(10, 7))
for k in range(0,len(T_int_first)):
T_int_first[k] = T_int_first[k] / 1000000
plt.plot(T_int_first, E, drawstyle='steps-mid')
plt.title(detector+', #'+str(shot_no))
plt.xlabel('Time [ms]')
plt.ylabel('Energy [keV]')
if is_plasma == 1:
for t in (t_plasma_start, t_plasma_end):
plt.axvline(t, color='k', linestyle='--')
plt.xlim([0, (t_plasma_start + t_plasma_end)])
else:
plt.xlim(0,)
plt.ylim(0,) #10 000 keV
plt.savefig(figure_E_in_time_hist, dpi = 1000)
caption = '# x = time in ms, count = energy in keV, dT= '+str(dt)+' ns'
return caption, T_int_first
def hits_in_time_hist_new(T, dt, t_plasma_start, t_plasma_end, is_plasma,figure_count_in_time_hist):
pom = 0
T_first=0 #cas, kdy prisel trigger a yacalo mereni
T_last=(max(T)) #posledni z Tfirst
Delta_T = T_last - T_first
poc = int(int(Delta_T) / float(dt)) + 1 #pocet casovych oken
T_hit=[] #cas
count=[] #energie
for i in range(0,poc):
T_hit.append((i*dt) + dt/2)
count.append(0)
for j in range(0,len(T)):
time_index=0
time_index=int(((T[j]-T_first)/dt))
k=time_index
for j in range(0,len(T)):
time_index=0
time_index=int(((T[j]-T_first)/dt))
if float(T[j]-T_first) >= (T_hit[time_index] - dt / 2) and float(T[j]-T_first) < (T_hit[time_index] + dt / 2):
count[time_index] = count[time_index] + 1
pom=pom+1
for l in range(0,len(T_hit)):
T_hit[l]=T_hit[l]+T_first
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(figsize =(10, 7))
for k in range(0,len(T_hit)):
T_hit[k] = T_hit[k] / 1000000
#plt.plot(T_hit, count)
plt.plot(T_hit, count, drawstyle='steps-mid')
plt.title(detector+', #'+str(shot_no))
plt.xlabel('Time [ms]')
plt.ylabel('Count')
if is_plasma == 1:
for t in (t_plasma_start, t_plasma_end):
plt.axvline(t, color='k', linestyle='--')
plt.xlim([0, (t_plasma_start + t_plasma_end)])
else:
plt.xlim(0,)
plt.ylim(0,) #10 000 keV
plt.savefig(figure_count_in_time_hist, dpi = 1000)
caption = '# x = time in ms, dT= '+str(dt)+' ns'
return caption, T_hit,count
def energy_spectrum(Etot):
E_min=0
dE=5 #keV
E_max=max(Etot)
pocet=(E_max//dE) + 3
pocet=int(pocet)
E_max=float(dE*pocet)
xle=[]
xre=[]
xmean=[]
for p in range (0,pocet):
xle.append(E_min + (p * (E_max - E_min)) / pocet)
xre.append(xle[p]+dE)
xmean.append((xle[p] + xre[p]) / 2)
count=[]
for l in range(0,pocet):
count.append(0)
#XII
for i in range(0,len(Etot)):
E_index=int(((Etot[i]-E_min)/dE))
if ((xle[E_index] <= Etot[i]) and (Etot[i] < xre[E_index])):
count[E_index]=count[E_index]+1
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(figsize =(10, 7))
#ax.hist(Etot, bins = xle)
plt.fill_between(xmean, count,step='mid') #pre mid post
plt.plot(xmean, count, drawstyle='steps-mid')
plt.title(detector+', #'+str(shot_no))
plt.xlabel('Energy [keV]')
plt.ylabel('Count')
plt.xlim(0,)
ax.set_yscale('log') #log scale y
caption = '# x = energy in keV, dE= '+str(dE)+' keV'
plt.savefig(figure_E_hist, dpi = 1000)
return caption, xmean,count, xle, Etot
def hist_file(file_hist, xmean, count, caption ):
with open(file_hist, "w", encoding="utf-8") as hist:
hist.write('#\n')
hist.write('#'+str(caption)+'\n')
hist.write('# x_mean count\n')
hist.write('\n')
for m in range(0,len(xmean)):
hist.write(str(xmean[m])+' '+str(count[m])+'\n')
hist.close
return T_first, E_tot
def multiplot(icon_fig, x1,y1,x2,y2):
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(nrows=2,figsize =(10, 7))
ax[0].plot(x1, y1, drawstyle='steps-mid')
ax[0].set_xlabel('Time [ms]')
ax[0].set_ylabel('Energy [keV]')
if is_plasma == 1:
for t in (t_plasma_start, t_plasma_end):
ax[0].axvline(t, color='k', linestyle='--')
ax[0].set_xlim([0, (t_plasma_start + t_plasma_end)])
else:
ax[0].set_xlim(0,)
ax[0].set_ylim(0,) #keV
#ax[1].hist(y2, bins = x2)
ax[1].fill_between(x2, y2,step='mid') #pre mid post
ax[1].plot(x2, y2, drawstyle='steps-mid')
ax[1].set_xlabel('Energy [keV]')
ax[1].set_ylabel('Count')
ax[1].set_xlim(0,)
#ax[1].set_ylim(0,)
ax[1].set_yscale('log') #log scale y
fig.subplots_adjust(hspace=0.3)
plt.savefig(icon_fig, dpi = 1000)
return
def single_interaction(eventNo,Etot, Tfirst, ECl, TCl, RowNoCl, ClmNoCl,path): # ver XV
#tuto funkci volam ve funkci file_t3pa_cls_new(file_t3pa_cls,T):
#This function is calling in function file_t3pa_cls_new(file_t3pa_cls,T)
high_E = 1500 #[keV] - zadani, jaka energie je pro me vysoka
if(Etot>=high_E or len(ECl)>15):
#if (len(ECl)>15): #len(ECl) = pocet pixelu dane interakce
print("Total energy of track: "+str(Etot)+" keV\n")
A, B, C, D, sigma_A, sigma_B, sigma_C, sigma_D = Timewalk_parameters_Si()
######################
#SI - rekonstrukce z(t) - parametry
a=0.0193947
b=-0.0273934
sigma_a=0.0004163
sigma_b=0.009832
#######################
time=[]
sigma_time=[]
time_min = []
time_max=[]
z_rec=[]
z_rec_min=[]
z_rec_max=[]
sigma_z_rec=[]
for i in range(0, len(TCl)):
time.append(TCl[i] - Tfirst)
#chyba urceni casu = chyba timewalk ->
sigma_time.append(np.sqrt(((sigma_C / (pow((ECl[i] - B), D)))*(sigma_C / (pow((ECl[i] - B), D)))) + (((sigma_B*C*D) / (pow((ECl[i] - B), (D + 1))))*((sigma_B*C*D) / (pow((ECl[i] - B), (D + 1))))) + (((sigma_D*C*math.log(ECl[i] - B)) / (pow((ECl[i] - B), D)))* ((sigma_D*C*math.log(ECl[i] - B)) / (pow((ECl[i] - B), D)))) + (sigma_A*sigma_A)))
time_min.append(time[i] - sigma_time[i])
time_max.append(time[i] + sigma_time[i])
#//
#//rekonstrukce hloubky interakce
z_rec.append(a * time[i] + (b))
sigma_z_rec.append(np.sqrt(((time[i]*time[i])*(sigma_a*sigma_a)) + (sigma_b*sigma_b) + (a*a)*(sigma_time[i]*sigma_time[i])))
z_rec_min.append(z_rec[i] - sigma_z_rec[i])
z_rec_max.append(z_rec[i] + sigma_z_rec[i])
#//
single_interaction_file=str(path)+'event'+str(eventNo)+'.txt'
single_interaction_2D_fig=str(path)+'2D_event'+str(eventNo)+'.png'
single_interaction_3D_fig=str(path)+'3D_event'+str(eventNo)+'.png'
with open(single_interaction_file, "w", encoding="utf-8") as f:
f.write('#\n')
f.write('# x_mean y_mean z_rec z_rec_min z_rec_max sigma_z_rec\n')
f.write('#E_tot='+str(Etot)+'\n')
f.write('\n')
for m in range(0,len(TCl)):
#print(str(RowNoCl[m])+' '+str(ClmNoCl[m])+' '+str(z_rec[m])+' '+str(z_rec_min[m])+' '+str(z_rec_max[m])+' '+str(sigma_z_rec[m])+' '+str(ECl[m])+'\n')
f.write(str(RowNoCl[m])+' '+str(ClmNoCl[m])+' '+str(z_rec[m])+' '+str(z_rec_min[m])+' '+str(z_rec_max[m])+' '+str(sigma_z_rec[m])+' '+str(ECl[m])+'\n')
f.close
############################### plot
#binwidth=1
if ((max(RowNoCl)-min(RowNoCl))>=(max(ClmNoCl)-min(ClmNoCl))):
rang=max(RowNoCl)-min(RowNoCl)
#bins=(range((min(RowNoCl)-1), (max(RowNoCl)+3), binwidth), range((min(ClmNoCl)-1), (min(ClmNoCl)+rang+3), binwidth))
x_min=min(RowNoCl)-1
x_max=max(RowNoCl)+2
y_min=min(ClmNoCl)-1
y_max=min(ClmNoCl)+rang+2
else:
rang = max(ClmNoCl)-min(ClmNoCl)
#bins=(range((min(RowNoCl)-1), (min(RowNoCl)+rang+3), binwidth), range((min(ClmNoCl)-1), (max(ClmNoCl)+3), binwidth))
x_min=min(RowNoCl)-1
x_max=min(RowNoCl)+rang+2
y_min=min(ClmNoCl)-1
y_max=max(ClmNoCl)+2
###############$$$$$$$$$$$$$$$$$$$$
rows, cols = (x_max-x_min, x_max-x_min)
#arrECl = [[0]*cols]*rows
arrECl= [[0] * cols for _ in range(rows)]
for i in range (x_min,x_max):
for j in range (y_min,y_max):
for k in range(0,len(RowNoCl)):
if ((i==RowNoCl[k]) and (j==ClmNoCl[k])):
#print(str(i)+" "+str(j)+" "+str(RowNoCl[k])+" "+str(ClmNoCl[k])+"\n")
arrECl[i-x_min][j-y_min]=ECl[k]
arrECl=np.transpose(arrECl)
arrECl[arrECl == 0] = np.nan
#2D plot
plt.imshow(arrECl,cmap='jet', interpolation='none', origin=[(x_min-0.2),(y_min-0.2)], aspect='equal', extent=[x_min-0.2,x_max,y_min-0.2,y_max])
###############$$$$$$$$$$$$$$$$$$$$
cb=plt.colorbar(pad=0.005)
plt.tick_params(axis="x",direction="in")
plt.tick_params(axis="y",direction="in")
cb.ax.tick_params(axis='y', direction='in')
cb.set_label('Energy in pixel [keV]')
plt.xlabel('x [pixel]')
plt.ylabel('y [pixel]')
plt.title('$E_{tot}$ = '+str(round(Etot, 2))+' keV, $N_{tot}$ = '+str(len(ECl)))
plt.savefig(single_interaction_2D_fig, dpi = 1000)
plt.show()
plt.close()
############################### plot
############## 3D plot
# Creating figure
fig = plt.figure(figsize = (16, 9))
ax = plt.axes(projection ="3d")
# Add x, y gridlines
ax.grid(b = True, color ='grey', #
linestyle ='-.', linewidth = 0.3,
alpha = 0.2)
# Creating plot
sctt = ax.scatter3D(RowNoCl, ClmNoCl, z_rec,
alpha = 0.8,
c = ECl,
cmap = 'jet',
s = 4000, #size of bubbles in plot
marker ='o')
plt.title('$E_{tot}$ = '+str(round(Etot, 2))+' keV, $N_{tot}$ = '+str(len(ECl)))
ax.set_xlabel('x [pixel]', fontweight ='bold')
ax.set_ylabel('y [pixel]', fontweight ='bold')
ax.set_zlabel('z [mm]', fontweight ='bold')
cb=fig.colorbar(sctt, ax = ax, shrink = 0.5,aspect = 10,pad=0.00005) #
cb.ax.tick_params(axis='y', direction='in')
cb.set_label('Energy in pixel [keV]', fontweight ='bold')
plt.savefig(single_interaction_3D_fig, dpi = 1000)
# show plot
plt.show()
plt.close()
############## 3D plot
eventNo=eventNo+1
return eventNo
def size_of_interactions_average(Etot, Ntot,file_hist): #ver XV
E_min=0
dE=5 #keV
E_max=max(Etot)
pocet=(E_max//dE) + 3
pocet=int(pocet)
E_max=float(dE*pocet)
xle=[]
xre=[]
xmean=[]
count=[]
nop=[] #number of pixels
nop_mean=[] #mean number of pixels in dE
sigma=[] #root mean square error of the mean - stredni kvadraticka chyba prumeru
for p in range (0,pocet):
xle.append(E_min + (p * (E_max - E_min)) / pocet)
xre.append(xle[p]+dE)
xmean.append((xle[p] + xre[p]) / 2)
count.append(0)
nop.append(0)
nop_mean.append(0)
sigma.append(0)
#XII
for i in range(0,len(Etot)):
E_index=int(((Etot[i]-E_min)/dE))
if ((xle[E_index] <= Etot[i]) and (Etot[i] < xre[E_index])):
count[E_index]=count[E_index]+1
nop[E_index]=nop[E_index]+Ntot[i] #ver XV
for l in range(0,pocet):
if nop[l]!=0:
nop_mean[l]=float(nop[l])/float(count[l])
#####Computing sigma
for i in range(0,len(Etot)):
E_index=int(((Etot[i]-E_min)/dE))
if ((xle[E_index] <= Etot[i]) and (Etot[i] < xre[E_index])):
if nop_mean[E_index]!=0:
sigma[E_index]=sigma[E_index]+((float(Ntot[i])-float(nop_mean[E_index]))*(float(Ntot[i])-float(nop_mean[E_index])))
for l in range(0,pocet):
if nop[l]!=0 and count[l]>1:
sigma[l]=np.sqrt(sigma[l]/(float(count[l])*(float(count[l])-1)))
if nop[l]!=0 and count[l]==1:
sigma[l]=10
#####Computing sigma
#####write to file
with open(file_hist, "w", encoding="utf-8") as hist:
hist.write('# x_mean [keV] mean_size_of_interaction [pixel] sigma_mean_size_of_interaction\n')
for m in range(0,len(xmean)):
hist.write(str(xmean[m])+' '+str(nop_mean[m])+' '+str(sigma[m])+'\n')
hist.close
#####write to file
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(figsize =(10, 7))
#plt.fill_between(xmean, nop,step='mid',color='blue', alpha=0.3) #pre mid post
#plt.fill_between(xmean, nop,step='mid') #pre mid post
plt.plot(xmean, nop_mean, drawstyle='steps-mid')
plt.errorbar(xmean, nop_mean, yerr = sigma,fmt ='.', linewidth=0.7)
plt.title(detector+', #'+str(shot_no))
plt.xlabel('Energy [keV]')
plt.ylabel('Average size of interaction [pixel]')
plt.xlim(0,500)
plt.ylim(0,17)
#ax.set_yscale('log') #log scale y
caption = '# x = energy in keV, dE= '+str(dE)+' keV'
plt.savefig(figure_size_interaction, dpi = 1000)
return
def energy_spectra_doublebreakdown(Etot, Tfirst, file_hist):
#this function separates discharge into two parts acording to time Tsep and creates energy spectrum for each part.
#This is for discharges with double brakdown
Tsep=14636000 # [ns]
E_min=0
dE=5 #keV
E_max=max(Etot)
pocet=(E_max//dE) + 3
pocet=int(pocet)
E_max=float(dE*pocet)
xle=[]
xre=[]
xmean=[]
for p in range (0,pocet):
xle.append(E_min + (p * (E_max - E_min)) / pocet)
xre.append(xle[p]+dE)
xmean.append((xle[p] + xre[p]) / 2)
count_first=[]
count_second=[]
for l in range(0,pocet):
count_first.append(0)
count_second.append(0)
#XII
for i in range(0,len(Etot)):
E_index=int(((Etot[i]-E_min)/dE))
if ((xle[E_index] <= Etot[i]) and (Etot[i] < xre[E_index])):
if(Tfirst[i]<Tsep):
count_first[E_index]=count_first[E_index]+1
else:
count_second[E_index]=count_second[E_index]+1
caption = '# x = energy in keV, dE= '+str(dE)+' keV'
with open(file_hist, "w", encoding="utf-8") as hist:
hist.write('#\n')
hist.write('#'+str(caption)+'\n')
hist.write('# x_mean count_before_2nd_breakdown count_2nd_breakdown\n')
hist.write('\n')
for m in range(0,len(xmean)):
hist.write(str(xmean[m])+' '+str(count_first[m])+' '+str(count_second[m])+'\n')
hist.close
plt.rcParams.update({'font.size': 20})
fig, ax = plt.subplots(figsize =(10, 7))
#plt.fill_between(xmean, count_first,step='mid') #pre mid post
plt.plot(xmean, count_first, label='Before 2nd breakdown', drawstyle='steps-mid')
plt.plot(xmean, count_second, label='2nd breakdown', drawstyle='steps-mid')
plt.legend(loc='best')
plt.title(detector+', #'+str(shot_no))
plt.xlabel('Energy [keV]')
plt.ylabel('Count')
plt.xlim(0,500)
ax.set_yscale('log') #log scale y
plt.savefig(figure_energy_spectra_doublebreakdown, dpi = 1000)
return
#soubory, ktere ctu
#read files
t3pa=get_file(shot, identifier)
name_calib='caliba'
caliba=get_file_calib(name_calib)
name_calib='calibb'
calibb=get_file_calib(name_calib)
name_calib='calibc'
calibc=get_file_calib(name_calib)
name_calib='calibt'
calibt=get_file_calib(name_calib)
#vytvorene soubory:
#created files
t3pa_cls= 'H03-W0051_shot_'+str(shot)+'_450V.t3pa_cls'
E_hist= 'H03-W0051_shot_'+str(shot)+'_450V_E_hist.txt'
E_in_time_hist= 'H03-W0051_shot_'+str(shot)+'_450V_discharge_energy.txt'
count_in_time_hist= 'H03-W0051_shot_'+str(shot)+'_450V_discharge_hits.txt'
size_interaction= 'H03-W0051_shot_'+str(shot)+'size_interaction.txt'
file_energy_spectra_doublebreakdown= 'H03-W0051_shot_'+str(shot)+'energy_spectra_doublebreakdown.txt'
#created figures
icon_fig='icon-fig'
figure_E_in_time_hist='discharge_energy'
figure_count_in_time_hist='discharge_hits'
figure_E_hist='Energy_spectrum'
hit_map_fig='hit-map'
figure_size_interaction= 'H03-W0051_shot_'+str(shot)+'size_interaction'
figure_energy_spectra_doublebreakdown= 'H03-W0051_shot_'+str(shot)+'energy_spectra_doublebreakdown'
#nactu jednotlive kalibracni matice - abych to nemusel delat v kazde funkci
a=load_calib(caliba)
b=load_calib(calibb)
c=load_calib(calibc)
t=load_calib(calibt)
#nactu a urcim jednotlive hodnoty - abych to nemusel delat v kazde funkci
index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti = load_t3pa_file(t3pa)
index, matrix_index, ToA, ToT, FToA, overflow, pocet_udalosti, RowNo, ClmNo = t3pa_data(pocet_udalosti,index, matrix_index, ToA, ToT, FToA, overflow)
raw data
#hit map
hit_map(detector,hit_map_fig,RowNo,ClmNo)
Energy and time calculation from raw data.
E=energy(a, b, c, t, ToT, pocet_udalosti, RowNo, ClmNo)
T=Time(ToA, FToA, pocet_udalosti, RowNo, ClmNo)
index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T = remove_interactions_with_zero_energy(index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E, T)
E,T=Timewalk(E,T)
#sort by time
T, index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E = (list(t) for t in zip(*sorted(zip(T, index, matrix_index, ToA, ToT, FToA, overflow, RowNo, ClmNo, E), reverse=True))) #serazeni od nejvetsiho po nejmensi
T_pom=T.copy()
#save to file
T_first, E_tot, Ntot = file_t3pa_cls_new(t3pa_cls,T)
dt, caption, T_int_first, E = energy_spectrum_in_time(T_first, E_tot)
hist_file(E_in_time_hist, T_int_first, E, caption);
([2692720.1004015864, 2695917.3357360014, 2697964.767665928, 2705272.0020465497, 2709281.2136133295, 2710110.9375, 2711071.875, 2711134.375, 3892867.877447698, 4018756.25, 4019649.2973558498, 4022217.9495024127, 4030444.535360559, 4034563.020584635, 4034668.3430823497, 4037298.768749749, 4038384.209875627, 4073400.0, 4094959.6684048497, 4120477.615528486, 4126499.8688066076, 4129567.753816499, 4133292.8050101786, 4140889.103527634, 4167232.9643956465, 4246454.319375454, 4252134.375, 4259144.967418772, 4280156.281175411, 4298998.588099788, 4299937.5, 4321503.125, 4344251.87018677, 4344682.8125, 4345144.594908385, 4347384.097593097, 4362252.407514535, 4380989.991202976, 4408014.0625, 4416720.3125, 4416721.30146563, 4416824.048541817, 4436303.125, 4438271.556158769, 4457992.1875, 4458113.476736264, 4480828.318203756, 4532065.121663375, 4549042.605964527, 4551860.9375, 4592390.625, 4673212.5, 4856598.4375, 4965623.4375, 4965668.688674606, 4970668.819036831, 4970696.253975025, 5002456.809867685, 5002463.0047824085, 5042113.802832185, 5160248.072345799, 5216363.488709299, 5223213.018001375, 5355796.958053288, 5518626.284404795, 5699714.351988957, 5715256.25, 5715260.477103869, 5866760.996551031, 5891306.265949594, 5927989.21220742, 5944475.0, 5955444.176750548, 5955460.650712091, 5955965.35269564, 5957563.026483722, 5957742.1875, 5962147.782524253, 5962242.071077935, 5963290.625, 5967060.405819647, 5968208.797519306, 5981315.717004951, 5990828.320093125, 5991207.128728542, 6013322.082938431, 6014495.266828606, 6020954.819392552, 6022315.186673111, 6022336.563314932, 6039728.244692154, 6040426.301797333, 6044844.376920491, 6048604.6875, 6049698.692555448, 6058559.679008499, 6058617.280820549, 6063206.25, 6063919.64946755, 6064595.3125, 6066157.058890775, 6067767.769062869, 6067872.693852176, 6067905.976122217, 6068840.625, 6069580.306246648, 6070854.863349944, 6071200.0, 6079573.954643596, 6080909.375, 6082902.143968813, 6085380.898886903, 6085753.125, 6085942.1875, 6102920.3125, 6108373.4375, 6108545.3125, 6137368.088516885, 6151407.554256394, 6152204.946949685, 6152423.444993352, 6156472.053423564, 6158004.6875, 6161017.1875, 6179489.408449854, 6181491.439633897, 6181720.474005023, 6183114.0625, 6183315.063760877, 6186075.995047216, 6188378.125, 6201813.860197495, 6215814.0625, 6215852.073364068, 6231351.003944456, 6245692.115622011, 6300959.375, 6324958.549970466, 6377053.405794212, 6378926.399824694, 6388077.386425193, 6388112.5, 6389076.014558202, 6392287.5, 6396385.675847341, 6401300.501525028, 6401525.0, 6408050.594805578, 6432169.874677336, 6438728.125, 6441892.5775627345, 6445598.341040434, 6449535.262059221, 6456134.933490733, 6460692.364421735, 6461478.4340421995, 6462609.1598483035, 6463881.77208489, 6463885.847630434, 6465058.719974049, 6475995.008578723, 6480559.375, 6541249.683059577, 6543065.4325564625, 6545239.0625, 6545258.986130987, 6548336.241159592, 6551856.437647265, 6554719.908838512, 6555445.682604433, 6557359.6287175305, 6559647.406141108, 6573671.875, 6576200.885024158, 6598870.3125, 6602251.5625, 6603674.3527337015, 6617188.700734895, 6634497.607590354, 6634613.831703695, 6663512.001443829, 6685875.735246269, 6709960.9375, 6710962.996547109, 6711007.918530929, 6712596.561281946, 6760552.697436959, 6774088.5966428155, 6797199.627886102, 6808239.387566366, 6810464.0625, 6812542.1875, 6816112.0518164495, 6822001.5625, 6822668.701916819, 6824116.819319943, 6825703.125, 6825823.131436278, 6826714.0625, 6851277.557550482, 6855657.8125, 6857949.531637902, 6861024.956255711, 6861563.170220593, 6862325.158632509, 6864565.290341807, 6870001.5625, 6870401.5625, 6871260.215828698, 6875266.69772021, 6875449.959964955, 6877129.6875, 6878757.051749379, 6882726.5625, 6883431.25, 6883686.747399841, 6883883.379158942, 6885957.8125, 6886709.333786679, 6887673.88901678, 6888839.0625, 6892162.5, 6892371.875, 6892896.468963064, 6893218.377438747, 6893561.757252315, 6894215.822790465, 6897639.883229241, 6897989.986409719, 6899151.126442572, 6899589.296384853, 6900827.146743678, 6901431.325248416, 6902314.705129791, 6902530.199120932, 6902979.009957747, 6903465.467054221, 6904123.4375, 6904620.226053826, 6908432.5802251445, 6908862.5, 6909268.707747401, 6914403.91647037, 6916016.567603447, 6916258.847221782, 6919413.809921916, 6922957.693163713, 6923021.406527795, 6923792.1875, 6924405.634374563, 6924568.75, 6924734.293053639, 6926235.9375, 6928862.6702497145, 6932164.0625, 6937252.119217735, 6937737.5, 6939306.596514256, 6944445.33011166, 6945038.695600939, 6947151.5625, 6947580.374782855, 6950378.517903154, 6951081.25, 6952387.278180372, 6956102.23668783, 6958470.116277808, 6959681.25, 6966963.520430899, 6980240.932648857, 6981680.477497062, 6992101.07811357, 6993150.46724205, 6993737.5, 6996927.957824181, 6998630.860919388, 7001497.060020668, 7003460.9375, 7005258.815990897, 7007325.0, 7009958.597195663, 7015016.494280411, 7016298.231242667, 7017397.870092256, 7020533.980682361, 7021875.123542358, 7027429.660183113, 7029631.76896727, 7031281.488298474, 7038764.0625, 7041521.979303345, 7044174.383527453, 7045574.128585007, 7050153.336981198, 7052104.119071297, 7060921.875, 7063612.5, 7063618.187878838, 7065646.2316585975, 7065657.8125, 7065702.170952827, 7066355.818451807, 7067167.1875, 7067175.0, 7068708.442109391, 7077730.191097658, 7078232.106574512, 7081682.8125, 7086257.268899208, 7086384.212874325, 7086795.3125, 7087654.390090902, 7088814.0625, 7089795.825837109, 7090028.099485087, 7092440.596412678, 7112201.3575007375, 7113309.8039733255, 7119032.393941749, 7121782.811654541, 7127243.131886682, 7130887.7590200715, 7142971.884175561, 7143684.375, 7143716.311879822, 7150167.510220042, 7153648.970866364, 7153778.033312482, 7162607.000616368, 7163779.54528653, 7182735.945466928, 7189302.005056735, 7192126.87855574, 7194771.875, 7200464.0625, 7202580.439360912, 7203931.25, 7206250.864604544, 7208578.084113826, 7255787.492409457, 7270656.219607039, 7288115.25945947, 7288776.5625, 7291579.459838246, 7291720.051485243, 7292233.513730175, 7301810.9375, 7305088.867646563, 7307542.59629674, 7307542.614612627, 7325487.967127418, 7346059.703945313, 7353351.5625, 7399849.462702661, 7400854.073208573, 7403083.432918513, 7411926.5625, 7432517.1875, 7438264.0625, 7457454.6875, 7462832.884346482, 7463912.192142973, 7477847.773032207, 7481250.343896915, 7482145.3125, 7499306.25, 7513088.48744783, 7540068.75, 7563302.583745069, 7571676.672082714, 7583257.5428959895, 7586283.758531684, 7588681.401067025, 7622125.14274453, 7622365.625, 7623584.304466458, 7646817.1875, 7661203.125, 7678634.757087618, 7689174.871567504, 7822905.893707356, 7854230.747836169, 7856195.3125, 7869193.75, 7872618.972371498, 7890806.25, 7904602.835061496, 7914949.530172926, 7977045.111964757, 7977467.1875, 7993339.0625, 8038953.736188674, 8054717.1875, 8054751.086033197, 8059790.093671273, 8061220.035603252, 8062623.161368831, 8099813.452844678, 8106725.814309394, 8114343.022060831, 8135412.142953978, 8196171.875, 8196553.601559651, 8196561.330114764, 8200157.8125, 8201018.75, 8202128.125, 8206382.580526173, 8206447.523749458, 8209213.940150545, 8210470.3125, 8210667.1875, 8211556.891284203, 8217029.137824479, 8223111.8976366725, 8226431.25, 8227248.609543484, 8232010.374648829, 8249199.42757676, 8253452.375080084, 8264080.750446811, 8266504.452841691, 8271292.1875, 8272405.172286064, 8274514.3825727925, 8290775.0, 8291819.248137018, 8291820.634109917, 8293325.848691058, 8294810.598199227, 8296639.0625, 8307271.875, 8307273.30720458, 8307415.625, 8310268.75, 8313593.096964294, 8320567.240533914, 8320596.79878593, 8321888.940969745, 8331359.308588435, 8334579.6875, 8334588.912391935, 8335512.063116234, 8336079.640364957, 8347771.875, 8352187.5, 8353403.125, 8354334.835907985, 8366420.3125, 8367403.125, 8390259.375, 8405090.990564562, 8436004.6875, 8439972.696930068, 8441493.744203657, 8447351.985541759, 8452622.958117004, 8472614.300793394, 8479090.422018547, 8498700.0, 8502356.440689625, 8504211.739700947, 8516456.604447985, 8529206.25, 8534197.080558553, 8549871.974770172, 8550906.220940374, 8557197.911890404, 8618954.387643768, 8621729.976635128, 8621736.101320183, 8623931.983345306, 8637529.144726863, 8661133.796391837, 8661166.036166158, 8688114.007356651, 8688120.067589452, 8691221.643610446, 8691806.25, 8700475.093657231, 8711804.6875, 8730217.683154427, 8733219.73941015, 8733381.25, 8736117.1875, 8829112.085879784, 8836009.167248152, 8848796.875, 8849784.29386933, 8859834.324170304, 8868875.0, 8869517.275072763, 8870669.376155138, 8872267.031593526, 8873132.761699826, 8875051.993952075, 8888314.992263999, 8888803.783337086, 8889435.9375, 8895799.347759701, 8907082.36118653, 8907861.61081775, 8916794.767872764, 8922792.11315179, 8926054.392805975, 9133545.276231473, 9172315.625, 9174846.491996761, 9176935.711829457, 9177610.13548507, 9178421.785121, 9179475.956443638, 9181814.669049736, 9183162.997765064, 9188787.882380841, 9190007.697424674, 9193505.357956978, 9193604.594705822, 9193627.882778205, 9194468.75, 9198093.998878762, 9199381.032868836, 9199866.843801862, 9200457.161105808, 9201800.609063866, 9202047.690719156, 9202210.9375, 9205599.55297396, 9211199.407347627, 9217751.827461716, 9217865.70326004, 9230092.1875], [14.19034984838482, 27.848209151670765, 6.360600804821466, 7.649843798333368, 21.5405997039229, 100.69397626032585, 35.29798242994611, 77.05729249797884, 5.7521216741095476, 51.988151346772035, 6.948235447913715, 39.89923040058594, 5.758632487085948, 5.484563231514386, 99.10474154146044, 15.35405581226053, 24.51748225211363, 36.64725814628421, 13.645749054650704, 21.399134313133214, 31.909203899644055, 8.610621845462541, 27.932814739949528, 24.335264175385753, 32.350102040553445, 29.333339954034432, 45.31251065620338, 10.62800983842125, 158.0578439601167, 44.80453072977322, 116.21875204088184, 144.75650172208938, 64.8974795901149, 35.49680629235135, 50.21391023016571, 24.043691902135503, 10.165176874283615, 12.973959313725812, 75.17595887214983, 59.920091636668964, 8.889364087624838, 5.025866560121685, 34.378445457031106, 23.513017974767052, 39.76109245270577, 82.64590200790457, 30.61059036807652, 82.35221415388666, 51.51738300747023, 73.3664562182091, 44.66262962931446, 73.15441093264431, 50.0776172103562, 72.93062987625149, 17.901186042270552, 104.01835598817995, 7.3930734753952105, 7.819113208589117, 18.858858867202102, 113.08300697558933, 10.601196503850916, 20.787281484244033, 9.811500983939617, 103.53068224921768, 85.36581946360994, 14.822524327084693, 115.2445155137394, 13.435836395815956, 8.318053322332736, 9.34492596689892, 15.544572095805934, 153.25733523502686, 191.767308187299, 23.920987744836367, 13.996134175169496, 83.8203695213842, 64.52424805987532, 26.970160419236887, 72.41260938958838, 59.25886915913098, 36.02136785216646, 44.59698471243555, 25.381059633315076, 88.883305927782, 27.87790784508477, 15.798088958788066, 67.01268499394666, 47.12114550924633, 64.20276691209915, 9.923265633326285, 15.418227256785356, 32.406068622065604, 12.272856966798475, 186.46633510579838, 17.074915929206202, 80.66380577424847, 6.50182022760882, 41.50278955774998, 6.637983019043638, 111.21101832350556, 93.81756591748398, 20.71021479254522, 72.10454416448269, 10.725002523005461, 39.18089614236778, 104.80456894947535, 5.34798374354174, 53.6195170342349, 5.1775830827892255, 88.66643212587188, 12.177006105573438, 142.6365770548221, 80.10833791648498, 31.107338774831085, 41.78154992595454, 38.65741180809228, 53.22147574417652, 20.020486788434855, 14.040803769558773, 16.03210533504829, 33.12414509762379, 144.43602691315573, 131.07129862708527, 62.05601083021363, 74.09173972555067, 108.01398898986992, 71.93949187114514, 88.1667348759196, 8.010525476919645, 20.845616704636655, 85.4982638118719, 71.24625640204746, 39.575931376155175, 17.32660365593363, 27.666501156811016, 27.179281106314644, 48.492477601163, 56.70611517012708, 24.58352123501576, 25.679106669963264, 12.716919264076385, 52.675472889750566, 29.197413064327044, 37.88206324235204, 56.135838690670596, 225.73127777903235, 34.24262032949957, 31.29368473203091, 27.75781825509025, 63.537916156559874, 8.504213560503542, 75.7426463107636, 95.74799717001807, 17.60480142597078, 60.4351623780363, 9.607140902540433, 272.2994863602358, 183.80382295606503, 7.571053617026645, 42.303636578280546, 56.017871098952384, 66.42694779551742, 23.536736494214523, 25.22925562331817, 42.58578602707844, 5.9062410919553665, 16.240707692752345, 11.43425059955018, 13.597872707241317, 49.804404697332075, 24.298569083977274, 19.68712437572113, 67.59579363695946, 19.888286161439677, 63.30533123245523, 39.68421643334506, 76.47826920877701, 30.460761112352802, 108.79070024397402, 24.676892829730797, 5.675746596681207, 23.834285543896343, 29.484211131811353, 73.78439879119838, 139.4311328135607, 5.518046097986423, 22.247469644487506, 47.91546968646233, 10.591953068950675, 8.4662987791669, 33.71136740481955, 47.032247154794334, 68.4522606385482, 38.44776136147166, 27.698722605221892, 22.917226407199305, 104.86354511145821, 79.36237673157649, 97.05234329322009, 20.84564687145127, 31.962020609757666, 54.68605097497179, 27.687862117817676, 46.861020187904444, 15.58269852369539, 53.26642197937252, 117.184882111412, 37.595308788606445, 111.31585586441437, 21.595661748208883, 108.21164881168772, 57.58749063288811, 10.115783601676336, 66.79577800125496, 107.24074128383248, 8.766948755041385, 40.27514974606786, 30.154785773676938, 5.704140092728878, 42.66290025950235, 50.343791499001355, 48.791376016632576, 88.16245393259116, 75.3810604214022, 317.1449309556272, 12.706998779915972, 23.20986989686795, 19.378558054967367, 8.844115100233967, 165.24779890129062, 15.914781486575936, 17.760251714258033, 23.770040754800764, 18.12654105758278, 12.03413782995769, 8.817450370225213, 25.752367738370204, 42.532416819218575, 26.92453644172116, 17.12433846699303, 30.28513123917257, 11.062299341084914, 19.157494708128763, 20.375012487362454, 69.60223201680417, 63.420526193787474, 10.946162793715736, 52.85130257686449, 79.66728521081737, 13.020150684866254, 77.40057186671552, 11.001990438394806, 90.90045389257864, 9.479630812374308, 43.053262079883, 9.851117903312035, 44.69341031022004, 9.642658078958064, 171.39674998629323, 10.598876526221808, 43.40345865885554, 32.33791841970556, 8.505886364519597, 55.71718045708932, 18.11921971908351, 223.66539039235917, 182.37235958926112, 98.94125634336238, 33.31532549212524, 99.32787345548633, 12.636934619786214, 58.75999479670889, 17.081840803062807, 36.89247765905279, 27.24447776288295, 115.67977204110305, 8.386904335086752, 31.22641240399591, 19.664606648121225, 75.04189701754989, 197.9952007792319, 46.902468960476696, 25.026883860843807, 20.84603273918892, 30.369112049776753, 33.29501451029515, 129.38393149589405, 53.351230613860885, 42.17393975945034, 47.054054851868216, 9.421182726847148, 13.017986393154759, 18.446058501618644, 95.83295131022699, 8.892953758325529, 43.66678093653964, 87.92665998501613, 20.895011175324615, 12.949894215402276, 54.64155423217167, 76.54622281013863, 22.20424741732214, 72.31744747336246, 54.16793774334469, 5.862082540423834, 30.674128691481947, 113.16711057494722, 133.26484976354214, 21.068912688261186, 83.94670860963707, 41.626138467135625, 13.917393199497704, 67.63270993725058, 6.570689178711965, 117.65102770934215, 72.46750674659127, 128.70353222535073, 16.874586983558704, 87.2258969680177, 11.126385553173076, 20.390573293577972, 37.57099625904489, 53.973588842072445, 36.75519418500673, 106.27281964281931, 99.27940832573238, 13.351118095044544, 74.46323785444923, 151.1602486542152, 63.24216737345294, 14.971962818021417, 11.897901174655756, 11.660477080919131, 55.54431963220431, 29.542532350062213, 13.959282113513197, 39.74379550265823, 12.03871108698873, 5.531099491322514, 14.91265654103682, 27.937226312248054, 22.79008692259933, 77.79021551934716, 77.14424761863984, 50.58790875237599, 18.514840215178, 111.5627311587575, 264.3072412160329, 121.01446087183113, 51.13507881491684, 17.081209755841382, 8.468542145438125, 80.14986928211596, 8.914964535313299, 10.286466710193205, 17.984865495193134, 50.182790981438636, 36.52556322253778, 263.0585317876396, 138.06998296112548, 181.5114651607208, 20.848198959118697, 42.52912563956579, 114.8826985980753, 39.94490115123847, 65.67648198412874, 78.54762260504046, 112.90504227721362, 94.26879909419648, 11.10175014632583, 24.146931705894943, 131.63480656291108, 15.55036339353054, 69.90535776751457, 29.09418946488677, 63.773992772254886, 82.35768506090378, 74.50368011977551, 11.782518266801771, 26.221143425110405, 57.578769248172065, 66.41019292782121, 94.97031769220854, 63.31315545290681, 87.75296054711616, 30.932824590046756, 11.062079877204873, 61.75349086070217, 25.110234781385202, 66.84157732545205, 44.96575948639678, 117.18001748318477, 39.389835277032596, 8.04972158110595, 120.57170577722168, 10.720829447272694, 24.06049744291175, 13.038918044163129, 19.32949046825865, 10.15316530576356, 73.78794527178479, 53.41383297677247, 17.133344001633656, 18.34456959837184, 120.48238053596077, 78.85950858264395, 30.78944199596439, 10.783494353556737, 5.0264745990529605, 26.320326109456794, 43.78102593182749, 102.00443916645327, 12.30363712501373, 88.27381990999922, 5.321696066575118, 35.405441923454816, 21.196755372280816, 10.348832387895461, 13.13197779952597, 19.316327842484682, 7.432026960031074, 30.26818051333456, 32.6884091611567, 27.954823528021755, 16.32005933705371, 28.859958320507566, 46.46027546877043, 16.32754496321851, 16.729786064925, 13.788819932389437, 70.12768779722182, 44.15699941306262, 34.7101034330186, 49.303892562750825, 39.3778043826466, 162.12871252780096, 158.01179251363493, 41.53978627967485, 9.230713926174872, 83.58013532002116, 71.69836628143975, 32.24162604049934, 22.146704319979484, 35.324673942073815, 97.58722433930166, 77.1486825766684, 74.52437496869135, 6.859149255793922, 73.88638179737934, 48.210002790848094, 52.964277074833575, 9.660898713581334, 65.59466315651571, 19.38777177525697, 45.15665605827377, 16.84306492209997, 8.956482549133824, 15.93484521414629, 63.92868139146564, 62.51753490397098, 22.51332514401272, 25.650626053518987, 35.03220723172447, 75.80223973642882, 85.3833224860262, 15.383316537669224, 27.962421954171013, 21.24137906727032, 23.752578261255607, 9.58846506815031, 7.663583131773338, 82.38988585471681, 8.911077588856525, 10.329590306581702, 110.12450808023502, 48.66830835842539, 24.480898312708728, 88.04136551266339, 60.89493350688963, 106.75192902956735, 60.18500796462766, 132.0480813027557, 10.336315117432692, 47.25312455933563, 51.71877138771087, 22.39482315453382, 10.817795802271975, 48.06704925461807, 5.458295061338722, 56.18793740049887, 41.69972826487832, 11.267404321438955, 7.846576370791571, 25.78411229218405, 27.558195047869464, 74.48178325625024, 70.45613612822457, 12.340491358005915, 96.88366090431033, 6.022800364945965, 59.314629815908134, 18.32719512181366, 46.88220500420398, 58.964534936334246, 90.83421934456923, 7.111950290223817, 82.48178821053767, 22.745394005795482, 125.94787621641507, 6.368311792732685, 54.13519416493166, 13.044673988627705, 89.26631931049043, 17.25212327934698, 6.842324977255514, 26.44011594698671, 12.366892494743118, 26.81530164268758, 26.59573525531055, 68.5367761525164, 5.722782531775807, 23.58836923354534, 66.83347754498057, 33.39338504371727, 9.905602230408967, 19.340237973176023, 47.244954276412436, 22.038337577939657, 7.996210265667415, 11.568755246024102, 6.27713685261054, 63.8596003642264])
caption, xmean,count, xle, Etot = energy_spectrum(E_tot)
hist_file(E_hist, xmean, count, caption);
([2692720.1004015864, 2695917.3357360014, 2697964.767665928, 2705272.0020465497, 2709281.2136133295, 2710110.9375, 2711071.875, 2711134.375, 3892867.877447698, 4018756.25, 4019649.2973558498, 4022217.9495024127, 4030444.535360559, 4034563.020584635, 4034668.3430823497, 4037298.768749749, 4038384.209875627, 4073400.0, 4094959.6684048497, 4120477.615528486, 4126499.8688066076, 4129567.753816499, 4133292.8050101786, 4140889.103527634, 4167232.9643956465, 4246454.319375454, 4252134.375, 4259144.967418772, 4280156.281175411, 4298998.588099788, 4299937.5, 4321503.125, 4344251.87018677, 4344682.8125, 4345144.594908385, 4347384.097593097, 4362252.407514535, 4380989.991202976, 4408014.0625, 4416720.3125, 4416721.30146563, 4416824.048541817, 4436303.125, 4438271.556158769, 4457992.1875, 4458113.476736264, 4480828.318203756, 4532065.121663375, 4549042.605964527, 4551860.9375, 4592390.625, 4673212.5, 4856598.4375, 4965623.4375, 4965668.688674606, 4970668.819036831, 4970696.253975025, 5002456.809867685, 5002463.0047824085, 5042113.802832185, 5160248.072345799, 5216363.488709299, 5223213.018001375, 5355796.958053288, 5518626.284404795, 5699714.351988957, 5715256.25, 5715260.477103869, 5866760.996551031, 5891306.265949594, 5927989.21220742, 5944475.0, 5955444.176750548, 5955460.650712091, 5955965.35269564, 5957563.026483722, 5957742.1875, 5962147.782524253, 5962242.071077935, 5963290.625, 5967060.405819647, 5968208.797519306, 5981315.717004951, 5990828.320093125, 5991207.128728542, 6013322.082938431, 6014495.266828606, 6020954.819392552, 6022315.186673111, 6022336.563314932, 6039728.244692154, 6040426.301797333, 6044844.376920491, 6048604.6875, 6049698.692555448, 6058559.679008499, 6058617.280820549, 6063206.25, 6063919.64946755, 6064595.3125, 6066157.058890775, 6067767.769062869, 6067872.693852176, 6067905.976122217, 6068840.625, 6069580.306246648, 6070854.863349944, 6071200.0, 6079573.954643596, 6080909.375, 6082902.143968813, 6085380.898886903, 6085753.125, 6085942.1875, 6102920.3125, 6108373.4375, 6108545.3125, 6137368.088516885, 6151407.554256394, 6152204.946949685, 6152423.444993352, 6156472.053423564, 6158004.6875, 6161017.1875, 6179489.408449854, 6181491.439633897, 6181720.474005023, 6183114.0625, 6183315.063760877, 6186075.995047216, 6188378.125, 6201813.860197495, 6215814.0625, 6215852.073364068, 6231351.003944456, 6245692.115622011, 6300959.375, 6324958.549970466, 6377053.405794212, 6378926.399824694, 6388077.386425193, 6388112.5, 6389076.014558202, 6392287.5, 6396385.675847341, 6401300.501525028, 6401525.0, 6408050.594805578, 6432169.874677336, 6438728.125, 6441892.5775627345, 6445598.341040434, 6449535.262059221, 6456134.933490733, 6460692.364421735, 6461478.4340421995, 6462609.1598483035, 6463881.77208489, 6463885.847630434, 6465058.719974049, 6475995.008578723, 6480559.375, 6541249.683059577, 6543065.4325564625, 6545239.0625, 6545258.986130987, 6548336.241159592, 6551856.437647265, 6554719.908838512, 6555445.682604433, 6557359.6287175305, 6559647.406141108, 6573671.875, 6576200.885024158, 6598870.3125, 6602251.5625, 6603674.3527337015, 6617188.700734895, 6634497.607590354, 6634613.831703695, 6663512.001443829, 6685875.735246269, 6709960.9375, 6710962.996547109, 6711007.918530929, 6712596.561281946, 6760552.697436959, 6774088.5966428155, 6797199.627886102, 6808239.387566366, 6810464.0625, 6812542.1875, 6816112.0518164495, 6822001.5625, 6822668.701916819, 6824116.819319943, 6825703.125, 6825823.131436278, 6826714.0625, 6851277.557550482, 6855657.8125, 6857949.531637902, 6861024.956255711, 6861563.170220593, 6862325.158632509, 6864565.290341807, 6870001.5625, 6870401.5625, 6871260.215828698, 6875266.69772021, 6875449.959964955, 6877129.6875, 6878757.051749379, 6882726.5625, 6883431.25, 6883686.747399841, 6883883.379158942, 6885957.8125, 6886709.333786679, 6887673.88901678, 6888839.0625, 6892162.5, 6892371.875, 6892896.468963064, 6893218.377438747, 6893561.757252315, 6894215.822790465, 6897639.883229241, 6897989.986409719, 6899151.126442572, 6899589.296384853, 6900827.146743678, 6901431.325248416, 6902314.705129791, 6902530.199120932, 6902979.009957747, 6903465.467054221, 6904123.4375, 6904620.226053826, 6908432.5802251445, 6908862.5, 6909268.707747401, 6914403.91647037, 6916016.567603447, 6916258.847221782, 6919413.809921916, 6922957.693163713, 6923021.406527795, 6923792.1875, 6924405.634374563, 6924568.75, 6924734.293053639, 6926235.9375, 6928862.6702497145, 6932164.0625, 6937252.119217735, 6937737.5, 6939306.596514256, 6944445.33011166, 6945038.695600939, 6947151.5625, 6947580.374782855, 6950378.517903154, 6951081.25, 6952387.278180372, 6956102.23668783, 6958470.116277808, 6959681.25, 6966963.520430899, 6980240.932648857, 6981680.477497062, 6992101.07811357, 6993150.46724205, 6993737.5, 6996927.957824181, 6998630.860919388, 7001497.060020668, 7003460.9375, 7005258.815990897, 7007325.0, 7009958.597195663, 7015016.494280411, 7016298.231242667, 7017397.870092256, 7020533.980682361, 7021875.123542358, 7027429.660183113, 7029631.76896727, 7031281.488298474, 7038764.0625, 7041521.979303345, 7044174.383527453, 7045574.128585007, 7050153.336981198, 7052104.119071297, 7060921.875, 7063612.5, 7063618.187878838, 7065646.2316585975, 7065657.8125, 7065702.170952827, 7066355.818451807, 7067167.1875, 7067175.0, 7068708.442109391, 7077730.191097658, 7078232.106574512, 7081682.8125, 7086257.268899208, 7086384.212874325, 7086795.3125, 7087654.390090902, 7088814.0625, 7089795.825837109, 7090028.099485087, 7092440.596412678, 7112201.3575007375, 7113309.8039733255, 7119032.393941749, 7121782.811654541, 7127243.131886682, 7130887.7590200715, 7142971.884175561, 7143684.375, 7143716.311879822, 7150167.510220042, 7153648.970866364, 7153778.033312482, 7162607.000616368, 7163779.54528653, 7182735.945466928, 7189302.005056735, 7192126.87855574, 7194771.875, 7200464.0625, 7202580.439360912, 7203931.25, 7206250.864604544, 7208578.084113826, 7255787.492409457, 7270656.219607039, 7288115.25945947, 7288776.5625, 7291579.459838246, 7291720.051485243, 7292233.513730175, 7301810.9375, 7305088.867646563, 7307542.59629674, 7307542.614612627, 7325487.967127418, 7346059.703945313, 7353351.5625, 7399849.462702661, 7400854.073208573, 7403083.432918513, 7411926.5625, 7432517.1875, 7438264.0625, 7457454.6875, 7462832.884346482, 7463912.192142973, 7477847.773032207, 7481250.343896915, 7482145.3125, 7499306.25, 7513088.48744783, 7540068.75, 7563302.583745069, 7571676.672082714, 7583257.5428959895, 7586283.758531684, 7588681.401067025, 7622125.14274453, 7622365.625, 7623584.304466458, 7646817.1875, 7661203.125, 7678634.757087618, 7689174.871567504, 7822905.893707356, 7854230.747836169, 7856195.3125, 7869193.75, 7872618.972371498, 7890806.25, 7904602.835061496, 7914949.530172926, 7977045.111964757, 7977467.1875, 7993339.0625, 8038953.736188674, 8054717.1875, 8054751.086033197, 8059790.093671273, 8061220.035603252, 8062623.161368831, 8099813.452844678, 8106725.814309394, 8114343.022060831, 8135412.142953978, 8196171.875, 8196553.601559651, 8196561.330114764, 8200157.8125, 8201018.75, 8202128.125, 8206382.580526173, 8206447.523749458, 8209213.940150545, 8210470.3125, 8210667.1875, 8211556.891284203, 8217029.137824479, 8223111.8976366725, 8226431.25, 8227248.609543484, 8232010.374648829, 8249199.42757676, 8253452.375080084, 8264080.750446811, 8266504.452841691, 8271292.1875, 8272405.172286064, 8274514.3825727925, 8290775.0, 8291819.248137018, 8291820.634109917, 8293325.848691058, 8294810.598199227, 8296639.0625, 8307271.875, 8307273.30720458, 8307415.625, 8310268.75, 8313593.096964294, 8320567.240533914, 8320596.79878593, 8321888.940969745, 8331359.308588435, 8334579.6875, 8334588.912391935, 8335512.063116234, 8336079.640364957, 8347771.875, 8352187.5, 8353403.125, 8354334.835907985, 8366420.3125, 8367403.125, 8390259.375, 8405090.990564562, 8436004.6875, 8439972.696930068, 8441493.744203657, 8447351.985541759, 8452622.958117004, 8472614.300793394, 8479090.422018547, 8498700.0, 8502356.440689625, 8504211.739700947, 8516456.604447985, 8529206.25, 8534197.080558553, 8549871.974770172, 8550906.220940374, 8557197.911890404, 8618954.387643768, 8621729.976635128, 8621736.101320183, 8623931.983345306, 8637529.144726863, 8661133.796391837, 8661166.036166158, 8688114.007356651, 8688120.067589452, 8691221.643610446, 8691806.25, 8700475.093657231, 8711804.6875, 8730217.683154427, 8733219.73941015, 8733381.25, 8736117.1875, 8829112.085879784, 8836009.167248152, 8848796.875, 8849784.29386933, 8859834.324170304, 8868875.0, 8869517.275072763, 8870669.376155138, 8872267.031593526, 8873132.761699826, 8875051.993952075, 8888314.992263999, 8888803.783337086, 8889435.9375, 8895799.347759701, 8907082.36118653, 8907861.61081775, 8916794.767872764, 8922792.11315179, 8926054.392805975, 9133545.276231473, 9172315.625, 9174846.491996761, 9176935.711829457, 9177610.13548507, 9178421.785121, 9179475.956443638, 9181814.669049736, 9183162.997765064, 9188787.882380841, 9190007.697424674, 9193505.357956978, 9193604.594705822, 9193627.882778205, 9194468.75, 9198093.998878762, 9199381.032868836, 9199866.843801862, 9200457.161105808, 9201800.609063866, 9202047.690719156, 9202210.9375, 9205599.55297396, 9211199.407347627, 9217751.827461716, 9217865.70326004, 9230092.1875], [14.19034984838482, 27.848209151670765, 6.360600804821466, 7.649843798333368, 21.5405997039229, 100.69397626032585, 35.29798242994611, 77.05729249797884, 5.7521216741095476, 51.988151346772035, 6.948235447913715, 39.89923040058594, 5.758632487085948, 5.484563231514386, 99.10474154146044, 15.35405581226053, 24.51748225211363, 36.64725814628421, 13.645749054650704, 21.399134313133214, 31.909203899644055, 8.610621845462541, 27.932814739949528, 24.335264175385753, 32.350102040553445, 29.333339954034432, 45.31251065620338, 10.62800983842125, 158.0578439601167, 44.80453072977322, 116.21875204088184, 144.75650172208938, 64.8974795901149, 35.49680629235135, 50.21391023016571, 24.043691902135503, 10.165176874283615, 12.973959313725812, 75.17595887214983, 59.920091636668964, 8.889364087624838, 5.025866560121685, 34.378445457031106, 23.513017974767052, 39.76109245270577, 82.64590200790457, 30.61059036807652, 82.35221415388666, 51.51738300747023, 73.3664562182091, 44.66262962931446, 73.15441093264431, 50.0776172103562, 72.93062987625149, 17.901186042270552, 104.01835598817995, 7.3930734753952105, 7.819113208589117, 18.858858867202102, 113.08300697558933, 10.601196503850916, 20.787281484244033, 9.811500983939617, 103.53068224921768, 85.36581946360994, 14.822524327084693, 115.2445155137394, 13.435836395815956, 8.318053322332736, 9.34492596689892, 15.544572095805934, 153.25733523502686, 191.767308187299, 23.920987744836367, 13.996134175169496, 83.8203695213842, 64.52424805987532, 26.970160419236887, 72.41260938958838, 59.25886915913098, 36.02136785216646, 44.59698471243555, 25.381059633315076, 88.883305927782, 27.87790784508477, 15.798088958788066, 67.01268499394666, 47.12114550924633, 64.20276691209915, 9.923265633326285, 15.418227256785356, 32.406068622065604, 12.272856966798475, 186.46633510579838, 17.074915929206202, 80.66380577424847, 6.50182022760882, 41.50278955774998, 6.637983019043638, 111.21101832350556, 93.81756591748398, 20.71021479254522, 72.10454416448269, 10.725002523005461, 39.18089614236778, 104.80456894947535, 5.34798374354174, 53.6195170342349, 5.1775830827892255, 88.66643212587188, 12.177006105573438, 142.6365770548221, 80.10833791648498, 31.107338774831085, 41.78154992595454, 38.65741180809228, 53.22147574417652, 20.020486788434855, 14.040803769558773, 16.03210533504829, 33.12414509762379, 144.43602691315573, 131.07129862708527, 62.05601083021363, 74.09173972555067, 108.01398898986992, 71.93949187114514, 88.1667348759196, 8.010525476919645, 20.845616704636655, 85.4982638118719, 71.24625640204746, 39.575931376155175, 17.32660365593363, 27.666501156811016, 27.179281106314644, 48.492477601163, 56.70611517012708, 24.58352123501576, 25.679106669963264, 12.716919264076385, 52.675472889750566, 29.197413064327044, 37.88206324235204, 56.135838690670596, 225.73127777903235, 34.24262032949957, 31.29368473203091, 27.75781825509025, 63.537916156559874, 8.504213560503542, 75.7426463107636, 95.74799717001807, 17.60480142597078, 60.4351623780363, 9.607140902540433, 272.2994863602358, 183.80382295606503, 7.571053617026645, 42.303636578280546, 56.017871098952384, 66.42694779551742, 23.536736494214523, 25.22925562331817, 42.58578602707844, 5.9062410919553665, 16.240707692752345, 11.43425059955018, 13.597872707241317, 49.804404697332075, 24.298569083977274, 19.68712437572113, 67.59579363695946, 19.888286161439677, 63.30533123245523, 39.68421643334506, 76.47826920877701, 30.460761112352802, 108.79070024397402, 24.676892829730797, 5.675746596681207, 23.834285543896343, 29.484211131811353, 73.78439879119838, 139.4311328135607, 5.518046097986423, 22.247469644487506, 47.91546968646233, 10.591953068950675, 8.4662987791669, 33.71136740481955, 47.032247154794334, 68.4522606385482, 38.44776136147166, 27.698722605221892, 22.917226407199305, 104.86354511145821, 79.36237673157649, 97.05234329322009, 20.84564687145127, 31.962020609757666, 54.68605097497179, 27.687862117817676, 46.861020187904444, 15.58269852369539, 53.26642197937252, 117.184882111412, 37.595308788606445, 111.31585586441437, 21.595661748208883, 108.21164881168772, 57.58749063288811, 10.115783601676336, 66.79577800125496, 107.24074128383248, 8.766948755041385, 40.27514974606786, 30.154785773676938, 5.704140092728878, 42.66290025950235, 50.343791499001355, 48.791376016632576, 88.16245393259116, 75.3810604214022, 317.1449309556272, 12.706998779915972, 23.20986989686795, 19.378558054967367, 8.844115100233967, 165.24779890129062, 15.914781486575936, 17.760251714258033, 23.770040754800764, 18.12654105758278, 12.03413782995769, 8.817450370225213, 25.752367738370204, 42.532416819218575, 26.92453644172116, 17.12433846699303, 30.28513123917257, 11.062299341084914, 19.157494708128763, 20.375012487362454, 69.60223201680417, 63.420526193787474, 10.946162793715736, 52.85130257686449, 79.66728521081737, 13.020150684866254, 77.40057186671552, 11.001990438394806, 90.90045389257864, 9.479630812374308, 43.053262079883, 9.851117903312035, 44.69341031022004, 9.642658078958064, 171.39674998629323, 10.598876526221808, 43.40345865885554, 32.33791841970556, 8.505886364519597, 55.71718045708932, 18.11921971908351, 223.66539039235917, 182.37235958926112, 98.94125634336238, 33.31532549212524, 99.32787345548633, 12.636934619786214, 58.75999479670889, 17.081840803062807, 36.89247765905279, 27.24447776288295, 115.67977204110305, 8.386904335086752, 31.22641240399591, 19.664606648121225, 75.04189701754989, 197.9952007792319, 46.902468960476696, 25.026883860843807, 20.84603273918892, 30.369112049776753, 33.29501451029515, 129.38393149589405, 53.351230613860885, 42.17393975945034, 47.054054851868216, 9.421182726847148, 13.017986393154759, 18.446058501618644, 95.83295131022699, 8.892953758325529, 43.66678093653964, 87.92665998501613, 20.895011175324615, 12.949894215402276, 54.64155423217167, 76.54622281013863, 22.20424741732214, 72.31744747336246, 54.16793774334469, 5.862082540423834, 30.674128691481947, 113.16711057494722, 133.26484976354214, 21.068912688261186, 83.94670860963707, 41.626138467135625, 13.917393199497704, 67.63270993725058, 6.570689178711965, 117.65102770934215, 72.46750674659127, 128.70353222535073, 16.874586983558704, 87.2258969680177, 11.126385553173076, 20.390573293577972, 37.57099625904489, 53.973588842072445, 36.75519418500673, 106.27281964281931, 99.27940832573238, 13.351118095044544, 74.46323785444923, 151.1602486542152, 63.24216737345294, 14.971962818021417, 11.897901174655756, 11.660477080919131, 55.54431963220431, 29.542532350062213, 13.959282113513197, 39.74379550265823, 12.03871108698873, 5.531099491322514, 14.91265654103682, 27.937226312248054, 22.79008692259933, 77.79021551934716, 77.14424761863984, 50.58790875237599, 18.514840215178, 111.5627311587575, 264.3072412160329, 121.01446087183113, 51.13507881491684, 17.081209755841382, 8.468542145438125, 80.14986928211596, 8.914964535313299, 10.286466710193205, 17.984865495193134, 50.182790981438636, 36.52556322253778, 263.0585317876396, 138.06998296112548, 181.5114651607208, 20.848198959118697, 42.52912563956579, 114.8826985980753, 39.94490115123847, 65.67648198412874, 78.54762260504046, 112.90504227721362, 94.26879909419648, 11.10175014632583, 24.146931705894943, 131.63480656291108, 15.55036339353054, 69.90535776751457, 29.09418946488677, 63.773992772254886, 82.35768506090378, 74.50368011977551, 11.782518266801771, 26.221143425110405, 57.578769248172065, 66.41019292782121, 94.97031769220854, 63.31315545290681, 87.75296054711616, 30.932824590046756, 11.062079877204873, 61.75349086070217, 25.110234781385202, 66.84157732545205, 44.96575948639678, 117.18001748318477, 39.389835277032596, 8.04972158110595, 120.57170577722168, 10.720829447272694, 24.06049744291175, 13.038918044163129, 19.32949046825865, 10.15316530576356, 73.78794527178479, 53.41383297677247, 17.133344001633656, 18.34456959837184, 120.48238053596077, 78.85950858264395, 30.78944199596439, 10.783494353556737, 5.0264745990529605, 26.320326109456794, 43.78102593182749, 102.00443916645327, 12.30363712501373, 88.27381990999922, 5.321696066575118, 35.405441923454816, 21.196755372280816, 10.348832387895461, 13.13197779952597, 19.316327842484682, 7.432026960031074, 30.26818051333456, 32.6884091611567, 27.954823528021755, 16.32005933705371, 28.859958320507566, 46.46027546877043, 16.32754496321851, 16.729786064925, 13.788819932389437, 70.12768779722182, 44.15699941306262, 34.7101034330186, 49.303892562750825, 39.3778043826466, 162.12871252780096, 158.01179251363493, 41.53978627967485, 9.230713926174872, 83.58013532002116, 71.69836628143975, 32.24162604049934, 22.146704319979484, 35.324673942073815, 97.58722433930166, 77.1486825766684, 74.52437496869135, 6.859149255793922, 73.88638179737934, 48.210002790848094, 52.964277074833575, 9.660898713581334, 65.59466315651571, 19.38777177525697, 45.15665605827377, 16.84306492209997, 8.956482549133824, 15.93484521414629, 63.92868139146564, 62.51753490397098, 22.51332514401272, 25.650626053518987, 35.03220723172447, 75.80223973642882, 85.3833224860262, 15.383316537669224, 27.962421954171013, 21.24137906727032, 23.752578261255607, 9.58846506815031, 7.663583131773338, 82.38988585471681, 8.911077588856525, 10.329590306581702, 110.12450808023502, 48.66830835842539, 24.480898312708728, 88.04136551266339, 60.89493350688963, 106.75192902956735, 60.18500796462766, 132.0480813027557, 10.336315117432692, 47.25312455933563, 51.71877138771087, 22.39482315453382, 10.817795802271975, 48.06704925461807, 5.458295061338722, 56.18793740049887, 41.69972826487832, 11.267404321438955, 7.846576370791571, 25.78411229218405, 27.558195047869464, 74.48178325625024, 70.45613612822457, 12.340491358005915, 96.88366090431033, 6.022800364945965, 59.314629815908134, 18.32719512181366, 46.88220500420398, 58.964534936334246, 90.83421934456923, 7.111950290223817, 82.48178821053767, 22.745394005795482, 125.94787621641507, 6.368311792732685, 54.13519416493166, 13.044673988627705, 89.26631931049043, 17.25212327934698, 6.842324977255514, 26.44011594698671, 12.366892494743118, 26.81530164268758, 26.59573525531055, 68.5367761525164, 5.722782531775807, 23.58836923354534, 66.83347754498057, 33.39338504371727, 9.905602230408967, 19.340237973176023, 47.244954276412436, 22.038337577939657, 7.996210265667415, 11.568755246024102, 6.27713685261054, 63.8596003642264])
caption, T_hit,count1 = hits_in_time_hist_new(T_pom, dt, t_plasma_start, t_plasma_end, is_plasma, figure_count_in_time_hist)
hist_file(count_in_time_hist, T_hit, count1, caption);
([2692720.1004015864, 2695917.3357360014, 2697964.767665928, 2705272.0020465497, 2709281.2136133295, 2710110.9375, 2711071.875, 2711134.375, 3892867.877447698, 4018756.25, 4019649.2973558498, 4022217.9495024127, 4030444.535360559, 4034563.020584635, 4034668.3430823497, 4037298.768749749, 4038384.209875627, 4073400.0, 4094959.6684048497, 4120477.615528486, 4126499.8688066076, 4129567.753816499, 4133292.8050101786, 4140889.103527634, 4167232.9643956465, 4246454.319375454, 4252134.375, 4259144.967418772, 4280156.281175411, 4298998.588099788, 4299937.5, 4321503.125, 4344251.87018677, 4344682.8125, 4345144.594908385, 4347384.097593097, 4362252.407514535, 4380989.991202976, 4408014.0625, 4416720.3125, 4416721.30146563, 4416824.048541817, 4436303.125, 4438271.556158769, 4457992.1875, 4458113.476736264, 4480828.318203756, 4532065.121663375, 4549042.605964527, 4551860.9375, 4592390.625, 4673212.5, 4856598.4375, 4965623.4375, 4965668.688674606, 4970668.819036831, 4970696.253975025, 5002456.809867685, 5002463.0047824085, 5042113.802832185, 5160248.072345799, 5216363.488709299, 5223213.018001375, 5355796.958053288, 5518626.284404795, 5699714.351988957, 5715256.25, 5715260.477103869, 5866760.996551031, 5891306.265949594, 5927989.21220742, 5944475.0, 5955444.176750548, 5955460.650712091, 5955965.35269564, 5957563.026483722, 5957742.1875, 5962147.782524253, 5962242.071077935, 5963290.625, 5967060.405819647, 5968208.797519306, 5981315.717004951, 5990828.320093125, 5991207.128728542, 6013322.082938431, 6014495.266828606, 6020954.819392552, 6022315.186673111, 6022336.563314932, 6039728.244692154, 6040426.301797333, 6044844.376920491, 6048604.6875, 6049698.692555448, 6058559.679008499, 6058617.280820549, 6063206.25, 6063919.64946755, 6064595.3125, 6066157.058890775, 6067767.769062869, 6067872.693852176, 6067905.976122217, 6068840.625, 6069580.306246648, 6070854.863349944, 6071200.0, 6079573.954643596, 6080909.375, 6082902.143968813, 6085380.898886903, 6085753.125, 6085942.1875, 6102920.3125, 6108373.4375, 6108545.3125, 6137368.088516885, 6151407.554256394, 6152204.946949685, 6152423.444993352, 6156472.053423564, 6158004.6875, 6161017.1875, 6179489.408449854, 6181491.439633897, 6181720.474005023, 6183114.0625, 6183315.063760877, 6186075.995047216, 6188378.125, 6201813.860197495, 6215814.0625, 6215852.073364068, 6231351.003944456, 6245692.115622011, 6300959.375, 6324958.549970466, 6377053.405794212, 6378926.399824694, 6388077.386425193, 6388112.5, 6389076.014558202, 6392287.5, 6396385.675847341, 6401300.501525028, 6401525.0, 6408050.594805578, 6432169.874677336, 6438728.125, 6441892.5775627345, 6445598.341040434, 6449535.262059221, 6456134.933490733, 6460692.364421735, 6461478.4340421995, 6462609.1598483035, 6463881.77208489, 6463885.847630434, 6465058.719974049, 6475995.008578723, 6480559.375, 6541249.683059577, 6543065.4325564625, 6545239.0625, 6545258.986130987, 6548336.241159592, 6551856.437647265, 6554719.908838512, 6555445.682604433, 6557359.6287175305, 6559647.406141108, 6573671.875, 6576200.885024158, 6598870.3125, 6602251.5625, 6603674.3527337015, 6617188.700734895, 6634497.607590354, 6634613.831703695, 6663512.001443829, 6685875.735246269, 6709960.9375, 6710962.996547109, 6711007.918530929, 6712596.561281946, 6760552.697436959, 6774088.5966428155, 6797199.627886102, 6808239.387566366, 6810464.0625, 6812542.1875, 6816112.0518164495, 6822001.5625, 6822668.701916819, 6824116.819319943, 6825703.125, 6825823.131436278, 6826714.0625, 6851277.557550482, 6855657.8125, 6857949.531637902, 6861024.956255711, 6861563.170220593, 6862325.158632509, 6864565.290341807, 6870001.5625, 6870401.5625, 6871260.215828698, 6875266.69772021, 6875449.959964955, 6877129.6875, 6878757.051749379, 6882726.5625, 6883431.25, 6883686.747399841, 6883883.379158942, 6885957.8125, 6886709.333786679, 6887673.88901678, 6888839.0625, 6892162.5, 6892371.875, 6892896.468963064, 6893218.377438747, 6893561.757252315, 6894215.822790465, 6897639.883229241, 6897989.986409719, 6899151.126442572, 6899589.296384853, 6900827.146743678, 6901431.325248416, 6902314.705129791, 6902530.199120932, 6902979.009957747, 6903465.467054221, 6904123.4375, 6904620.226053826, 6908432.5802251445, 6908862.5, 6909268.707747401, 6914403.91647037, 6916016.567603447, 6916258.847221782, 6919413.809921916, 6922957.693163713, 6923021.406527795, 6923792.1875, 6924405.634374563, 6924568.75, 6924734.293053639, 6926235.9375, 6928862.6702497145, 6932164.0625, 6937252.119217735, 6937737.5, 6939306.596514256, 6944445.33011166, 6945038.695600939, 6947151.5625, 6947580.374782855, 6950378.517903154, 6951081.25, 6952387.278180372, 6956102.23668783, 6958470.116277808, 6959681.25, 6966963.520430899, 6980240.932648857, 6981680.477497062, 6992101.07811357, 6993150.46724205, 6993737.5, 6996927.957824181, 6998630.860919388, 7001497.060020668, 7003460.9375, 7005258.815990897, 7007325.0, 7009958.597195663, 7015016.494280411, 7016298.231242667, 7017397.870092256, 7020533.980682361, 7021875.123542358, 7027429.660183113, 7029631.76896727, 7031281.488298474, 7038764.0625, 7041521.979303345, 7044174.383527453, 7045574.128585007, 7050153.336981198, 7052104.119071297, 7060921.875, 7063612.5, 7063618.187878838, 7065646.2316585975, 7065657.8125, 7065702.170952827, 7066355.818451807, 7067167.1875, 7067175.0, 7068708.442109391, 7077730.191097658, 7078232.106574512, 7081682.8125, 7086257.268899208, 7086384.212874325, 7086795.3125, 7087654.390090902, 7088814.0625, 7089795.825837109, 7090028.099485087, 7092440.596412678, 7112201.3575007375, 7113309.8039733255, 7119032.393941749, 7121782.811654541, 7127243.131886682, 7130887.7590200715, 7142971.884175561, 7143684.375, 7143716.311879822, 7150167.510220042, 7153648.970866364, 7153778.033312482, 7162607.000616368, 7163779.54528653, 7182735.945466928, 7189302.005056735, 7192126.87855574, 7194771.875, 7200464.0625, 7202580.439360912, 7203931.25, 7206250.864604544, 7208578.084113826, 7255787.492409457, 7270656.219607039, 7288115.25945947, 7288776.5625, 7291579.459838246, 7291720.051485243, 7292233.513730175, 7301810.9375, 7305088.867646563, 7307542.59629674, 7307542.614612627, 7325487.967127418, 7346059.703945313, 7353351.5625, 7399849.462702661, 7400854.073208573, 7403083.432918513, 7411926.5625, 7432517.1875, 7438264.0625, 7457454.6875, 7462832.884346482, 7463912.192142973, 7477847.773032207, 7481250.343896915, 7482145.3125, 7499306.25, 7513088.48744783, 7540068.75, 7563302.583745069, 7571676.672082714, 7583257.5428959895, 7586283.758531684, 7588681.401067025, 7622125.14274453, 7622365.625, 7623584.304466458, 7646817.1875, 7661203.125, 7678634.757087618, 7689174.871567504, 7822905.893707356, 7854230.747836169, 7856195.3125, 7869193.75, 7872618.972371498, 7890806.25, 7904602.835061496, 7914949.530172926, 7977045.111964757, 7977467.1875, 7993339.0625, 8038953.736188674, 8054717.1875, 8054751.086033197, 8059790.093671273, 8061220.035603252, 8062623.161368831, 8099813.452844678, 8106725.814309394, 8114343.022060831, 8135412.142953978, 8196171.875, 8196553.601559651, 8196561.330114764, 8200157.8125, 8201018.75, 8202128.125, 8206382.580526173, 8206447.523749458, 8209213.940150545, 8210470.3125, 8210667.1875, 8211556.891284203, 8217029.137824479, 8223111.8976366725, 8226431.25, 8227248.609543484, 8232010.374648829, 8249199.42757676, 8253452.375080084, 8264080.750446811, 8266504.452841691, 8271292.1875, 8272405.172286064, 8274514.3825727925, 8290775.0, 8291819.248137018, 8291820.634109917, 8293325.848691058, 8294810.598199227, 8296639.0625, 8307271.875, 8307273.30720458, 8307415.625, 8310268.75, 8313593.096964294, 8320567.240533914, 8320596.79878593, 8321888.940969745, 8331359.308588435, 8334579.6875, 8334588.912391935, 8335512.063116234, 8336079.640364957, 8347771.875, 8352187.5, 8353403.125, 8354334.835907985, 8366420.3125, 8367403.125, 8390259.375, 8405090.990564562, 8436004.6875, 8439972.696930068, 8441493.744203657, 8447351.985541759, 8452622.958117004, 8472614.300793394, 8479090.422018547, 8498700.0, 8502356.440689625, 8504211.739700947, 8516456.604447985, 8529206.25, 8534197.080558553, 8549871.974770172, 8550906.220940374, 8557197.911890404, 8618954.387643768, 8621729.976635128, 8621736.101320183, 8623931.983345306, 8637529.144726863, 8661133.796391837, 8661166.036166158, 8688114.007356651, 8688120.067589452, 8691221.643610446, 8691806.25, 8700475.093657231, 8711804.6875, 8730217.683154427, 8733219.73941015, 8733381.25, 8736117.1875, 8829112.085879784, 8836009.167248152, 8848796.875, 8849784.29386933, 8859834.324170304, 8868875.0, 8869517.275072763, 8870669.376155138, 8872267.031593526, 8873132.761699826, 8875051.993952075, 8888314.992263999, 8888803.783337086, 8889435.9375, 8895799.347759701, 8907082.36118653, 8907861.61081775, 8916794.767872764, 8922792.11315179, 8926054.392805975, 9133545.276231473, 9172315.625, 9174846.491996761, 9176935.711829457, 9177610.13548507, 9178421.785121, 9179475.956443638, 9181814.669049736, 9183162.997765064, 9188787.882380841, 9190007.697424674, 9193505.357956978, 9193604.594705822, 9193627.882778205, 9194468.75, 9198093.998878762, 9199381.032868836, 9199866.843801862, 9200457.161105808, 9201800.609063866, 9202047.690719156, 9202210.9375, 9205599.55297396, 9211199.407347627, 9217751.827461716, 9217865.70326004, 9230092.1875], [14.19034984838482, 27.848209151670765, 6.360600804821466, 7.649843798333368, 21.5405997039229, 100.69397626032585, 35.29798242994611, 77.05729249797884, 5.7521216741095476, 51.988151346772035, 6.948235447913715, 39.89923040058594, 5.758632487085948, 5.484563231514386, 99.10474154146044, 15.35405581226053, 24.51748225211363, 36.64725814628421, 13.645749054650704, 21.399134313133214, 31.909203899644055, 8.610621845462541, 27.932814739949528, 24.335264175385753, 32.350102040553445, 29.333339954034432, 45.31251065620338, 10.62800983842125, 158.0578439601167, 44.80453072977322, 116.21875204088184, 144.75650172208938, 64.8974795901149, 35.49680629235135, 50.21391023016571, 24.043691902135503, 10.165176874283615, 12.973959313725812, 75.17595887214983, 59.920091636668964, 8.889364087624838, 5.025866560121685, 34.378445457031106, 23.513017974767052, 39.76109245270577, 82.64590200790457, 30.61059036807652, 82.35221415388666, 51.51738300747023, 73.3664562182091, 44.66262962931446, 73.15441093264431, 50.0776172103562, 72.93062987625149, 17.901186042270552, 104.01835598817995, 7.3930734753952105, 7.819113208589117, 18.858858867202102, 113.08300697558933, 10.601196503850916, 20.787281484244033, 9.811500983939617, 103.53068224921768, 85.36581946360994, 14.822524327084693, 115.2445155137394, 13.435836395815956, 8.318053322332736, 9.34492596689892, 15.544572095805934, 153.25733523502686, 191.767308187299, 23.920987744836367, 13.996134175169496, 83.8203695213842, 64.52424805987532, 26.970160419236887, 72.41260938958838, 59.25886915913098, 36.02136785216646, 44.59698471243555, 25.381059633315076, 88.883305927782, 27.87790784508477, 15.798088958788066, 67.01268499394666, 47.12114550924633, 64.20276691209915, 9.923265633326285, 15.418227256785356, 32.406068622065604, 12.272856966798475, 186.46633510579838, 17.074915929206202, 80.66380577424847, 6.50182022760882, 41.50278955774998, 6.637983019043638, 111.21101832350556, 93.81756591748398, 20.71021479254522, 72.10454416448269, 10.725002523005461, 39.18089614236778, 104.80456894947535, 5.34798374354174, 53.6195170342349, 5.1775830827892255, 88.66643212587188, 12.177006105573438, 142.6365770548221, 80.10833791648498, 31.107338774831085, 41.78154992595454, 38.65741180809228, 53.22147574417652, 20.020486788434855, 14.040803769558773, 16.03210533504829, 33.12414509762379, 144.43602691315573, 131.07129862708527, 62.05601083021363, 74.09173972555067, 108.01398898986992, 71.93949187114514, 88.1667348759196, 8.010525476919645, 20.845616704636655, 85.4982638118719, 71.24625640204746, 39.575931376155175, 17.32660365593363, 27.666501156811016, 27.179281106314644, 48.492477601163, 56.70611517012708, 24.58352123501576, 25.679106669963264, 12.716919264076385, 52.675472889750566, 29.197413064327044, 37.88206324235204, 56.135838690670596, 225.73127777903235, 34.24262032949957, 31.29368473203091, 27.75781825509025, 63.537916156559874, 8.504213560503542, 75.7426463107636, 95.74799717001807, 17.60480142597078, 60.4351623780363, 9.607140902540433, 272.2994863602358, 183.80382295606503, 7.571053617026645, 42.303636578280546, 56.017871098952384, 66.42694779551742, 23.536736494214523, 25.22925562331817, 42.58578602707844, 5.9062410919553665, 16.240707692752345, 11.43425059955018, 13.597872707241317, 49.804404697332075, 24.298569083977274, 19.68712437572113, 67.59579363695946, 19.888286161439677, 63.30533123245523, 39.68421643334506, 76.47826920877701, 30.460761112352802, 108.79070024397402, 24.676892829730797, 5.675746596681207, 23.834285543896343, 29.484211131811353, 73.78439879119838, 139.4311328135607, 5.518046097986423, 22.247469644487506, 47.91546968646233, 10.591953068950675, 8.4662987791669, 33.71136740481955, 47.032247154794334, 68.4522606385482, 38.44776136147166, 27.698722605221892, 22.917226407199305, 104.86354511145821, 79.36237673157649, 97.05234329322009, 20.84564687145127, 31.962020609757666, 54.68605097497179, 27.687862117817676, 46.861020187904444, 15.58269852369539, 53.26642197937252, 117.184882111412, 37.595308788606445, 111.31585586441437, 21.595661748208883, 108.21164881168772, 57.58749063288811, 10.115783601676336, 66.79577800125496, 107.24074128383248, 8.766948755041385, 40.27514974606786, 30.154785773676938, 5.704140092728878, 42.66290025950235, 50.343791499001355, 48.791376016632576, 88.16245393259116, 75.3810604214022, 317.1449309556272, 12.706998779915972, 23.20986989686795, 19.378558054967367, 8.844115100233967, 165.24779890129062, 15.914781486575936, 17.760251714258033, 23.770040754800764, 18.12654105758278, 12.03413782995769, 8.817450370225213, 25.752367738370204, 42.532416819218575, 26.92453644172116, 17.12433846699303, 30.28513123917257, 11.062299341084914, 19.157494708128763, 20.375012487362454, 69.60223201680417, 63.420526193787474, 10.946162793715736, 52.85130257686449, 79.66728521081737, 13.020150684866254, 77.40057186671552, 11.001990438394806, 90.90045389257864, 9.479630812374308, 43.053262079883, 9.851117903312035, 44.69341031022004, 9.642658078958064, 171.39674998629323, 10.598876526221808, 43.40345865885554, 32.33791841970556, 8.505886364519597, 55.71718045708932, 18.11921971908351, 223.66539039235917, 182.37235958926112, 98.94125634336238, 33.31532549212524, 99.32787345548633, 12.636934619786214, 58.75999479670889, 17.081840803062807, 36.89247765905279, 27.24447776288295, 115.67977204110305, 8.386904335086752, 31.22641240399591, 19.664606648121225, 75.04189701754989, 197.9952007792319, 46.902468960476696, 25.026883860843807, 20.84603273918892, 30.369112049776753, 33.29501451029515, 129.38393149589405, 53.351230613860885, 42.17393975945034, 47.054054851868216, 9.421182726847148, 13.017986393154759, 18.446058501618644, 95.83295131022699, 8.892953758325529, 43.66678093653964, 87.92665998501613, 20.895011175324615, 12.949894215402276, 54.64155423217167, 76.54622281013863, 22.20424741732214, 72.31744747336246, 54.16793774334469, 5.862082540423834, 30.674128691481947, 113.16711057494722, 133.26484976354214, 21.068912688261186, 83.94670860963707, 41.626138467135625, 13.917393199497704, 67.63270993725058, 6.570689178711965, 117.65102770934215, 72.46750674659127, 128.70353222535073, 16.874586983558704, 87.2258969680177, 11.126385553173076, 20.390573293577972, 37.57099625904489, 53.973588842072445, 36.75519418500673, 106.27281964281931, 99.27940832573238, 13.351118095044544, 74.46323785444923, 151.1602486542152, 63.24216737345294, 14.971962818021417, 11.897901174655756, 11.660477080919131, 55.54431963220431, 29.542532350062213, 13.959282113513197, 39.74379550265823, 12.03871108698873, 5.531099491322514, 14.91265654103682, 27.937226312248054, 22.79008692259933, 77.79021551934716, 77.14424761863984, 50.58790875237599, 18.514840215178, 111.5627311587575, 264.3072412160329, 121.01446087183113, 51.13507881491684, 17.081209755841382, 8.468542145438125, 80.14986928211596, 8.914964535313299, 10.286466710193205, 17.984865495193134, 50.182790981438636, 36.52556322253778, 263.0585317876396, 138.06998296112548, 181.5114651607208, 20.848198959118697, 42.52912563956579, 114.8826985980753, 39.94490115123847, 65.67648198412874, 78.54762260504046, 112.90504227721362, 94.26879909419648, 11.10175014632583, 24.146931705894943, 131.63480656291108, 15.55036339353054, 69.90535776751457, 29.09418946488677, 63.773992772254886, 82.35768506090378, 74.50368011977551, 11.782518266801771, 26.221143425110405, 57.578769248172065, 66.41019292782121, 94.97031769220854, 63.31315545290681, 87.75296054711616, 30.932824590046756, 11.062079877204873, 61.75349086070217, 25.110234781385202, 66.84157732545205, 44.96575948639678, 117.18001748318477, 39.389835277032596, 8.04972158110595, 120.57170577722168, 10.720829447272694, 24.06049744291175, 13.038918044163129, 19.32949046825865, 10.15316530576356, 73.78794527178479, 53.41383297677247, 17.133344001633656, 18.34456959837184, 120.48238053596077, 78.85950858264395, 30.78944199596439, 10.783494353556737, 5.0264745990529605, 26.320326109456794, 43.78102593182749, 102.00443916645327, 12.30363712501373, 88.27381990999922, 5.321696066575118, 35.405441923454816, 21.196755372280816, 10.348832387895461, 13.13197779952597, 19.316327842484682, 7.432026960031074, 30.26818051333456, 32.6884091611567, 27.954823528021755, 16.32005933705371, 28.859958320507566, 46.46027546877043, 16.32754496321851, 16.729786064925, 13.788819932389437, 70.12768779722182, 44.15699941306262, 34.7101034330186, 49.303892562750825, 39.3778043826466, 162.12871252780096, 158.01179251363493, 41.53978627967485, 9.230713926174872, 83.58013532002116, 71.69836628143975, 32.24162604049934, 22.146704319979484, 35.324673942073815, 97.58722433930166, 77.1486825766684, 74.52437496869135, 6.859149255793922, 73.88638179737934, 48.210002790848094, 52.964277074833575, 9.660898713581334, 65.59466315651571, 19.38777177525697, 45.15665605827377, 16.84306492209997, 8.956482549133824, 15.93484521414629, 63.92868139146564, 62.51753490397098, 22.51332514401272, 25.650626053518987, 35.03220723172447, 75.80223973642882, 85.3833224860262, 15.383316537669224, 27.962421954171013, 21.24137906727032, 23.752578261255607, 9.58846506815031, 7.663583131773338, 82.38988585471681, 8.911077588856525, 10.329590306581702, 110.12450808023502, 48.66830835842539, 24.480898312708728, 88.04136551266339, 60.89493350688963, 106.75192902956735, 60.18500796462766, 132.0480813027557, 10.336315117432692, 47.25312455933563, 51.71877138771087, 22.39482315453382, 10.817795802271975, 48.06704925461807, 5.458295061338722, 56.18793740049887, 41.69972826487832, 11.267404321438955, 7.846576370791571, 25.78411229218405, 27.558195047869464, 74.48178325625024, 70.45613612822457, 12.340491358005915, 96.88366090431033, 6.022800364945965, 59.314629815908134, 18.32719512181366, 46.88220500420398, 58.964534936334246, 90.83421934456923, 7.111950290223817, 82.48178821053767, 22.745394005795482, 125.94787621641507, 6.368311792732685, 54.13519416493166, 13.044673988627705, 89.26631931049043, 17.25212327934698, 6.842324977255514, 26.44011594698671, 12.366892494743118, 26.81530164268758, 26.59573525531055, 68.5367761525164, 5.722782531775807, 23.58836923354534, 66.83347754498057, 33.39338504371727, 9.905602230408967, 19.340237973176023, 47.244954276412436, 22.038337577939657, 7.996210265667415, 11.568755246024102, 6.27713685261054, 63.8596003642264])
Detected energies during the discharge + Energy spectrum
multiplot(icon_fig, T_int_first,E,xmean,count)
size_of_interactions_average(Etot, Ntot,size_interaction)
#energy_spectra_doublebreakdown(Etot, T_first, file_energy_spectra_doublebreakdown)