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 = 44447
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);
([6675421.875, 6817651.5625, 6978385.9375, 7092885.9375, 7092889.0625, 7098371.875, 7098979.6875, 7100273.4375, 7128687.5, 7139760.9375, 7143310.9375, 7256139.0625, 7283318.75, 7313010.9375, 7317635.9375, 7317639.0625, 7318851.5625, 7319214.0625, 7320768.75, 7341092.1875, 7341784.375, 7343203.125, 7446295.3125, 7456365.625, 7467387.5, 7470332.8125, 7548021.875, 7557921.875, 7560350.0, 7574860.9375, 7577114.0625, 7602728.125, 7614604.6875, 7628903.125, 7637468.75, 7662876.5625, 7734831.25, 7739964.0625, 7773648.4375, 7814643.75, 7816306.25, 7818746.875, 7823817.1875, 7846806.25, 7849092.1875, 7901448.4375, 7957520.3125, 7988923.4375, 8072834.375, 8143668.75, 8148107.8125, 8149007.8125, 8164992.1875, 8172745.3125, 8173853.125, 8175201.5625, 8176145.3125, 8176529.6875, 8177703.125, 8177868.75, 8177895.3125, 8180195.3125, 8180248.4375, 8180279.6875, 8180350.0, 8200370.3125, 8225598.4375, 8230703.125, 8251876.5625, 8313131.25, 8319104.6875, 8323873.4375, 8332112.5, 8340421.875, 8341232.8125, 8342232.8125, 8344295.3125, 8344396.875, 8348782.8125, 8357298.4375, 8365906.25, 8369943.75, 8370267.1875, 8371520.3125, 8373115.625, 8380440.625, 8388807.8125, 8395351.5625, 8396159.375, 8404123.4375, 8406585.9375, 8406826.5625, 8412414.0625, 8414870.3125, 8414890.625, 8414925.0, 8415414.0625, 8420159.375, 8442282.8125, 8443321.875, 8475060.9375, 8476731.25, 8496901.5625, 8505571.875, 8509389.0625, 8512120.3125, 8513762.5, 8513768.75, 8515059.375, 8515598.4375, 8524450.0, 8524845.3125, 8533562.5, 8560229.6875, 8571446.875, 8583526.5625, 8583607.8125, 8591646.875, 8595970.3125, 8600737.5, 8616078.125, 8617128.125, 8617371.875, 8617376.5625, 8623314.0625, 8657139.0625, 8657895.3125, 8663223.4375, 8674862.5, 8689834.375, 8689950.0, 8692990.625, 8705206.25, 8716768.75, 8716981.25, 8733256.25, 8736100.0, 8737276.5625, 8740320.3125, 8760042.1875, 8777928.125, 8799714.0625, 8803287.5, 8840356.25, 8843668.75, 8847260.9375, 8849359.375, 8873490.625, 8877912.5, 8884868.75, 8887275.0, 8888321.875, 8892020.3125, 8892634.375, 8893745.3125, 8894812.5, 8897482.8125, 8900835.9375, 8902046.875, 8915989.0625, 8924979.6875, 8927212.5, 8927559.375, 8938485.9375, 8943710.9375, 8988821.875, 8990507.8125, 9000132.8125, 9000903.125, 9025575.0, 9026225.0, 9029510.9375, 9097810.9375, 9170179.6875, 9170195.3125, 9205451.5625, 9258082.8125, 9261270.3125, 9297826.5625, 9300153.125, 9303004.6875, 9303590.625, 9345239.0625, 9345670.3125, 9347903.125, 9349409.375, 9351432.8125, 9353031.25, 9354407.8125, 9354576.5625, 9376487.5, 9392710.9375, 9401296.875, 9408787.5, 9431748.4375, 9431793.75, 9432690.625, 9476881.25, 9482476.5625, 9509901.5625, 9510982.8125, 9512203.125, 9512214.0625, 9575226.5625, 9614798.4375, 9642014.0625, 9642806.25, 9662876.5625, 9663964.0625, 9665265.625, 9665775.0, 9666203.125, 9673587.5, 9964559.375, 9979282.8125, 10004625.0, 10005646.875, 10005873.4375, 10006995.3125, 10113265.625, 10200153.125, 10255425.0, 10255451.5625, 10273357.8125, 10285385.9375, 10286537.5, 10286801.5625, 10291153.125, 10291903.125, 10296210.9375, 10297573.4375, 10297578.125, 10297725.0, 10297851.5625, 10298045.3125, 10298479.6875, 10298498.4375, 10298500.0, 10298642.1875, 10299628.125, 10299773.4375, 10299920.3125, 10300079.6875, 10300220.3125, 10300734.375, 10301528.125, 10302734.375, 10304187.5, 10304909.375, 10305703.125, 10306726.5625, 10307206.25, 10307640.625, 10307898.4375, 10307962.5, 10308196.875, 10309334.375, 10310075.0, 10310098.4375, 10311015.625, 10312735.9375, 10317031.25, 10325976.5625, 10340576.5625, 10343412.5, 10343945.3125, 10344478.125, 10345520.3125, 10358854.6875, 10360171.875, 10360225.0, 10360887.5, 10366634.375, 10375445.3125, 10426262.5, 10428004.6875, 10442987.5, 10454871.875, 10455601.5625, 10455742.1875, 10456635.9375, 10458771.875, 10459531.25, 10460009.375, 10460632.8125, 10461193.75, 10461806.25, 10462496.875, 10464868.75, 10468921.875, 10469254.6875, 10469276.5625, 10480273.4375, 10504426.5625, 10504725.0, 10506353.125, 10506500.0, 10511100.0, 10511490.625, 10512409.375, 10512648.4375, 10512656.25, 10521906.25, 10527426.5625, 10530987.5, 10531629.6875, 10546514.0625, 10547482.8125, 10547617.1875, 10547659.375, 10547812.5, 10547837.5, 10547939.0625, 10548040.625, 10548196.875, 10548703.125, 10549128.125, 10549157.8125, 10549187.5, 10549187.5, 10549384.375, 10549910.9375, 10550687.5, 10550757.8125, 10550884.375, 10550957.8125, 10551310.9375, 10551767.1875, 10551846.875, 10551956.25, 10552307.8125, 10553276.5625, 10555601.5625, 10557300.0, 10560206.25, 10575029.6875, 10619951.5625, 10629181.25, 10640809.375, 10640896.875, 10642035.9375, 10644512.5, 10645075.0, 10645428.125, 10654884.375, 10662776.5625, 10688106.25, 10691389.0625, 10712278.125, 10735873.4375, 10735915.625, 10755632.8125, 10764081.25, 10770628.125, 10787176.5625, 10838475.0, 10895640.625, 10895667.1875, 10917342.1875, 10924587.5, 10972598.4375, 10976764.0625, 10988540.625, 10991975.0, 10992062.5, 11269531.25, 11270073.4375, 11271045.3125, 11273004.6875, 11273259.375, 11273301.5625, 11275484.375, 11275540.625, 11275671.875, 11275681.25, 11276285.9375, 11276323.4375, 11276428.125, 11276653.125, 11277160.9375, 11277228.125, 11277235.9375, 11277760.9375, 11277912.5, 11278118.75, 11278287.5, 11278892.1875, 11279121.875, 11279479.6875, 11279507.8125, 11280860.9375, 11281453.125, 11281940.625, 11282479.6875, 11283810.9375, 11286175.0, 11287128.125, 11290793.75, 11291912.5, 11294076.5625, 11300660.9375, 11301662.5, 11317231.25, 11321393.75, 11323300.0, 11340200.0], [8.725674249108101, 103.95749517640063, 16.911212832089973, 29.875792936195207, 46.382217265439294, 9.40742309627946, 43.19303348931678, 15.678186898233212, 36.8570066251708, 10.022951491915055, 5.831137341569644, 32.03777677163422, 53.17557237696437, 67.97997461637571, 8.737102965494946, 15.694765143850907, 64.44336110370863, 5.420072265832159, 6.121240148959732, 112.66851656335349, 24.032152048509587, 7.752569219913355, 6.650158048471144, 57.25981083060302, 55.76047543327001, 12.341604997449997, 92.28559141005242, 45.183432405908476, 12.360801152053908, 9.874491456460024, 65.2635878631005, 47.91841171077741, 68.33758696666882, 23.25614976367455, 75.96104583716459, 48.13945612294357, 44.26548204909314, 70.28500225626108, 110.1912613934, 21.1230715208105, 86.243922275947, 14.642830653048176, 11.638890146069583, 60.810025044053255, 62.66384021773473, 41.7858084200972, 62.56936319224397, 18.007760315130554, 35.06331713762447, 130.50346753065978, 73.46947091364179, 88.09403464108539, 9.692111548671178, 12.022102186791225, 87.40852558431759, 24.25194702679376, 12.868024908166046, 18.838930306162556, 61.74281670684342, 11.134173584365199, 57.70292276998698, 49.03167150160209, 130.63306825003718, 67.04066925000402, 7.601395635602859, 5.343093424632028, 21.55357591530306, 26.727480746053953, 95.48710808398643, 32.67198583813225, 24.816741450068513, 33.085617138596334, 275.23270976286034, 68.89303056718089, 16.824408543222198, 8.840176641657772, 23.465219701704207, 24.32546803107448, 130.37220146915044, 7.756833235656309, 11.157783869927128, 18.544789419853096, 34.09490751890481, 8.85751887081068, 105.61747282334676, 11.18491411136805, 17.711905775983976, 68.56255235090998, 7.8461807674058335, 11.771598410854484, 24.043689077399343, 83.2499087003606, 23.882062990694642, 41.32812767789959, 15.87476335395307, 5.76008332284351, 14.449293450006884, 140.19423616250697, 5.061766115800348, 36.13904214502617, 10.792621808745416, 126.65558578597923, 14.281259830278731, 18.540615820874066, 82.06283417042998, 23.845888731908797, 16.464222056587232, 132.93535873575465, 7.963891692296081, 20.083525225352105, 92.25301663586909, 16.02789258418085, 60.09052283118764, 40.827962311402274, 14.621190391623067, 55.82913178042385, 19.268992448536036, 50.52779530899383, 85.71234530887935, 9.601013863575597, 14.347585810809578, 13.488714105063352, 11.962446987002375, 25.707354889961977, 61.691775677707014, 103.20743477486252, 17.18606191625954, 93.76546296956079, 5.479275161806557, 10.234363394436295, 23.987105095762438, 26.609909213653033, 24.84528038723188, 11.08255467847581, 8.634082286467176, 61.36986591431188, 10.76366323247887, 55.9879318136863, 10.41788049100119, 232.68411120291796, 22.98507139753179, 7.951166699051319, 16.619093910080863, 5.407441839580478, 105.13408756649287, 13.5477082717389, 59.9434010759788, 41.10344697256212, 18.606227301583054, 33.4062172797482, 6.4914672647900655, 110.1099111810159, 75.16863217331897, 12.261137244384523, 27.37524889581041, 28.12092903183646, 8.309518006769318, 101.29084385663403, 21.51702613254438, 37.88348661485069, 37.40726922262905, 16.510661494231602, 19.85975433652352, 17.98333963205377, 15.755913352748014, 84.20444143638079, 71.01515092388257, 17.006959332566414, 86.39468635567259, 116.1000656135765, 52.18921206044704, 30.41432904298234, 100.24282024015382, 81.98564603852908, 29.14435904125166, 138.18310530258898, 6.581522944501258, 75.12480381635136, 69.69985656256037, 70.03997553936959, 110.12922935641102, 61.350045915405964, 66.4398595495233, 49.436462507619495, 13.490335090658917, 67.25462082287027, 11.080121759092671, 53.547205184851954, 12.335543796697985, 9.555595512331573, 50.64503067421698, 60.490529694993484, 59.962091325837044, 12.604915874028517, 14.395806090626191, 6.2789449470867895, 12.302784252260969, 109.78145765258051, 9.670727951527168, 73.79543316563421, 33.92989641933261, 57.11881665659753, 26.368018227956146, 155.7698427088887, 14.392237720876608, 14.264823104559005, 40.62045819218783, 61.16591319106122, 18.896984017824018, 8.735016380625224, 83.9814210014587, 13.139231715162145, 8.88131635611141, 5.199653459810009, 160.8230815973544, 27.275734798439725, 44.62021761877179, 5.2419987517299145, 7.623778901788336, 19.004751115527952, 67.84959623248989, 10.335226265177868, 8.753441773592002, 9.199367433695578, 25.699170883262294, 117.71226211464243, 26.866607793975803, 33.351239100152675, 17.866883222682493, 54.953273690236735, 47.65915564370957, 13.35207833723956, 8.064218109195036, 41.3497263463137, 7.499529163179203, 11.975674032937329, 10.667059176883198, 165.9319215923794, 44.334107372531854, 17.67467895029652, 11.773149561476474, 54.72704050321152, 27.31234578762937, 30.76394638669201, 10.551911139586588, 13.913987820178765, 99.13255645605543, 15.022663928907958, 5.923339403702851, 6.815412635429669, 12.860142665844094, 38.33290059875653, 7.103368022638362, 14.19760291034208, 81.43128559100386, 45.1552549632878, 28.96402438290769, 63.24588779863649, 8.795773578309461, 15.822112103966406, 6.314094734794091, 21.98345109606125, 16.241929816869987, 10.720196428330741, 64.02920992316601, 18.008926409964012, 19.278078022726454, 18.83378536507593, 39.89967327082796, 10.007149247170073, 5.231741761224389, 65.07064861674289, 33.88022799265076, 8.196768343928607, 5.217344475182415, 44.07216182485023, 87.94773714795826, 37.4207052781117, 26.462942602974337, 8.482622138450122, 84.8541055865594, 106.08892244624805, 27.691856922796738, 121.9724393913981, 150.0320406483125, 14.905868815118025, 11.13928608960115, 73.34555505379083, 20.68440812403423, 78.60062320500448, 53.98204217386905, 14.30696862574752, 8.932197016946592, 12.729497349666689, 69.38418202583836, 13.777442287595346, 77.97421082500756, 89.26537187690722, 9.173795470689878, 54.3946757116579, 54.49389093876625, 46.4377138882506, 35.11364015959136, 46.29415253556006, 19.712071472870484, 7.904822560741564, 47.33148770876206, 25.851213115977725, 179.05502688013289, 43.71794095757631, 41.44827147444012, 189.0761051999664, 14.513741398076213, 17.245392236159713, 26.34486964471019, 10.80521476881118, 34.935344327189966, 119.99004208030053, 66.98236154765513, 14.849079306219434, 11.13367314356341, 54.946356574095425, 8.321303065395925, 12.783268703987915, 19.486037536968617, 57.54235605293544, 16.814087040827665, 34.912567554219336, 5.880666240050639, 38.67018198770049, 72.77347800972618, 8.234436701527683, 89.04906037578115, 19.494121862112834, 146.64904458438212, 73.2602092766762, 10.203258198202331, 19.79411173314245, 6.318424565184148, 9.86943236635915, 96.7518341313348, 100.9047024648366, 101.76052669784126, 5.50994716444726, 90.65128222287527, 78.4078652950865, 9.774732875713882, 135.94958112356883, 89.22533215731346, 24.663803355331446, 25.902973572428323, 94.37037590777993, 93.98756562553552, 37.17669261025041, 102.29263498886125, 12.001233610906525, 24.974016750226955, 6.974748866757529, 12.317267034835274, 10.858864502161847, 37.689152356283586, 15.3744299154924, 74.7793567671871, 74.41608110209874, 12.813795320110623, 84.67752647961551, 80.90293019739579, 155.02378013103962, 62.37335100254475, 6.105065259444005, 28.255523006381278, 120.18344787885563, 5.13523732549022, 6.587539191050565, 154.41250890492933, 132.83150465706674, 93.56238872049694, 10.803735174826643, 15.188985503227999, 20.88094031160771, 5.37986458118887, 7.135019312153978, 52.307870746092476, 10.96026299065091, 59.21979078806922, 25.62867682283258, 8.010233278974438, 18.734738862386028, 8.88937736032853, 14.571890081683934, 57.015148212922114, 20.112725643374645, 18.459738524971947, 14.001388581800914, 38.33789404664146, 96.42203587148747, 54.40808657576671, 49.531843227462076, 26.241566654270024, 60.53428219868335, 5.845386102027495, 8.34787544865437, 12.759527038621485, 11.757804831169018, 5.817472766507895, 6.090845440277669])
caption, xmean,count, xle, Etot = energy_spectrum(E_tot)
hist_file(E_hist, xmean, count, caption);
([6675421.875, 6817651.5625, 6978385.9375, 7092885.9375, 7092889.0625, 7098371.875, 7098979.6875, 7100273.4375, 7128687.5, 7139760.9375, 7143310.9375, 7256139.0625, 7283318.75, 7313010.9375, 7317635.9375, 7317639.0625, 7318851.5625, 7319214.0625, 7320768.75, 7341092.1875, 7341784.375, 7343203.125, 7446295.3125, 7456365.625, 7467387.5, 7470332.8125, 7548021.875, 7557921.875, 7560350.0, 7574860.9375, 7577114.0625, 7602728.125, 7614604.6875, 7628903.125, 7637468.75, 7662876.5625, 7734831.25, 7739964.0625, 7773648.4375, 7814643.75, 7816306.25, 7818746.875, 7823817.1875, 7846806.25, 7849092.1875, 7901448.4375, 7957520.3125, 7988923.4375, 8072834.375, 8143668.75, 8148107.8125, 8149007.8125, 8164992.1875, 8172745.3125, 8173853.125, 8175201.5625, 8176145.3125, 8176529.6875, 8177703.125, 8177868.75, 8177895.3125, 8180195.3125, 8180248.4375, 8180279.6875, 8180350.0, 8200370.3125, 8225598.4375, 8230703.125, 8251876.5625, 8313131.25, 8319104.6875, 8323873.4375, 8332112.5, 8340421.875, 8341232.8125, 8342232.8125, 8344295.3125, 8344396.875, 8348782.8125, 8357298.4375, 8365906.25, 8369943.75, 8370267.1875, 8371520.3125, 8373115.625, 8380440.625, 8388807.8125, 8395351.5625, 8396159.375, 8404123.4375, 8406585.9375, 8406826.5625, 8412414.0625, 8414870.3125, 8414890.625, 8414925.0, 8415414.0625, 8420159.375, 8442282.8125, 8443321.875, 8475060.9375, 8476731.25, 8496901.5625, 8505571.875, 8509389.0625, 8512120.3125, 8513762.5, 8513768.75, 8515059.375, 8515598.4375, 8524450.0, 8524845.3125, 8533562.5, 8560229.6875, 8571446.875, 8583526.5625, 8583607.8125, 8591646.875, 8595970.3125, 8600737.5, 8616078.125, 8617128.125, 8617371.875, 8617376.5625, 8623314.0625, 8657139.0625, 8657895.3125, 8663223.4375, 8674862.5, 8689834.375, 8689950.0, 8692990.625, 8705206.25, 8716768.75, 8716981.25, 8733256.25, 8736100.0, 8737276.5625, 8740320.3125, 8760042.1875, 8777928.125, 8799714.0625, 8803287.5, 8840356.25, 8843668.75, 8847260.9375, 8849359.375, 8873490.625, 8877912.5, 8884868.75, 8887275.0, 8888321.875, 8892020.3125, 8892634.375, 8893745.3125, 8894812.5, 8897482.8125, 8900835.9375, 8902046.875, 8915989.0625, 8924979.6875, 8927212.5, 8927559.375, 8938485.9375, 8943710.9375, 8988821.875, 8990507.8125, 9000132.8125, 9000903.125, 9025575.0, 9026225.0, 9029510.9375, 9097810.9375, 9170179.6875, 9170195.3125, 9205451.5625, 9258082.8125, 9261270.3125, 9297826.5625, 9300153.125, 9303004.6875, 9303590.625, 9345239.0625, 9345670.3125, 9347903.125, 9349409.375, 9351432.8125, 9353031.25, 9354407.8125, 9354576.5625, 9376487.5, 9392710.9375, 9401296.875, 9408787.5, 9431748.4375, 9431793.75, 9432690.625, 9476881.25, 9482476.5625, 9509901.5625, 9510982.8125, 9512203.125, 9512214.0625, 9575226.5625, 9614798.4375, 9642014.0625, 9642806.25, 9662876.5625, 9663964.0625, 9665265.625, 9665775.0, 9666203.125, 9673587.5, 9964559.375, 9979282.8125, 10004625.0, 10005646.875, 10005873.4375, 10006995.3125, 10113265.625, 10200153.125, 10255425.0, 10255451.5625, 10273357.8125, 10285385.9375, 10286537.5, 10286801.5625, 10291153.125, 10291903.125, 10296210.9375, 10297573.4375, 10297578.125, 10297725.0, 10297851.5625, 10298045.3125, 10298479.6875, 10298498.4375, 10298500.0, 10298642.1875, 10299628.125, 10299773.4375, 10299920.3125, 10300079.6875, 10300220.3125, 10300734.375, 10301528.125, 10302734.375, 10304187.5, 10304909.375, 10305703.125, 10306726.5625, 10307206.25, 10307640.625, 10307898.4375, 10307962.5, 10308196.875, 10309334.375, 10310075.0, 10310098.4375, 10311015.625, 10312735.9375, 10317031.25, 10325976.5625, 10340576.5625, 10343412.5, 10343945.3125, 10344478.125, 10345520.3125, 10358854.6875, 10360171.875, 10360225.0, 10360887.5, 10366634.375, 10375445.3125, 10426262.5, 10428004.6875, 10442987.5, 10454871.875, 10455601.5625, 10455742.1875, 10456635.9375, 10458771.875, 10459531.25, 10460009.375, 10460632.8125, 10461193.75, 10461806.25, 10462496.875, 10464868.75, 10468921.875, 10469254.6875, 10469276.5625, 10480273.4375, 10504426.5625, 10504725.0, 10506353.125, 10506500.0, 10511100.0, 10511490.625, 10512409.375, 10512648.4375, 10512656.25, 10521906.25, 10527426.5625, 10530987.5, 10531629.6875, 10546514.0625, 10547482.8125, 10547617.1875, 10547659.375, 10547812.5, 10547837.5, 10547939.0625, 10548040.625, 10548196.875, 10548703.125, 10549128.125, 10549157.8125, 10549187.5, 10549187.5, 10549384.375, 10549910.9375, 10550687.5, 10550757.8125, 10550884.375, 10550957.8125, 10551310.9375, 10551767.1875, 10551846.875, 10551956.25, 10552307.8125, 10553276.5625, 10555601.5625, 10557300.0, 10560206.25, 10575029.6875, 10619951.5625, 10629181.25, 10640809.375, 10640896.875, 10642035.9375, 10644512.5, 10645075.0, 10645428.125, 10654884.375, 10662776.5625, 10688106.25, 10691389.0625, 10712278.125, 10735873.4375, 10735915.625, 10755632.8125, 10764081.25, 10770628.125, 10787176.5625, 10838475.0, 10895640.625, 10895667.1875, 10917342.1875, 10924587.5, 10972598.4375, 10976764.0625, 10988540.625, 10991975.0, 10992062.5, 11269531.25, 11270073.4375, 11271045.3125, 11273004.6875, 11273259.375, 11273301.5625, 11275484.375, 11275540.625, 11275671.875, 11275681.25, 11276285.9375, 11276323.4375, 11276428.125, 11276653.125, 11277160.9375, 11277228.125, 11277235.9375, 11277760.9375, 11277912.5, 11278118.75, 11278287.5, 11278892.1875, 11279121.875, 11279479.6875, 11279507.8125, 11280860.9375, 11281453.125, 11281940.625, 11282479.6875, 11283810.9375, 11286175.0, 11287128.125, 11290793.75, 11291912.5, 11294076.5625, 11300660.9375, 11301662.5, 11317231.25, 11321393.75, 11323300.0, 11340200.0], [8.725674249108101, 103.95749517640063, 16.911212832089973, 29.875792936195207, 46.382217265439294, 9.40742309627946, 43.19303348931678, 15.678186898233212, 36.8570066251708, 10.022951491915055, 5.831137341569644, 32.03777677163422, 53.17557237696437, 67.97997461637571, 8.737102965494946, 15.694765143850907, 64.44336110370863, 5.420072265832159, 6.121240148959732, 112.66851656335349, 24.032152048509587, 7.752569219913355, 6.650158048471144, 57.25981083060302, 55.76047543327001, 12.341604997449997, 92.28559141005242, 45.183432405908476, 12.360801152053908, 9.874491456460024, 65.2635878631005, 47.91841171077741, 68.33758696666882, 23.25614976367455, 75.96104583716459, 48.13945612294357, 44.26548204909314, 70.28500225626108, 110.1912613934, 21.1230715208105, 86.243922275947, 14.642830653048176, 11.638890146069583, 60.810025044053255, 62.66384021773473, 41.7858084200972, 62.56936319224397, 18.007760315130554, 35.06331713762447, 130.50346753065978, 73.46947091364179, 88.09403464108539, 9.692111548671178, 12.022102186791225, 87.40852558431759, 24.25194702679376, 12.868024908166046, 18.838930306162556, 61.74281670684342, 11.134173584365199, 57.70292276998698, 49.03167150160209, 130.63306825003718, 67.04066925000402, 7.601395635602859, 5.343093424632028, 21.55357591530306, 26.727480746053953, 95.48710808398643, 32.67198583813225, 24.816741450068513, 33.085617138596334, 275.23270976286034, 68.89303056718089, 16.824408543222198, 8.840176641657772, 23.465219701704207, 24.32546803107448, 130.37220146915044, 7.756833235656309, 11.157783869927128, 18.544789419853096, 34.09490751890481, 8.85751887081068, 105.61747282334676, 11.18491411136805, 17.711905775983976, 68.56255235090998, 7.8461807674058335, 11.771598410854484, 24.043689077399343, 83.2499087003606, 23.882062990694642, 41.32812767789959, 15.87476335395307, 5.76008332284351, 14.449293450006884, 140.19423616250697, 5.061766115800348, 36.13904214502617, 10.792621808745416, 126.65558578597923, 14.281259830278731, 18.540615820874066, 82.06283417042998, 23.845888731908797, 16.464222056587232, 132.93535873575465, 7.963891692296081, 20.083525225352105, 92.25301663586909, 16.02789258418085, 60.09052283118764, 40.827962311402274, 14.621190391623067, 55.82913178042385, 19.268992448536036, 50.52779530899383, 85.71234530887935, 9.601013863575597, 14.347585810809578, 13.488714105063352, 11.962446987002375, 25.707354889961977, 61.691775677707014, 103.20743477486252, 17.18606191625954, 93.76546296956079, 5.479275161806557, 10.234363394436295, 23.987105095762438, 26.609909213653033, 24.84528038723188, 11.08255467847581, 8.634082286467176, 61.36986591431188, 10.76366323247887, 55.9879318136863, 10.41788049100119, 232.68411120291796, 22.98507139753179, 7.951166699051319, 16.619093910080863, 5.407441839580478, 105.13408756649287, 13.5477082717389, 59.9434010759788, 41.10344697256212, 18.606227301583054, 33.4062172797482, 6.4914672647900655, 110.1099111810159, 75.16863217331897, 12.261137244384523, 27.37524889581041, 28.12092903183646, 8.309518006769318, 101.29084385663403, 21.51702613254438, 37.88348661485069, 37.40726922262905, 16.510661494231602, 19.85975433652352, 17.98333963205377, 15.755913352748014, 84.20444143638079, 71.01515092388257, 17.006959332566414, 86.39468635567259, 116.1000656135765, 52.18921206044704, 30.41432904298234, 100.24282024015382, 81.98564603852908, 29.14435904125166, 138.18310530258898, 6.581522944501258, 75.12480381635136, 69.69985656256037, 70.03997553936959, 110.12922935641102, 61.350045915405964, 66.4398595495233, 49.436462507619495, 13.490335090658917, 67.25462082287027, 11.080121759092671, 53.547205184851954, 12.335543796697985, 9.555595512331573, 50.64503067421698, 60.490529694993484, 59.962091325837044, 12.604915874028517, 14.395806090626191, 6.2789449470867895, 12.302784252260969, 109.78145765258051, 9.670727951527168, 73.79543316563421, 33.92989641933261, 57.11881665659753, 26.368018227956146, 155.7698427088887, 14.392237720876608, 14.264823104559005, 40.62045819218783, 61.16591319106122, 18.896984017824018, 8.735016380625224, 83.9814210014587, 13.139231715162145, 8.88131635611141, 5.199653459810009, 160.8230815973544, 27.275734798439725, 44.62021761877179, 5.2419987517299145, 7.623778901788336, 19.004751115527952, 67.84959623248989, 10.335226265177868, 8.753441773592002, 9.199367433695578, 25.699170883262294, 117.71226211464243, 26.866607793975803, 33.351239100152675, 17.866883222682493, 54.953273690236735, 47.65915564370957, 13.35207833723956, 8.064218109195036, 41.3497263463137, 7.499529163179203, 11.975674032937329, 10.667059176883198, 165.9319215923794, 44.334107372531854, 17.67467895029652, 11.773149561476474, 54.72704050321152, 27.31234578762937, 30.76394638669201, 10.551911139586588, 13.913987820178765, 99.13255645605543, 15.022663928907958, 5.923339403702851, 6.815412635429669, 12.860142665844094, 38.33290059875653, 7.103368022638362, 14.19760291034208, 81.43128559100386, 45.1552549632878, 28.96402438290769, 63.24588779863649, 8.795773578309461, 15.822112103966406, 6.314094734794091, 21.98345109606125, 16.241929816869987, 10.720196428330741, 64.02920992316601, 18.008926409964012, 19.278078022726454, 18.83378536507593, 39.89967327082796, 10.007149247170073, 5.231741761224389, 65.07064861674289, 33.88022799265076, 8.196768343928607, 5.217344475182415, 44.07216182485023, 87.94773714795826, 37.4207052781117, 26.462942602974337, 8.482622138450122, 84.8541055865594, 106.08892244624805, 27.691856922796738, 121.9724393913981, 150.0320406483125, 14.905868815118025, 11.13928608960115, 73.34555505379083, 20.68440812403423, 78.60062320500448, 53.98204217386905, 14.30696862574752, 8.932197016946592, 12.729497349666689, 69.38418202583836, 13.777442287595346, 77.97421082500756, 89.26537187690722, 9.173795470689878, 54.3946757116579, 54.49389093876625, 46.4377138882506, 35.11364015959136, 46.29415253556006, 19.712071472870484, 7.904822560741564, 47.33148770876206, 25.851213115977725, 179.05502688013289, 43.71794095757631, 41.44827147444012, 189.0761051999664, 14.513741398076213, 17.245392236159713, 26.34486964471019, 10.80521476881118, 34.935344327189966, 119.99004208030053, 66.98236154765513, 14.849079306219434, 11.13367314356341, 54.946356574095425, 8.321303065395925, 12.783268703987915, 19.486037536968617, 57.54235605293544, 16.814087040827665, 34.912567554219336, 5.880666240050639, 38.67018198770049, 72.77347800972618, 8.234436701527683, 89.04906037578115, 19.494121862112834, 146.64904458438212, 73.2602092766762, 10.203258198202331, 19.79411173314245, 6.318424565184148, 9.86943236635915, 96.7518341313348, 100.9047024648366, 101.76052669784126, 5.50994716444726, 90.65128222287527, 78.4078652950865, 9.774732875713882, 135.94958112356883, 89.22533215731346, 24.663803355331446, 25.902973572428323, 94.37037590777993, 93.98756562553552, 37.17669261025041, 102.29263498886125, 12.001233610906525, 24.974016750226955, 6.974748866757529, 12.317267034835274, 10.858864502161847, 37.689152356283586, 15.3744299154924, 74.7793567671871, 74.41608110209874, 12.813795320110623, 84.67752647961551, 80.90293019739579, 155.02378013103962, 62.37335100254475, 6.105065259444005, 28.255523006381278, 120.18344787885563, 5.13523732549022, 6.587539191050565, 154.41250890492933, 132.83150465706674, 93.56238872049694, 10.803735174826643, 15.188985503227999, 20.88094031160771, 5.37986458118887, 7.135019312153978, 52.307870746092476, 10.96026299065091, 59.21979078806922, 25.62867682283258, 8.010233278974438, 18.734738862386028, 8.88937736032853, 14.571890081683934, 57.015148212922114, 20.112725643374645, 18.459738524971947, 14.001388581800914, 38.33789404664146, 96.42203587148747, 54.40808657576671, 49.531843227462076, 26.241566654270024, 60.53428219868335, 5.845386102027495, 8.34787544865437, 12.759527038621485, 11.757804831169018, 5.817472766507895, 6.090845440277669])
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);
([6675421.875, 6817651.5625, 6978385.9375, 7092885.9375, 7092889.0625, 7098371.875, 7098979.6875, 7100273.4375, 7128687.5, 7139760.9375, 7143310.9375, 7256139.0625, 7283318.75, 7313010.9375, 7317635.9375, 7317639.0625, 7318851.5625, 7319214.0625, 7320768.75, 7341092.1875, 7341784.375, 7343203.125, 7446295.3125, 7456365.625, 7467387.5, 7470332.8125, 7548021.875, 7557921.875, 7560350.0, 7574860.9375, 7577114.0625, 7602728.125, 7614604.6875, 7628903.125, 7637468.75, 7662876.5625, 7734831.25, 7739964.0625, 7773648.4375, 7814643.75, 7816306.25, 7818746.875, 7823817.1875, 7846806.25, 7849092.1875, 7901448.4375, 7957520.3125, 7988923.4375, 8072834.375, 8143668.75, 8148107.8125, 8149007.8125, 8164992.1875, 8172745.3125, 8173853.125, 8175201.5625, 8176145.3125, 8176529.6875, 8177703.125, 8177868.75, 8177895.3125, 8180195.3125, 8180248.4375, 8180279.6875, 8180350.0, 8200370.3125, 8225598.4375, 8230703.125, 8251876.5625, 8313131.25, 8319104.6875, 8323873.4375, 8332112.5, 8340421.875, 8341232.8125, 8342232.8125, 8344295.3125, 8344396.875, 8348782.8125, 8357298.4375, 8365906.25, 8369943.75, 8370267.1875, 8371520.3125, 8373115.625, 8380440.625, 8388807.8125, 8395351.5625, 8396159.375, 8404123.4375, 8406585.9375, 8406826.5625, 8412414.0625, 8414870.3125, 8414890.625, 8414925.0, 8415414.0625, 8420159.375, 8442282.8125, 8443321.875, 8475060.9375, 8476731.25, 8496901.5625, 8505571.875, 8509389.0625, 8512120.3125, 8513762.5, 8513768.75, 8515059.375, 8515598.4375, 8524450.0, 8524845.3125, 8533562.5, 8560229.6875, 8571446.875, 8583526.5625, 8583607.8125, 8591646.875, 8595970.3125, 8600737.5, 8616078.125, 8617128.125, 8617371.875, 8617376.5625, 8623314.0625, 8657139.0625, 8657895.3125, 8663223.4375, 8674862.5, 8689834.375, 8689950.0, 8692990.625, 8705206.25, 8716768.75, 8716981.25, 8733256.25, 8736100.0, 8737276.5625, 8740320.3125, 8760042.1875, 8777928.125, 8799714.0625, 8803287.5, 8840356.25, 8843668.75, 8847260.9375, 8849359.375, 8873490.625, 8877912.5, 8884868.75, 8887275.0, 8888321.875, 8892020.3125, 8892634.375, 8893745.3125, 8894812.5, 8897482.8125, 8900835.9375, 8902046.875, 8915989.0625, 8924979.6875, 8927212.5, 8927559.375, 8938485.9375, 8943710.9375, 8988821.875, 8990507.8125, 9000132.8125, 9000903.125, 9025575.0, 9026225.0, 9029510.9375, 9097810.9375, 9170179.6875, 9170195.3125, 9205451.5625, 9258082.8125, 9261270.3125, 9297826.5625, 9300153.125, 9303004.6875, 9303590.625, 9345239.0625, 9345670.3125, 9347903.125, 9349409.375, 9351432.8125, 9353031.25, 9354407.8125, 9354576.5625, 9376487.5, 9392710.9375, 9401296.875, 9408787.5, 9431748.4375, 9431793.75, 9432690.625, 9476881.25, 9482476.5625, 9509901.5625, 9510982.8125, 9512203.125, 9512214.0625, 9575226.5625, 9614798.4375, 9642014.0625, 9642806.25, 9662876.5625, 9663964.0625, 9665265.625, 9665775.0, 9666203.125, 9673587.5, 9964559.375, 9979282.8125, 10004625.0, 10005646.875, 10005873.4375, 10006995.3125, 10113265.625, 10200153.125, 10255425.0, 10255451.5625, 10273357.8125, 10285385.9375, 10286537.5, 10286801.5625, 10291153.125, 10291903.125, 10296210.9375, 10297573.4375, 10297578.125, 10297725.0, 10297851.5625, 10298045.3125, 10298479.6875, 10298498.4375, 10298500.0, 10298642.1875, 10299628.125, 10299773.4375, 10299920.3125, 10300079.6875, 10300220.3125, 10300734.375, 10301528.125, 10302734.375, 10304187.5, 10304909.375, 10305703.125, 10306726.5625, 10307206.25, 10307640.625, 10307898.4375, 10307962.5, 10308196.875, 10309334.375, 10310075.0, 10310098.4375, 10311015.625, 10312735.9375, 10317031.25, 10325976.5625, 10340576.5625, 10343412.5, 10343945.3125, 10344478.125, 10345520.3125, 10358854.6875, 10360171.875, 10360225.0, 10360887.5, 10366634.375, 10375445.3125, 10426262.5, 10428004.6875, 10442987.5, 10454871.875, 10455601.5625, 10455742.1875, 10456635.9375, 10458771.875, 10459531.25, 10460009.375, 10460632.8125, 10461193.75, 10461806.25, 10462496.875, 10464868.75, 10468921.875, 10469254.6875, 10469276.5625, 10480273.4375, 10504426.5625, 10504725.0, 10506353.125, 10506500.0, 10511100.0, 10511490.625, 10512409.375, 10512648.4375, 10512656.25, 10521906.25, 10527426.5625, 10530987.5, 10531629.6875, 10546514.0625, 10547482.8125, 10547617.1875, 10547659.375, 10547812.5, 10547837.5, 10547939.0625, 10548040.625, 10548196.875, 10548703.125, 10549128.125, 10549157.8125, 10549187.5, 10549187.5, 10549384.375, 10549910.9375, 10550687.5, 10550757.8125, 10550884.375, 10550957.8125, 10551310.9375, 10551767.1875, 10551846.875, 10551956.25, 10552307.8125, 10553276.5625, 10555601.5625, 10557300.0, 10560206.25, 10575029.6875, 10619951.5625, 10629181.25, 10640809.375, 10640896.875, 10642035.9375, 10644512.5, 10645075.0, 10645428.125, 10654884.375, 10662776.5625, 10688106.25, 10691389.0625, 10712278.125, 10735873.4375, 10735915.625, 10755632.8125, 10764081.25, 10770628.125, 10787176.5625, 10838475.0, 10895640.625, 10895667.1875, 10917342.1875, 10924587.5, 10972598.4375, 10976764.0625, 10988540.625, 10991975.0, 10992062.5, 11269531.25, 11270073.4375, 11271045.3125, 11273004.6875, 11273259.375, 11273301.5625, 11275484.375, 11275540.625, 11275671.875, 11275681.25, 11276285.9375, 11276323.4375, 11276428.125, 11276653.125, 11277160.9375, 11277228.125, 11277235.9375, 11277760.9375, 11277912.5, 11278118.75, 11278287.5, 11278892.1875, 11279121.875, 11279479.6875, 11279507.8125, 11280860.9375, 11281453.125, 11281940.625, 11282479.6875, 11283810.9375, 11286175.0, 11287128.125, 11290793.75, 11291912.5, 11294076.5625, 11300660.9375, 11301662.5, 11317231.25, 11321393.75, 11323300.0, 11340200.0], [8.725674249108101, 103.95749517640063, 16.911212832089973, 29.875792936195207, 46.382217265439294, 9.40742309627946, 43.19303348931678, 15.678186898233212, 36.8570066251708, 10.022951491915055, 5.831137341569644, 32.03777677163422, 53.17557237696437, 67.97997461637571, 8.737102965494946, 15.694765143850907, 64.44336110370863, 5.420072265832159, 6.121240148959732, 112.66851656335349, 24.032152048509587, 7.752569219913355, 6.650158048471144, 57.25981083060302, 55.76047543327001, 12.341604997449997, 92.28559141005242, 45.183432405908476, 12.360801152053908, 9.874491456460024, 65.2635878631005, 47.91841171077741, 68.33758696666882, 23.25614976367455, 75.96104583716459, 48.13945612294357, 44.26548204909314, 70.28500225626108, 110.1912613934, 21.1230715208105, 86.243922275947, 14.642830653048176, 11.638890146069583, 60.810025044053255, 62.66384021773473, 41.7858084200972, 62.56936319224397, 18.007760315130554, 35.06331713762447, 130.50346753065978, 73.46947091364179, 88.09403464108539, 9.692111548671178, 12.022102186791225, 87.40852558431759, 24.25194702679376, 12.868024908166046, 18.838930306162556, 61.74281670684342, 11.134173584365199, 57.70292276998698, 49.03167150160209, 130.63306825003718, 67.04066925000402, 7.601395635602859, 5.343093424632028, 21.55357591530306, 26.727480746053953, 95.48710808398643, 32.67198583813225, 24.816741450068513, 33.085617138596334, 275.23270976286034, 68.89303056718089, 16.824408543222198, 8.840176641657772, 23.465219701704207, 24.32546803107448, 130.37220146915044, 7.756833235656309, 11.157783869927128, 18.544789419853096, 34.09490751890481, 8.85751887081068, 105.61747282334676, 11.18491411136805, 17.711905775983976, 68.56255235090998, 7.8461807674058335, 11.771598410854484, 24.043689077399343, 83.2499087003606, 23.882062990694642, 41.32812767789959, 15.87476335395307, 5.76008332284351, 14.449293450006884, 140.19423616250697, 5.061766115800348, 36.13904214502617, 10.792621808745416, 126.65558578597923, 14.281259830278731, 18.540615820874066, 82.06283417042998, 23.845888731908797, 16.464222056587232, 132.93535873575465, 7.963891692296081, 20.083525225352105, 92.25301663586909, 16.02789258418085, 60.09052283118764, 40.827962311402274, 14.621190391623067, 55.82913178042385, 19.268992448536036, 50.52779530899383, 85.71234530887935, 9.601013863575597, 14.347585810809578, 13.488714105063352, 11.962446987002375, 25.707354889961977, 61.691775677707014, 103.20743477486252, 17.18606191625954, 93.76546296956079, 5.479275161806557, 10.234363394436295, 23.987105095762438, 26.609909213653033, 24.84528038723188, 11.08255467847581, 8.634082286467176, 61.36986591431188, 10.76366323247887, 55.9879318136863, 10.41788049100119, 232.68411120291796, 22.98507139753179, 7.951166699051319, 16.619093910080863, 5.407441839580478, 105.13408756649287, 13.5477082717389, 59.9434010759788, 41.10344697256212, 18.606227301583054, 33.4062172797482, 6.4914672647900655, 110.1099111810159, 75.16863217331897, 12.261137244384523, 27.37524889581041, 28.12092903183646, 8.309518006769318, 101.29084385663403, 21.51702613254438, 37.88348661485069, 37.40726922262905, 16.510661494231602, 19.85975433652352, 17.98333963205377, 15.755913352748014, 84.20444143638079, 71.01515092388257, 17.006959332566414, 86.39468635567259, 116.1000656135765, 52.18921206044704, 30.41432904298234, 100.24282024015382, 81.98564603852908, 29.14435904125166, 138.18310530258898, 6.581522944501258, 75.12480381635136, 69.69985656256037, 70.03997553936959, 110.12922935641102, 61.350045915405964, 66.4398595495233, 49.436462507619495, 13.490335090658917, 67.25462082287027, 11.080121759092671, 53.547205184851954, 12.335543796697985, 9.555595512331573, 50.64503067421698, 60.490529694993484, 59.962091325837044, 12.604915874028517, 14.395806090626191, 6.2789449470867895, 12.302784252260969, 109.78145765258051, 9.670727951527168, 73.79543316563421, 33.92989641933261, 57.11881665659753, 26.368018227956146, 155.7698427088887, 14.392237720876608, 14.264823104559005, 40.62045819218783, 61.16591319106122, 18.896984017824018, 8.735016380625224, 83.9814210014587, 13.139231715162145, 8.88131635611141, 5.199653459810009, 160.8230815973544, 27.275734798439725, 44.62021761877179, 5.2419987517299145, 7.623778901788336, 19.004751115527952, 67.84959623248989, 10.335226265177868, 8.753441773592002, 9.199367433695578, 25.699170883262294, 117.71226211464243, 26.866607793975803, 33.351239100152675, 17.866883222682493, 54.953273690236735, 47.65915564370957, 13.35207833723956, 8.064218109195036, 41.3497263463137, 7.499529163179203, 11.975674032937329, 10.667059176883198, 165.9319215923794, 44.334107372531854, 17.67467895029652, 11.773149561476474, 54.72704050321152, 27.31234578762937, 30.76394638669201, 10.551911139586588, 13.913987820178765, 99.13255645605543, 15.022663928907958, 5.923339403702851, 6.815412635429669, 12.860142665844094, 38.33290059875653, 7.103368022638362, 14.19760291034208, 81.43128559100386, 45.1552549632878, 28.96402438290769, 63.24588779863649, 8.795773578309461, 15.822112103966406, 6.314094734794091, 21.98345109606125, 16.241929816869987, 10.720196428330741, 64.02920992316601, 18.008926409964012, 19.278078022726454, 18.83378536507593, 39.89967327082796, 10.007149247170073, 5.231741761224389, 65.07064861674289, 33.88022799265076, 8.196768343928607, 5.217344475182415, 44.07216182485023, 87.94773714795826, 37.4207052781117, 26.462942602974337, 8.482622138450122, 84.8541055865594, 106.08892244624805, 27.691856922796738, 121.9724393913981, 150.0320406483125, 14.905868815118025, 11.13928608960115, 73.34555505379083, 20.68440812403423, 78.60062320500448, 53.98204217386905, 14.30696862574752, 8.932197016946592, 12.729497349666689, 69.38418202583836, 13.777442287595346, 77.97421082500756, 89.26537187690722, 9.173795470689878, 54.3946757116579, 54.49389093876625, 46.4377138882506, 35.11364015959136, 46.29415253556006, 19.712071472870484, 7.904822560741564, 47.33148770876206, 25.851213115977725, 179.05502688013289, 43.71794095757631, 41.44827147444012, 189.0761051999664, 14.513741398076213, 17.245392236159713, 26.34486964471019, 10.80521476881118, 34.935344327189966, 119.99004208030053, 66.98236154765513, 14.849079306219434, 11.13367314356341, 54.946356574095425, 8.321303065395925, 12.783268703987915, 19.486037536968617, 57.54235605293544, 16.814087040827665, 34.912567554219336, 5.880666240050639, 38.67018198770049, 72.77347800972618, 8.234436701527683, 89.04906037578115, 19.494121862112834, 146.64904458438212, 73.2602092766762, 10.203258198202331, 19.79411173314245, 6.318424565184148, 9.86943236635915, 96.7518341313348, 100.9047024648366, 101.76052669784126, 5.50994716444726, 90.65128222287527, 78.4078652950865, 9.774732875713882, 135.94958112356883, 89.22533215731346, 24.663803355331446, 25.902973572428323, 94.37037590777993, 93.98756562553552, 37.17669261025041, 102.29263498886125, 12.001233610906525, 24.974016750226955, 6.974748866757529, 12.317267034835274, 10.858864502161847, 37.689152356283586, 15.3744299154924, 74.7793567671871, 74.41608110209874, 12.813795320110623, 84.67752647961551, 80.90293019739579, 155.02378013103962, 62.37335100254475, 6.105065259444005, 28.255523006381278, 120.18344787885563, 5.13523732549022, 6.587539191050565, 154.41250890492933, 132.83150465706674, 93.56238872049694, 10.803735174826643, 15.188985503227999, 20.88094031160771, 5.37986458118887, 7.135019312153978, 52.307870746092476, 10.96026299065091, 59.21979078806922, 25.62867682283258, 8.010233278974438, 18.734738862386028, 8.88937736032853, 14.571890081683934, 57.015148212922114, 20.112725643374645, 18.459738524971947, 14.001388581800914, 38.33789404664146, 96.42203587148747, 54.40808657576671, 49.531843227462076, 26.241566654270024, 60.53428219868335, 5.845386102027495, 8.34787544865437, 12.759527038621485, 11.757804831169018, 5.817472766507895, 6.090845440277669])
Detected energies during the discharge + Energy spectrum
multiplot(icon_fig, T_int_first,E,xle,Etot)