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
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"
#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 = 36529 #test discharge for which the notebook will definitely work
shot_no = 43743
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))
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 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=[]
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))
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')
i=i+1
t3pa_cls.close
return T_first, E_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)
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.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.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)
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].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
#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'
#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'
#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)
#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 = 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);
([6702123.4375, 6703312.5, 6721140.625, 6776465.625, 6815854.6875, 6845760.9375, 6845815.625, 6945081.25, 7072123.4375, 7275979.6875, 7290945.3125, 7576170.3125, 7581706.25, 7736068.75, 7888759.375, 7966967.1875, 8002228.125, 8089846.875, 8110712.5, 8145512.5, 8187796.875, 8216154.6875, 8260179.6875, 8266659.375, 8288673.4375, 8298578.125, 8299657.8125, 8300746.875, 8313471.875, 8355889.0625, 8356275.0, 8356560.9375, 8356860.9375, 8358754.6875, 8422942.1875, 8453071.875, 8498756.25, 8512720.3125, 8562068.75, 8567334.375, 8573739.0625, 8591664.0625, 8591668.75, 8599557.8125, 8600909.375, 8607660.9375, 8636132.8125, 8659342.1875, 8662582.8125, 8669785.9375, 8669809.375, 8670932.8125, 8676731.25, 8696884.375, 8697204.6875, 8697560.9375, 8698375.0, 8698443.75, 8736804.6875, 8739162.5, 8739657.8125, 8744940.625, 8750167.1875, 8793454.6875, 8793885.9375, 8809121.875, 8850320.3125, 8855114.0625, 8855610.9375, 8883209.375, 8884910.9375, 8885432.8125, 8897084.375, 8910134.375, 8910150.0, 8910321.875, 8979895.3125, 8980232.8125, 8984356.25, 8990906.25, 8990909.375, 9036895.3125, 9042481.25, 9046239.0625, 9123150.0, 9133493.75, 9136284.375, 9178212.5, 9249051.5625, 9250475.0, 9292623.4375, 9347743.75, 9377792.1875, 9381315.625, 9389564.0625, 9390085.9375, 9395371.875, 9407093.75, 9417732.8125, 9424987.5, 9427201.5625, 9427257.8125, 9427804.6875, 9430576.5625, 9431150.0, 9431492.1875, 9432425.0, 9432546.875, 9433062.5, 9433064.0625, 9433142.1875, 9433404.6875, 9434214.0625, 9435809.375, 9438412.5, 9442193.75, 9457021.875, 9470207.8125, 9471731.25, 9472045.3125, 9473762.5, 9476767.1875, 9486106.25, 9488057.8125, 9512159.375, 9513307.8125, 9521117.1875, 9526429.6875, 9526526.5625, 9553079.6875, 9560964.0625, 9560964.0625, 9569885.9375, 9574856.25, 9583495.3125, 9585025.0, 9585050.0, 9594242.1875, 9615978.125, 9616429.6875, 9617479.6875, 9618437.5, 9618610.9375, 9618657.8125, 9620032.8125, 9621598.4375, 9624496.875, 9633740.625, 9636121.875, 9644181.25, 9651896.875, 9652932.8125, 9654609.375, 9655625.0, 9665221.875, 9665429.6875, 9673275.0, 9673343.75, 9673634.375, 9676539.0625, 9677407.8125, 9678975.0, 9684787.5, 9691523.4375, 9692401.5625, 9696654.6875, 9698751.5625, 9700667.1875, 9701593.75, 9713009.375, 9714607.8125, 9716362.5, 9718379.6875, 9718901.5625, 9719248.4375, 9720378.125, 9720714.0625, 9720735.9375, 9720835.9375, 9723914.0625, 9725431.25, 9727373.4375, 9727379.6875, 9728337.5, 9730817.1875, 9731107.8125, 9731323.4375, 9732225.0, 9732359.375, 9733107.8125, 9733589.0625, 9733885.9375, 9735789.0625, 9737425.0, 9737592.1875, 9738187.5, 9738501.5625, 9739301.5625, 9741012.5, 9741015.625, 9741156.25, 9741626.5625, 9756407.8125, 9773557.8125, 9775035.9375, 9777684.375, 9796612.5, 9797867.1875, 9798128.125, 9800064.0625, 9805659.375, 9807931.25, 9812404.6875, 9813457.8125, 9815460.9375, 9815468.75, 9816590.625, 9816865.625, 9817306.25, 9818596.875, 9821534.375, 9823117.1875, 9825542.1875, 9826079.6875, 9827428.125, 9830915.625, 9833496.875, 9835735.9375, 9835792.1875, 9839557.8125, 9842139.0625, 9842629.6875, 9843314.0625, 9852282.8125, 9862553.125, 9873203.125, 9879837.5, 9919790.625, 9919904.6875, 9919914.0625, 9920217.1875, 9921204.6875, 9921228.125, 9922320.3125, 9922623.4375, 9922690.625, 9922692.1875, 9923114.0625, 9923373.4375, 9923714.0625, 9928764.0625, 9935193.75, 9935264.0625, 9935603.125, 9939701.5625, 9940564.0625, 9944618.75, 9944859.375, 9974039.0625, 9978823.4375, 9979114.0625, 9980585.9375, 9981982.8125, 9982020.3125, 9988700.0, 9990814.0625, 9991837.5, 9992037.5, 10033653.125, 10043640.625, 10050756.25, 10050818.75, 10054059.375, 10054098.4375, 10066900.0, 10120782.8125, 10122526.5625, 10123228.125, 10127959.375, 10160023.4375, 10160643.75, 10160896.875, 10161495.3125, 10161564.0625, 10184528.125, 10187106.25, 10206746.875, 10209068.75, 10215167.1875, 10216157.8125, 10221635.9375, 10243903.125, 10254356.25, 10254357.8125, 10265403.125, 10272709.375, 10283431.25, 10284257.8125, 10285239.0625, 10289125.0, 10323567.1875, 10326410.9375, 10343676.5625, 10343873.4375, 10344646.875, 10374437.5, 10375234.375, 10378707.8125, 10381079.6875, 10381100.0, 10390162.5, 10424528.125, 10424964.0625, 10425918.75, 10427123.4375, 10466509.375, 10481609.375, 10494698.4375, 10514598.4375, 10531073.4375, 10539109.375, 10545609.375, 10560079.6875, 10562231.25, 10564315.625, 10566306.25, 10566335.9375, 10568329.6875, 10584418.75, 10587639.0625, 10593151.5625, 10593709.375, 10596240.625, 10596475.0, 10598351.5625, 10598439.0625, 10599190.625, 10600045.3125, 10600643.75, 10631750.0, 10638537.5, 10660300.0, 10660748.4375, 10674496.875, 10685310.9375, 10695751.5625, 10701673.4375, 10713392.1875, 10714715.625, 10754167.1875, 10758400.0, 10765392.1875, 10765464.0625, 10768276.5625, 10814621.875, 10826537.5, 10863096.875, 10878003.125, 10883165.625, 10924007.8125, 10942665.625, 10952223.4375, 10955585.9375, 10969357.8125, 10970759.375, 10981768.75, 10998167.1875, 10998215.625, 10999409.375, 11024659.375, 11028679.6875, 11084995.3125, 11145645.3125, 11145985.9375, 11158785.9375, 11159785.9375, 11169228.125, 11202025.0, 11204964.0625, 11207717.1875, 11249953.125, 11252271.875, 11276290.625, 11278484.375, 11288339.0625, 11456865.625, 11559310.9375, 11602498.4375, 11618676.5625, 11640900.0, 11725303.125, 11768067.1875, 11786321.875, 11861989.0625, 11862504.6875, 11898459.375, 11913976.5625, 11970690.625, 12029381.25, 12106231.25, 12149460.9375, 12158957.8125, 12169448.4375, 12320590.625, 12534482.8125, 12725429.6875, 12733895.3125, 12810037.5, 12833265.625, 12836156.25, 12866971.875, 12866975.0, 12940668.75, 12969271.875, 12987954.6875, 13140137.5, 13147146.875, 13381693.75, 13405731.25, 13500865.625, 13514595.3125, 13541206.25, 13598979.6875, 13656506.25, 13659232.8125, 13702051.5625, 13728529.6875, 13748550.0, 13824970.3125, 13842996.875, 13870084.375, 13902278.125, 13908223.4375, 13917598.4375, 13922098.4375, 13922167.1875, 13943046.875, 13945935.9375, 13966034.375, 13975685.9375, 13986309.375, 13993400.0, 13994212.5, 13996507.8125, 14016793.75, 14027428.125, 14034771.875, 14035648.4375, 14045773.4375, 14056870.3125, 14061512.5, 14073570.3125, 14073692.1875, 14075189.0625, 14084820.3125, 14091435.9375, 14094520.3125, 14096676.5625, 14104018.75, 14104307.8125, 14105376.5625, 14110698.4375, 14116717.1875, 14116731.25, 14119142.1875, 14119429.6875, 14137129.6875, 14145346.875, 14147781.25, 14154300.0, 14159420.3125, 14162776.5625, 14164873.4375, 14169210.9375, 14177560.9375, 14182046.875, 14185373.4375, 14186075.0, 14194457.8125, 14194560.9375, 14198235.9375, 14205482.8125, 14209867.1875, 14213710.9375], [24.68851448402208, 84.84866914726011, 35.13689703035241, 60.634162199284724, 38.03230104726693, 26.787350778103303, 6.503262167951173, 17.47184563504383, 13.134434998318289, 28.937391258480687, 76.4384874160239, 37.45599599287843, 53.02388344645122, 9.590546522215952, 31.05370885801944, 82.20359771265679, 13.829808975799823, 10.721861936018636, 8.717052669710851, 183.64691316505048, 93.17166473580124, 204.9817418995467, 12.577212095778115, 55.306983960410065, 10.623307562956692, 9.556324633641085, 7.389458389854248, 15.307356831521856, 23.974130742342503, 104.67896263212988, 21.730911291101787, 62.76634106066996, 44.259496526097294, 67.82490192042684, 158.51961660633876, 111.75481572783528, 31.99188489935038, 28.344291453508397, 10.738964625436672, 29.950214674344707, 24.61002714356064, 30.833615704568885, 6.197938743932924, 8.916726234526168, 31.82120526280779, 107.94578553982664, 51.74236962418874, 24.93122930171541, 54.51337055987561, 38.419490883911394, 54.21869282414771, 274.11595131589985, 94.09549655005355, 62.65703083682191, 65.83958591833233, 8.28084348154651, 101.47058422806292, 6.0395245918351375, 68.78183026398904, 19.122723207618947, 6.507582466641071, 124.91808143488964, 10.664844514942967, 15.651568285068167, 34.33495058669123, 22.432785847286706, 13.609592071828457, 47.742781654753635, 94.33042465538337, 68.05314829927646, 7.00027913364774, 37.81084824280081, 103.30842681559878, 39.40610006655236, 19.860974547058316, 19.779220477129638, 19.533592649504904, 138.82190467536242, 16.100652508314255, 18.941946554940603, 51.01624081881794, 6.835311351493932, 111.92763628452997, 47.16359778097485, 49.50416309664809, 54.43495518209085, 175.56924953322488, 97.70517569643734, 22.151514309839, 9.378298919420896, 19.861123509035256, 80.92446680589684, 14.44172451445488, 13.803128579037024, 11.93753895336613, 81.53178394162732, 6.3854659160080045, 10.285232257173075, 164.79629201694476, 98.48871899037796, 28.375914759505854, 5.128672643161582, 33.23835751649679, 53.45502439630284, 6.922254184389764, 30.27593672807693, 96.02605735521988, 55.4882520573175, 61.657339873248254, 25.461181368723746, 46.43991784512598, 75.38222328307242, 6.654093475469354, 8.226777265525289, 6.354532213062286, 84.62513352032613, 11.242860867452213, 59.85955792166261, 15.523989392247568, 125.26638417118383, 6.913313995653163, 22.38588677690682, 30.476819802562346, 52.789971018268034, 20.122454950796694, 101.42455328984254, 60.93152594915452, 17.539185598975042, 55.73032827828026, 171.49567087620653, 13.146773098387857, 56.957185137174655, 18.280474058320525, 19.795308822912386, 36.4411296021292, 18.819104722263173, 33.94873697594437, 112.5028614252474, 15.863121801584132, 13.54240281075748, 13.269475927128262, 113.22783336982731, 19.53192465467992, 20.041972780413182, 82.43475172092984, 11.708467889687158, 12.982699581012639, 26.36628682005442, 107.62800784899244, 68.65447015015137, 90.12608890425736, 13.158017671298367, 64.94444367149715, 70.31071275675669, 38.78356057304381, 6.151768414043996, 11.474734389631202, 105.26676587736264, 160.3705489105756, 91.20211135978425, 36.17433270746429, 18.312167093725236, 14.556980307248997, 19.6004470780773, 58.614323036343066, 38.99313965365905, 20.079400261758735, 19.306721400197144, 26.080264071180395, 56.37557568019878, 72.76918181012341, 132.5382626263126, 185.67544830646, 137.43732309785582, 91.68693361611139, 176.8748584110389, 8.877478772675675, 11.697323719908484, 308.61218683587236, 16.6074314058715, 6.162910962266525, 90.93785215866647, 5.425296858424457, 5.677434338030336, 54.793596503153175, 11.201030637387793, 53.195099437217394, 31.679315399468223, 35.16046039711478, 60.8867109442064, 61.59440629214997, 6.081332537762744, 322.6244257046246, 49.12322297037729, 12.119598235720943, 100.51901730640054, 79.52025874707566, 46.069454393436736, 18.969628790367146, 14.459926564088475, 29.617683119704754, 50.58417777205308, 6.963207305535152, 76.75874225316994, 106.72025105888139, 31.660893648041128, 93.76163503556006, 88.52775880855664, 147.7163167086155, 93.75730800680108, 33.46066677179081, 13.140171009491104, 11.372517896496607, 50.20676436521701, 51.286560973224304, 65.65615704496592, 7.560001717808797, 8.70676581594313, 38.831129752508254, 17.825661050267694, 8.554760753667976, 109.52783302969843, 31.67080289616315, 73.23649171389394, 95.42857207773866, 110.26264995069585, 60.226829478508805, 9.735303895007286, 6.577589136585937, 109.45844151763222, 38.97158685350341, 47.69084229021271, 73.98122864549433, 15.963447384224676, 15.363992976386298, 22.91977063824237, 77.19697514801452, 6.566437843630164, 33.4169467932895, 39.63500079498314, 84.20471447110658, 6.757517013063974, 10.22496259148416, 8.167255807146779, 6.115875031099629, 107.10277620793514, 18.343165833021327, 8.014615024348752, 9.09254285916369, 11.150134245199773, 38.47974501226385, 34.69034290693728, 5.051315728273502, 35.29804367636061, 108.91177594183407, 51.53988621900457, 16.81513366904171, 62.51635514494844, 16.051421901326155, 34.17604159758342, 54.64500396559899, 14.102769971654519, 129.92295317936734, 50.09981084441696, 102.51557761707684, 77.59927032697514, 214.32718217194963, 66.12724866518285, 37.27600918635832, 82.72807372999249, 42.660946096154625, 60.30538346001821, 79.58676052787081, 5.818686894486069, 197.72749160832012, 6.119813342237784, 5.657458976101975, 23.099055689203276, 98.49360877699125, 21.64160236844155, 9.720451206764404, 124.43413247930314, 36.36900714591521, 5.062587679347528, 42.972450638509, 20.116277797728053, 89.4176238696004, 73.97953738378949, 33.0634875811484, 16.433873824437008, 11.162574757513474, 58.957335459359115, 14.784794127167558, 28.28006957162479, 25.02421193268264, 49.83760895752465, 48.610687743934804, 117.33757801046318, 91.93156984516663, 19.162649881354362, 42.79297367216226, 11.543127290711691, 5.11758953980814, 28.70813049037398, 71.76715296339776, 41.2766359147206, 7.257987257490517, 57.529516019245655, 78.48022305635443, 23.084074502183565, 6.8226514200664, 8.141782058302402, 101.25610057571582, 180.47531734139596, 41.60465924928087, 82.93961262980942, 37.57954290400939, 144.2701563992095, 9.401679391902485, 104.91873671779895, 11.156066521892447, 12.249304374339678, 11.157800209008926, 54.82641927094286, 166.4475600757492, 31.358578763641738, 78.45222170867855, 19.839963637788074, 17.708997422991775, 160.89519157121813, 20.95559943299614, 23.286600324830186, 100.311408901508, 48.69308109202466, 274.61102947877146, 5.587996665477519, 149.36287009233743, 36.80411461882002, 54.60266825794204, 92.76110972723536, 28.70969725935893, 54.213658805425275, 16.225399758136074, 65.27488157163964, 96.110977215623, 18.615233123831967, 74.6172585605943, 64.26202227210888, 82.82584159810195, 66.21316287772835, 21.61274400550876, 41.16023985389632, 5.155621063688611, 61.25222028172978, 146.01578879360244, 234.25441792602754, 86.14076055769641, 15.91180579779668, 25.688077932912616, 52.049967681552644, 12.733284254540047, 61.81219852200222, 16.279228113268864, 50.73027856834425, 9.698175549196238, 100.93683403469313, 47.16709038384474, 10.787839251319271, 10.161224930480547, 56.394990930302434, 49.061217382133776, 38.63306201243808, 61.653625830100516, 73.43816981904277, 50.7846030765006, 61.585730221705184, 13.36541205907069, 30.7107429992194, 77.11056740007713, 31.903789738438334, 20.9989038359829, 74.85150527291277, 8.396371589363014, 21.689763484412165, 65.1999751696978, 8.646255758640248, 106.0102889088324, 42.7908467567538, 30.4389682508123, 60.299698514256356, 9.22220202974034, 86.21789604483597, 6.996480957953043, 128.8517984091344, 36.632826074538364, 58.47744025714698, 94.42548019948303, 18.230769341162507, 26.326418707190165, 163.1903557974341, 51.56270308009573, 20.255292431712178, 47.22897770522656, 19.010981866214927, 61.981251463788496, 6.755491735669235, 49.21633833876453, 97.9172341757574, 17.989277534359992, 49.04039101861015, 37.29560618849519, 43.415702786737015, 80.18507271439721, 34.74934215245216, 63.679632093637665, 66.6619862370784, 98.92621464576843, 30.11814090807484, 24.22935022154222, 29.72567611853882, 33.79322259301835, 73.86395831962017, 59.841389349842345, 27.79183824356125, 62.42750057823055, 87.38342567866985, 42.01442889515817, 149.63350788651198, 65.05554269995609, 24.968930030719836, 6.416441354252671, 18.600404485036755, 55.509773437657486, 11.3560780190508, 27.00056525680339, 5.461332816389943, 18.573434255831017, 58.34347530314864, 45.86580338106704, 42.44113263256609, 55.385569494604034, 68.80199413144635, 53.094172849374715, 26.94834136269305, 71.79135400500202, 101.01562422182272, 76.62769917611053, 36.779326145626435, 28.730494691541775, 5.757127083593235, 106.61751922145537, 6.4672717670315, 106.58586751526616, 20.920954502456773, 58.444109488484955, 28.367195570887354, 12.10013549446281, 12.221779282583203, 8.766101764625752, 22.40821640730958, 14.744540218593986, 77.80567748884391, 13.78552642292732, 10.526720046642962, 12.451018220930385, 5.712145990218603, 13.559205872564366, 5.839069698361007, 12.290189839981341, 9.776477537110647, 18.20450382533095, 6.280404348641033, 7.297025496329114, 46.0971872330129, 78.64650272425519, 11.13331287386952, 46.686792921666765, 33.785750988039034, 15.085413545685368, 53.6417349770649, 64.01506275084859, 63.86735843687562, 8.135003304989235, 56.78206340318694])
caption, xmean,count, xle, Etot = energy_spectrum(E_tot)
hist_file(E_hist, xmean, count, caption);
([6702123.4375, 6703312.5, 6721140.625, 6776465.625, 6815854.6875, 6845760.9375, 6845815.625, 6945081.25, 7072123.4375, 7275979.6875, 7290945.3125, 7576170.3125, 7581706.25, 7736068.75, 7888759.375, 7966967.1875, 8002228.125, 8089846.875, 8110712.5, 8145512.5, 8187796.875, 8216154.6875, 8260179.6875, 8266659.375, 8288673.4375, 8298578.125, 8299657.8125, 8300746.875, 8313471.875, 8355889.0625, 8356275.0, 8356560.9375, 8356860.9375, 8358754.6875, 8422942.1875, 8453071.875, 8498756.25, 8512720.3125, 8562068.75, 8567334.375, 8573739.0625, 8591664.0625, 8591668.75, 8599557.8125, 8600909.375, 8607660.9375, 8636132.8125, 8659342.1875, 8662582.8125, 8669785.9375, 8669809.375, 8670932.8125, 8676731.25, 8696884.375, 8697204.6875, 8697560.9375, 8698375.0, 8698443.75, 8736804.6875, 8739162.5, 8739657.8125, 8744940.625, 8750167.1875, 8793454.6875, 8793885.9375, 8809121.875, 8850320.3125, 8855114.0625, 8855610.9375, 8883209.375, 8884910.9375, 8885432.8125, 8897084.375, 8910134.375, 8910150.0, 8910321.875, 8979895.3125, 8980232.8125, 8984356.25, 8990906.25, 8990909.375, 9036895.3125, 9042481.25, 9046239.0625, 9123150.0, 9133493.75, 9136284.375, 9178212.5, 9249051.5625, 9250475.0, 9292623.4375, 9347743.75, 9377792.1875, 9381315.625, 9389564.0625, 9390085.9375, 9395371.875, 9407093.75, 9417732.8125, 9424987.5, 9427201.5625, 9427257.8125, 9427804.6875, 9430576.5625, 9431150.0, 9431492.1875, 9432425.0, 9432546.875, 9433062.5, 9433064.0625, 9433142.1875, 9433404.6875, 9434214.0625, 9435809.375, 9438412.5, 9442193.75, 9457021.875, 9470207.8125, 9471731.25, 9472045.3125, 9473762.5, 9476767.1875, 9486106.25, 9488057.8125, 9512159.375, 9513307.8125, 9521117.1875, 9526429.6875, 9526526.5625, 9553079.6875, 9560964.0625, 9560964.0625, 9569885.9375, 9574856.25, 9583495.3125, 9585025.0, 9585050.0, 9594242.1875, 9615978.125, 9616429.6875, 9617479.6875, 9618437.5, 9618610.9375, 9618657.8125, 9620032.8125, 9621598.4375, 9624496.875, 9633740.625, 9636121.875, 9644181.25, 9651896.875, 9652932.8125, 9654609.375, 9655625.0, 9665221.875, 9665429.6875, 9673275.0, 9673343.75, 9673634.375, 9676539.0625, 9677407.8125, 9678975.0, 9684787.5, 9691523.4375, 9692401.5625, 9696654.6875, 9698751.5625, 9700667.1875, 9701593.75, 9713009.375, 9714607.8125, 9716362.5, 9718379.6875, 9718901.5625, 9719248.4375, 9720378.125, 9720714.0625, 9720735.9375, 9720835.9375, 9723914.0625, 9725431.25, 9727373.4375, 9727379.6875, 9728337.5, 9730817.1875, 9731107.8125, 9731323.4375, 9732225.0, 9732359.375, 9733107.8125, 9733589.0625, 9733885.9375, 9735789.0625, 9737425.0, 9737592.1875, 9738187.5, 9738501.5625, 9739301.5625, 9741012.5, 9741015.625, 9741156.25, 9741626.5625, 9756407.8125, 9773557.8125, 9775035.9375, 9777684.375, 9796612.5, 9797867.1875, 9798128.125, 9800064.0625, 9805659.375, 9807931.25, 9812404.6875, 9813457.8125, 9815460.9375, 9815468.75, 9816590.625, 9816865.625, 9817306.25, 9818596.875, 9821534.375, 9823117.1875, 9825542.1875, 9826079.6875, 9827428.125, 9830915.625, 9833496.875, 9835735.9375, 9835792.1875, 9839557.8125, 9842139.0625, 9842629.6875, 9843314.0625, 9852282.8125, 9862553.125, 9873203.125, 9879837.5, 9919790.625, 9919904.6875, 9919914.0625, 9920217.1875, 9921204.6875, 9921228.125, 9922320.3125, 9922623.4375, 9922690.625, 9922692.1875, 9923114.0625, 9923373.4375, 9923714.0625, 9928764.0625, 9935193.75, 9935264.0625, 9935603.125, 9939701.5625, 9940564.0625, 9944618.75, 9944859.375, 9974039.0625, 9978823.4375, 9979114.0625, 9980585.9375, 9981982.8125, 9982020.3125, 9988700.0, 9990814.0625, 9991837.5, 9992037.5, 10033653.125, 10043640.625, 10050756.25, 10050818.75, 10054059.375, 10054098.4375, 10066900.0, 10120782.8125, 10122526.5625, 10123228.125, 10127959.375, 10160023.4375, 10160643.75, 10160896.875, 10161495.3125, 10161564.0625, 10184528.125, 10187106.25, 10206746.875, 10209068.75, 10215167.1875, 10216157.8125, 10221635.9375, 10243903.125, 10254356.25, 10254357.8125, 10265403.125, 10272709.375, 10283431.25, 10284257.8125, 10285239.0625, 10289125.0, 10323567.1875, 10326410.9375, 10343676.5625, 10343873.4375, 10344646.875, 10374437.5, 10375234.375, 10378707.8125, 10381079.6875, 10381100.0, 10390162.5, 10424528.125, 10424964.0625, 10425918.75, 10427123.4375, 10466509.375, 10481609.375, 10494698.4375, 10514598.4375, 10531073.4375, 10539109.375, 10545609.375, 10560079.6875, 10562231.25, 10564315.625, 10566306.25, 10566335.9375, 10568329.6875, 10584418.75, 10587639.0625, 10593151.5625, 10593709.375, 10596240.625, 10596475.0, 10598351.5625, 10598439.0625, 10599190.625, 10600045.3125, 10600643.75, 10631750.0, 10638537.5, 10660300.0, 10660748.4375, 10674496.875, 10685310.9375, 10695751.5625, 10701673.4375, 10713392.1875, 10714715.625, 10754167.1875, 10758400.0, 10765392.1875, 10765464.0625, 10768276.5625, 10814621.875, 10826537.5, 10863096.875, 10878003.125, 10883165.625, 10924007.8125, 10942665.625, 10952223.4375, 10955585.9375, 10969357.8125, 10970759.375, 10981768.75, 10998167.1875, 10998215.625, 10999409.375, 11024659.375, 11028679.6875, 11084995.3125, 11145645.3125, 11145985.9375, 11158785.9375, 11159785.9375, 11169228.125, 11202025.0, 11204964.0625, 11207717.1875, 11249953.125, 11252271.875, 11276290.625, 11278484.375, 11288339.0625, 11456865.625, 11559310.9375, 11602498.4375, 11618676.5625, 11640900.0, 11725303.125, 11768067.1875, 11786321.875, 11861989.0625, 11862504.6875, 11898459.375, 11913976.5625, 11970690.625, 12029381.25, 12106231.25, 12149460.9375, 12158957.8125, 12169448.4375, 12320590.625, 12534482.8125, 12725429.6875, 12733895.3125, 12810037.5, 12833265.625, 12836156.25, 12866971.875, 12866975.0, 12940668.75, 12969271.875, 12987954.6875, 13140137.5, 13147146.875, 13381693.75, 13405731.25, 13500865.625, 13514595.3125, 13541206.25, 13598979.6875, 13656506.25, 13659232.8125, 13702051.5625, 13728529.6875, 13748550.0, 13824970.3125, 13842996.875, 13870084.375, 13902278.125, 13908223.4375, 13917598.4375, 13922098.4375, 13922167.1875, 13943046.875, 13945935.9375, 13966034.375, 13975685.9375, 13986309.375, 13993400.0, 13994212.5, 13996507.8125, 14016793.75, 14027428.125, 14034771.875, 14035648.4375, 14045773.4375, 14056870.3125, 14061512.5, 14073570.3125, 14073692.1875, 14075189.0625, 14084820.3125, 14091435.9375, 14094520.3125, 14096676.5625, 14104018.75, 14104307.8125, 14105376.5625, 14110698.4375, 14116717.1875, 14116731.25, 14119142.1875, 14119429.6875, 14137129.6875, 14145346.875, 14147781.25, 14154300.0, 14159420.3125, 14162776.5625, 14164873.4375, 14169210.9375, 14177560.9375, 14182046.875, 14185373.4375, 14186075.0, 14194457.8125, 14194560.9375, 14198235.9375, 14205482.8125, 14209867.1875, 14213710.9375], [24.68851448402208, 84.84866914726011, 35.13689703035241, 60.634162199284724, 38.03230104726693, 26.787350778103303, 6.503262167951173, 17.47184563504383, 13.134434998318289, 28.937391258480687, 76.4384874160239, 37.45599599287843, 53.02388344645122, 9.590546522215952, 31.05370885801944, 82.20359771265679, 13.829808975799823, 10.721861936018636, 8.717052669710851, 183.64691316505048, 93.17166473580124, 204.9817418995467, 12.577212095778115, 55.306983960410065, 10.623307562956692, 9.556324633641085, 7.389458389854248, 15.307356831521856, 23.974130742342503, 104.67896263212988, 21.730911291101787, 62.76634106066996, 44.259496526097294, 67.82490192042684, 158.51961660633876, 111.75481572783528, 31.99188489935038, 28.344291453508397, 10.738964625436672, 29.950214674344707, 24.61002714356064, 30.833615704568885, 6.197938743932924, 8.916726234526168, 31.82120526280779, 107.94578553982664, 51.74236962418874, 24.93122930171541, 54.51337055987561, 38.419490883911394, 54.21869282414771, 274.11595131589985, 94.09549655005355, 62.65703083682191, 65.83958591833233, 8.28084348154651, 101.47058422806292, 6.0395245918351375, 68.78183026398904, 19.122723207618947, 6.507582466641071, 124.91808143488964, 10.664844514942967, 15.651568285068167, 34.33495058669123, 22.432785847286706, 13.609592071828457, 47.742781654753635, 94.33042465538337, 68.05314829927646, 7.00027913364774, 37.81084824280081, 103.30842681559878, 39.40610006655236, 19.860974547058316, 19.779220477129638, 19.533592649504904, 138.82190467536242, 16.100652508314255, 18.941946554940603, 51.01624081881794, 6.835311351493932, 111.92763628452997, 47.16359778097485, 49.50416309664809, 54.43495518209085, 175.56924953322488, 97.70517569643734, 22.151514309839, 9.378298919420896, 19.861123509035256, 80.92446680589684, 14.44172451445488, 13.803128579037024, 11.93753895336613, 81.53178394162732, 6.3854659160080045, 10.285232257173075, 164.79629201694476, 98.48871899037796, 28.375914759505854, 5.128672643161582, 33.23835751649679, 53.45502439630284, 6.922254184389764, 30.27593672807693, 96.02605735521988, 55.4882520573175, 61.657339873248254, 25.461181368723746, 46.43991784512598, 75.38222328307242, 6.654093475469354, 8.226777265525289, 6.354532213062286, 84.62513352032613, 11.242860867452213, 59.85955792166261, 15.523989392247568, 125.26638417118383, 6.913313995653163, 22.38588677690682, 30.476819802562346, 52.789971018268034, 20.122454950796694, 101.42455328984254, 60.93152594915452, 17.539185598975042, 55.73032827828026, 171.49567087620653, 13.146773098387857, 56.957185137174655, 18.280474058320525, 19.795308822912386, 36.4411296021292, 18.819104722263173, 33.94873697594437, 112.5028614252474, 15.863121801584132, 13.54240281075748, 13.269475927128262, 113.22783336982731, 19.53192465467992, 20.041972780413182, 82.43475172092984, 11.708467889687158, 12.982699581012639, 26.36628682005442, 107.62800784899244, 68.65447015015137, 90.12608890425736, 13.158017671298367, 64.94444367149715, 70.31071275675669, 38.78356057304381, 6.151768414043996, 11.474734389631202, 105.26676587736264, 160.3705489105756, 91.20211135978425, 36.17433270746429, 18.312167093725236, 14.556980307248997, 19.6004470780773, 58.614323036343066, 38.99313965365905, 20.079400261758735, 19.306721400197144, 26.080264071180395, 56.37557568019878, 72.76918181012341, 132.5382626263126, 185.67544830646, 137.43732309785582, 91.68693361611139, 176.8748584110389, 8.877478772675675, 11.697323719908484, 308.61218683587236, 16.6074314058715, 6.162910962266525, 90.93785215866647, 5.425296858424457, 5.677434338030336, 54.793596503153175, 11.201030637387793, 53.195099437217394, 31.679315399468223, 35.16046039711478, 60.8867109442064, 61.59440629214997, 6.081332537762744, 322.6244257046246, 49.12322297037729, 12.119598235720943, 100.51901730640054, 79.52025874707566, 46.069454393436736, 18.969628790367146, 14.459926564088475, 29.617683119704754, 50.58417777205308, 6.963207305535152, 76.75874225316994, 106.72025105888139, 31.660893648041128, 93.76163503556006, 88.52775880855664, 147.7163167086155, 93.75730800680108, 33.46066677179081, 13.140171009491104, 11.372517896496607, 50.20676436521701, 51.286560973224304, 65.65615704496592, 7.560001717808797, 8.70676581594313, 38.831129752508254, 17.825661050267694, 8.554760753667976, 109.52783302969843, 31.67080289616315, 73.23649171389394, 95.42857207773866, 110.26264995069585, 60.226829478508805, 9.735303895007286, 6.577589136585937, 109.45844151763222, 38.97158685350341, 47.69084229021271, 73.98122864549433, 15.963447384224676, 15.363992976386298, 22.91977063824237, 77.19697514801452, 6.566437843630164, 33.4169467932895, 39.63500079498314, 84.20471447110658, 6.757517013063974, 10.22496259148416, 8.167255807146779, 6.115875031099629, 107.10277620793514, 18.343165833021327, 8.014615024348752, 9.09254285916369, 11.150134245199773, 38.47974501226385, 34.69034290693728, 5.051315728273502, 35.29804367636061, 108.91177594183407, 51.53988621900457, 16.81513366904171, 62.51635514494844, 16.051421901326155, 34.17604159758342, 54.64500396559899, 14.102769971654519, 129.92295317936734, 50.09981084441696, 102.51557761707684, 77.59927032697514, 214.32718217194963, 66.12724866518285, 37.27600918635832, 82.72807372999249, 42.660946096154625, 60.30538346001821, 79.58676052787081, 5.818686894486069, 197.72749160832012, 6.119813342237784, 5.657458976101975, 23.099055689203276, 98.49360877699125, 21.64160236844155, 9.720451206764404, 124.43413247930314, 36.36900714591521, 5.062587679347528, 42.972450638509, 20.116277797728053, 89.4176238696004, 73.97953738378949, 33.0634875811484, 16.433873824437008, 11.162574757513474, 58.957335459359115, 14.784794127167558, 28.28006957162479, 25.02421193268264, 49.83760895752465, 48.610687743934804, 117.33757801046318, 91.93156984516663, 19.162649881354362, 42.79297367216226, 11.543127290711691, 5.11758953980814, 28.70813049037398, 71.76715296339776, 41.2766359147206, 7.257987257490517, 57.529516019245655, 78.48022305635443, 23.084074502183565, 6.8226514200664, 8.141782058302402, 101.25610057571582, 180.47531734139596, 41.60465924928087, 82.93961262980942, 37.57954290400939, 144.2701563992095, 9.401679391902485, 104.91873671779895, 11.156066521892447, 12.249304374339678, 11.157800209008926, 54.82641927094286, 166.4475600757492, 31.358578763641738, 78.45222170867855, 19.839963637788074, 17.708997422991775, 160.89519157121813, 20.95559943299614, 23.286600324830186, 100.311408901508, 48.69308109202466, 274.61102947877146, 5.587996665477519, 149.36287009233743, 36.80411461882002, 54.60266825794204, 92.76110972723536, 28.70969725935893, 54.213658805425275, 16.225399758136074, 65.27488157163964, 96.110977215623, 18.615233123831967, 74.6172585605943, 64.26202227210888, 82.82584159810195, 66.21316287772835, 21.61274400550876, 41.16023985389632, 5.155621063688611, 61.25222028172978, 146.01578879360244, 234.25441792602754, 86.14076055769641, 15.91180579779668, 25.688077932912616, 52.049967681552644, 12.733284254540047, 61.81219852200222, 16.279228113268864, 50.73027856834425, 9.698175549196238, 100.93683403469313, 47.16709038384474, 10.787839251319271, 10.161224930480547, 56.394990930302434, 49.061217382133776, 38.63306201243808, 61.653625830100516, 73.43816981904277, 50.7846030765006, 61.585730221705184, 13.36541205907069, 30.7107429992194, 77.11056740007713, 31.903789738438334, 20.9989038359829, 74.85150527291277, 8.396371589363014, 21.689763484412165, 65.1999751696978, 8.646255758640248, 106.0102889088324, 42.7908467567538, 30.4389682508123, 60.299698514256356, 9.22220202974034, 86.21789604483597, 6.996480957953043, 128.8517984091344, 36.632826074538364, 58.47744025714698, 94.42548019948303, 18.230769341162507, 26.326418707190165, 163.1903557974341, 51.56270308009573, 20.255292431712178, 47.22897770522656, 19.010981866214927, 61.981251463788496, 6.755491735669235, 49.21633833876453, 97.9172341757574, 17.989277534359992, 49.04039101861015, 37.29560618849519, 43.415702786737015, 80.18507271439721, 34.74934215245216, 63.679632093637665, 66.6619862370784, 98.92621464576843, 30.11814090807484, 24.22935022154222, 29.72567611853882, 33.79322259301835, 73.86395831962017, 59.841389349842345, 27.79183824356125, 62.42750057823055, 87.38342567866985, 42.01442889515817, 149.63350788651198, 65.05554269995609, 24.968930030719836, 6.416441354252671, 18.600404485036755, 55.509773437657486, 11.3560780190508, 27.00056525680339, 5.461332816389943, 18.573434255831017, 58.34347530314864, 45.86580338106704, 42.44113263256609, 55.385569494604034, 68.80199413144635, 53.094172849374715, 26.94834136269305, 71.79135400500202, 101.01562422182272, 76.62769917611053, 36.779326145626435, 28.730494691541775, 5.757127083593235, 106.61751922145537, 6.4672717670315, 106.58586751526616, 20.920954502456773, 58.444109488484955, 28.367195570887354, 12.10013549446281, 12.221779282583203, 8.766101764625752, 22.40821640730958, 14.744540218593986, 77.80567748884391, 13.78552642292732, 10.526720046642962, 12.451018220930385, 5.712145990218603, 13.559205872564366, 5.839069698361007, 12.290189839981341, 9.776477537110647, 18.20450382533095, 6.280404348641033, 7.297025496329114, 46.0971872330129, 78.64650272425519, 11.13331287386952, 46.686792921666765, 33.785750988039034, 15.085413545685368, 53.6417349770649, 64.01506275084859, 63.86735843687562, 8.135003304989235, 56.78206340318694])
caption, T_hit,count = 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, count, caption);
([6702123.4375, 6703312.5, 6721140.625, 6776465.625, 6815854.6875, 6845760.9375, 6845815.625, 6945081.25, 7072123.4375, 7275979.6875, 7290945.3125, 7576170.3125, 7581706.25, 7736068.75, 7888759.375, 7966967.1875, 8002228.125, 8089846.875, 8110712.5, 8145512.5, 8187796.875, 8216154.6875, 8260179.6875, 8266659.375, 8288673.4375, 8298578.125, 8299657.8125, 8300746.875, 8313471.875, 8355889.0625, 8356275.0, 8356560.9375, 8356860.9375, 8358754.6875, 8422942.1875, 8453071.875, 8498756.25, 8512720.3125, 8562068.75, 8567334.375, 8573739.0625, 8591664.0625, 8591668.75, 8599557.8125, 8600909.375, 8607660.9375, 8636132.8125, 8659342.1875, 8662582.8125, 8669785.9375, 8669809.375, 8670932.8125, 8676731.25, 8696884.375, 8697204.6875, 8697560.9375, 8698375.0, 8698443.75, 8736804.6875, 8739162.5, 8739657.8125, 8744940.625, 8750167.1875, 8793454.6875, 8793885.9375, 8809121.875, 8850320.3125, 8855114.0625, 8855610.9375, 8883209.375, 8884910.9375, 8885432.8125, 8897084.375, 8910134.375, 8910150.0, 8910321.875, 8979895.3125, 8980232.8125, 8984356.25, 8990906.25, 8990909.375, 9036895.3125, 9042481.25, 9046239.0625, 9123150.0, 9133493.75, 9136284.375, 9178212.5, 9249051.5625, 9250475.0, 9292623.4375, 9347743.75, 9377792.1875, 9381315.625, 9389564.0625, 9390085.9375, 9395371.875, 9407093.75, 9417732.8125, 9424987.5, 9427201.5625, 9427257.8125, 9427804.6875, 9430576.5625, 9431150.0, 9431492.1875, 9432425.0, 9432546.875, 9433062.5, 9433064.0625, 9433142.1875, 9433404.6875, 9434214.0625, 9435809.375, 9438412.5, 9442193.75, 9457021.875, 9470207.8125, 9471731.25, 9472045.3125, 9473762.5, 9476767.1875, 9486106.25, 9488057.8125, 9512159.375, 9513307.8125, 9521117.1875, 9526429.6875, 9526526.5625, 9553079.6875, 9560964.0625, 9560964.0625, 9569885.9375, 9574856.25, 9583495.3125, 9585025.0, 9585050.0, 9594242.1875, 9615978.125, 9616429.6875, 9617479.6875, 9618437.5, 9618610.9375, 9618657.8125, 9620032.8125, 9621598.4375, 9624496.875, 9633740.625, 9636121.875, 9644181.25, 9651896.875, 9652932.8125, 9654609.375, 9655625.0, 9665221.875, 9665429.6875, 9673275.0, 9673343.75, 9673634.375, 9676539.0625, 9677407.8125, 9678975.0, 9684787.5, 9691523.4375, 9692401.5625, 9696654.6875, 9698751.5625, 9700667.1875, 9701593.75, 9713009.375, 9714607.8125, 9716362.5, 9718379.6875, 9718901.5625, 9719248.4375, 9720378.125, 9720714.0625, 9720735.9375, 9720835.9375, 9723914.0625, 9725431.25, 9727373.4375, 9727379.6875, 9728337.5, 9730817.1875, 9731107.8125, 9731323.4375, 9732225.0, 9732359.375, 9733107.8125, 9733589.0625, 9733885.9375, 9735789.0625, 9737425.0, 9737592.1875, 9738187.5, 9738501.5625, 9739301.5625, 9741012.5, 9741015.625, 9741156.25, 9741626.5625, 9756407.8125, 9773557.8125, 9775035.9375, 9777684.375, 9796612.5, 9797867.1875, 9798128.125, 9800064.0625, 9805659.375, 9807931.25, 9812404.6875, 9813457.8125, 9815460.9375, 9815468.75, 9816590.625, 9816865.625, 9817306.25, 9818596.875, 9821534.375, 9823117.1875, 9825542.1875, 9826079.6875, 9827428.125, 9830915.625, 9833496.875, 9835735.9375, 9835792.1875, 9839557.8125, 9842139.0625, 9842629.6875, 9843314.0625, 9852282.8125, 9862553.125, 9873203.125, 9879837.5, 9919790.625, 9919904.6875, 9919914.0625, 9920217.1875, 9921204.6875, 9921228.125, 9922320.3125, 9922623.4375, 9922690.625, 9922692.1875, 9923114.0625, 9923373.4375, 9923714.0625, 9928764.0625, 9935193.75, 9935264.0625, 9935603.125, 9939701.5625, 9940564.0625, 9944618.75, 9944859.375, 9974039.0625, 9978823.4375, 9979114.0625, 9980585.9375, 9981982.8125, 9982020.3125, 9988700.0, 9990814.0625, 9991837.5, 9992037.5, 10033653.125, 10043640.625, 10050756.25, 10050818.75, 10054059.375, 10054098.4375, 10066900.0, 10120782.8125, 10122526.5625, 10123228.125, 10127959.375, 10160023.4375, 10160643.75, 10160896.875, 10161495.3125, 10161564.0625, 10184528.125, 10187106.25, 10206746.875, 10209068.75, 10215167.1875, 10216157.8125, 10221635.9375, 10243903.125, 10254356.25, 10254357.8125, 10265403.125, 10272709.375, 10283431.25, 10284257.8125, 10285239.0625, 10289125.0, 10323567.1875, 10326410.9375, 10343676.5625, 10343873.4375, 10344646.875, 10374437.5, 10375234.375, 10378707.8125, 10381079.6875, 10381100.0, 10390162.5, 10424528.125, 10424964.0625, 10425918.75, 10427123.4375, 10466509.375, 10481609.375, 10494698.4375, 10514598.4375, 10531073.4375, 10539109.375, 10545609.375, 10560079.6875, 10562231.25, 10564315.625, 10566306.25, 10566335.9375, 10568329.6875, 10584418.75, 10587639.0625, 10593151.5625, 10593709.375, 10596240.625, 10596475.0, 10598351.5625, 10598439.0625, 10599190.625, 10600045.3125, 10600643.75, 10631750.0, 10638537.5, 10660300.0, 10660748.4375, 10674496.875, 10685310.9375, 10695751.5625, 10701673.4375, 10713392.1875, 10714715.625, 10754167.1875, 10758400.0, 10765392.1875, 10765464.0625, 10768276.5625, 10814621.875, 10826537.5, 10863096.875, 10878003.125, 10883165.625, 10924007.8125, 10942665.625, 10952223.4375, 10955585.9375, 10969357.8125, 10970759.375, 10981768.75, 10998167.1875, 10998215.625, 10999409.375, 11024659.375, 11028679.6875, 11084995.3125, 11145645.3125, 11145985.9375, 11158785.9375, 11159785.9375, 11169228.125, 11202025.0, 11204964.0625, 11207717.1875, 11249953.125, 11252271.875, 11276290.625, 11278484.375, 11288339.0625, 11456865.625, 11559310.9375, 11602498.4375, 11618676.5625, 11640900.0, 11725303.125, 11768067.1875, 11786321.875, 11861989.0625, 11862504.6875, 11898459.375, 11913976.5625, 11970690.625, 12029381.25, 12106231.25, 12149460.9375, 12158957.8125, 12169448.4375, 12320590.625, 12534482.8125, 12725429.6875, 12733895.3125, 12810037.5, 12833265.625, 12836156.25, 12866971.875, 12866975.0, 12940668.75, 12969271.875, 12987954.6875, 13140137.5, 13147146.875, 13381693.75, 13405731.25, 13500865.625, 13514595.3125, 13541206.25, 13598979.6875, 13656506.25, 13659232.8125, 13702051.5625, 13728529.6875, 13748550.0, 13824970.3125, 13842996.875, 13870084.375, 13902278.125, 13908223.4375, 13917598.4375, 13922098.4375, 13922167.1875, 13943046.875, 13945935.9375, 13966034.375, 13975685.9375, 13986309.375, 13993400.0, 13994212.5, 13996507.8125, 14016793.75, 14027428.125, 14034771.875, 14035648.4375, 14045773.4375, 14056870.3125, 14061512.5, 14073570.3125, 14073692.1875, 14075189.0625, 14084820.3125, 14091435.9375, 14094520.3125, 14096676.5625, 14104018.75, 14104307.8125, 14105376.5625, 14110698.4375, 14116717.1875, 14116731.25, 14119142.1875, 14119429.6875, 14137129.6875, 14145346.875, 14147781.25, 14154300.0, 14159420.3125, 14162776.5625, 14164873.4375, 14169210.9375, 14177560.9375, 14182046.875, 14185373.4375, 14186075.0, 14194457.8125, 14194560.9375, 14198235.9375, 14205482.8125, 14209867.1875, 14213710.9375], [24.68851448402208, 84.84866914726011, 35.13689703035241, 60.634162199284724, 38.03230104726693, 26.787350778103303, 6.503262167951173, 17.47184563504383, 13.134434998318289, 28.937391258480687, 76.4384874160239, 37.45599599287843, 53.02388344645122, 9.590546522215952, 31.05370885801944, 82.20359771265679, 13.829808975799823, 10.721861936018636, 8.717052669710851, 183.64691316505048, 93.17166473580124, 204.9817418995467, 12.577212095778115, 55.306983960410065, 10.623307562956692, 9.556324633641085, 7.389458389854248, 15.307356831521856, 23.974130742342503, 104.67896263212988, 21.730911291101787, 62.76634106066996, 44.259496526097294, 67.82490192042684, 158.51961660633876, 111.75481572783528, 31.99188489935038, 28.344291453508397, 10.738964625436672, 29.950214674344707, 24.61002714356064, 30.833615704568885, 6.197938743932924, 8.916726234526168, 31.82120526280779, 107.94578553982664, 51.74236962418874, 24.93122930171541, 54.51337055987561, 38.419490883911394, 54.21869282414771, 274.11595131589985, 94.09549655005355, 62.65703083682191, 65.83958591833233, 8.28084348154651, 101.47058422806292, 6.0395245918351375, 68.78183026398904, 19.122723207618947, 6.507582466641071, 124.91808143488964, 10.664844514942967, 15.651568285068167, 34.33495058669123, 22.432785847286706, 13.609592071828457, 47.742781654753635, 94.33042465538337, 68.05314829927646, 7.00027913364774, 37.81084824280081, 103.30842681559878, 39.40610006655236, 19.860974547058316, 19.779220477129638, 19.533592649504904, 138.82190467536242, 16.100652508314255, 18.941946554940603, 51.01624081881794, 6.835311351493932, 111.92763628452997, 47.16359778097485, 49.50416309664809, 54.43495518209085, 175.56924953322488, 97.70517569643734, 22.151514309839, 9.378298919420896, 19.861123509035256, 80.92446680589684, 14.44172451445488, 13.803128579037024, 11.93753895336613, 81.53178394162732, 6.3854659160080045, 10.285232257173075, 164.79629201694476, 98.48871899037796, 28.375914759505854, 5.128672643161582, 33.23835751649679, 53.45502439630284, 6.922254184389764, 30.27593672807693, 96.02605735521988, 55.4882520573175, 61.657339873248254, 25.461181368723746, 46.43991784512598, 75.38222328307242, 6.654093475469354, 8.226777265525289, 6.354532213062286, 84.62513352032613, 11.242860867452213, 59.85955792166261, 15.523989392247568, 125.26638417118383, 6.913313995653163, 22.38588677690682, 30.476819802562346, 52.789971018268034, 20.122454950796694, 101.42455328984254, 60.93152594915452, 17.539185598975042, 55.73032827828026, 171.49567087620653, 13.146773098387857, 56.957185137174655, 18.280474058320525, 19.795308822912386, 36.4411296021292, 18.819104722263173, 33.94873697594437, 112.5028614252474, 15.863121801584132, 13.54240281075748, 13.269475927128262, 113.22783336982731, 19.53192465467992, 20.041972780413182, 82.43475172092984, 11.708467889687158, 12.982699581012639, 26.36628682005442, 107.62800784899244, 68.65447015015137, 90.12608890425736, 13.158017671298367, 64.94444367149715, 70.31071275675669, 38.78356057304381, 6.151768414043996, 11.474734389631202, 105.26676587736264, 160.3705489105756, 91.20211135978425, 36.17433270746429, 18.312167093725236, 14.556980307248997, 19.6004470780773, 58.614323036343066, 38.99313965365905, 20.079400261758735, 19.306721400197144, 26.080264071180395, 56.37557568019878, 72.76918181012341, 132.5382626263126, 185.67544830646, 137.43732309785582, 91.68693361611139, 176.8748584110389, 8.877478772675675, 11.697323719908484, 308.61218683587236, 16.6074314058715, 6.162910962266525, 90.93785215866647, 5.425296858424457, 5.677434338030336, 54.793596503153175, 11.201030637387793, 53.195099437217394, 31.679315399468223, 35.16046039711478, 60.8867109442064, 61.59440629214997, 6.081332537762744, 322.6244257046246, 49.12322297037729, 12.119598235720943, 100.51901730640054, 79.52025874707566, 46.069454393436736, 18.969628790367146, 14.459926564088475, 29.617683119704754, 50.58417777205308, 6.963207305535152, 76.75874225316994, 106.72025105888139, 31.660893648041128, 93.76163503556006, 88.52775880855664, 147.7163167086155, 93.75730800680108, 33.46066677179081, 13.140171009491104, 11.372517896496607, 50.20676436521701, 51.286560973224304, 65.65615704496592, 7.560001717808797, 8.70676581594313, 38.831129752508254, 17.825661050267694, 8.554760753667976, 109.52783302969843, 31.67080289616315, 73.23649171389394, 95.42857207773866, 110.26264995069585, 60.226829478508805, 9.735303895007286, 6.577589136585937, 109.45844151763222, 38.97158685350341, 47.69084229021271, 73.98122864549433, 15.963447384224676, 15.363992976386298, 22.91977063824237, 77.19697514801452, 6.566437843630164, 33.4169467932895, 39.63500079498314, 84.20471447110658, 6.757517013063974, 10.22496259148416, 8.167255807146779, 6.115875031099629, 107.10277620793514, 18.343165833021327, 8.014615024348752, 9.09254285916369, 11.150134245199773, 38.47974501226385, 34.69034290693728, 5.051315728273502, 35.29804367636061, 108.91177594183407, 51.53988621900457, 16.81513366904171, 62.51635514494844, 16.051421901326155, 34.17604159758342, 54.64500396559899, 14.102769971654519, 129.92295317936734, 50.09981084441696, 102.51557761707684, 77.59927032697514, 214.32718217194963, 66.12724866518285, 37.27600918635832, 82.72807372999249, 42.660946096154625, 60.30538346001821, 79.58676052787081, 5.818686894486069, 197.72749160832012, 6.119813342237784, 5.657458976101975, 23.099055689203276, 98.49360877699125, 21.64160236844155, 9.720451206764404, 124.43413247930314, 36.36900714591521, 5.062587679347528, 42.972450638509, 20.116277797728053, 89.4176238696004, 73.97953738378949, 33.0634875811484, 16.433873824437008, 11.162574757513474, 58.957335459359115, 14.784794127167558, 28.28006957162479, 25.02421193268264, 49.83760895752465, 48.610687743934804, 117.33757801046318, 91.93156984516663, 19.162649881354362, 42.79297367216226, 11.543127290711691, 5.11758953980814, 28.70813049037398, 71.76715296339776, 41.2766359147206, 7.257987257490517, 57.529516019245655, 78.48022305635443, 23.084074502183565, 6.8226514200664, 8.141782058302402, 101.25610057571582, 180.47531734139596, 41.60465924928087, 82.93961262980942, 37.57954290400939, 144.2701563992095, 9.401679391902485, 104.91873671779895, 11.156066521892447, 12.249304374339678, 11.157800209008926, 54.82641927094286, 166.4475600757492, 31.358578763641738, 78.45222170867855, 19.839963637788074, 17.708997422991775, 160.89519157121813, 20.95559943299614, 23.286600324830186, 100.311408901508, 48.69308109202466, 274.61102947877146, 5.587996665477519, 149.36287009233743, 36.80411461882002, 54.60266825794204, 92.76110972723536, 28.70969725935893, 54.213658805425275, 16.225399758136074, 65.27488157163964, 96.110977215623, 18.615233123831967, 74.6172585605943, 64.26202227210888, 82.82584159810195, 66.21316287772835, 21.61274400550876, 41.16023985389632, 5.155621063688611, 61.25222028172978, 146.01578879360244, 234.25441792602754, 86.14076055769641, 15.91180579779668, 25.688077932912616, 52.049967681552644, 12.733284254540047, 61.81219852200222, 16.279228113268864, 50.73027856834425, 9.698175549196238, 100.93683403469313, 47.16709038384474, 10.787839251319271, 10.161224930480547, 56.394990930302434, 49.061217382133776, 38.63306201243808, 61.653625830100516, 73.43816981904277, 50.7846030765006, 61.585730221705184, 13.36541205907069, 30.7107429992194, 77.11056740007713, 31.903789738438334, 20.9989038359829, 74.85150527291277, 8.396371589363014, 21.689763484412165, 65.1999751696978, 8.646255758640248, 106.0102889088324, 42.7908467567538, 30.4389682508123, 60.299698514256356, 9.22220202974034, 86.21789604483597, 6.996480957953043, 128.8517984091344, 36.632826074538364, 58.47744025714698, 94.42548019948303, 18.230769341162507, 26.326418707190165, 163.1903557974341, 51.56270308009573, 20.255292431712178, 47.22897770522656, 19.010981866214927, 61.981251463788496, 6.755491735669235, 49.21633833876453, 97.9172341757574, 17.989277534359992, 49.04039101861015, 37.29560618849519, 43.415702786737015, 80.18507271439721, 34.74934215245216, 63.679632093637665, 66.6619862370784, 98.92621464576843, 30.11814090807484, 24.22935022154222, 29.72567611853882, 33.79322259301835, 73.86395831962017, 59.841389349842345, 27.79183824356125, 62.42750057823055, 87.38342567866985, 42.01442889515817, 149.63350788651198, 65.05554269995609, 24.968930030719836, 6.416441354252671, 18.600404485036755, 55.509773437657486, 11.3560780190508, 27.00056525680339, 5.461332816389943, 18.573434255831017, 58.34347530314864, 45.86580338106704, 42.44113263256609, 55.385569494604034, 68.80199413144635, 53.094172849374715, 26.94834136269305, 71.79135400500202, 101.01562422182272, 76.62769917611053, 36.779326145626435, 28.730494691541775, 5.757127083593235, 106.61751922145537, 6.4672717670315, 106.58586751526616, 20.920954502456773, 58.444109488484955, 28.367195570887354, 12.10013549446281, 12.221779282583203, 8.766101764625752, 22.40821640730958, 14.744540218593986, 77.80567748884391, 13.78552642292732, 10.526720046642962, 12.451018220930385, 5.712145990218603, 13.559205872564366, 5.839069698361007, 12.290189839981341, 9.776477537110647, 18.20450382533095, 6.280404348641033, 7.297025496329114, 46.0971872330129, 78.64650272425519, 11.13331287386952, 46.686792921666765, 33.785750988039034, 15.085413545685368, 53.6417349770649, 64.01506275084859, 63.86735843687562, 8.135003304989235, 56.78206340318694])
Detected energies during the discharge + Energy spectrum
multiplot(icon_fig, T_int_first,E,xle,Etot)