tprak

Theoretical Physics Practical Training
git clone git://popovic.xyz/tprak.git
Log | Files | Refs

commit 0b8b6816f2827367014542a4024b74df7d5cabfe
parent 3e623d8fa5f24368cec4537f5caeb6218bf9958a
Author: miksa <milutin@popovic.xyz>
Date:   Sat, 10 Apr 2021 21:30:58 +0200

correted model function from c*(1 + a*s + b*s**2) to 1 + a*s + b*s**2 + c*s**3'

Diffstat:
Msesh1/prog/standard-method/__pycache__/model.cpython-39.pyc | 0
Msesh1/prog/standard-method/model.py | 2+-
Msesh1/prog/standard-method/plots/BABAR.png | 0
Msesh1/prog/standard-method/plots/CMD2.png | 0
Msesh1/prog/standard-method/plots/KLOE.png | 0
Msesh1/prog/standard-method/plots/SND.png | 0
Msesh1/prog/standard-method/standard.py | 2+-
Asesh1/prog/t0-method/__pycache__/method.cpython-39.pyc | 0
Asesh1/prog/t0-method/__pycache__/model.cpython-39.pyc | 0
Msesh1/prog/t0-method/model.py | 6+++++-
Msesh1/prog/t0-method/multiple_fit.py | 5+++++
Msesh1/prog/t0-method/plots/BABAR.png | 0
Msesh1/prog/t0-method/plots/CMD2.png | 0
Msesh1/prog/t0-method/plots/KLOE.png | 0
Msesh1/prog/t0-method/plots/SND.png | 0
Msesh1/prog/t0-method/plots/all-fit.png | 0
Msesh1/prog/t0-method/single_fit.py | 2+-
17 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/sesh1/prog/standard-method/__pycache__/model.cpython-39.pyc b/sesh1/prog/standard-method/__pycache__/model.cpython-39.pyc Binary files differ. diff --git a/sesh1/prog/standard-method/model.py b/sesh1/prog/standard-method/model.py @@ -12,7 +12,7 @@ g_s = lambda s, m_q, g_q: g_q*s/m_q**2 * (sig_p(s)/sig_p(m_q**2))**3 * np.heavis def model(s, m_q, g_q, m_w, g_w, e_w, a, b, c): part1 = (m_q)**4/((m_q**2 - s)**2 + m_q**2*g_s(s, m_q, g_q)**2) part2 = 1 + (e_w * 2*s * (m_w**2 - s))/((m_w**2 - s)**2 + m_w**2*g_w**2) - part3 = c*(1 + a*s + b*s**2)**2 + part3 = (1 + a*s + b*s**2 + c*s**3)**2 return part1 * part2 * part3 def myplot(name, x_data, y_data, p, dp, sigma): diff --git a/sesh1/prog/standard-method/plots/BABAR.png b/sesh1/prog/standard-method/plots/BABAR.png Binary files differ. diff --git a/sesh1/prog/standard-method/plots/CMD2.png b/sesh1/prog/standard-method/plots/CMD2.png Binary files differ. diff --git a/sesh1/prog/standard-method/plots/KLOE.png b/sesh1/prog/standard-method/plots/KLOE.png Binary files differ. diff --git a/sesh1/prog/standard-method/plots/SND.png b/sesh1/prog/standard-method/plots/SND.png Binary files differ. diff --git a/sesh1/prog/standard-method/standard.py b/sesh1/prog/standard-method/standard.py @@ -7,7 +7,7 @@ from model import * global p0 -p0 = [0.9, 0.2, 0.81, 0.04, 0.02, -1, 0.84, 1.55] # in GeV +p0 = [0.77, 0.15, 0.78, 0.09, 0.0085, 0.002, 0.16, 0.3] # in GeV def SND(): data = np.loadtxt('../data/SND-VFF.txt') diff --git a/sesh1/prog/t0-method/__pycache__/method.cpython-39.pyc b/sesh1/prog/t0-method/__pycache__/method.cpython-39.pyc Binary files differ. diff --git a/sesh1/prog/t0-method/__pycache__/model.cpython-39.pyc b/sesh1/prog/t0-method/__pycache__/model.cpython-39.pyc Binary files differ. diff --git a/sesh1/prog/t0-method/model.py b/sesh1/prog/t0-method/model.py @@ -13,7 +13,7 @@ g_s = lambda s, m_q, g_q: g_q*s/m_q**2 * (sig_p(s)/sig_p(m_q**2))**3 * sp.Heavis def model(s, m_q, g_q, m_w, g_w, e_w, a, b, c): part1 = (m_q)**4/((m_q**2 - s)**2 + m_q**2*g_s(s, m_q, g_q)**2) part2 = 1 + (e_w * 2*s * (m_w**2 - s))/((m_w**2 - s)**2 + m_w**2*g_w**2) - part3 = c*(1 + a*s + b*s**2)**2 + part3 = (1 + a*s + b*s**2 + c*s**3)**2 return part1 * part2 * part3 @@ -38,6 +38,10 @@ def my_plot(name, x_data, y_data, p, dp, sigma): plt.annotate(r'$\Gamma_{\rho} = $' + f'({p[1]}' + r'$\pm$' + f'{dp[1]}) GeV', (0.2, 38)) plt.annotate(r'$M_{\omega} = $' + f'({p[2]}' + r'$\pm$' + f'{dp[2]}) GeV', (0.2, 36)) plt.annotate(r'$\Gamma_{\omega} = $' + f'({p[3]}' + r'$\pm$' + f'{dp[3]}) GeV', (0.2, 34)) + plt.annotate(r'$\epsilon_{\omega} = $' + f'({p[4]}' + r'$\pm$' + f'{dp[4]}) GeV', (0.2, 32)) + plt.annotate(r'$a = $' + f'({p[5]}' + r'$\pm$' + f'{dp[5]}) GeV', (0.2, 30)) + plt.annotate(r'$b = $' + f'({p[6]}' + r'$\pm$' + f'{dp[6]}) GeV', (0.2, 28)) + plt.annotate(r'$c = $' + f'({p[7]}' + r'$\pm$' + f'{dp[7]}) GeV', (0.2, 26)) plt.title(f't0-Singlefit of {name}') plt.legend(loc='best') diff --git a/sesh1/prog/t0-method/multiple_fit.py b/sesh1/prog/t0-method/multiple_fit.py @@ -77,6 +77,11 @@ def main(): plt.annotate(r'$\Gamma_{\rho} = $' + f'({p[1]}' + r'$\pm$' + f'{dp[1]}) GeV', (0.1, 38)) plt.annotate(r'$M_{\omega} = $' + f'({p[2]}' + r'$\pm$' + f'{dp[2]}) GeV', (0.1, 36)) plt.annotate(r'$\Gamma_{\omega} = $' + f'({p[3]}' + r'$\pm$' + f'{dp[3]}) GeV', (0.1, 34)) + plt.annotate(r'$\epsilon_{\omega} = $' + f'({p[4]}' + r'$\pm$' + f'{dp[4]}) GeV', (0.1, 32)) + plt.annotate(r'$a = $' + f'({p[5]}' + r'$\pm$' + f'{dp[5]}) GeV', (0.1, 30)) + plt.annotate(r'$b = $' + f'({p[6]}' + r'$\pm$' + f'{dp[6]}) GeV', (0.1, 28)) + plt.annotate(r'$c = $' + f'({p[7]}' + r'$\pm$' + f'{dp[7]}) GeV', (0.1, 26)) + plt.title('t0-Multifit') plt.legend(loc='best') diff --git a/sesh1/prog/t0-method/plots/BABAR.png b/sesh1/prog/t0-method/plots/BABAR.png Binary files differ. diff --git a/sesh1/prog/t0-method/plots/CMD2.png b/sesh1/prog/t0-method/plots/CMD2.png Binary files differ. diff --git a/sesh1/prog/t0-method/plots/KLOE.png b/sesh1/prog/t0-method/plots/KLOE.png Binary files differ. diff --git a/sesh1/prog/t0-method/plots/SND.png b/sesh1/prog/t0-method/plots/SND.png Binary files differ. diff --git a/sesh1/prog/t0-method/plots/all-fit.png b/sesh1/prog/t0-method/plots/all-fit.png Binary files differ. diff --git a/sesh1/prog/t0-method/single_fit.py b/sesh1/prog/t0-method/single_fit.py @@ -14,7 +14,7 @@ def SND(): data = np.loadtxt('../data/SND-VFF.txt') x_data = data[:, 0] y_data = data[:, 1] - cov_stat = (np.eye(len(x_data)) * data[:, 2]) + cov_stat = (np.eye(len(x_data)) * data[:, 2])**2 cov_relsyst = (np.eye(len(x_data)) * np.array([0.032 if i<=2 else 0.013 for i in range(len(x_data))]))**2 var_str = "m_q g_q m_w g_w e_w a b c"