Beispiel #1
0
import numpy as np
import matplotlib.pyplot as plt
import math
from array import array
import glob
from Functions import ClassFunc
import sys
sys.path.insert(0, '/Users/boldrinicoder/lab4/FunctionClass')
from Root_objects import ROOT_obj as R_o

ROOT.gROOT.SetBatch()

f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190510/*.txt"))

try_path = "/Users/boldrinicoder/lab4/Prova_Dense"
ClassFunc.mkdir_p(try_path)

inf = 370
sup = 680
mean = 520
Rates = []
Err_Rates = []
Reso = []
Err_Reso = []
j = 0
for i in f:

    rate, err_rate, Res = ClassFunc.Fitter_Synchro(j, i, inf, sup, mean,
                                                   try_path, 0)
    Rates.append(rate)
    print("RATEEEEEEEEEEEEEEE : ", rate)
Beispiel #2
0
from Root_objects import ROOT_obj as R_o

ROOT.gROOT.SetBatch()

#temperature .txt paths
temp_may_path = "/Users/boldrinicoder/lab4/data/tempreborn.txt"
temp_dec_path = "/Users/boldrinicoder/lab4/data/Temperature3/TEMPVENERDI1101.txt"

#file spectra path
f_may = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190513/*.txt"))
f_dec = sorted(glob.glob("/Users/boldrinicoder/lab4/data/Temperature/*.txt"))

#creating a folder to store results
try_path = "/Users/boldrinicoder/lab4/Prova_Temp_combined"
outpath1 = "./"
ClassFunc.mkdir_p(try_path)

#loading temperatures from the .txt
temp_may = ClassFunc.Temp_reading(temp_may_path)
temp_dec = ClassFunc.Temp_reading(temp_dec_path)

#shapes were not right so we set them correctly
#December
f_dec_final = f_dec[49:]
temp_dec_final = temp_dec[53:len(f_dec)+4]
#May
temp_may_final = []
for i in range(0, len(temp_may), 2):
    temp_may_final.append(float(temp_may[i]))
#temp = [float(i) for i in temp[:len(Rates)] ]
Beispiel #3
0
import numpy as np
import matplotlib.pyplot as plt
import math
from array import array
import glob
from Functions import ClassFunc
import sys
sys.path.insert(0, '/Users/boldrinicoder/lab4/FunctionClass')
from Root_objects import ROOT_obj

############MAIN#############
ROOT.gROOT.SetBatch(True)
out_path = "/Users/boldrinicoder/lab4/Grafici_Sincro"
f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190218/Sincro/*.txt"))
index = 0
ClassFunc.mkdir_p(out_path)
rate = []
err_rate = []
for i in f:
    ra, err_ra = ClassFunc.Fitter_Synchro(index, i, 400, 750, 550, out_path)
    #rate.append(ClassFunc.Fitter_Synchro(index, i, 400,750,550, out_path ))
    rate.append(ra)
    err_rate.append(err_ra)
    index += 1

x = np.arange(0, 360, 2.25)
err_x = [0] * len(x)
c = ROOT_obj.Create_Canvas(1300, 1000)
g = ROOT_obj.TGraph_err_obj(len(rate), x, rate, err_x, err_rate, 20, 4,
                            "Angle [Deg]", "Rate [s^(-1)]", "JustToShow")
g.SetMarkerSize(0.1)
Beispiel #4
0
from Functions import ClassFunc
import sys
sys.path.insert(0, '/Users/boldrinicoder/lab4/FunctionClass')
from Root_objects import ROOT_obj as robj

############MAIN#############
ROOT.gROOT.SetBatch(True)
out_path1 = "/Users/boldrinicoder/lab4/General_Graphs/pdfs"
out_path2 = "/Users/boldrinicoder/lab4/High_Voltage"
f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190118/*.txt"))
#f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/181130/*.txt"))
#f = f[10:19]
#print(f)

try_path = "/Users/boldrinicoder/lab4/Prova_Rateres"
ClassFunc.mkdir_p(try_path)

Voltages = [600,650,700,750,800,850,900,950,1000]
means = [540,600,600,570,570,550,590,610,750]
#means = [600,600,570,570,570,550,590,600,600]
infs = [350,400,470,470,470,450,430,480,600]
#infs = [450,400,430,470,470,400,430,450,450]
sups = [700,750,750,730,730,750,700,750,950]
#sups = [700,750,700,730,730,700,700,750,700]

Rates = []
Err_Rates = []
Reso = []
Err_Reso = []
j = 0
for i in f:
Beispiel #5
0
from Functions import ClassFunc

ROOT.gROOT.SetBatch(True)
#reading all the txts
f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190206/*.txt"))
histos = []
xmax = []
"""
for i in f[:2]:
    #histos.append(ClassFunc.Histo_Filler(i, 300, 850))
    Rate.append(ClassFunc.Fitter(i, 300, 850,400, 0)[0])
    Res.append(ClassFunc.Fitter(i, 300, 850,400, 0)[1])

"""

real = ClassFunc.Fitter("1", f[1], 380, 570, 480, 1)
#xmax.append(real)
xm = ClassFunc.Fitter("2", f[2], 350, 570, 480, 1)
xmax.append(xm)
xm = ClassFunc.Fitter("3", f[3], 380, 570, 480, 1)
xmax.append(xm)
xm = ClassFunc.Fitter("4", f[4], 380, 570, 480, 1)
xmax.append(xm)
xm = ClassFunc.Fitter("5", f[5], 380, 570, 480, 1)
xmax.append(xm)
xm = ClassFunc.Fitter("6", f[6], 380, 570, 480, 1)
xmax.append(xm)

n = len(xmax)
y = array('f', xmax)
x = array('f', [560, 470, 680, 820, 660])
Beispiel #6
0
from Functions import ClassFunc
import sys
sys.path.insert(0, '/Users/boldrinicoder/lab4/FunctionClass')
from Root_objects import ROOT_obj as robj

############MAIN#############
ROOT.gROOT.SetBatch(True)
out_path1 = "/Users/boldrinicoder/lab4/General_Graphs/pdfs"
out_path2 = "/Users/boldrinicoder/lab4/Shaping_time"
f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/181214/*.txt"))
#f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/181212/*.txt"))
#f = f[10:19]
print(f)

try_path = "/Users/boldrinicoder/lab4/Prova_RateRes"
ClassFunc.mkdir_p(try_path)

pulse_shape = [0.5, 1,2,3,6,10]
means = [540,600,600,570,570,550]
#means = [600,600,610,570,570,610]
infs = [450,400,470,450,450,400]
#infs = [450,400,500,470,470,500]
sups = [700,750,750,700,700,700]
#sups = [700,750,750,730,730,700]

Rates = []
Err_Rates = []
Reso = []
Err_Reso = []
j = 0
for i in f:
Beispiel #7
0
from Functions import ClassFunc
import sys
sys.path.insert(0, '/Users/boldrinicoder/lab4/FunctionClass')
from Root_objects import ROOT_obj as R_o

ROOT.gROOT.SetBatch()

temp_path = "/Users/boldrinicoder/lab4/data/tempreborn.txt"
f = sorted(glob.glob("/Users/boldrinicoder/lab4/data/190513/*.txt"))


try_path = "/Users/boldrinicoder/lab4/Prova_Temp"
outpath1 = "/Users/boldrinicoder/lab4"
outpath2 = "."
outpath3 = "/Users/boldrinicoder/Desktop"
ClassFunc.mkdir_p(try_path)

temp = ClassFunc.Temp_reading(temp_path)

inf = 500
sup = 700
mean = 600

"""
Rates = []
Err_Rates = []
Reso = []
Err_Reso = []
j = 0
for i in f: