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 = 44602
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
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
RowNo.append(int(int(matrix_index[i]))%int(256)) #ver XV
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);
([3396120.3125, 3455794.9858699054, 3473396.875, 3595873.4767300715, 3626629.227543435, 3653123.8824835825, 3687220.3125, 3724290.3720047562, 3725913.843611853, 3800701.091150325, 3817206.218048582, 3829543.89809581, 3839860.647746144, 3849272.9320649523, 3859114.470911665, 3875224.9349851306, 3987082.5122909257, 4011790.625, 4041595.3125, 4087685.9375, 4092100.7036269265, 4195396.875, 4213835.687632816, 4227884.375, 4229573.225091646, 4235719.803289092, 4249332.309600382, 4256340.167779679, 4257447.191946655, 4290034.961590105, 4315275.9735594, 4394712.5, 4395328.287209072, 4419439.0625, 4429042.1875, 4433345.279961017, 4433767.1875, 4434897.625683392, 4447693.181173331, 4468339.816606357, 4474729.6875, 4498468.032826871, 4502218.75, 4509347.657221171, 4532840.7184039, 4533961.785159259, 4544489.385230624, 4546710.899502219, 4547378.125, 4601623.4375, 4619838.865387929, 4619867.1875, 4833779.6875, 4853918.75, 4934659.722362649, 4940478.042086372, 5053471.157077108, 5054368.625252328, 5056560.420554757, 6742078.125, 6934152.1705453945, 6935534.291112853, 6937526.5625, 6939370.385298073, 7074239.952988229, 7142826.555464846, 7148447.6312675895, 7148463.467244404, 7148465.995111362, 7148471.875, 7148764.0625, 7149918.813957622, 7149998.4375, 7150104.146939968, 7150371.807085173, 7150743.75, 7152670.218441345, 7153620.3125, 7154181.855565143, 7154482.956556382, 7154944.202594699, 7156479.6875, 7156782.8125, 7158071.316821844, 7159459.931234486, 7159616.70924599, 7159625.0, 7159739.0625, 7160458.027052037, 7172895.119508337, 7177539.0625, 7202901.5625, 7203492.5797885405, 7207920.3125, 7212075.508671655, 7221374.799281785, 7233089.513720761, 7268652.1596872425, 7275673.713350413, 7275912.320734258, 7277519.3965330655, 7277910.206840791, 7287968.195382568, 7293788.925310066, 7305951.665665938, 7314037.5, 7343368.73147853, 7347764.862918261, 7347900.717178597, 7347948.307707531, 7348540.625, 7350993.75, 7354627.347907249, 7356278.849048148, 7356520.809090628, 7357256.487838868, 7359150.837190085, 7381782.932911381, 7388676.55797744, 7403769.66242491, 7412085.482411231, 7465528.125, 7480648.018210574, 7485114.495129188, 7487639.707974833, 7487972.395914212, 7488331.489222729, 7490903.558574179, 7492854.6875, 7493286.791594194, 7497591.442808658, 7497993.489742781, 7501695.044772089, 7501990.90740238, 7502800.575270419, 7505590.625, 7521946.747952165, 7530896.875, 7537233.827238594, 7541372.780592159, 7544801.511823327, 7548568.976311123, 7548846.732639161, 7555575.4411085695, 7556028.108833381, 7559090.5470698, 7565412.5, 7567764.889817959, 7568348.4375, 7568385.028187323, 7568416.784465245, 7568727.915010314, 7571034.00549596, 7571068.100900329, 7607914.0625, 7631675.0, 7632155.908279529, 7633266.880046463, 7633972.479826512, 7645083.908987559, 7645437.011345626, 7660718.75, 7662041.67709357, 7664958.997795925, 7671460.438826127, 7672807.325831643, 7673323.4375, 7673343.75, 7673550.938774252, 7673849.9657510435, 7673933.053463544, 7674689.978276066, 7676235.696852459, 7678268.999936565, 7683593.75, 7690564.059350532, 7691059.375, 7691076.358444537, 7693877.998048853, 7697499.385325004, 7748768.68440047, 7752449.087418767, 7779137.49702785, 7779145.68829223, 7793563.927906755, 7794082.8125, 7796919.151150464, 7798509.117304439, 7799089.146171931, 7815292.072785281, 7818059.948266917, 7819138.739024588, 7821880.654259697, 7824040.625, 7828259.22585763, 7829321.15544093, 7830277.333933292, 7834452.864441825, 7835813.5966195455, 7839851.5625, 7858790.625, 7862342.094233947, 7862360.688256269, 7862362.5, 7863646.570966072, 7867232.433783263, 7872497.877060103, 7874251.131263768, 7875912.5, 7883342.1875, 7901732.8125, 7909453.125, 7911189.012773448, 7914741.443281059, 7914767.1875, 7915571.917930349, 7915697.54490994, 7916689.0625, 7917792.1875, 7918105.626966827, 7920148.391269869, 7920746.604480106, 7920829.243064113, 7921985.805601628, 7922449.466723856, 7922722.425438599, 7922932.530216051, 7923284.375, 7929161.651683358, 7931359.255261745, 7933975.1739590345, 7964872.498296972, 7966824.68135582, 7982942.1875, 8034434.184444227, 8034443.75, 8042845.235096335, 8066793.75, 8066823.341632484, 8075593.220403549, 8076343.277948045, 8077018.875933485, 8077148.476220226, 8077262.9984264625, 8077442.845674123, 8077629.312562009, 8080089.991274315, 8089836.354906385, 8091219.501128995, 8098528.516228272, 8114360.1504297545, 8114784.585279993, 8117290.397834844, 8127868.863375641, 8135485.9375, 8137318.75, 8147408.701016589, 8149263.1371853035, 8157177.605307059, 8157433.570615082, 8159453.467197067, 8160123.0088625625, 8167981.25, 8169134.236141031, 8172254.6875, 8207425.6442166865, 8221453.035197104, 8225718.75, 8226242.057877695, 8226322.625005592, 8227535.622187893, 8227990.002089008, 8228651.027873815, 8228725.0, 8234655.085342468, 8234675.0, 8235039.015915934, 8235688.517410397, 8239540.235428109, 8240155.122721719, 8240225.484037374, 8240812.378598435, 8242016.265848422, 8257166.874213542, 8292354.5504564615, 8294989.696713381, 8295748.2376555195, 8296446.875, 8296650.0, 8296921.695580018, 8297025.683551523, 8297161.312318331, 8298055.793094756, 8301695.3125, 8302089.0625, 8304412.409666559, 8327832.8125, 8327948.09145759, 8328246.922562916, 8329149.80590384, 8332318.566716866, 8332451.2409118395, 8336127.566291152, 8336200.182211287, 8337278.089782933, 8337418.75, 8338333.909148299, 8339261.964073224, 8339268.75, 8339553.222799597, 8340827.217110776, 8340956.641261332, 8341078.936401495, 8343304.658295839, 8343439.505111194, 8343857.8125, 8352491.558190998, 8353217.643523081, 8355209.194106643, 8356975.99336166, 8357242.58588518, 8357701.164993209, 8451999.561033119, 8452000.0, 8533335.9375, 8534360.9375, 8535086.223249704, 8539504.249731127, 8548479.149021106, 8564760.9375, 8575332.85758544, 8576897.853983806, 8604354.6875, 8606641.244801488, 8618165.183286339, 8618476.730054636, 8623395.713683551, 8641399.592352886, 8641636.359589145, 8642982.067124702, 8643460.855574213, 8644088.49009179, 8645159.387977554, 8645376.5625, 8646131.170765525, 8646208.823777482, 8646464.684849398, 8647359.946597, 8647700.0, 8648159.685496699, 8653400.0, 8707668.75, 8888290.625, 8975728.125, 8981857.21336416, 8991163.160118286, 8994929.6875, 9006291.171575619, 9181900.0, 9193430.722814389, 9194011.345772794, 9219139.0625, 9246379.748577155, 9258313.78509268, 9258595.21282639, 9259049.690609735, 9259068.053156221, 9259095.183720341, 9259736.372053847, 9259820.73466186, 9260568.75, 9260990.47980395, 9262037.147021415, 9262655.88464606, 9263512.733310869, 9263640.625, 9264071.875, 9264121.896273946, 9265182.8125, 9265661.78032927, 9277563.775656143, 9299958.205826234, 9355867.709428238, 9356213.718329277, 9357782.750989322, 9359745.953261545, 9361298.4375, 9362740.02005856, 9363826.132117754, 9363895.32329143, 9369326.470193133, 9423122.679870501, 9423164.122121798, 9425173.4375, 9472301.553155674, 9472313.39738654, 9473270.3125, 9486239.409832463, 9487945.20985894, 9489128.784930428, 9493992.08802879, 9534368.75, 9534375.86405899, 9534734.375, 9537072.055985002, 9567738.463711243, 9571095.3125, 9579612.041666536, 9631446.708670853, 9647558.398760676, 9675809.169613156, 9677998.765407145, 9685906.4455795, 9689038.673498135, 9756809.375, 9761049.502106156, 9761509.375, 9766325.285553535, 9775652.026823903, 9776918.860819235, 9777015.606171835, 9777310.30666076, 9777522.224787144, 9779057.489224555, 9780428.148646599, 9780443.75, 9781874.643041763, 9783008.616778051, 9783451.5625, 9803614.431638928, 9805740.570966268, 9834875.0, 9835581.25, 9836754.360906573, 9836784.375, 9837558.981961673, 9837983.876240868, 9838500.74510899, 9838893.472593043, 9839876.174309818, 9840622.23639361, 9840649.26682833, 9842293.21433711, 9844699.51033611, 9845946.875, 9846492.1875, 9847582.509964153, 9848050.0, 9848117.565379044, 9848293.473988323, 9852151.41038207, 9852233.286803687, 9854912.774207123, 9856652.709156962, 9857518.75, 9858350.209948279, 9863741.710498685, 9876088.537422188, 9876178.125, 9876189.0625, 9876427.500676336, 9876954.6875, 9878990.625, 9880415.510408273, 9880605.670132289, 9929533.77772857, 9931612.14915107, 9933008.97590509, 9954387.865989162, 9955256.25, 9955308.966764215, 9955314.55483339, 9956059.548402086, 9956390.313982096, 9966782.002552578, 9975921.875, 9981337.5, 9994742.841276113, 9997235.115273358, 9997314.595590875, 10000740.11351176, 10001484.483738964, 10017352.99720009, 10018333.306800585, 10026777.887048118, 10041153.076361936, 10042417.104843304, 10044956.2267915, 10048102.36639937, 10050017.1875, 10101324.23446098, 10134732.8125, 10134762.095709061, 10159607.15032977, 11407156.25, 11410464.0625, 11419672.572550049, 11425079.623448709, 19217569.823134102], [40.453472526766376, 38.86226323960311, 61.12952502356603, 12.111307700243643, 21.90207693638239, 16.960468828494875, 45.69161747630563, 20.440617009809642, 55.26593880836489, 38.06472261696866, 5.4603968173315245, 11.36735864089064, 47.30642512978358, 21.439053532822943, 41.71159946008606, 58.53100150750564, 34.00000163283192, 36.07334116820836, 68.59635698029642, 52.13966691850734, 17.929104731150687, 46.32378367378314, 5.037358197380157, 48.7994179810451, 37.58183936681442, 21.40170598328722, 21.46422368548446, 10.481087113212931, 11.662097054007452, 17.77459649829963, 19.602026978928745, 78.86852803507642, 78.22837694794256, 85.1993347716632, 34.87644572236158, 5.6122465383858495, 42.98059965458304, 5.368320166223151, 20.832936150169896, 18.88446629911146, 67.84887644942124, 10.165536518963576, 76.16645833702731, 19.088958433821734, 17.959222443868285, 5.662725449799893, 16.33300858119463, 27.794541386193703, 41.241060066747245, 36.68049955067508, 25.16042029570732, 48.78913506922927, 52.02658485891377, 86.94270122923116, 8.479227050140915, 21.199802479905742, 13.771939231857214, 14.486433016064678, 5.586071614102154, 61.54674077888089, 96.3765967491291, 46.997277704255794, 71.13718098308583, 7.629781437734897, 12.878404748836866, 8.28286051945799, 52.478916071760835, 29.253916805576107, 11.76008253239629, 59.49274607287386, 70.72437570106388, 15.19102136836934, 33.37290710859734, 21.09781433825904, 52.83808062830408, 37.025603398648954, 14.59472496645307, 30.056546684454585, 12.227531488235265, 15.520565214153912, 6.857357467123839, 28.61878834973911, 86.8326407738634, 13.169484716417744, 78.99602537364915, 21.71280601830829, 60.61210248384725, 40.48072112746688, 9.519656254559829, 19.40598619169104, 68.5303504314888, 32.82915912019622, 27.1782523920811, 32.48416507975997, 43.574381355114845, 25.107559135483015, 27.517890195134605, 91.8609287589718, 126.02308348851692, 25.42603428902366, 12.314944619024542, 7.358748277656755, 20.9650318431155, 57.950369438853365, 6.098893676283936, 68.35624815578994, 30.474800152995886, 44.19492285719255, 12.470318469470145, 26.199091650358117, 31.20250099490097, 82.473500445443, 12.626231352991907, 6.005041779753533, 85.10351204731299, 9.540945821328977, 41.53077821353117, 14.866452514032982, 105.65239426773985, 12.932996480918206, 10.483815831106003, 102.33207579008601, 39.30414532692984, 8.529423674019528, 36.73119261714624, 28.275854905766273, 66.6775089755152, 5.846773022626286, 60.3371781419666, 59.543787600336024, 63.16307204111486, 14.034381395922951, 24.171915817665177, 9.58217864918084, 17.705675414749685, 49.30379454224031, 45.228591577634845, 54.08242666036543, 7.416449359204045, 10.235770565552157, 20.096883499498794, 15.880474238440977, 13.119907830689009, 13.871239337298771, 14.880245805683904, 14.652568782018838, 30.59313065868525, 18.972715492476663, 41.74389135162135, 7.857900644907761, 5.034816838152889, 24.972875973981147, 13.698240913995635, 24.374259814011143, 153.09613370021586, 44.724991866100545, 23.232058212971584, 68.7889680740405, 98.1701836339356, 59.303605022433814, 21.60703047104814, 142.82919924876177, 6.036582420674563, 22.812238881329844, 72.57128901809739, 10.44363544300461, 43.54841015671626, 47.04353946301003, 100.42170711301608, 44.81574023983953, 5.627515375247737, 8.838520993382556, 8.163290654294304, 15.988170358228102, 130.17785887195672, 58.1763166084196, 61.11013449237521, 25.058878147404624, 55.03428334289691, 20.420662057063726, 11.026695599709702, 86.48133839639472, 14.930193063844001, 82.53222783645332, 27.482954082767822, 62.13476329351415, 11.818510742581864, 55.75500486316878, 21.223955607999912, 48.30862585899466, 12.159955577015033, 9.072086102860926, 139.85997089060731, 71.0919054150576, 22.000790005380573, 5.115416023628752, 17.827850337516722, 29.876158990034554, 20.306107737433706, 38.15530097458803, 69.36408961264038, 26.807223910034637, 21.752202541843804, 154.10991616419406, 19.119051347717132, 105.39580781901701, 13.163508266289545, 7.454374144850057, 37.71407027399288, 72.82325446967977, 118.02717385381517, 31.75044075577616, 11.050860499420386, 60.87982968198375, 72.03634380220785, 15.107704083450969, 18.30462530691272, 89.5595517737706, 75.81544637112934, 170.48302992021024, 19.176620021814728, 51.39088776413726, 22.06588690213384, 33.98316937049408, 13.23582515079696, 87.4078466214204, 23.66554802697995, 67.44175129963152, 130.8509834112822, 26.363177488949646, 14.797648501140419, 6.894667462387815, 10.663676452121294, 172.59305864985114, 10.842370047333407, 31.983132094455122, 42.146868319397235, 73.38995260092173, 26.762795135153343, 23.738077805710347, 13.403246480138643, 13.564397019474113, 11.188773210336953, 5.851803588872312, 6.354096397601967, 27.94603856198775, 30.479507396539837, 9.711178144813719, 18.863142041308695, 90.82034092599585, 19.039036466269305, 17.21759186798596, 11.614032722091395, 6.505011944147552, 72.1203454503413, 33.12009968406283, 19.91696507748609, 13.680114736205535, 21.298876545750137, 10.066809579349538, 51.3377252108381, 28.774274995930266, 107.97885724880977, 7.553775173981215, 38.96781172595496, 18.136775791950395, 10.990181566983882, 80.74122338406286, 5.928196169370264, 8.727459089925363, 12.19387142670962, 20.348776481146515, 60.926262271853545, 45.97842046069588, 16.710896901492916, 164.45250038266573, 32.76996950667994, 73.54702138115763, 7.022676985240294, 7.76861877390889, 11.979141661709019, 26.33586226278649, 41.58872737047025, 23.582496320400452, 27.20688709201558, 18.07251189055622, 25.12034224754961, 97.41403855926198, 42.14468519602873, 25.4237096509436, 7.313528832053161, 16.592556185140978, 10.481490307574624, 64.0342825038328, 32.807894377186656, 46.28222273936009, 30.618266046987014, 29.90041342420915, 15.125949864368277, 6.242983266448258, 24.080577401717832, 50.29910366924389, 6.981941029737095, 7.170187625405937, 5.811379091509354, 34.90414077513512, 10.47006232388985, 21.142044721629308, 30.572442834330936, 6.098328906387125, 80.41274910988855, 29.95659322899455, 16.69013072303809, 33.91837266319272, 33.13306396429253, 51.09032279890989, 6.02501344653486, 17.020375202283265, 33.60085917603647, 52.18539361014492, 11.813268060736515, 48.00286717090178, 22.12433880579278, 30.228298425236243, 76.63777757294703, 47.3642726932479, 7.7099649118669715, 10.50607817117438, 27.39301243852712, 65.36106678545684, 268.2246626260949, 46.16863540957621, 31.849597351003094, 23.70502697797562, 7.450925945309446, 9.477215848220728, 69.82287893333718, 43.259608518498034, 9.715766576569429, 19.350968709164906, 82.8971792449407, 66.17169998446454, 7.607938196199149, 51.276891436292225, 185.66302712165714, 20.996906251692124, 12.263111342714291, 17.6834611101091, 43.71770647339048, 5.352675048990693, 58.254359190407584, 66.01749228713435, 77.10299829673907, 44.05719698892909, 108.86064814104954, 8.6694978443714, 161.35054760196655, 17.65900695939508, 41.60939542622277, 120.2121098477363, 16.765262707777445, 77.35125849236422, 69.94074219918542, 39.304143113433774, 20.579196978229362, 59.837168257292255, 51.13573598177483, 38.257392758746505, 9.728018465569612, 5.553926292801612, 33.37704385988, 25.952391783894406, 13.747584234669322, 22.95035188115382, 67.34528007906646, 132.96074023554806, 85.69606171661327, 5.462680381773095, 54.60377102494621, 19.54995474865044, 156.54440536814042, 16.68750428806539, 12.054892248644752, 39.766228133139464, 54.40433486921796, 18.114511180035432, 30.70130643560032, 8.867406342362017, 7.012733572439325, 12.590730438767764, 6.255606079621959, 30.089941767962763, 9.382330769238763, 50.416252901399744, 88.08604050274396, 46.39483171411968, 93.28002891440859, 11.71778065247283, 78.50913289043976, 31.6385077507288, 26.70153932384006, 122.38111066675943, 19.718320686125214, 56.39536240627385, 88.88451271083933, 6.649574546273669, 118.5293951150753, 13.441628066755094, 25.622850409448464, 133.99218584253455, 40.107743878367216, 62.19263823912269, 15.743328469046158, 12.722270988671408, 58.04197992854266, 184.39175346915204, 32.6635721421549, 186.7212846362291, 12.257579566784703, 11.305458064240902, 5.164923320010713, 7.3899690026401155, 11.722315962945743, 90.5429296219454, 11.164870215339754, 33.44002441249418, 11.796750669324975, 5.875987265165515, 31.22897750329509, 66.86149882742674, 42.963682082879764, 46.89257290653713, 28.91029383812464, 23.4168889010511, 63.59316529294085, 22.63085872392242, 21.505487491175035, 38.74885524957955, 51.25039316779714, 13.643065644255055, 25.64842403102803, 5.761652972797761, 13.35601102395653, 107.37933652070373, 64.40704022281423, 37.662728291112536, 28.31352873787504, 51.75326584443931, 5.635297055835058, 40.2362107420467, 25.843336653644712, 9.767465135546878, 47.84219123101032, 7.459454030224771, 117.95403985303362, 26.912825941590874, 26.046323213675084, 13.257884572560988, 46.751809700842294, 90.58753344489435, 12.997978692249383, 41.57518671953254, 38.1372259602847, 9.236353188215142, 106.1821084435633, 10.306957879827136, 9.051372105361187, 9.015301333974678, 63.93626716965889, 82.30869324498931, 22.460091033188412, 17.22148892151015, 7.667181847235986, 6.702963118749465, 18.873330126856096, 37.27180357499733, 38.633272787083634, 89.39882642385058, 77.99939187846851, 36.52051376324458, 41.491021310768545, 6.785411381443954, 26.231415901185855, 11.999512434547963, 9.137992112501, 27.597775193997986, 8.24334545923908, 55.99078262149371, 38.427077318247086, 59.51868492955869, 24.67108982219905, 107.11807634245959, 22.504110560612094, 46.35280040788884, 92.46947709283359, 93.9958117337929, 79.40133122088442, 14.702869466084598, 8.043703580786902])
caption, xmean,count, xle, Etot = energy_spectrum(E_tot)
hist_file(E_hist, xmean, count, caption);
([3396120.3125, 3455794.9858699054, 3473396.875, 3595873.4767300715, 3626629.227543435, 3653123.8824835825, 3687220.3125, 3724290.3720047562, 3725913.843611853, 3800701.091150325, 3817206.218048582, 3829543.89809581, 3839860.647746144, 3849272.9320649523, 3859114.470911665, 3875224.9349851306, 3987082.5122909257, 4011790.625, 4041595.3125, 4087685.9375, 4092100.7036269265, 4195396.875, 4213835.687632816, 4227884.375, 4229573.225091646, 4235719.803289092, 4249332.309600382, 4256340.167779679, 4257447.191946655, 4290034.961590105, 4315275.9735594, 4394712.5, 4395328.287209072, 4419439.0625, 4429042.1875, 4433345.279961017, 4433767.1875, 4434897.625683392, 4447693.181173331, 4468339.816606357, 4474729.6875, 4498468.032826871, 4502218.75, 4509347.657221171, 4532840.7184039, 4533961.785159259, 4544489.385230624, 4546710.899502219, 4547378.125, 4601623.4375, 4619838.865387929, 4619867.1875, 4833779.6875, 4853918.75, 4934659.722362649, 4940478.042086372, 5053471.157077108, 5054368.625252328, 5056560.420554757, 6742078.125, 6934152.1705453945, 6935534.291112853, 6937526.5625, 6939370.385298073, 7074239.952988229, 7142826.555464846, 7148447.6312675895, 7148463.467244404, 7148465.995111362, 7148471.875, 7148764.0625, 7149918.813957622, 7149998.4375, 7150104.146939968, 7150371.807085173, 7150743.75, 7152670.218441345, 7153620.3125, 7154181.855565143, 7154482.956556382, 7154944.202594699, 7156479.6875, 7156782.8125, 7158071.316821844, 7159459.931234486, 7159616.70924599, 7159625.0, 7159739.0625, 7160458.027052037, 7172895.119508337, 7177539.0625, 7202901.5625, 7203492.5797885405, 7207920.3125, 7212075.508671655, 7221374.799281785, 7233089.513720761, 7268652.1596872425, 7275673.713350413, 7275912.320734258, 7277519.3965330655, 7277910.206840791, 7287968.195382568, 7293788.925310066, 7305951.665665938, 7314037.5, 7343368.73147853, 7347764.862918261, 7347900.717178597, 7347948.307707531, 7348540.625, 7350993.75, 7354627.347907249, 7356278.849048148, 7356520.809090628, 7357256.487838868, 7359150.837190085, 7381782.932911381, 7388676.55797744, 7403769.66242491, 7412085.482411231, 7465528.125, 7480648.018210574, 7485114.495129188, 7487639.707974833, 7487972.395914212, 7488331.489222729, 7490903.558574179, 7492854.6875, 7493286.791594194, 7497591.442808658, 7497993.489742781, 7501695.044772089, 7501990.90740238, 7502800.575270419, 7505590.625, 7521946.747952165, 7530896.875, 7537233.827238594, 7541372.780592159, 7544801.511823327, 7548568.976311123, 7548846.732639161, 7555575.4411085695, 7556028.108833381, 7559090.5470698, 7565412.5, 7567764.889817959, 7568348.4375, 7568385.028187323, 7568416.784465245, 7568727.915010314, 7571034.00549596, 7571068.100900329, 7607914.0625, 7631675.0, 7632155.908279529, 7633266.880046463, 7633972.479826512, 7645083.908987559, 7645437.011345626, 7660718.75, 7662041.67709357, 7664958.997795925, 7671460.438826127, 7672807.325831643, 7673323.4375, 7673343.75, 7673550.938774252, 7673849.9657510435, 7673933.053463544, 7674689.978276066, 7676235.696852459, 7678268.999936565, 7683593.75, 7690564.059350532, 7691059.375, 7691076.358444537, 7693877.998048853, 7697499.385325004, 7748768.68440047, 7752449.087418767, 7779137.49702785, 7779145.68829223, 7793563.927906755, 7794082.8125, 7796919.151150464, 7798509.117304439, 7799089.146171931, 7815292.072785281, 7818059.948266917, 7819138.739024588, 7821880.654259697, 7824040.625, 7828259.22585763, 7829321.15544093, 7830277.333933292, 7834452.864441825, 7835813.5966195455, 7839851.5625, 7858790.625, 7862342.094233947, 7862360.688256269, 7862362.5, 7863646.570966072, 7867232.433783263, 7872497.877060103, 7874251.131263768, 7875912.5, 7883342.1875, 7901732.8125, 7909453.125, 7911189.012773448, 7914741.443281059, 7914767.1875, 7915571.917930349, 7915697.54490994, 7916689.0625, 7917792.1875, 7918105.626966827, 7920148.391269869, 7920746.604480106, 7920829.243064113, 7921985.805601628, 7922449.466723856, 7922722.425438599, 7922932.530216051, 7923284.375, 7929161.651683358, 7931359.255261745, 7933975.1739590345, 7964872.498296972, 7966824.68135582, 7982942.1875, 8034434.184444227, 8034443.75, 8042845.235096335, 8066793.75, 8066823.341632484, 8075593.220403549, 8076343.277948045, 8077018.875933485, 8077148.476220226, 8077262.9984264625, 8077442.845674123, 8077629.312562009, 8080089.991274315, 8089836.354906385, 8091219.501128995, 8098528.516228272, 8114360.1504297545, 8114784.585279993, 8117290.397834844, 8127868.863375641, 8135485.9375, 8137318.75, 8147408.701016589, 8149263.1371853035, 8157177.605307059, 8157433.570615082, 8159453.467197067, 8160123.0088625625, 8167981.25, 8169134.236141031, 8172254.6875, 8207425.6442166865, 8221453.035197104, 8225718.75, 8226242.057877695, 8226322.625005592, 8227535.622187893, 8227990.002089008, 8228651.027873815, 8228725.0, 8234655.085342468, 8234675.0, 8235039.015915934, 8235688.517410397, 8239540.235428109, 8240155.122721719, 8240225.484037374, 8240812.378598435, 8242016.265848422, 8257166.874213542, 8292354.5504564615, 8294989.696713381, 8295748.2376555195, 8296446.875, 8296650.0, 8296921.695580018, 8297025.683551523, 8297161.312318331, 8298055.793094756, 8301695.3125, 8302089.0625, 8304412.409666559, 8327832.8125, 8327948.09145759, 8328246.922562916, 8329149.80590384, 8332318.566716866, 8332451.2409118395, 8336127.566291152, 8336200.182211287, 8337278.089782933, 8337418.75, 8338333.909148299, 8339261.964073224, 8339268.75, 8339553.222799597, 8340827.217110776, 8340956.641261332, 8341078.936401495, 8343304.658295839, 8343439.505111194, 8343857.8125, 8352491.558190998, 8353217.643523081, 8355209.194106643, 8356975.99336166, 8357242.58588518, 8357701.164993209, 8451999.561033119, 8452000.0, 8533335.9375, 8534360.9375, 8535086.223249704, 8539504.249731127, 8548479.149021106, 8564760.9375, 8575332.85758544, 8576897.853983806, 8604354.6875, 8606641.244801488, 8618165.183286339, 8618476.730054636, 8623395.713683551, 8641399.592352886, 8641636.359589145, 8642982.067124702, 8643460.855574213, 8644088.49009179, 8645159.387977554, 8645376.5625, 8646131.170765525, 8646208.823777482, 8646464.684849398, 8647359.946597, 8647700.0, 8648159.685496699, 8653400.0, 8707668.75, 8888290.625, 8975728.125, 8981857.21336416, 8991163.160118286, 8994929.6875, 9006291.171575619, 9181900.0, 9193430.722814389, 9194011.345772794, 9219139.0625, 9246379.748577155, 9258313.78509268, 9258595.21282639, 9259049.690609735, 9259068.053156221, 9259095.183720341, 9259736.372053847, 9259820.73466186, 9260568.75, 9260990.47980395, 9262037.147021415, 9262655.88464606, 9263512.733310869, 9263640.625, 9264071.875, 9264121.896273946, 9265182.8125, 9265661.78032927, 9277563.775656143, 9299958.205826234, 9355867.709428238, 9356213.718329277, 9357782.750989322, 9359745.953261545, 9361298.4375, 9362740.02005856, 9363826.132117754, 9363895.32329143, 9369326.470193133, 9423122.679870501, 9423164.122121798, 9425173.4375, 9472301.553155674, 9472313.39738654, 9473270.3125, 9486239.409832463, 9487945.20985894, 9489128.784930428, 9493992.08802879, 9534368.75, 9534375.86405899, 9534734.375, 9537072.055985002, 9567738.463711243, 9571095.3125, 9579612.041666536, 9631446.708670853, 9647558.398760676, 9675809.169613156, 9677998.765407145, 9685906.4455795, 9689038.673498135, 9756809.375, 9761049.502106156, 9761509.375, 9766325.285553535, 9775652.026823903, 9776918.860819235, 9777015.606171835, 9777310.30666076, 9777522.224787144, 9779057.489224555, 9780428.148646599, 9780443.75, 9781874.643041763, 9783008.616778051, 9783451.5625, 9803614.431638928, 9805740.570966268, 9834875.0, 9835581.25, 9836754.360906573, 9836784.375, 9837558.981961673, 9837983.876240868, 9838500.74510899, 9838893.472593043, 9839876.174309818, 9840622.23639361, 9840649.26682833, 9842293.21433711, 9844699.51033611, 9845946.875, 9846492.1875, 9847582.509964153, 9848050.0, 9848117.565379044, 9848293.473988323, 9852151.41038207, 9852233.286803687, 9854912.774207123, 9856652.709156962, 9857518.75, 9858350.209948279, 9863741.710498685, 9876088.537422188, 9876178.125, 9876189.0625, 9876427.500676336, 9876954.6875, 9878990.625, 9880415.510408273, 9880605.670132289, 9929533.77772857, 9931612.14915107, 9933008.97590509, 9954387.865989162, 9955256.25, 9955308.966764215, 9955314.55483339, 9956059.548402086, 9956390.313982096, 9966782.002552578, 9975921.875, 9981337.5, 9994742.841276113, 9997235.115273358, 9997314.595590875, 10000740.11351176, 10001484.483738964, 10017352.99720009, 10018333.306800585, 10026777.887048118, 10041153.076361936, 10042417.104843304, 10044956.2267915, 10048102.36639937, 10050017.1875, 10101324.23446098, 10134732.8125, 10134762.095709061, 10159607.15032977, 11407156.25, 11410464.0625, 11419672.572550049, 11425079.623448709, 19217569.823134102], [40.453472526766376, 38.86226323960311, 61.12952502356603, 12.111307700243643, 21.90207693638239, 16.960468828494875, 45.69161747630563, 20.440617009809642, 55.26593880836489, 38.06472261696866, 5.4603968173315245, 11.36735864089064, 47.30642512978358, 21.439053532822943, 41.71159946008606, 58.53100150750564, 34.00000163283192, 36.07334116820836, 68.59635698029642, 52.13966691850734, 17.929104731150687, 46.32378367378314, 5.037358197380157, 48.7994179810451, 37.58183936681442, 21.40170598328722, 21.46422368548446, 10.481087113212931, 11.662097054007452, 17.77459649829963, 19.602026978928745, 78.86852803507642, 78.22837694794256, 85.1993347716632, 34.87644572236158, 5.6122465383858495, 42.98059965458304, 5.368320166223151, 20.832936150169896, 18.88446629911146, 67.84887644942124, 10.165536518963576, 76.16645833702731, 19.088958433821734, 17.959222443868285, 5.662725449799893, 16.33300858119463, 27.794541386193703, 41.241060066747245, 36.68049955067508, 25.16042029570732, 48.78913506922927, 52.02658485891377, 86.94270122923116, 8.479227050140915, 21.199802479905742, 13.771939231857214, 14.486433016064678, 5.586071614102154, 61.54674077888089, 96.3765967491291, 46.997277704255794, 71.13718098308583, 7.629781437734897, 12.878404748836866, 8.28286051945799, 52.478916071760835, 29.253916805576107, 11.76008253239629, 59.49274607287386, 70.72437570106388, 15.19102136836934, 33.37290710859734, 21.09781433825904, 52.83808062830408, 37.025603398648954, 14.59472496645307, 30.056546684454585, 12.227531488235265, 15.520565214153912, 6.857357467123839, 28.61878834973911, 86.8326407738634, 13.169484716417744, 78.99602537364915, 21.71280601830829, 60.61210248384725, 40.48072112746688, 9.519656254559829, 19.40598619169104, 68.5303504314888, 32.82915912019622, 27.1782523920811, 32.48416507975997, 43.574381355114845, 25.107559135483015, 27.517890195134605, 91.8609287589718, 126.02308348851692, 25.42603428902366, 12.314944619024542, 7.358748277656755, 20.9650318431155, 57.950369438853365, 6.098893676283936, 68.35624815578994, 30.474800152995886, 44.19492285719255, 12.470318469470145, 26.199091650358117, 31.20250099490097, 82.473500445443, 12.626231352991907, 6.005041779753533, 85.10351204731299, 9.540945821328977, 41.53077821353117, 14.866452514032982, 105.65239426773985, 12.932996480918206, 10.483815831106003, 102.33207579008601, 39.30414532692984, 8.529423674019528, 36.73119261714624, 28.275854905766273, 66.6775089755152, 5.846773022626286, 60.3371781419666, 59.543787600336024, 63.16307204111486, 14.034381395922951, 24.171915817665177, 9.58217864918084, 17.705675414749685, 49.30379454224031, 45.228591577634845, 54.08242666036543, 7.416449359204045, 10.235770565552157, 20.096883499498794, 15.880474238440977, 13.119907830689009, 13.871239337298771, 14.880245805683904, 14.652568782018838, 30.59313065868525, 18.972715492476663, 41.74389135162135, 7.857900644907761, 5.034816838152889, 24.972875973981147, 13.698240913995635, 24.374259814011143, 153.09613370021586, 44.724991866100545, 23.232058212971584, 68.7889680740405, 98.1701836339356, 59.303605022433814, 21.60703047104814, 142.82919924876177, 6.036582420674563, 22.812238881329844, 72.57128901809739, 10.44363544300461, 43.54841015671626, 47.04353946301003, 100.42170711301608, 44.81574023983953, 5.627515375247737, 8.838520993382556, 8.163290654294304, 15.988170358228102, 130.17785887195672, 58.1763166084196, 61.11013449237521, 25.058878147404624, 55.03428334289691, 20.420662057063726, 11.026695599709702, 86.48133839639472, 14.930193063844001, 82.53222783645332, 27.482954082767822, 62.13476329351415, 11.818510742581864, 55.75500486316878, 21.223955607999912, 48.30862585899466, 12.159955577015033, 9.072086102860926, 139.85997089060731, 71.0919054150576, 22.000790005380573, 5.115416023628752, 17.827850337516722, 29.876158990034554, 20.306107737433706, 38.15530097458803, 69.36408961264038, 26.807223910034637, 21.752202541843804, 154.10991616419406, 19.119051347717132, 105.39580781901701, 13.163508266289545, 7.454374144850057, 37.71407027399288, 72.82325446967977, 118.02717385381517, 31.75044075577616, 11.050860499420386, 60.87982968198375, 72.03634380220785, 15.107704083450969, 18.30462530691272, 89.5595517737706, 75.81544637112934, 170.48302992021024, 19.176620021814728, 51.39088776413726, 22.06588690213384, 33.98316937049408, 13.23582515079696, 87.4078466214204, 23.66554802697995, 67.44175129963152, 130.8509834112822, 26.363177488949646, 14.797648501140419, 6.894667462387815, 10.663676452121294, 172.59305864985114, 10.842370047333407, 31.983132094455122, 42.146868319397235, 73.38995260092173, 26.762795135153343, 23.738077805710347, 13.403246480138643, 13.564397019474113, 11.188773210336953, 5.851803588872312, 6.354096397601967, 27.94603856198775, 30.479507396539837, 9.711178144813719, 18.863142041308695, 90.82034092599585, 19.039036466269305, 17.21759186798596, 11.614032722091395, 6.505011944147552, 72.1203454503413, 33.12009968406283, 19.91696507748609, 13.680114736205535, 21.298876545750137, 10.066809579349538, 51.3377252108381, 28.774274995930266, 107.97885724880977, 7.553775173981215, 38.96781172595496, 18.136775791950395, 10.990181566983882, 80.74122338406286, 5.928196169370264, 8.727459089925363, 12.19387142670962, 20.348776481146515, 60.926262271853545, 45.97842046069588, 16.710896901492916, 164.45250038266573, 32.76996950667994, 73.54702138115763, 7.022676985240294, 7.76861877390889, 11.979141661709019, 26.33586226278649, 41.58872737047025, 23.582496320400452, 27.20688709201558, 18.07251189055622, 25.12034224754961, 97.41403855926198, 42.14468519602873, 25.4237096509436, 7.313528832053161, 16.592556185140978, 10.481490307574624, 64.0342825038328, 32.807894377186656, 46.28222273936009, 30.618266046987014, 29.90041342420915, 15.125949864368277, 6.242983266448258, 24.080577401717832, 50.29910366924389, 6.981941029737095, 7.170187625405937, 5.811379091509354, 34.90414077513512, 10.47006232388985, 21.142044721629308, 30.572442834330936, 6.098328906387125, 80.41274910988855, 29.95659322899455, 16.69013072303809, 33.91837266319272, 33.13306396429253, 51.09032279890989, 6.02501344653486, 17.020375202283265, 33.60085917603647, 52.18539361014492, 11.813268060736515, 48.00286717090178, 22.12433880579278, 30.228298425236243, 76.63777757294703, 47.3642726932479, 7.7099649118669715, 10.50607817117438, 27.39301243852712, 65.36106678545684, 268.2246626260949, 46.16863540957621, 31.849597351003094, 23.70502697797562, 7.450925945309446, 9.477215848220728, 69.82287893333718, 43.259608518498034, 9.715766576569429, 19.350968709164906, 82.8971792449407, 66.17169998446454, 7.607938196199149, 51.276891436292225, 185.66302712165714, 20.996906251692124, 12.263111342714291, 17.6834611101091, 43.71770647339048, 5.352675048990693, 58.254359190407584, 66.01749228713435, 77.10299829673907, 44.05719698892909, 108.86064814104954, 8.6694978443714, 161.35054760196655, 17.65900695939508, 41.60939542622277, 120.2121098477363, 16.765262707777445, 77.35125849236422, 69.94074219918542, 39.304143113433774, 20.579196978229362, 59.837168257292255, 51.13573598177483, 38.257392758746505, 9.728018465569612, 5.553926292801612, 33.37704385988, 25.952391783894406, 13.747584234669322, 22.95035188115382, 67.34528007906646, 132.96074023554806, 85.69606171661327, 5.462680381773095, 54.60377102494621, 19.54995474865044, 156.54440536814042, 16.68750428806539, 12.054892248644752, 39.766228133139464, 54.40433486921796, 18.114511180035432, 30.70130643560032, 8.867406342362017, 7.012733572439325, 12.590730438767764, 6.255606079621959, 30.089941767962763, 9.382330769238763, 50.416252901399744, 88.08604050274396, 46.39483171411968, 93.28002891440859, 11.71778065247283, 78.50913289043976, 31.6385077507288, 26.70153932384006, 122.38111066675943, 19.718320686125214, 56.39536240627385, 88.88451271083933, 6.649574546273669, 118.5293951150753, 13.441628066755094, 25.622850409448464, 133.99218584253455, 40.107743878367216, 62.19263823912269, 15.743328469046158, 12.722270988671408, 58.04197992854266, 184.39175346915204, 32.6635721421549, 186.7212846362291, 12.257579566784703, 11.305458064240902, 5.164923320010713, 7.3899690026401155, 11.722315962945743, 90.5429296219454, 11.164870215339754, 33.44002441249418, 11.796750669324975, 5.875987265165515, 31.22897750329509, 66.86149882742674, 42.963682082879764, 46.89257290653713, 28.91029383812464, 23.4168889010511, 63.59316529294085, 22.63085872392242, 21.505487491175035, 38.74885524957955, 51.25039316779714, 13.643065644255055, 25.64842403102803, 5.761652972797761, 13.35601102395653, 107.37933652070373, 64.40704022281423, 37.662728291112536, 28.31352873787504, 51.75326584443931, 5.635297055835058, 40.2362107420467, 25.843336653644712, 9.767465135546878, 47.84219123101032, 7.459454030224771, 117.95403985303362, 26.912825941590874, 26.046323213675084, 13.257884572560988, 46.751809700842294, 90.58753344489435, 12.997978692249383, 41.57518671953254, 38.1372259602847, 9.236353188215142, 106.1821084435633, 10.306957879827136, 9.051372105361187, 9.015301333974678, 63.93626716965889, 82.30869324498931, 22.460091033188412, 17.22148892151015, 7.667181847235986, 6.702963118749465, 18.873330126856096, 37.27180357499733, 38.633272787083634, 89.39882642385058, 77.99939187846851, 36.52051376324458, 41.491021310768545, 6.785411381443954, 26.231415901185855, 11.999512434547963, 9.137992112501, 27.597775193997986, 8.24334545923908, 55.99078262149371, 38.427077318247086, 59.51868492955869, 24.67108982219905, 107.11807634245959, 22.504110560612094, 46.35280040788884, 92.46947709283359, 93.9958117337929, 79.40133122088442, 14.702869466084598, 8.043703580786902])
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);
([3396120.3125, 3455794.9858699054, 3473396.875, 3595873.4767300715, 3626629.227543435, 3653123.8824835825, 3687220.3125, 3724290.3720047562, 3725913.843611853, 3800701.091150325, 3817206.218048582, 3829543.89809581, 3839860.647746144, 3849272.9320649523, 3859114.470911665, 3875224.9349851306, 3987082.5122909257, 4011790.625, 4041595.3125, 4087685.9375, 4092100.7036269265, 4195396.875, 4213835.687632816, 4227884.375, 4229573.225091646, 4235719.803289092, 4249332.309600382, 4256340.167779679, 4257447.191946655, 4290034.961590105, 4315275.9735594, 4394712.5, 4395328.287209072, 4419439.0625, 4429042.1875, 4433345.279961017, 4433767.1875, 4434897.625683392, 4447693.181173331, 4468339.816606357, 4474729.6875, 4498468.032826871, 4502218.75, 4509347.657221171, 4532840.7184039, 4533961.785159259, 4544489.385230624, 4546710.899502219, 4547378.125, 4601623.4375, 4619838.865387929, 4619867.1875, 4833779.6875, 4853918.75, 4934659.722362649, 4940478.042086372, 5053471.157077108, 5054368.625252328, 5056560.420554757, 6742078.125, 6934152.1705453945, 6935534.291112853, 6937526.5625, 6939370.385298073, 7074239.952988229, 7142826.555464846, 7148447.6312675895, 7148463.467244404, 7148465.995111362, 7148471.875, 7148764.0625, 7149918.813957622, 7149998.4375, 7150104.146939968, 7150371.807085173, 7150743.75, 7152670.218441345, 7153620.3125, 7154181.855565143, 7154482.956556382, 7154944.202594699, 7156479.6875, 7156782.8125, 7158071.316821844, 7159459.931234486, 7159616.70924599, 7159625.0, 7159739.0625, 7160458.027052037, 7172895.119508337, 7177539.0625, 7202901.5625, 7203492.5797885405, 7207920.3125, 7212075.508671655, 7221374.799281785, 7233089.513720761, 7268652.1596872425, 7275673.713350413, 7275912.320734258, 7277519.3965330655, 7277910.206840791, 7287968.195382568, 7293788.925310066, 7305951.665665938, 7314037.5, 7343368.73147853, 7347764.862918261, 7347900.717178597, 7347948.307707531, 7348540.625, 7350993.75, 7354627.347907249, 7356278.849048148, 7356520.809090628, 7357256.487838868, 7359150.837190085, 7381782.932911381, 7388676.55797744, 7403769.66242491, 7412085.482411231, 7465528.125, 7480648.018210574, 7485114.495129188, 7487639.707974833, 7487972.395914212, 7488331.489222729, 7490903.558574179, 7492854.6875, 7493286.791594194, 7497591.442808658, 7497993.489742781, 7501695.044772089, 7501990.90740238, 7502800.575270419, 7505590.625, 7521946.747952165, 7530896.875, 7537233.827238594, 7541372.780592159, 7544801.511823327, 7548568.976311123, 7548846.732639161, 7555575.4411085695, 7556028.108833381, 7559090.5470698, 7565412.5, 7567764.889817959, 7568348.4375, 7568385.028187323, 7568416.784465245, 7568727.915010314, 7571034.00549596, 7571068.100900329, 7607914.0625, 7631675.0, 7632155.908279529, 7633266.880046463, 7633972.479826512, 7645083.908987559, 7645437.011345626, 7660718.75, 7662041.67709357, 7664958.997795925, 7671460.438826127, 7672807.325831643, 7673323.4375, 7673343.75, 7673550.938774252, 7673849.9657510435, 7673933.053463544, 7674689.978276066, 7676235.696852459, 7678268.999936565, 7683593.75, 7690564.059350532, 7691059.375, 7691076.358444537, 7693877.998048853, 7697499.385325004, 7748768.68440047, 7752449.087418767, 7779137.49702785, 7779145.68829223, 7793563.927906755, 7794082.8125, 7796919.151150464, 7798509.117304439, 7799089.146171931, 7815292.072785281, 7818059.948266917, 7819138.739024588, 7821880.654259697, 7824040.625, 7828259.22585763, 7829321.15544093, 7830277.333933292, 7834452.864441825, 7835813.5966195455, 7839851.5625, 7858790.625, 7862342.094233947, 7862360.688256269, 7862362.5, 7863646.570966072, 7867232.433783263, 7872497.877060103, 7874251.131263768, 7875912.5, 7883342.1875, 7901732.8125, 7909453.125, 7911189.012773448, 7914741.443281059, 7914767.1875, 7915571.917930349, 7915697.54490994, 7916689.0625, 7917792.1875, 7918105.626966827, 7920148.391269869, 7920746.604480106, 7920829.243064113, 7921985.805601628, 7922449.466723856, 7922722.425438599, 7922932.530216051, 7923284.375, 7929161.651683358, 7931359.255261745, 7933975.1739590345, 7964872.498296972, 7966824.68135582, 7982942.1875, 8034434.184444227, 8034443.75, 8042845.235096335, 8066793.75, 8066823.341632484, 8075593.220403549, 8076343.277948045, 8077018.875933485, 8077148.476220226, 8077262.9984264625, 8077442.845674123, 8077629.312562009, 8080089.991274315, 8089836.354906385, 8091219.501128995, 8098528.516228272, 8114360.1504297545, 8114784.585279993, 8117290.397834844, 8127868.863375641, 8135485.9375, 8137318.75, 8147408.701016589, 8149263.1371853035, 8157177.605307059, 8157433.570615082, 8159453.467197067, 8160123.0088625625, 8167981.25, 8169134.236141031, 8172254.6875, 8207425.6442166865, 8221453.035197104, 8225718.75, 8226242.057877695, 8226322.625005592, 8227535.622187893, 8227990.002089008, 8228651.027873815, 8228725.0, 8234655.085342468, 8234675.0, 8235039.015915934, 8235688.517410397, 8239540.235428109, 8240155.122721719, 8240225.484037374, 8240812.378598435, 8242016.265848422, 8257166.874213542, 8292354.5504564615, 8294989.696713381, 8295748.2376555195, 8296446.875, 8296650.0, 8296921.695580018, 8297025.683551523, 8297161.312318331, 8298055.793094756, 8301695.3125, 8302089.0625, 8304412.409666559, 8327832.8125, 8327948.09145759, 8328246.922562916, 8329149.80590384, 8332318.566716866, 8332451.2409118395, 8336127.566291152, 8336200.182211287, 8337278.089782933, 8337418.75, 8338333.909148299, 8339261.964073224, 8339268.75, 8339553.222799597, 8340827.217110776, 8340956.641261332, 8341078.936401495, 8343304.658295839, 8343439.505111194, 8343857.8125, 8352491.558190998, 8353217.643523081, 8355209.194106643, 8356975.99336166, 8357242.58588518, 8357701.164993209, 8451999.561033119, 8452000.0, 8533335.9375, 8534360.9375, 8535086.223249704, 8539504.249731127, 8548479.149021106, 8564760.9375, 8575332.85758544, 8576897.853983806, 8604354.6875, 8606641.244801488, 8618165.183286339, 8618476.730054636, 8623395.713683551, 8641399.592352886, 8641636.359589145, 8642982.067124702, 8643460.855574213, 8644088.49009179, 8645159.387977554, 8645376.5625, 8646131.170765525, 8646208.823777482, 8646464.684849398, 8647359.946597, 8647700.0, 8648159.685496699, 8653400.0, 8707668.75, 8888290.625, 8975728.125, 8981857.21336416, 8991163.160118286, 8994929.6875, 9006291.171575619, 9181900.0, 9193430.722814389, 9194011.345772794, 9219139.0625, 9246379.748577155, 9258313.78509268, 9258595.21282639, 9259049.690609735, 9259068.053156221, 9259095.183720341, 9259736.372053847, 9259820.73466186, 9260568.75, 9260990.47980395, 9262037.147021415, 9262655.88464606, 9263512.733310869, 9263640.625, 9264071.875, 9264121.896273946, 9265182.8125, 9265661.78032927, 9277563.775656143, 9299958.205826234, 9355867.709428238, 9356213.718329277, 9357782.750989322, 9359745.953261545, 9361298.4375, 9362740.02005856, 9363826.132117754, 9363895.32329143, 9369326.470193133, 9423122.679870501, 9423164.122121798, 9425173.4375, 9472301.553155674, 9472313.39738654, 9473270.3125, 9486239.409832463, 9487945.20985894, 9489128.784930428, 9493992.08802879, 9534368.75, 9534375.86405899, 9534734.375, 9537072.055985002, 9567738.463711243, 9571095.3125, 9579612.041666536, 9631446.708670853, 9647558.398760676, 9675809.169613156, 9677998.765407145, 9685906.4455795, 9689038.673498135, 9756809.375, 9761049.502106156, 9761509.375, 9766325.285553535, 9775652.026823903, 9776918.860819235, 9777015.606171835, 9777310.30666076, 9777522.224787144, 9779057.489224555, 9780428.148646599, 9780443.75, 9781874.643041763, 9783008.616778051, 9783451.5625, 9803614.431638928, 9805740.570966268, 9834875.0, 9835581.25, 9836754.360906573, 9836784.375, 9837558.981961673, 9837983.876240868, 9838500.74510899, 9838893.472593043, 9839876.174309818, 9840622.23639361, 9840649.26682833, 9842293.21433711, 9844699.51033611, 9845946.875, 9846492.1875, 9847582.509964153, 9848050.0, 9848117.565379044, 9848293.473988323, 9852151.41038207, 9852233.286803687, 9854912.774207123, 9856652.709156962, 9857518.75, 9858350.209948279, 9863741.710498685, 9876088.537422188, 9876178.125, 9876189.0625, 9876427.500676336, 9876954.6875, 9878990.625, 9880415.510408273, 9880605.670132289, 9929533.77772857, 9931612.14915107, 9933008.97590509, 9954387.865989162, 9955256.25, 9955308.966764215, 9955314.55483339, 9956059.548402086, 9956390.313982096, 9966782.002552578, 9975921.875, 9981337.5, 9994742.841276113, 9997235.115273358, 9997314.595590875, 10000740.11351176, 10001484.483738964, 10017352.99720009, 10018333.306800585, 10026777.887048118, 10041153.076361936, 10042417.104843304, 10044956.2267915, 10048102.36639937, 10050017.1875, 10101324.23446098, 10134732.8125, 10134762.095709061, 10159607.15032977, 11407156.25, 11410464.0625, 11419672.572550049, 11425079.623448709, 19217569.823134102], [40.453472526766376, 38.86226323960311, 61.12952502356603, 12.111307700243643, 21.90207693638239, 16.960468828494875, 45.69161747630563, 20.440617009809642, 55.26593880836489, 38.06472261696866, 5.4603968173315245, 11.36735864089064, 47.30642512978358, 21.439053532822943, 41.71159946008606, 58.53100150750564, 34.00000163283192, 36.07334116820836, 68.59635698029642, 52.13966691850734, 17.929104731150687, 46.32378367378314, 5.037358197380157, 48.7994179810451, 37.58183936681442, 21.40170598328722, 21.46422368548446, 10.481087113212931, 11.662097054007452, 17.77459649829963, 19.602026978928745, 78.86852803507642, 78.22837694794256, 85.1993347716632, 34.87644572236158, 5.6122465383858495, 42.98059965458304, 5.368320166223151, 20.832936150169896, 18.88446629911146, 67.84887644942124, 10.165536518963576, 76.16645833702731, 19.088958433821734, 17.959222443868285, 5.662725449799893, 16.33300858119463, 27.794541386193703, 41.241060066747245, 36.68049955067508, 25.16042029570732, 48.78913506922927, 52.02658485891377, 86.94270122923116, 8.479227050140915, 21.199802479905742, 13.771939231857214, 14.486433016064678, 5.586071614102154, 61.54674077888089, 96.3765967491291, 46.997277704255794, 71.13718098308583, 7.629781437734897, 12.878404748836866, 8.28286051945799, 52.478916071760835, 29.253916805576107, 11.76008253239629, 59.49274607287386, 70.72437570106388, 15.19102136836934, 33.37290710859734, 21.09781433825904, 52.83808062830408, 37.025603398648954, 14.59472496645307, 30.056546684454585, 12.227531488235265, 15.520565214153912, 6.857357467123839, 28.61878834973911, 86.8326407738634, 13.169484716417744, 78.99602537364915, 21.71280601830829, 60.61210248384725, 40.48072112746688, 9.519656254559829, 19.40598619169104, 68.5303504314888, 32.82915912019622, 27.1782523920811, 32.48416507975997, 43.574381355114845, 25.107559135483015, 27.517890195134605, 91.8609287589718, 126.02308348851692, 25.42603428902366, 12.314944619024542, 7.358748277656755, 20.9650318431155, 57.950369438853365, 6.098893676283936, 68.35624815578994, 30.474800152995886, 44.19492285719255, 12.470318469470145, 26.199091650358117, 31.20250099490097, 82.473500445443, 12.626231352991907, 6.005041779753533, 85.10351204731299, 9.540945821328977, 41.53077821353117, 14.866452514032982, 105.65239426773985, 12.932996480918206, 10.483815831106003, 102.33207579008601, 39.30414532692984, 8.529423674019528, 36.73119261714624, 28.275854905766273, 66.6775089755152, 5.846773022626286, 60.3371781419666, 59.543787600336024, 63.16307204111486, 14.034381395922951, 24.171915817665177, 9.58217864918084, 17.705675414749685, 49.30379454224031, 45.228591577634845, 54.08242666036543, 7.416449359204045, 10.235770565552157, 20.096883499498794, 15.880474238440977, 13.119907830689009, 13.871239337298771, 14.880245805683904, 14.652568782018838, 30.59313065868525, 18.972715492476663, 41.74389135162135, 7.857900644907761, 5.034816838152889, 24.972875973981147, 13.698240913995635, 24.374259814011143, 153.09613370021586, 44.724991866100545, 23.232058212971584, 68.7889680740405, 98.1701836339356, 59.303605022433814, 21.60703047104814, 142.82919924876177, 6.036582420674563, 22.812238881329844, 72.57128901809739, 10.44363544300461, 43.54841015671626, 47.04353946301003, 100.42170711301608, 44.81574023983953, 5.627515375247737, 8.838520993382556, 8.163290654294304, 15.988170358228102, 130.17785887195672, 58.1763166084196, 61.11013449237521, 25.058878147404624, 55.03428334289691, 20.420662057063726, 11.026695599709702, 86.48133839639472, 14.930193063844001, 82.53222783645332, 27.482954082767822, 62.13476329351415, 11.818510742581864, 55.75500486316878, 21.223955607999912, 48.30862585899466, 12.159955577015033, 9.072086102860926, 139.85997089060731, 71.0919054150576, 22.000790005380573, 5.115416023628752, 17.827850337516722, 29.876158990034554, 20.306107737433706, 38.15530097458803, 69.36408961264038, 26.807223910034637, 21.752202541843804, 154.10991616419406, 19.119051347717132, 105.39580781901701, 13.163508266289545, 7.454374144850057, 37.71407027399288, 72.82325446967977, 118.02717385381517, 31.75044075577616, 11.050860499420386, 60.87982968198375, 72.03634380220785, 15.107704083450969, 18.30462530691272, 89.5595517737706, 75.81544637112934, 170.48302992021024, 19.176620021814728, 51.39088776413726, 22.06588690213384, 33.98316937049408, 13.23582515079696, 87.4078466214204, 23.66554802697995, 67.44175129963152, 130.8509834112822, 26.363177488949646, 14.797648501140419, 6.894667462387815, 10.663676452121294, 172.59305864985114, 10.842370047333407, 31.983132094455122, 42.146868319397235, 73.38995260092173, 26.762795135153343, 23.738077805710347, 13.403246480138643, 13.564397019474113, 11.188773210336953, 5.851803588872312, 6.354096397601967, 27.94603856198775, 30.479507396539837, 9.711178144813719, 18.863142041308695, 90.82034092599585, 19.039036466269305, 17.21759186798596, 11.614032722091395, 6.505011944147552, 72.1203454503413, 33.12009968406283, 19.91696507748609, 13.680114736205535, 21.298876545750137, 10.066809579349538, 51.3377252108381, 28.774274995930266, 107.97885724880977, 7.553775173981215, 38.96781172595496, 18.136775791950395, 10.990181566983882, 80.74122338406286, 5.928196169370264, 8.727459089925363, 12.19387142670962, 20.348776481146515, 60.926262271853545, 45.97842046069588, 16.710896901492916, 164.45250038266573, 32.76996950667994, 73.54702138115763, 7.022676985240294, 7.76861877390889, 11.979141661709019, 26.33586226278649, 41.58872737047025, 23.582496320400452, 27.20688709201558, 18.07251189055622, 25.12034224754961, 97.41403855926198, 42.14468519602873, 25.4237096509436, 7.313528832053161, 16.592556185140978, 10.481490307574624, 64.0342825038328, 32.807894377186656, 46.28222273936009, 30.618266046987014, 29.90041342420915, 15.125949864368277, 6.242983266448258, 24.080577401717832, 50.29910366924389, 6.981941029737095, 7.170187625405937, 5.811379091509354, 34.90414077513512, 10.47006232388985, 21.142044721629308, 30.572442834330936, 6.098328906387125, 80.41274910988855, 29.95659322899455, 16.69013072303809, 33.91837266319272, 33.13306396429253, 51.09032279890989, 6.02501344653486, 17.020375202283265, 33.60085917603647, 52.18539361014492, 11.813268060736515, 48.00286717090178, 22.12433880579278, 30.228298425236243, 76.63777757294703, 47.3642726932479, 7.7099649118669715, 10.50607817117438, 27.39301243852712, 65.36106678545684, 268.2246626260949, 46.16863540957621, 31.849597351003094, 23.70502697797562, 7.450925945309446, 9.477215848220728, 69.82287893333718, 43.259608518498034, 9.715766576569429, 19.350968709164906, 82.8971792449407, 66.17169998446454, 7.607938196199149, 51.276891436292225, 185.66302712165714, 20.996906251692124, 12.263111342714291, 17.6834611101091, 43.71770647339048, 5.352675048990693, 58.254359190407584, 66.01749228713435, 77.10299829673907, 44.05719698892909, 108.86064814104954, 8.6694978443714, 161.35054760196655, 17.65900695939508, 41.60939542622277, 120.2121098477363, 16.765262707777445, 77.35125849236422, 69.94074219918542, 39.304143113433774, 20.579196978229362, 59.837168257292255, 51.13573598177483, 38.257392758746505, 9.728018465569612, 5.553926292801612, 33.37704385988, 25.952391783894406, 13.747584234669322, 22.95035188115382, 67.34528007906646, 132.96074023554806, 85.69606171661327, 5.462680381773095, 54.60377102494621, 19.54995474865044, 156.54440536814042, 16.68750428806539, 12.054892248644752, 39.766228133139464, 54.40433486921796, 18.114511180035432, 30.70130643560032, 8.867406342362017, 7.012733572439325, 12.590730438767764, 6.255606079621959, 30.089941767962763, 9.382330769238763, 50.416252901399744, 88.08604050274396, 46.39483171411968, 93.28002891440859, 11.71778065247283, 78.50913289043976, 31.6385077507288, 26.70153932384006, 122.38111066675943, 19.718320686125214, 56.39536240627385, 88.88451271083933, 6.649574546273669, 118.5293951150753, 13.441628066755094, 25.622850409448464, 133.99218584253455, 40.107743878367216, 62.19263823912269, 15.743328469046158, 12.722270988671408, 58.04197992854266, 184.39175346915204, 32.6635721421549, 186.7212846362291, 12.257579566784703, 11.305458064240902, 5.164923320010713, 7.3899690026401155, 11.722315962945743, 90.5429296219454, 11.164870215339754, 33.44002441249418, 11.796750669324975, 5.875987265165515, 31.22897750329509, 66.86149882742674, 42.963682082879764, 46.89257290653713, 28.91029383812464, 23.4168889010511, 63.59316529294085, 22.63085872392242, 21.505487491175035, 38.74885524957955, 51.25039316779714, 13.643065644255055, 25.64842403102803, 5.761652972797761, 13.35601102395653, 107.37933652070373, 64.40704022281423, 37.662728291112536, 28.31352873787504, 51.75326584443931, 5.635297055835058, 40.2362107420467, 25.843336653644712, 9.767465135546878, 47.84219123101032, 7.459454030224771, 117.95403985303362, 26.912825941590874, 26.046323213675084, 13.257884572560988, 46.751809700842294, 90.58753344489435, 12.997978692249383, 41.57518671953254, 38.1372259602847, 9.236353188215142, 106.1821084435633, 10.306957879827136, 9.051372105361187, 9.015301333974678, 63.93626716965889, 82.30869324498931, 22.460091033188412, 17.22148892151015, 7.667181847235986, 6.702963118749465, 18.873330126856096, 37.27180357499733, 38.633272787083634, 89.39882642385058, 77.99939187846851, 36.52051376324458, 41.491021310768545, 6.785411381443954, 26.231415901185855, 11.999512434547963, 9.137992112501, 27.597775193997986, 8.24334545923908, 55.99078262149371, 38.427077318247086, 59.51868492955869, 24.67108982219905, 107.11807634245959, 22.504110560612094, 46.35280040788884, 92.46947709283359, 93.9958117337929, 79.40133122088442, 14.702869466084598, 8.043703580786902])
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)