Skip to content

Commit

Permalink
valence do not depends on sign!!
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed May 3, 2024
1 parent f229474 commit 34fbe0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/yadism/coefficient_functions/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ def cc_weights_odd(coupling_constants, Q2, cc_mask, nf, is_pv):
weights["ns"][-sign * q] = -w / 2 * (1 if not is_pv else sign)
tot_ch_sq += w
# add valence
for q in weights["ns"]:
weights["v"][sign * q] = tot_ch_sq / norm / 2
weights["v"][-sign * q] = -tot_ch_sq / norm / 2
for q in range(1, nf + 1):
weights["v"][q] = tot_ch_sq / norm / 2
weights["v"][-q] = -tot_ch_sq / norm / 2
return weights


Expand Down
12 changes: 1 addition & 11 deletions tests/yadism/cf/test_cc_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ def mkpv_even(nf, w, sgn): # pv = parity violating
)


def mkpv_valence(nf, w): # pv = parity violating
return dict(
zip(
mkpids(nf),
[(-1) ** (j + 1) * w for j in range(nf)]
+ [(-1) ** (j) * w for j in range(nf)],
)
)


def test_generate_light_pc():
for sgn in [True, False]:
esf = MockESF("F2_light", 11 * (1 if sgn else -1), 0.1, 10)
Expand All @@ -99,7 +89,7 @@ def test_generate_light_pv():
ps = [
mkpv_even(nf, 0.5 * norm, sgn),
mkpv_odd(nf, 0.5 * norm),
mkpv_valence(nf, (nf + 1) * norm / nf / 2.0),
mkpv_odd(nf, (nf + 1) * norm / nf / 2.0),
]
check(ps, w)

Expand Down

0 comments on commit 34fbe0a

Please sign in to comment.