Compare commits

..

No commits in common. "a4d8c0f391cdbd0d555fcbf1403db947f07657f5" and "c2fb9bd2d5d0df506d4a1220065bef43d487ac9e" have entirely different histories.

2 changed files with 2 additions and 42 deletions

View file

@ -12,7 +12,6 @@ parser.add_argument("file", type = str, help="path/file were data is stored in")
parser.add_argument('-hist', action='store_true', help = "makes histogramm of all channels") # on/off flag parser.add_argument('-hist', action='store_true', help = "makes histogramm of all channels") # on/off flag
parser.add_argument("-sum", action='store_true', help = "makes histogramms of BGOdiodes and sum (same as 'AHBGOC_vertical.py')") # on/off flag parser.add_argument("-sum", action='store_true', help = "makes histogramms of BGOdiodes and sum (same as 'AHBGOC_vertical.py')") # on/off flag
parser.add_argument('-Itime', action='store_true', help = "if chosen, Itime is calculatet and printet to filename.Itime") # on/off flag parser.add_argument('-Itime', action='store_true', help = "if chosen, Itime is calculatet and printet to filename.Itime") # on/off flag
parser.add_argument('-dau', action='store_true', help = "if chosen, time and temperature of BGO are printet to filename.dau") # on/off flag
parser.add_argument("-mV", action='store_true', help = "if chosen, data will be kept in mV changed to keV otherwise") # on/off flag parser.add_argument("-mV", action='store_true', help = "if chosen, data will be kept in mV changed to keV otherwise") # on/off flag
parser.add_argument('-muon', action='store_true', help = "only select muon data") # on/off flag parser.add_argument('-muon', action='store_true', help = "only select muon data") # on/off flag
parser.add_argument("-xray", action='store_true', help = "only select xray data") # on/off flag parser.add_argument("-xray", action='store_true', help = "only select xray data") # on/off flag
@ -62,11 +61,6 @@ def main(x):
outfile = open(fname, 'w') outfile = open(fname, 'w')
outfile.write(str(Itime)) outfile.write(str(Itime))
outfile.close() outfile.close()
elif args.dau:
time,temp = find_timetemp()
frame = pd.DataFrame({'time': time, 'T': temp})
frame.to_csv('histograms/'+filename+'.dau', sep = ' ', index = False)
else: else:
global thr global thr
@ -257,19 +251,6 @@ def find_Itime():
lasttime=time lasttime=time
return Itime return Itime
def find_timetemp():
time=[]
temp=[]
with fileinput.input(files=(file), encoding="utf-8", errors = 'ignore') as f:
for line in f:
l = line.split()
if not 'EOF' in l and l[0] == 'H':
T = adc_to_T(int(l[8]))
time.append(l[1])
temp.append(T)
return time,temp
def CmV(line, i): def CmV(line, i):
return int(line[3*i+5])/mV return int(line[3*i+5])/mV

25
test.py
View file

@ -5,28 +5,7 @@ Created on Wed Apr 10 13:16:52 2024
@author: ava @author: ava
""" """
import pandas as pd
a = [0,1,2] a = [0,1,2]
a = a + [3,4] a = a + [3,4]
print(a) print(a)
b = 6*[[30,40]]+[[50,90]]
print(b)
leer = [[],[],[]]
leer[0].append("P1")
leer[0].append("P2")
leer[1].append(3.5)
leer[1].append(1.0)
d = {'P': [], 'mpv': [], 'err_mpv':[]}
d['P'].append('P1')
d['mpv'].append(2.4)
d['err_mpv'].append(0.3)
print(d)
frame = pd.DataFrame(d)
frame.to_csv('fitparameters/'+'test'+'_mpv_sums.txt', sep = ' ', index = False)