Skip to content

Commit

Permalink
Use FIATLUX_DEFAULT from photon.compute
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Jun 16, 2023
1 parent 3e548a8 commit b40db35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
32 changes: 2 additions & 30 deletions validphys2/src/validphys/tests/photon/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from validphys.api import API
from validphys.core import PDF as PDFset
from validphys.photon import structure_functions as sf
from validphys.photon.compute import Alpha, Photon
from validphys.photon.compute import Alpha, Photon, FIATLUX_DEFAULT

from ..conftest import PDF

Expand All @@ -22,34 +22,6 @@
"eps_base": 1e-2, # using low precision to speed up tests
}

FIATLUX_DEFAULT = {
"apfel": False,
"eps_rel": 1e-1, # extra precision on any single integration.
"mum_proton": 2.792847356, # proton magnetic moment, from
# http://pdglive.lbl.gov/DataBlock.action?node=S016MM which itself
# gets it from arXiv:1203.5425 (CODATA)
# the elastic param type, options:
# dipole
# A1_world_spline
# A1_world_pol_spline
"elastic_param": "A1_world_pol_spline",
"elastic_electric_rescale": 1,
"elastic_magnetic_rescale": 1,
# the inelastic param type, options:
"inelastic_param": "LHAPDF_Hermes_ALLM_CLAS", # Hermes_ALLM_CLAS, LHAPDF_Hermes_ALLM_CLAS
"rescale_r_twist4": 0,
"rescale_r": 1,
"allm_limits": 0,
"rescale_non_resonance": 1,
"rescale_resonance": 1,
"use_mu2_as_upper_limit": False,
"q2min_inel_override": 0.0,
"q2max_inel_override": 1e300,
"lhapdf_transition_q2": 9,
# general
"verbose": False,
}


def test_parameters_init():
"test initailization of the parameters from Photon class"
Expand All @@ -69,7 +41,7 @@ def test_parameters_init():


def test_masses_init():
"test thresholds in Alpha class"
"test thresholds values in Alpha class"
theory = TEST_THEORY.get_description()
alpha = Alpha(theory)
np.testing.assert_equal(alpha.thresh_t, np.inf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from validphys.api import API
from validphys.core import PDF as PDFset
from validphys.lhapdfset import LHAPDFSet
import validphys.photon.structure_functions as sf

from ..conftest import PDF
Expand Down Expand Up @@ -66,8 +65,8 @@ def test_zero_pdfs():

def test_zero_grid(monkeypatch):
"test that a zero grid gives a zero structure function"
# patching pineappl.fk_table.FkTable to use ZeroFKTable
monkeypatch.setattr(pineappl.fk_table.FkTable, "read", ZeroFKTable)
# grid put to 0 and real pdf
pdfs = NNPDF40.load()
structurefunc = sf.InterpStructureFunction("", pdfs.central_member)
for x in np.geomspace(1e-4, 1.0, 10):
Expand Down

0 comments on commit b40db35

Please sign in to comment.