-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfit_on_data_plot.py
executable file
·67 lines (49 loc) · 2.09 KB
/
fit_on_data_plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# %%
import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
mpl.pyplot.ion()
#%matplotlib inline
# %%
from module.prepare_data import Prepare_data
from module.fit import Fit
from module.plot import moose_plot
from module.plot import moose_23_late_plot
from module.plot import tau_c_plot
from module.plot import m_z_plot
from module.plot import sum_gA_plot
from module.plot import FH_R_plot
from best_fits import combined_best_fit
from best_fits import late_23_fit
plt.rcParams.update({"text.usetex": True})
file_path = './a09m310_e_gA_srcs0-15.h5'
# %% moose plot
data_avg_dict_completed, fit_result, fitter = combined_best_fit(file_path)
pt3_data_range = range(2, 15)
tau_c_2 = 1.5 # 2-0.5 to make the color change at half way
divide_n = 11
moose_plot(data_avg_dict_completed, fit_result, fitter, pt3_data_range, tau_c_2, divide_n)
# %% FH(tau_c = 1) and R(tau = t/2)
combined_best_data_avg_dict_completed, fit_result, fitter = combined_best_fit('./a09m310_e_gA_srcs0-15.h5')
f_range = [1, 2] # tau_c range of fit part
d_range = [1, 2] # tau_c range of data part
FH_R_plot(file_path, f_range, d_range, fit_result, combined_best_data_avg_dict_completed)
# %% moose plot for 23 late tsep
data_avg_dict_completed, fit_result, fitter = late_23_fit(file_path, True)
pt3_data_range = [10, 12, 14]
moose_23_late_plot(data_avg_dict_completed, fit_result, fitter, pt3_data_range)
# %% tau_c plot
data_avg_dict_completed, fit_result, fitter = combined_best_fit('./a09m310_e_gA_srcs0-15.h5')
f_range = [1, 6] # tau_c range of fit part
d_range = [1, 6] # tau_c range of data part
tau_c_plot(file_path, f_range, d_range, fit_result)
# %% tau_c plot
data_avg_dict_completed, fit_result, fitter = combined_best_fit('./a09m310_e_gA_srcs0-15.h5')
f_range = [1, 2] # tau_c range of fit part
d_range = [1, 2] # tau_c range of data part
tau_c_plot(file_path, f_range, d_range, fit_result)
# %% m_eff, z_eff and sum_gA
data_avg_dict_completed, fit_result, fitter = combined_best_fit(file_path)
m_z_plot(data_avg_dict_completed, fit_result, fitter)
sum_gA_plot(data_avg_dict_completed, fit_result, fitter)
# %%