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 = 44424
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);
([6659298.4375, 6779945.3125, 6792304.6875, 6817081.25, 6997148.4375, 7227770.3125, 7274864.0625, 7334332.8125, 7337006.25, 7341653.125, 7341671.875, 7371440.625, 7464456.25, 7464526.5625, 7472360.9375, 7569301.5625, 7576957.8125, 7624095.3125, 7630340.625, 7636981.25, 7636993.75, 7657531.25, 7720651.5625, 7721856.25, 7725735.9375, 7743526.5625, 7764412.5, 7764889.0625, 7765960.9375, 7766865.625, 7770051.5625, 7771776.5625, 7780834.375, 7797489.0625, 7812832.8125, 7816318.75, 7855818.75, 7862368.75, 7868101.5625, 7880460.9375, 7885835.9375, 7926462.5, 7954076.5625, 7958973.4375, 7964820.3125, 7964857.8125, 7965395.3125, 8059565.625, 8064532.8125, 8071085.9375, 8073460.9375, 8073923.4375, 8085482.8125, 8088696.875, 8089215.625, 8089832.8125, 8089892.1875, 8094017.1875, 8096084.375, 8096175.0, 8096981.25, 8097234.375, 8097995.3125, 8098389.0625, 8103240.625, 8104243.75, 8107215.625, 8108206.25, 8109039.0625, 8109350.0, 8109435.9375, 8109846.875, 8112221.875, 8112246.875, 8116820.3125, 8118339.0625, 8121375.0, 8121528.125, 8121698.4375, 8122629.6875, 8126475.0, 8146621.875, 8147665.625, 8150798.4375, 8152885.9375, 8157925.0, 8158810.9375, 8159951.5625, 8160632.8125, 8161343.75, 8161987.5, 8163312.5, 8163535.9375, 8179220.3125, 8179514.0625, 8179976.5625, 8180143.75, 8180487.5, 8182559.375, 8182781.25, 8187639.0625, 8204668.75, 8209251.5625, 8211384.375, 8212470.3125, 8218139.0625, 8221915.625, 8224068.75, 8225767.1875, 8226571.875, 8233903.125, 8241253.125, 8241729.6875, 8241825.0, 8244360.9375, 8248001.5625, 8248737.5, 8251479.6875, 8251771.875, 8252017.1875, 8252023.4375, 8252810.9375, 8279756.25, 8283842.1875, 8284881.25, 8285375.0, 8286103.125, 8286743.75, 8287610.9375, 8287823.4375, 8290004.6875, 8291757.8125, 8303462.5, 8327271.875, 8346904.6875, 8382918.75, 8382950.0, 8386825.0, 8395151.5625, 8397304.6875, 8402109.375, 8405001.5625, 8405296.875, 8406157.8125, 8406412.5, 8406462.5, 8406834.375, 8406975.0, 8407489.0625, 8408753.125, 8409565.625, 8412985.9375, 8413853.125, 8415396.875, 8415532.8125, 8415543.75, 8416657.8125, 8417709.375, 8417892.1875, 8418057.8125, 8421323.4375, 8421381.25, 8421467.1875, 8421743.75, 8422093.75, 8422562.5, 8435256.25, 8435284.375, 8437045.3125, 8437925.0, 8438073.4375, 8438542.1875, 8440717.1875, 8445650.0, 8446037.5, 8450079.6875, 8464987.5, 8465453.125, 8473848.4375, 8477593.75, 8478868.75, 8479221.875, 8479635.9375, 8481518.75, 8483400.0, 8486668.75, 8486770.3125, 8487864.0625, 8488248.4375, 8489312.5, 8489900.0, 8495165.625, 8499317.1875, 8500598.4375, 8501184.375, 8501489.0625, 8501492.1875, 8501506.25, 8503906.25, 8504550.0, 8511057.8125, 8511428.125, 8511650.0, 8516100.0, 8516432.8125, 8516895.3125, 8517239.0625, 8519517.1875, 8550248.4375, 8557010.9375, 8559120.3125, 8560392.1875, 8564900.0, 8568164.0625, 8569934.375, 8571850.0, 8581207.8125, 8581787.5, 8582665.625, 8586615.625, 8607476.5625, 8612417.1875, 8626687.5, 8629104.6875, 8631314.0625, 8631462.5, 8631650.0, 8636590.625, 8636671.875, 8637329.6875, 8638362.5, 8638960.9375, 8639004.6875, 8640221.875, 8640251.5625, 8640585.9375, 8642379.6875, 8642629.6875, 8642784.375, 8642996.875, 8643064.0625, 8643817.1875, 8644065.625, 8644440.625, 8644754.6875, 8646271.875, 8648629.6875, 8652079.6875, 8653014.0625, 8654382.8125, 8654448.4375, 8654537.5, 8654596.875, 8654657.8125, 8655279.6875, 8655375.0, 8662342.1875, 8666590.625, 8667575.0, 8667604.6875, 8667629.6875, 8667771.875, 8669468.75, 8672751.5625, 8672851.5625, 8673912.5, 8688867.1875, 8690520.3125, 8697226.5625, 8697748.4375, 8699646.875, 8699993.75, 8701121.875, 8701479.6875, 8702737.5, 8709532.8125, 8709579.6875, 8710675.0, 8712745.3125, 8728179.6875, 8768053.125, 8776381.25, 8782335.9375, 8792335.9375, 8796714.0625, 8797365.625, 8798879.6875, 8800425.0, 8800460.9375, 8800964.0625, 8800973.4375, 8802548.4375, 8807990.625, 8811673.4375, 8811953.125, 8814743.75, 8816185.9375, 8827806.25, 8829287.5, 8831245.3125, 8833818.75, 8837614.0625, 8837653.125, 8839412.5, 8840632.8125, 8872126.5625, 8872467.1875, 8873398.4375, 8874567.1875, 8875025.0, 8875742.1875, 8875845.3125, 8878996.875, 8883671.875, 8891751.5625, 8891778.125, 8898845.3125, 8920048.4375, 8920048.4375, 8948073.4375, 8955534.375, 8956582.8125, 8961035.9375, 8986039.0625, 8996629.6875, 9005087.5, 9024432.8125, 9028370.3125, 9028371.875, 9028642.1875, 9033826.5625, 9036350.0, 9038510.9375, 9043340.625, 9053129.6875, 9065915.625, 9072646.875, 9073535.9375, 9118718.75, 9129948.4375, 9130326.5625, 9130671.875, 9131785.9375, 9132090.625, 9132157.8125, 9133368.75, 9135823.4375, 9136709.375, 9138498.4375, 9138917.1875, 9141142.1875, 9141326.5625, 9141417.1875, 9144079.6875, 9144710.9375, 9144890.625, 9150528.125, 9150748.4375, 9151064.0625, 9152562.5, 9155781.25, 9158445.3125, 9162578.125, 9163039.0625, 9168290.625, 9184837.5, 9190593.75, 9195693.75, 9197998.4375, 9198248.4375, 9224962.5, 9251459.375, 9260020.3125, 9264604.6875, 9264753.125, 9264857.8125, 9268189.0625, 9272923.4375, 9291389.0625, 9291400.0, 9291462.5, 9295509.375, 9330571.875, 9346484.375, 9397915.625, 9406179.6875, 9409260.9375, 9441470.3125, 9441925.0, 9548662.5, 9628584.375, 9910067.1875, 10252698.4375, 10268976.5625, 10270400.0, 10358231.25, 10422428.125, 10430784.375, 10518301.5625, 10597381.25, 10597467.1875, 10704878.125, 10705662.5, 10777540.625, 10913528.125, 10920878.125, 11320742.1875, 11325134.375, 11325559.375, 11327590.625, 11329243.75, 11334350.0, 11341254.6875, 11355509.375, 11384643.75, 183889442.1875, 468852471.875], [17.75508859616611, 40.41963793182402, 40.84939480103119, 5.0379402723876945, 9.010970837978926, 21.591976853165225, 33.35016282884718, 52.60364608349887, 100.32573259463985, 43.11293407533998, 16.57711610310442, 15.92356086243431, 9.709279399090542, 5.159016629343135, 70.87355596799638, 13.902460996709625, 6.5944922682473734, 58.20119581541063, 25.680336850357065, 24.08763123228424, 24.425104151903124, 6.633840013319265, 43.06064227755857, 26.113770275746504, 494.79719901121894, 9.076049856030801, 71.92115454692295, 7.3918909924617955, 102.23178050891855, 82.90432294748625, 37.463143827572125, 42.49621171257902, 13.186320396583334, 27.529732654346745, 39.82816937602468, 18.657119226502946, 153.2041849702464, 10.655248731559332, 26.146195910735933, 35.03858151268257, 97.85018954190618, 9.118684360587498, 7.528947555416272, 14.82858570903348, 11.097841689923248, 23.353071911564804, 5.299925435302319, 74.21888497038016, 81.37304576593627, 65.22194824122334, 75.30001396289272, 19.950860048746303, 21.56144774377657, 15.91368620597985, 9.477082850688063, 9.780874212730755, 53.91035152888269, 85.14027535770653, 51.715572251963124, 94.94977627312542, 61.82786816246933, 67.53772506402609, 42.1705869460583, 44.16997214920204, 68.23804370084896, 65.43349383940027, 136.673766018393, 50.39216036434293, 30.84756025879141, 6.968338660866034, 56.92581387455617, 82.66681879524218, 53.557753126065464, 8.025673505746854, 19.064964036644184, 101.47993480672577, 62.49306298713327, 10.536300329137344, 41.01970594337075, 54.12544253913087, 65.31734226767401, 66.02608099060527, 73.97096220029934, 19.65870402600046, 35.16944290214204, 68.85287258411941, 58.99579935137301, 113.88777286169531, 9.662399484329377, 12.322582794865808, 132.9227550602385, 11.423246830646711, 54.81347387720939, 34.704896746586854, 45.05314643327291, 15.997993176618271, 76.14858965336023, 122.64758827159984, 25.639567991438277, 9.784902533553387, 10.49031486607681, 52.01851004498215, 68.03464824039105, 44.18571005121463, 70.18165812992561, 20.93378980885894, 58.441044321995584, 66.13646784279771, 53.24569191706668, 82.24575616471287, 10.976930991518074, 7.5445489716622705, 45.42323383355118, 133.4670072334515, 102.77552737829274, 29.582384772073862, 69.87630631857802, 11.53075754374376, 67.72005334413414, 15.080344201158793, 61.481545033561346, 8.553989595780395, 13.173595949100621, 70.21521300789324, 91.03795470280939, 18.724768029523858, 5.409084692908067, 10.222024357527642, 37.128300159995746, 29.893685999750424, 10.1913110163505, 108.53125324690023, 99.54220175187949, 22.673934965422855, 20.796024689821184, 93.08477392237661, 43.553669190756544, 8.089514857092999, 6.563585580896897, 105.31642302849794, 63.12701550545955, 13.40742032805439, 18.974385608482798, 16.491099139364653, 22.576800646085328, 97.4817762111278, 96.14368162267166, 79.30489515703454, 96.52269309980953, 45.38862263074895, 81.79337216935161, 6.7194969038228525, 197.1929729743222, 73.3568127971482, 22.219374824868456, 7.6367146168626165, 18.165124811531296, 30.02049071926148, 191.74104739994962, 324.7496461441576, 90.40271507846342, 100.85948699992527, 44.281316044542564, 71.92711879872999, 40.935017930803916, 40.42197913147905, 34.75928628249297, 142.29423705264512, 31.60892715681897, 49.739745136571194, 10.535871696394713, 85.6934789829016, 76.33284538650312, 8.352871907136235, 7.419337269294948, 178.4741957263937, 10.11418544434442, 5.562987525608422, 65.54037659063921, 24.845089755203986, 115.34755054506041, 110.78626366932434, 5.289497243033156, 23.139479601671447, 61.1693811406915, 29.388292982122497, 41.15886976874864, 9.906301805545542, 48.487194059104894, 14.841965473702462, 33.54004782702998, 32.898735489804, 28.295357741731433, 21.774031640469005, 135.09751630605948, 44.66832000530258, 10.376008638936813, 65.21409404045833, 31.300515150290877, 10.96674593514339, 8.490671384848284, 77.1002008718303, 81.64593273321712, 142.39037245729992, 28.157841584315154, 27.573114187264448, 13.572713430038181, 107.82553354238648, 33.963466726266866, 52.24747659957484, 9.252912511851665, 22.072610925851333, 42.66845919672468, 7.59241694912062, 28.489660557511307, 13.181646726086889, 36.05156892808949, 17.377990770906333, 30.259140410782223, 112.66973598800696, 47.65237438377087, 153.64711509316353, 44.51964602566432, 69.47671645357293, 32.766324996959824, 93.22975362716467, 103.91138921629722, 83.87934659668313, 5.163550279631714, 11.702920826968175, 6.263991675779986, 36.073474088505236, 122.53992433457803, 16.187581324677872, 50.05416533128168, 21.636880129227904, 7.514380905661476, 137.391538858016, 18.0783534400249, 21.086355043488105, 5.967745953486653, 36.61747675927414, 33.787332394364746, 83.23954906091896, 17.192385510125742, 34.024065492962485, 29.107875795661577, 27.46951620278915, 28.852197872091008, 33.51300409364651, 5.054442195172537, 28.937654315225355, 14.723658265991812, 16.465350897026447, 55.229606455921285, 5.03782969554271, 27.2423720681164, 156.93511024522456, 10.424099256918758, 11.127887691884528, 16.571860363301578, 58.317367109482106, 31.66379743844118, 37.54948956988395, 61.845962035487574, 32.32220289188595, 35.56708592259957, 134.26778351043131, 50.20883801105495, 11.383797669189642, 13.042828689367136, 34.970725716170975, 88.28172593793875, 111.40354662305293, 43.95974841235095, 11.850172789859746, 33.99964442931332, 16.201998168831814, 9.12603651809355, 91.95376673005977, 16.6779884203392, 34.93488646062154, 101.94688740621461, 183.22055479582008, 22.49948497726869, 31.771413150607177, 14.666744523325768, 13.48845887870151, 140.44196129580865, 130.73922642364587, 110.38922340871676, 54.48782555948014, 13.199138027057783, 13.961321719701811, 21.665867113317542, 109.26074532351741, 57.076592033809334, 24.43190559211317, 23.880443029340604, 171.11631109680732, 26.67937228541495, 53.58877047064908, 7.816807209050949, 47.35829465581131, 43.87015504175876, 17.11073957373588, 22.44544612535948, 24.50385227091425, 37.17331588987599, 48.04260867924875, 68.44438411115566, 48.99389038018715, 11.411369465488198, 109.05683354159244, 20.599912764085243, 5.044365068875347, 12.085476825885879, 8.841593577513764, 42.29974436605625, 81.51180113711008, 15.867252864106382, 58.86864074509889, 19.070493133189718, 18.32466876053291, 54.58798529424991, 39.3245008536634, 48.31493555008675, 48.30553234450006, 12.795232635802073, 32.65828072020677, 26.852785635927916, 31.60289119307094, 52.67600842798148, 91.36076884549936, 161.6710451416995, 9.04142869924871, 113.28381714907128, 87.10061955670797, 93.63001728063293, 9.416304320616307, 85.93525716324993, 74.75237714946509, 37.68230645299737, 111.0110694603781, 18.76717793700988, 7.507913097834936, 117.62433006971811, 48.97122302510761, 44.05446021633079, 53.96749163762771, 56.60298291640678, 7.912369415755558, 21.108997418230977, 52.88629101720215, 32.95657754308504, 51.31837548588135, 113.78903317162995, 59.8824716113054, 79.38032835323105, 11.26083637408887, 28.533534412732138, 65.17763223661522, 89.25040450263157, 36.33365113627812, 40.83778833384814, 26.03959050442032, 50.91585696262089, 66.66466618164083, 25.35903065909047, 10.792104906491442, 56.642844925785354, 97.66075170022813, 103.58232863793282, 11.28987113792654, 5.75019578721745, 52.65377720350965, 31.90531282315219, 34.59827610879422, 16.669756482485944, 7.6998456008804395, 5.271888345239172, 37.61975512412645, 5.907969337378094, 88.66638020829373, 6.777058644039949, 41.69477913364284, 91.4946173142695, 12.757966722303342, 53.99291917360601, 172.3798190281272, 6.5655422066278035, 51.13416999335219, 9.17776443574648, 29.96770321953863, 58.86162778379328, 20.223876562554246, 5.756137567669847, 15.368590002872178, 61.2456809535426, 84.88669444211573, 5.079661364066633, 10.47798510094777, 8.146683871055346, 58.003665682476196, 6.813145755484013, 19.61783295250199, 5.103713755946156, 62.883738828034566, 37.5456525367094, 37.911716192517716, 124.63649411926956, 10.083742185486434, 71.30231040706084, 62.70640420675129, 75.34183768836809, 57.32418480651383, 20.635656875545678])
caption, xmean,count, xle, Etot = energy_spectrum(E_tot)
hist_file(E_hist, xmean, count, caption);
([6659298.4375, 6779945.3125, 6792304.6875, 6817081.25, 6997148.4375, 7227770.3125, 7274864.0625, 7334332.8125, 7337006.25, 7341653.125, 7341671.875, 7371440.625, 7464456.25, 7464526.5625, 7472360.9375, 7569301.5625, 7576957.8125, 7624095.3125, 7630340.625, 7636981.25, 7636993.75, 7657531.25, 7720651.5625, 7721856.25, 7725735.9375, 7743526.5625, 7764412.5, 7764889.0625, 7765960.9375, 7766865.625, 7770051.5625, 7771776.5625, 7780834.375, 7797489.0625, 7812832.8125, 7816318.75, 7855818.75, 7862368.75, 7868101.5625, 7880460.9375, 7885835.9375, 7926462.5, 7954076.5625, 7958973.4375, 7964820.3125, 7964857.8125, 7965395.3125, 8059565.625, 8064532.8125, 8071085.9375, 8073460.9375, 8073923.4375, 8085482.8125, 8088696.875, 8089215.625, 8089832.8125, 8089892.1875, 8094017.1875, 8096084.375, 8096175.0, 8096981.25, 8097234.375, 8097995.3125, 8098389.0625, 8103240.625, 8104243.75, 8107215.625, 8108206.25, 8109039.0625, 8109350.0, 8109435.9375, 8109846.875, 8112221.875, 8112246.875, 8116820.3125, 8118339.0625, 8121375.0, 8121528.125, 8121698.4375, 8122629.6875, 8126475.0, 8146621.875, 8147665.625, 8150798.4375, 8152885.9375, 8157925.0, 8158810.9375, 8159951.5625, 8160632.8125, 8161343.75, 8161987.5, 8163312.5, 8163535.9375, 8179220.3125, 8179514.0625, 8179976.5625, 8180143.75, 8180487.5, 8182559.375, 8182781.25, 8187639.0625, 8204668.75, 8209251.5625, 8211384.375, 8212470.3125, 8218139.0625, 8221915.625, 8224068.75, 8225767.1875, 8226571.875, 8233903.125, 8241253.125, 8241729.6875, 8241825.0, 8244360.9375, 8248001.5625, 8248737.5, 8251479.6875, 8251771.875, 8252017.1875, 8252023.4375, 8252810.9375, 8279756.25, 8283842.1875, 8284881.25, 8285375.0, 8286103.125, 8286743.75, 8287610.9375, 8287823.4375, 8290004.6875, 8291757.8125, 8303462.5, 8327271.875, 8346904.6875, 8382918.75, 8382950.0, 8386825.0, 8395151.5625, 8397304.6875, 8402109.375, 8405001.5625, 8405296.875, 8406157.8125, 8406412.5, 8406462.5, 8406834.375, 8406975.0, 8407489.0625, 8408753.125, 8409565.625, 8412985.9375, 8413853.125, 8415396.875, 8415532.8125, 8415543.75, 8416657.8125, 8417709.375, 8417892.1875, 8418057.8125, 8421323.4375, 8421381.25, 8421467.1875, 8421743.75, 8422093.75, 8422562.5, 8435256.25, 8435284.375, 8437045.3125, 8437925.0, 8438073.4375, 8438542.1875, 8440717.1875, 8445650.0, 8446037.5, 8450079.6875, 8464987.5, 8465453.125, 8473848.4375, 8477593.75, 8478868.75, 8479221.875, 8479635.9375, 8481518.75, 8483400.0, 8486668.75, 8486770.3125, 8487864.0625, 8488248.4375, 8489312.5, 8489900.0, 8495165.625, 8499317.1875, 8500598.4375, 8501184.375, 8501489.0625, 8501492.1875, 8501506.25, 8503906.25, 8504550.0, 8511057.8125, 8511428.125, 8511650.0, 8516100.0, 8516432.8125, 8516895.3125, 8517239.0625, 8519517.1875, 8550248.4375, 8557010.9375, 8559120.3125, 8560392.1875, 8564900.0, 8568164.0625, 8569934.375, 8571850.0, 8581207.8125, 8581787.5, 8582665.625, 8586615.625, 8607476.5625, 8612417.1875, 8626687.5, 8629104.6875, 8631314.0625, 8631462.5, 8631650.0, 8636590.625, 8636671.875, 8637329.6875, 8638362.5, 8638960.9375, 8639004.6875, 8640221.875, 8640251.5625, 8640585.9375, 8642379.6875, 8642629.6875, 8642784.375, 8642996.875, 8643064.0625, 8643817.1875, 8644065.625, 8644440.625, 8644754.6875, 8646271.875, 8648629.6875, 8652079.6875, 8653014.0625, 8654382.8125, 8654448.4375, 8654537.5, 8654596.875, 8654657.8125, 8655279.6875, 8655375.0, 8662342.1875, 8666590.625, 8667575.0, 8667604.6875, 8667629.6875, 8667771.875, 8669468.75, 8672751.5625, 8672851.5625, 8673912.5, 8688867.1875, 8690520.3125, 8697226.5625, 8697748.4375, 8699646.875, 8699993.75, 8701121.875, 8701479.6875, 8702737.5, 8709532.8125, 8709579.6875, 8710675.0, 8712745.3125, 8728179.6875, 8768053.125, 8776381.25, 8782335.9375, 8792335.9375, 8796714.0625, 8797365.625, 8798879.6875, 8800425.0, 8800460.9375, 8800964.0625, 8800973.4375, 8802548.4375, 8807990.625, 8811673.4375, 8811953.125, 8814743.75, 8816185.9375, 8827806.25, 8829287.5, 8831245.3125, 8833818.75, 8837614.0625, 8837653.125, 8839412.5, 8840632.8125, 8872126.5625, 8872467.1875, 8873398.4375, 8874567.1875, 8875025.0, 8875742.1875, 8875845.3125, 8878996.875, 8883671.875, 8891751.5625, 8891778.125, 8898845.3125, 8920048.4375, 8920048.4375, 8948073.4375, 8955534.375, 8956582.8125, 8961035.9375, 8986039.0625, 8996629.6875, 9005087.5, 9024432.8125, 9028370.3125, 9028371.875, 9028642.1875, 9033826.5625, 9036350.0, 9038510.9375, 9043340.625, 9053129.6875, 9065915.625, 9072646.875, 9073535.9375, 9118718.75, 9129948.4375, 9130326.5625, 9130671.875, 9131785.9375, 9132090.625, 9132157.8125, 9133368.75, 9135823.4375, 9136709.375, 9138498.4375, 9138917.1875, 9141142.1875, 9141326.5625, 9141417.1875, 9144079.6875, 9144710.9375, 9144890.625, 9150528.125, 9150748.4375, 9151064.0625, 9152562.5, 9155781.25, 9158445.3125, 9162578.125, 9163039.0625, 9168290.625, 9184837.5, 9190593.75, 9195693.75, 9197998.4375, 9198248.4375, 9224962.5, 9251459.375, 9260020.3125, 9264604.6875, 9264753.125, 9264857.8125, 9268189.0625, 9272923.4375, 9291389.0625, 9291400.0, 9291462.5, 9295509.375, 9330571.875, 9346484.375, 9397915.625, 9406179.6875, 9409260.9375, 9441470.3125, 9441925.0, 9548662.5, 9628584.375, 9910067.1875, 10252698.4375, 10268976.5625, 10270400.0, 10358231.25, 10422428.125, 10430784.375, 10518301.5625, 10597381.25, 10597467.1875, 10704878.125, 10705662.5, 10777540.625, 10913528.125, 10920878.125, 11320742.1875, 11325134.375, 11325559.375, 11327590.625, 11329243.75, 11334350.0, 11341254.6875, 11355509.375, 11384643.75, 183889442.1875, 468852471.875], [17.75508859616611, 40.41963793182402, 40.84939480103119, 5.0379402723876945, 9.010970837978926, 21.591976853165225, 33.35016282884718, 52.60364608349887, 100.32573259463985, 43.11293407533998, 16.57711610310442, 15.92356086243431, 9.709279399090542, 5.159016629343135, 70.87355596799638, 13.902460996709625, 6.5944922682473734, 58.20119581541063, 25.680336850357065, 24.08763123228424, 24.425104151903124, 6.633840013319265, 43.06064227755857, 26.113770275746504, 494.79719901121894, 9.076049856030801, 71.92115454692295, 7.3918909924617955, 102.23178050891855, 82.90432294748625, 37.463143827572125, 42.49621171257902, 13.186320396583334, 27.529732654346745, 39.82816937602468, 18.657119226502946, 153.2041849702464, 10.655248731559332, 26.146195910735933, 35.03858151268257, 97.85018954190618, 9.118684360587498, 7.528947555416272, 14.82858570903348, 11.097841689923248, 23.353071911564804, 5.299925435302319, 74.21888497038016, 81.37304576593627, 65.22194824122334, 75.30001396289272, 19.950860048746303, 21.56144774377657, 15.91368620597985, 9.477082850688063, 9.780874212730755, 53.91035152888269, 85.14027535770653, 51.715572251963124, 94.94977627312542, 61.82786816246933, 67.53772506402609, 42.1705869460583, 44.16997214920204, 68.23804370084896, 65.43349383940027, 136.673766018393, 50.39216036434293, 30.84756025879141, 6.968338660866034, 56.92581387455617, 82.66681879524218, 53.557753126065464, 8.025673505746854, 19.064964036644184, 101.47993480672577, 62.49306298713327, 10.536300329137344, 41.01970594337075, 54.12544253913087, 65.31734226767401, 66.02608099060527, 73.97096220029934, 19.65870402600046, 35.16944290214204, 68.85287258411941, 58.99579935137301, 113.88777286169531, 9.662399484329377, 12.322582794865808, 132.9227550602385, 11.423246830646711, 54.81347387720939, 34.704896746586854, 45.05314643327291, 15.997993176618271, 76.14858965336023, 122.64758827159984, 25.639567991438277, 9.784902533553387, 10.49031486607681, 52.01851004498215, 68.03464824039105, 44.18571005121463, 70.18165812992561, 20.93378980885894, 58.441044321995584, 66.13646784279771, 53.24569191706668, 82.24575616471287, 10.976930991518074, 7.5445489716622705, 45.42323383355118, 133.4670072334515, 102.77552737829274, 29.582384772073862, 69.87630631857802, 11.53075754374376, 67.72005334413414, 15.080344201158793, 61.481545033561346, 8.553989595780395, 13.173595949100621, 70.21521300789324, 91.03795470280939, 18.724768029523858, 5.409084692908067, 10.222024357527642, 37.128300159995746, 29.893685999750424, 10.1913110163505, 108.53125324690023, 99.54220175187949, 22.673934965422855, 20.796024689821184, 93.08477392237661, 43.553669190756544, 8.089514857092999, 6.563585580896897, 105.31642302849794, 63.12701550545955, 13.40742032805439, 18.974385608482798, 16.491099139364653, 22.576800646085328, 97.4817762111278, 96.14368162267166, 79.30489515703454, 96.52269309980953, 45.38862263074895, 81.79337216935161, 6.7194969038228525, 197.1929729743222, 73.3568127971482, 22.219374824868456, 7.6367146168626165, 18.165124811531296, 30.02049071926148, 191.74104739994962, 324.7496461441576, 90.40271507846342, 100.85948699992527, 44.281316044542564, 71.92711879872999, 40.935017930803916, 40.42197913147905, 34.75928628249297, 142.29423705264512, 31.60892715681897, 49.739745136571194, 10.535871696394713, 85.6934789829016, 76.33284538650312, 8.352871907136235, 7.419337269294948, 178.4741957263937, 10.11418544434442, 5.562987525608422, 65.54037659063921, 24.845089755203986, 115.34755054506041, 110.78626366932434, 5.289497243033156, 23.139479601671447, 61.1693811406915, 29.388292982122497, 41.15886976874864, 9.906301805545542, 48.487194059104894, 14.841965473702462, 33.54004782702998, 32.898735489804, 28.295357741731433, 21.774031640469005, 135.09751630605948, 44.66832000530258, 10.376008638936813, 65.21409404045833, 31.300515150290877, 10.96674593514339, 8.490671384848284, 77.1002008718303, 81.64593273321712, 142.39037245729992, 28.157841584315154, 27.573114187264448, 13.572713430038181, 107.82553354238648, 33.963466726266866, 52.24747659957484, 9.252912511851665, 22.072610925851333, 42.66845919672468, 7.59241694912062, 28.489660557511307, 13.181646726086889, 36.05156892808949, 17.377990770906333, 30.259140410782223, 112.66973598800696, 47.65237438377087, 153.64711509316353, 44.51964602566432, 69.47671645357293, 32.766324996959824, 93.22975362716467, 103.91138921629722, 83.87934659668313, 5.163550279631714, 11.702920826968175, 6.263991675779986, 36.073474088505236, 122.53992433457803, 16.187581324677872, 50.05416533128168, 21.636880129227904, 7.514380905661476, 137.391538858016, 18.0783534400249, 21.086355043488105, 5.967745953486653, 36.61747675927414, 33.787332394364746, 83.23954906091896, 17.192385510125742, 34.024065492962485, 29.107875795661577, 27.46951620278915, 28.852197872091008, 33.51300409364651, 5.054442195172537, 28.937654315225355, 14.723658265991812, 16.465350897026447, 55.229606455921285, 5.03782969554271, 27.2423720681164, 156.93511024522456, 10.424099256918758, 11.127887691884528, 16.571860363301578, 58.317367109482106, 31.66379743844118, 37.54948956988395, 61.845962035487574, 32.32220289188595, 35.56708592259957, 134.26778351043131, 50.20883801105495, 11.383797669189642, 13.042828689367136, 34.970725716170975, 88.28172593793875, 111.40354662305293, 43.95974841235095, 11.850172789859746, 33.99964442931332, 16.201998168831814, 9.12603651809355, 91.95376673005977, 16.6779884203392, 34.93488646062154, 101.94688740621461, 183.22055479582008, 22.49948497726869, 31.771413150607177, 14.666744523325768, 13.48845887870151, 140.44196129580865, 130.73922642364587, 110.38922340871676, 54.48782555948014, 13.199138027057783, 13.961321719701811, 21.665867113317542, 109.26074532351741, 57.076592033809334, 24.43190559211317, 23.880443029340604, 171.11631109680732, 26.67937228541495, 53.58877047064908, 7.816807209050949, 47.35829465581131, 43.87015504175876, 17.11073957373588, 22.44544612535948, 24.50385227091425, 37.17331588987599, 48.04260867924875, 68.44438411115566, 48.99389038018715, 11.411369465488198, 109.05683354159244, 20.599912764085243, 5.044365068875347, 12.085476825885879, 8.841593577513764, 42.29974436605625, 81.51180113711008, 15.867252864106382, 58.86864074509889, 19.070493133189718, 18.32466876053291, 54.58798529424991, 39.3245008536634, 48.31493555008675, 48.30553234450006, 12.795232635802073, 32.65828072020677, 26.852785635927916, 31.60289119307094, 52.67600842798148, 91.36076884549936, 161.6710451416995, 9.04142869924871, 113.28381714907128, 87.10061955670797, 93.63001728063293, 9.416304320616307, 85.93525716324993, 74.75237714946509, 37.68230645299737, 111.0110694603781, 18.76717793700988, 7.507913097834936, 117.62433006971811, 48.97122302510761, 44.05446021633079, 53.96749163762771, 56.60298291640678, 7.912369415755558, 21.108997418230977, 52.88629101720215, 32.95657754308504, 51.31837548588135, 113.78903317162995, 59.8824716113054, 79.38032835323105, 11.26083637408887, 28.533534412732138, 65.17763223661522, 89.25040450263157, 36.33365113627812, 40.83778833384814, 26.03959050442032, 50.91585696262089, 66.66466618164083, 25.35903065909047, 10.792104906491442, 56.642844925785354, 97.66075170022813, 103.58232863793282, 11.28987113792654, 5.75019578721745, 52.65377720350965, 31.90531282315219, 34.59827610879422, 16.669756482485944, 7.6998456008804395, 5.271888345239172, 37.61975512412645, 5.907969337378094, 88.66638020829373, 6.777058644039949, 41.69477913364284, 91.4946173142695, 12.757966722303342, 53.99291917360601, 172.3798190281272, 6.5655422066278035, 51.13416999335219, 9.17776443574648, 29.96770321953863, 58.86162778379328, 20.223876562554246, 5.756137567669847, 15.368590002872178, 61.2456809535426, 84.88669444211573, 5.079661364066633, 10.47798510094777, 8.146683871055346, 58.003665682476196, 6.813145755484013, 19.61783295250199, 5.103713755946156, 62.883738828034566, 37.5456525367094, 37.911716192517716, 124.63649411926956, 10.083742185486434, 71.30231040706084, 62.70640420675129, 75.34183768836809, 57.32418480651383, 20.635656875545678])
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);
([6659298.4375, 6779945.3125, 6792304.6875, 6817081.25, 6997148.4375, 7227770.3125, 7274864.0625, 7334332.8125, 7337006.25, 7341653.125, 7341671.875, 7371440.625, 7464456.25, 7464526.5625, 7472360.9375, 7569301.5625, 7576957.8125, 7624095.3125, 7630340.625, 7636981.25, 7636993.75, 7657531.25, 7720651.5625, 7721856.25, 7725735.9375, 7743526.5625, 7764412.5, 7764889.0625, 7765960.9375, 7766865.625, 7770051.5625, 7771776.5625, 7780834.375, 7797489.0625, 7812832.8125, 7816318.75, 7855818.75, 7862368.75, 7868101.5625, 7880460.9375, 7885835.9375, 7926462.5, 7954076.5625, 7958973.4375, 7964820.3125, 7964857.8125, 7965395.3125, 8059565.625, 8064532.8125, 8071085.9375, 8073460.9375, 8073923.4375, 8085482.8125, 8088696.875, 8089215.625, 8089832.8125, 8089892.1875, 8094017.1875, 8096084.375, 8096175.0, 8096981.25, 8097234.375, 8097995.3125, 8098389.0625, 8103240.625, 8104243.75, 8107215.625, 8108206.25, 8109039.0625, 8109350.0, 8109435.9375, 8109846.875, 8112221.875, 8112246.875, 8116820.3125, 8118339.0625, 8121375.0, 8121528.125, 8121698.4375, 8122629.6875, 8126475.0, 8146621.875, 8147665.625, 8150798.4375, 8152885.9375, 8157925.0, 8158810.9375, 8159951.5625, 8160632.8125, 8161343.75, 8161987.5, 8163312.5, 8163535.9375, 8179220.3125, 8179514.0625, 8179976.5625, 8180143.75, 8180487.5, 8182559.375, 8182781.25, 8187639.0625, 8204668.75, 8209251.5625, 8211384.375, 8212470.3125, 8218139.0625, 8221915.625, 8224068.75, 8225767.1875, 8226571.875, 8233903.125, 8241253.125, 8241729.6875, 8241825.0, 8244360.9375, 8248001.5625, 8248737.5, 8251479.6875, 8251771.875, 8252017.1875, 8252023.4375, 8252810.9375, 8279756.25, 8283842.1875, 8284881.25, 8285375.0, 8286103.125, 8286743.75, 8287610.9375, 8287823.4375, 8290004.6875, 8291757.8125, 8303462.5, 8327271.875, 8346904.6875, 8382918.75, 8382950.0, 8386825.0, 8395151.5625, 8397304.6875, 8402109.375, 8405001.5625, 8405296.875, 8406157.8125, 8406412.5, 8406462.5, 8406834.375, 8406975.0, 8407489.0625, 8408753.125, 8409565.625, 8412985.9375, 8413853.125, 8415396.875, 8415532.8125, 8415543.75, 8416657.8125, 8417709.375, 8417892.1875, 8418057.8125, 8421323.4375, 8421381.25, 8421467.1875, 8421743.75, 8422093.75, 8422562.5, 8435256.25, 8435284.375, 8437045.3125, 8437925.0, 8438073.4375, 8438542.1875, 8440717.1875, 8445650.0, 8446037.5, 8450079.6875, 8464987.5, 8465453.125, 8473848.4375, 8477593.75, 8478868.75, 8479221.875, 8479635.9375, 8481518.75, 8483400.0, 8486668.75, 8486770.3125, 8487864.0625, 8488248.4375, 8489312.5, 8489900.0, 8495165.625, 8499317.1875, 8500598.4375, 8501184.375, 8501489.0625, 8501492.1875, 8501506.25, 8503906.25, 8504550.0, 8511057.8125, 8511428.125, 8511650.0, 8516100.0, 8516432.8125, 8516895.3125, 8517239.0625, 8519517.1875, 8550248.4375, 8557010.9375, 8559120.3125, 8560392.1875, 8564900.0, 8568164.0625, 8569934.375, 8571850.0, 8581207.8125, 8581787.5, 8582665.625, 8586615.625, 8607476.5625, 8612417.1875, 8626687.5, 8629104.6875, 8631314.0625, 8631462.5, 8631650.0, 8636590.625, 8636671.875, 8637329.6875, 8638362.5, 8638960.9375, 8639004.6875, 8640221.875, 8640251.5625, 8640585.9375, 8642379.6875, 8642629.6875, 8642784.375, 8642996.875, 8643064.0625, 8643817.1875, 8644065.625, 8644440.625, 8644754.6875, 8646271.875, 8648629.6875, 8652079.6875, 8653014.0625, 8654382.8125, 8654448.4375, 8654537.5, 8654596.875, 8654657.8125, 8655279.6875, 8655375.0, 8662342.1875, 8666590.625, 8667575.0, 8667604.6875, 8667629.6875, 8667771.875, 8669468.75, 8672751.5625, 8672851.5625, 8673912.5, 8688867.1875, 8690520.3125, 8697226.5625, 8697748.4375, 8699646.875, 8699993.75, 8701121.875, 8701479.6875, 8702737.5, 8709532.8125, 8709579.6875, 8710675.0, 8712745.3125, 8728179.6875, 8768053.125, 8776381.25, 8782335.9375, 8792335.9375, 8796714.0625, 8797365.625, 8798879.6875, 8800425.0, 8800460.9375, 8800964.0625, 8800973.4375, 8802548.4375, 8807990.625, 8811673.4375, 8811953.125, 8814743.75, 8816185.9375, 8827806.25, 8829287.5, 8831245.3125, 8833818.75, 8837614.0625, 8837653.125, 8839412.5, 8840632.8125, 8872126.5625, 8872467.1875, 8873398.4375, 8874567.1875, 8875025.0, 8875742.1875, 8875845.3125, 8878996.875, 8883671.875, 8891751.5625, 8891778.125, 8898845.3125, 8920048.4375, 8920048.4375, 8948073.4375, 8955534.375, 8956582.8125, 8961035.9375, 8986039.0625, 8996629.6875, 9005087.5, 9024432.8125, 9028370.3125, 9028371.875, 9028642.1875, 9033826.5625, 9036350.0, 9038510.9375, 9043340.625, 9053129.6875, 9065915.625, 9072646.875, 9073535.9375, 9118718.75, 9129948.4375, 9130326.5625, 9130671.875, 9131785.9375, 9132090.625, 9132157.8125, 9133368.75, 9135823.4375, 9136709.375, 9138498.4375, 9138917.1875, 9141142.1875, 9141326.5625, 9141417.1875, 9144079.6875, 9144710.9375, 9144890.625, 9150528.125, 9150748.4375, 9151064.0625, 9152562.5, 9155781.25, 9158445.3125, 9162578.125, 9163039.0625, 9168290.625, 9184837.5, 9190593.75, 9195693.75, 9197998.4375, 9198248.4375, 9224962.5, 9251459.375, 9260020.3125, 9264604.6875, 9264753.125, 9264857.8125, 9268189.0625, 9272923.4375, 9291389.0625, 9291400.0, 9291462.5, 9295509.375, 9330571.875, 9346484.375, 9397915.625, 9406179.6875, 9409260.9375, 9441470.3125, 9441925.0, 9548662.5, 9628584.375, 9910067.1875, 10252698.4375, 10268976.5625, 10270400.0, 10358231.25, 10422428.125, 10430784.375, 10518301.5625, 10597381.25, 10597467.1875, 10704878.125, 10705662.5, 10777540.625, 10913528.125, 10920878.125, 11320742.1875, 11325134.375, 11325559.375, 11327590.625, 11329243.75, 11334350.0, 11341254.6875, 11355509.375, 11384643.75, 183889442.1875, 468852471.875], [17.75508859616611, 40.41963793182402, 40.84939480103119, 5.0379402723876945, 9.010970837978926, 21.591976853165225, 33.35016282884718, 52.60364608349887, 100.32573259463985, 43.11293407533998, 16.57711610310442, 15.92356086243431, 9.709279399090542, 5.159016629343135, 70.87355596799638, 13.902460996709625, 6.5944922682473734, 58.20119581541063, 25.680336850357065, 24.08763123228424, 24.425104151903124, 6.633840013319265, 43.06064227755857, 26.113770275746504, 494.79719901121894, 9.076049856030801, 71.92115454692295, 7.3918909924617955, 102.23178050891855, 82.90432294748625, 37.463143827572125, 42.49621171257902, 13.186320396583334, 27.529732654346745, 39.82816937602468, 18.657119226502946, 153.2041849702464, 10.655248731559332, 26.146195910735933, 35.03858151268257, 97.85018954190618, 9.118684360587498, 7.528947555416272, 14.82858570903348, 11.097841689923248, 23.353071911564804, 5.299925435302319, 74.21888497038016, 81.37304576593627, 65.22194824122334, 75.30001396289272, 19.950860048746303, 21.56144774377657, 15.91368620597985, 9.477082850688063, 9.780874212730755, 53.91035152888269, 85.14027535770653, 51.715572251963124, 94.94977627312542, 61.82786816246933, 67.53772506402609, 42.1705869460583, 44.16997214920204, 68.23804370084896, 65.43349383940027, 136.673766018393, 50.39216036434293, 30.84756025879141, 6.968338660866034, 56.92581387455617, 82.66681879524218, 53.557753126065464, 8.025673505746854, 19.064964036644184, 101.47993480672577, 62.49306298713327, 10.536300329137344, 41.01970594337075, 54.12544253913087, 65.31734226767401, 66.02608099060527, 73.97096220029934, 19.65870402600046, 35.16944290214204, 68.85287258411941, 58.99579935137301, 113.88777286169531, 9.662399484329377, 12.322582794865808, 132.9227550602385, 11.423246830646711, 54.81347387720939, 34.704896746586854, 45.05314643327291, 15.997993176618271, 76.14858965336023, 122.64758827159984, 25.639567991438277, 9.784902533553387, 10.49031486607681, 52.01851004498215, 68.03464824039105, 44.18571005121463, 70.18165812992561, 20.93378980885894, 58.441044321995584, 66.13646784279771, 53.24569191706668, 82.24575616471287, 10.976930991518074, 7.5445489716622705, 45.42323383355118, 133.4670072334515, 102.77552737829274, 29.582384772073862, 69.87630631857802, 11.53075754374376, 67.72005334413414, 15.080344201158793, 61.481545033561346, 8.553989595780395, 13.173595949100621, 70.21521300789324, 91.03795470280939, 18.724768029523858, 5.409084692908067, 10.222024357527642, 37.128300159995746, 29.893685999750424, 10.1913110163505, 108.53125324690023, 99.54220175187949, 22.673934965422855, 20.796024689821184, 93.08477392237661, 43.553669190756544, 8.089514857092999, 6.563585580896897, 105.31642302849794, 63.12701550545955, 13.40742032805439, 18.974385608482798, 16.491099139364653, 22.576800646085328, 97.4817762111278, 96.14368162267166, 79.30489515703454, 96.52269309980953, 45.38862263074895, 81.79337216935161, 6.7194969038228525, 197.1929729743222, 73.3568127971482, 22.219374824868456, 7.6367146168626165, 18.165124811531296, 30.02049071926148, 191.74104739994962, 324.7496461441576, 90.40271507846342, 100.85948699992527, 44.281316044542564, 71.92711879872999, 40.935017930803916, 40.42197913147905, 34.75928628249297, 142.29423705264512, 31.60892715681897, 49.739745136571194, 10.535871696394713, 85.6934789829016, 76.33284538650312, 8.352871907136235, 7.419337269294948, 178.4741957263937, 10.11418544434442, 5.562987525608422, 65.54037659063921, 24.845089755203986, 115.34755054506041, 110.78626366932434, 5.289497243033156, 23.139479601671447, 61.1693811406915, 29.388292982122497, 41.15886976874864, 9.906301805545542, 48.487194059104894, 14.841965473702462, 33.54004782702998, 32.898735489804, 28.295357741731433, 21.774031640469005, 135.09751630605948, 44.66832000530258, 10.376008638936813, 65.21409404045833, 31.300515150290877, 10.96674593514339, 8.490671384848284, 77.1002008718303, 81.64593273321712, 142.39037245729992, 28.157841584315154, 27.573114187264448, 13.572713430038181, 107.82553354238648, 33.963466726266866, 52.24747659957484, 9.252912511851665, 22.072610925851333, 42.66845919672468, 7.59241694912062, 28.489660557511307, 13.181646726086889, 36.05156892808949, 17.377990770906333, 30.259140410782223, 112.66973598800696, 47.65237438377087, 153.64711509316353, 44.51964602566432, 69.47671645357293, 32.766324996959824, 93.22975362716467, 103.91138921629722, 83.87934659668313, 5.163550279631714, 11.702920826968175, 6.263991675779986, 36.073474088505236, 122.53992433457803, 16.187581324677872, 50.05416533128168, 21.636880129227904, 7.514380905661476, 137.391538858016, 18.0783534400249, 21.086355043488105, 5.967745953486653, 36.61747675927414, 33.787332394364746, 83.23954906091896, 17.192385510125742, 34.024065492962485, 29.107875795661577, 27.46951620278915, 28.852197872091008, 33.51300409364651, 5.054442195172537, 28.937654315225355, 14.723658265991812, 16.465350897026447, 55.229606455921285, 5.03782969554271, 27.2423720681164, 156.93511024522456, 10.424099256918758, 11.127887691884528, 16.571860363301578, 58.317367109482106, 31.66379743844118, 37.54948956988395, 61.845962035487574, 32.32220289188595, 35.56708592259957, 134.26778351043131, 50.20883801105495, 11.383797669189642, 13.042828689367136, 34.970725716170975, 88.28172593793875, 111.40354662305293, 43.95974841235095, 11.850172789859746, 33.99964442931332, 16.201998168831814, 9.12603651809355, 91.95376673005977, 16.6779884203392, 34.93488646062154, 101.94688740621461, 183.22055479582008, 22.49948497726869, 31.771413150607177, 14.666744523325768, 13.48845887870151, 140.44196129580865, 130.73922642364587, 110.38922340871676, 54.48782555948014, 13.199138027057783, 13.961321719701811, 21.665867113317542, 109.26074532351741, 57.076592033809334, 24.43190559211317, 23.880443029340604, 171.11631109680732, 26.67937228541495, 53.58877047064908, 7.816807209050949, 47.35829465581131, 43.87015504175876, 17.11073957373588, 22.44544612535948, 24.50385227091425, 37.17331588987599, 48.04260867924875, 68.44438411115566, 48.99389038018715, 11.411369465488198, 109.05683354159244, 20.599912764085243, 5.044365068875347, 12.085476825885879, 8.841593577513764, 42.29974436605625, 81.51180113711008, 15.867252864106382, 58.86864074509889, 19.070493133189718, 18.32466876053291, 54.58798529424991, 39.3245008536634, 48.31493555008675, 48.30553234450006, 12.795232635802073, 32.65828072020677, 26.852785635927916, 31.60289119307094, 52.67600842798148, 91.36076884549936, 161.6710451416995, 9.04142869924871, 113.28381714907128, 87.10061955670797, 93.63001728063293, 9.416304320616307, 85.93525716324993, 74.75237714946509, 37.68230645299737, 111.0110694603781, 18.76717793700988, 7.507913097834936, 117.62433006971811, 48.97122302510761, 44.05446021633079, 53.96749163762771, 56.60298291640678, 7.912369415755558, 21.108997418230977, 52.88629101720215, 32.95657754308504, 51.31837548588135, 113.78903317162995, 59.8824716113054, 79.38032835323105, 11.26083637408887, 28.533534412732138, 65.17763223661522, 89.25040450263157, 36.33365113627812, 40.83778833384814, 26.03959050442032, 50.91585696262089, 66.66466618164083, 25.35903065909047, 10.792104906491442, 56.642844925785354, 97.66075170022813, 103.58232863793282, 11.28987113792654, 5.75019578721745, 52.65377720350965, 31.90531282315219, 34.59827610879422, 16.669756482485944, 7.6998456008804395, 5.271888345239172, 37.61975512412645, 5.907969337378094, 88.66638020829373, 6.777058644039949, 41.69477913364284, 91.4946173142695, 12.757966722303342, 53.99291917360601, 172.3798190281272, 6.5655422066278035, 51.13416999335219, 9.17776443574648, 29.96770321953863, 58.86162778379328, 20.223876562554246, 5.756137567669847, 15.368590002872178, 61.2456809535426, 84.88669444211573, 5.079661364066633, 10.47798510094777, 8.146683871055346, 58.003665682476196, 6.813145755484013, 19.61783295250199, 5.103713755946156, 62.883738828034566, 37.5456525367094, 37.911716192517716, 124.63649411926956, 10.083742185486434, 71.30231040706084, 62.70640420675129, 75.34183768836809, 57.32418480651383, 20.635656875545678])
Detected energies during the discharge + Energy spectrum
multiplot(icon_fig, T_int_first,E,xle,Etot)