def test_load(self):
sm = pkgutil.get_data('smeftrunner', 'tests/data/SMInput-CPV.dat').decode('utf-8')
wc = pkgutil.get_data('smeftrunner', 'tests/data/WCsInput-CPV-SMEFT.dat').decode('utf-8')
wcout = pkgutil.get_data('smeftrunner', 'tests/data/Output_SMEFTrunner.dat').decode('utf-8')
io.sm_lha2dict(pylha.load(sm))
io.wc_lha2dict(pylha.load(wc))
CSM = io.sm_lha2dict(pylha.load(wcout))
C = io.wc_lha2dict(pylha.load(wcout))
C2 = io.wc_lha2dict(io.wc_dict2lha(C))
for k in C:
npt.assert_array_equal(C[k], C2[k])
smeft = SMEFT()
smeft.load_initial((wcout,))
for k in C:
npt.assert_array_equal(definitions.symmetrize(C)[k], smeft.C_in[k], err_msg="Failed for {}".format(k))
for k in CSM:
npt.assert_array_equal(definitions.symmetrize(CSM)[k], smeft.C_in[k], err_msg="Failed for {}".format(k))
CSM2 = io.sm_lha2dict(io.sm_dict2lha(CSM))
for k in CSM:
npt.assert_array_equal(CSM[k], CSM2[k], err_msg="Failed for {}".format(k))
评论列表
文章目录