Skip to content

Commit 311fca7

Browse files
committed
Restoring master version for loader and photon
1 parent a32daab commit 311fca7

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

validphys2/src/validphys/loader.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,6 @@ def available_ekos(self):
217217
eko_path.parent.name.split("_")[1] for eko_path in self._theories_path.glob("*/eko.tar")
218218
}
219219

220-
@property
221-
@functools.lru_cache
222-
def available_photons_qed(self):
223-
"""Return a string token for each of the available theories"""
224-
return {
225-
eko_path.parent.name.split("_")[1] for eko_path in self._theories_path.glob("*/eko.npz")
226-
}
227-
228220
@functools.cached_property
229221
def available_photons(self):
230222
"""Return a string token for each of the available theories"""
@@ -329,16 +321,6 @@ def check_eko(self, theoryID):
329321
raise EkoNotFound(f"Could not find eko {eko_path} in theory: {theoryID}")
330322
return eko_path
331323

332-
@functools.lru_cache
333-
def check_photonQED(self, theoryID, luxset):
334-
"""Check the Photon QED set exists and return the path to it"""
335-
photon_qed_path = self._photons_qed_path / f"photon_qed_{theoryID.id}_{luxset}.tar"
336-
if not photon_qed_path.exists():
337-
raise PhotonQEDNotFound(
338-
f"Could not find Photon QED set {photon_qed_path} in theory: {theoryID}"
339-
)
340-
return photon_qed_path
341-
342324
@functools.lru_cache
343325
def check_photonQED(self, theoryID, luxset):
344326
"""Check the Photon QED set exists and return the path to it"""
@@ -880,16 +862,6 @@ def photon_qed_index(self):
880862
def photon_qed_urls(self):
881863
return self.nnprofile['photon_qed_urls']
882864

883-
@property
884-
@_key_or_loader_error
885-
def photon_qed_index(self):
886-
return self.nnprofile['photon_qed_index']
887-
888-
@property
889-
@_key_or_loader_error
890-
def photon_qed_urls(self):
891-
return self.nnprofile['photon_qed_urls']
892-
893865
@property
894866
@_key_or_loader_error
895867
def nnpdf_pdfs_urls(self):
@@ -960,13 +932,6 @@ def remote_ekos(self):
960932
rt = self.remote_files(self.eko_urls, self.eko_index, thing="ekos")
961933
return {k[len(token) :]: v for k, v in rt.items()}
962934

963-
@property
964-
@functools.lru_cache
965-
def remote_photons_qed(self):
966-
token = 'photon_qed_'
967-
rt = self.remote_files(self.photon_qed_urls, self.photon_qed_index, thing="photons_qed")
968-
return {k[len(token) :]: v for k, v in rt.items()}
969-
970935
@property
971936
@functools.lru_cache
972937
def remote_photons(self):
@@ -1008,10 +973,6 @@ def downloadable_theories(self):
1008973
def downloadable_ekos(self):
1009974
return list(self.remote_ekos)
1010975

1011-
@property
1012-
def downloadable_photonsQED(self):
1013-
return list(self.remote_photons_qed)
1014-
1015976
@property
1016977
def downloadable_photons(self):
1017978
return list(self.remote_photons)

validphys2/src/validphys/photon/compute.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from functools import lru_cache
44
import logging
55
import tempfile
6-
from concurrent.futures import ThreadPoolExecutor
76

87
from joblib import Parallel, delayed
98
import numpy as np
@@ -17,13 +16,11 @@
1716
from validphys.core import FKTableSpec
1817
from validphys.loader import Loader, PhotonQEDNotFound
1918
from validphys.n3fit_data import replica_luxseed
20-
from validphys.loader import Loader, PhotonQEDNotFound
2119

2220
from . import structure_functions as sf
2321
from .alpha import Alpha
2422

2523
log = logging.getLogger(__name__)
26-
loader = Loader()
2724

2825
# not the complete fiatlux runcard since some parameters are set in the code
2926
FIATLUX_DEFAULT = {
@@ -160,7 +157,6 @@ def _compute_photon_set(self):
160157
f2 = f2_func(luxset.members[photonreplica])
161158
fl = fl_func(luxset.members[photonreplica])
162159

163-
alpha = Alpha(theory, self.fiatlux_runcard["q2_max"])
164160
with tempfile.NamedTemporaryFile(mode="w") as tmp:
165161
yaml.dump(fiatlux_runcard, tmp)
166162
lux = fiatlux.FiatLux(tmp.name)

0 commit comments

Comments
 (0)