Skip to content

Commit

Permalink
Call black on compute.py
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Jun 26, 2023
1 parent 7fdb014 commit 91c52a6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions validphys2/src/validphys/photon/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, theoryid, lux_params, replicas):
mb_thr = theory["kbThr"] * theory["mb"]
mt_thr = theory["ktThr"] * theory["mt"] if theory["MaxNfPdf"] == 6 else 1e100

self.interpolator = {"total":[], "elastic":[], "inelastic":[], "msbar":[]}
self.interpolator = {"total": [], "elastic": [], "inelastic": [], "msbar": []}
self.integral = []

for replica in replicas:
Expand Down Expand Up @@ -147,7 +147,12 @@ def compute_photon_array(self, replica):
"""
# Compute photon PDF
log.info(f"Computing photon")
photon_qin = {"total": np.zeros_like(XGRID), "elastic": np.zeros_like(XGRID), "inelastic": np.zeros_like(XGRID), "msbar": np.zeros_like(XGRID)}
photon_qin = {
"total": np.zeros_like(XGRID),
"elastic": np.zeros_like(XGRID),
"inelastic": np.zeros_like(XGRID),
"msbar": np.zeros_like(XGRID),
}
for i, x in enumerate(XGRID):
pht = self.lux[replica].EvaluatePhoton(x, self.q_in**2)
photon_qin["total"][i] = pht.total
Expand All @@ -157,7 +162,7 @@ def compute_photon_array(self, replica):
# photon_qin += self.generate_errors(replica)
# fiatlux computes x * gamma(x)
# TODO : the different x points could be even computed in parallel

# Load eko and reshape it
photon_Q0 = {}
with EKO.read(self.path_to_eko_photon) as eko:
Expand Down

0 comments on commit 91c52a6

Please sign in to comment.