Skip to content

Commit

Permalink
look at ForcePositive during the test
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff committed Nov 30, 2023
1 parent e5cbe42 commit 7833d79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benchmarks_and_tests/check_many_pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def _compare_w_lhapdf(pdf, npoints=1000, tolerance=1e-6):
lres = np.array(lhapdf_results)
pres = pdfflow_pdf.py_xfxQ2_allpid(xx, qq).numpy()

# This is not still implemented as part of pdfflow, but need to be careful during the check
if pdf.info.get("ForcePositive", 0) > 0:
pres = np.maximum(pres, 1e-10)

np.testing.assert_allclose(pres, lres, rtol=tolerance, atol=tolerance)


Expand Down

0 comments on commit 7833d79

Please sign in to comment.