def test_alphas_6(self): self.assertAlmostEqual(alpha_s(500, 6), 0.095517575136454583087, delta=delta) # crazy values self.assertAlmostEqual(alpha_s(50, 6), 0.12785358110125187370, delta=delta)
def test_alphas_3(self): self.assertAlmostEqual(alpha_s(0.9, 3), 0.527089, delta=1e-5) # crazy values self.assertAlmostEqual(alpha_s(1000, 3), 0.076593079980776995496, delta=delta)
def test_alphas_4(self): self.assertAlmostEqual(alpha_s(3, 4), 0.25604161478941490576, delta=delta) # crazy values self.assertAlmostEqual(alpha_s(1, 4), 0.46414770696020787020, delta=delta) self.assertAlmostEqual(alpha_s(1000, 4), 0.082139482683335368979, delta=delta)
def test_alphas_5(self): self.assertAlmostEqual(alpha_s(100, 5), 0.11686431884237730186, delta=delta) self.assertAlmostEqual(alpha_s(10, 5), 0.17931693160062720703, delta=delta) # crazy values self.assertAlmostEqual(alpha_s(1, 5), 0.40957053067188524193, delta=delta) self.assertAlmostEqual(alpha_s(1000, 5), 0.087076948997751428458, delta=delta)
def _get_running_parameters(self, scale, f): """Get the running parameters (e.g. quark masses and the strong coupling at a given scale.""" p = {} p['alpha_s'] = qcd.alpha_s(scale, self.f, self.parameters['alpha_s']) p['m_b'] = qcd.m_b(self.parameters['m_b'], scale, self.f, self.parameters['alpha_s']) p['m_c'] = qcd.m_c(self.parameters['m_c'], scale, self.f, self.parameters['alpha_s']) p['m_s'] = qcd.m_s(self.parameters['m_s'], scale, self.f, self.parameters['alpha_s']) p['m_u'] = qcd.m_s(self.parameters['m_u'], scale, self.f, self.parameters['alpha_s']) p['m_d'] = qcd.m_s(self.parameters['m_d'], scale, self.f, self.parameters['alpha_s']) # running ignored for alpha_e and lepton mass p['alpha_e'] = self.parameters['alpha_e'] p['m_e'] = self.parameters['m_e'] p['m_mu'] = self.parameters['m_mu'] p['m_tau'] = self.parameters['m_tau'] return p
def test_alphas_invalid(self): with self.assertRaises(ValueError): alpha_s(100, 7) with self.assertRaises(ValueError): alpha_s(100, 2) with self.assertRaises(ValueError): alpha_s(100, 7) with self.assertRaises(ValueError): alpha_s(0, 6) with self.assertRaises(ValueError): alpha_s(-1, 6) with self.assertRaises(ValueError): alpha_s("1.0", 6)