diff --git a/example.py b/example.py index 6dfc30812e45f1ce3a9799119634a9dbf1dc0d81..f763a9b1cbffea5f1bf7011010351a9254839f35 100644 --- a/example.py +++ b/example.py @@ -5,8 +5,7 @@ import numpy as np import pandas as pd from PeakOTron import PeakOTron from joblib import dump -from time import time - +import time print("--------------------") print('EXAMPLE SIPM CALIBRATION RUN') @@ -40,6 +39,12 @@ for i, (file, path) in enumerate(files_to_fit): items = file.split('_') V = float(items[2].replace('V', '').replace('p', '.')) + + print("\n\n") + print("===============================================================") + print("FIT {:d} - {:s}".format(i, file)) + print("===============================================================") + print("\n\n") ## Load files. @@ -59,10 +64,11 @@ for i, (file, path) in enumerate(files_to_fit): ) #BINNING RULE "knuth", "freedman", "scott" - use bw= #### to override. it is still required for DCR calculation. time_end = time.time() - + print("\n") print("Fit took {:3.3f} s".format(time_end - time_start)) + print("\n") - f_data.PlotFit(xlabel="ADC", save_directory="./Results/{0}_fit.png".format(os.path.splitext(file)[0])) + f_data.PlotFit(xlabel="ADC", display=False, save_directory="./Results/{0}_fit.png".format(os.path.splitext(file)[0])) @@ -90,6 +96,10 @@ for i, (file, path) in enumerate(files_to_fit): for key in fit_out.keys(): out_dict[key].append(fit_out[key]) + print("===============================================================") + print("\n\n") + + df = pd.DataFrame.from_dict(out_dict)