Skip to content

Commit

Permalink
Now with the F1 case included for E155.
Browse files Browse the repository at this point in the history
  • Loading branch information
toonhasenack committed Oct 17, 2023
1 parent afe57e8 commit 9db14a7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
25 changes: 19 additions & 6 deletions extras/data/E155/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
E155_NC_9GEV_EP_G1F1RATIO:
E155_NC_9GEV_EP_G1:
description: Measurements with Polarised electron-proton beams
nnpdf_id: E155
y_label: A1
y_label_tex: $g_1 / F_1$
E155_NC_9GEV_EN_G1F1RATIO:
y_label: G1
y_label_tex: $g_1$

E155_NC_9GEV_EP_F1:
description: Measurements with Polarised electron-proton beams
nnpdf_id: E155
y_label: F1
y_label_tex: $F_1$

E155_NC_9GEV_EN_G1:
description: Measurements with Polarised electron-neutron beams
nnpdf_id: E155
y_label: G1
y_label_tex: $g_1$

E155_NC_9GEV_EN_F1:
description: Measurements with Polarised electron-neutron beams
nnpdf_id: E155
y_label: A1
y_label_tex: $g_1 / F_1$
y_label: F1
y_label_tex: $F_1$
13 changes: 8 additions & 5 deletions extras/data/machinery/generate/E155.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .utils import load, obs_template


def dump(src_path, _target):
def dump(src_path, target):
"""Generate the input card for E155 measurements.
Parameters
Expand All @@ -23,8 +23,11 @@ def dump(src_path, _target):
# Details regarding the observables
obs["prDIS"] = "NC"
obs["ProjectileDIS"] = "electron"
obs["PolarizationDIS"] = 1.0
obs["observables"] = {"g1_total": dict_kins}

# if "_f1_" in str(src_path.stem):
obs["PolarizationDIS"] = 0.0 if "_F1" in target.parent.name else 1.0
observable_name = "F1_total" if "_F1" in target.parent.name else "g1_total"
obs["observables"] = {observable_name: dict_kins}
if "_ep_" in str(src_path.stem):
obs["TargetDIS"] = "proton"
elif "_en_" in str(src_path.stem):
Expand All @@ -35,6 +38,6 @@ def dump(src_path, _target):

# renaming
new_names = {
"e155_ep_g1f1": "E155_NC_9GEV_EP_G1F1RATIO",
"e155_en_g1f1": "E155_NC_9GEV_EN_G1F1RATIO",
"e155_ep_g1f1": ["E155_NC_9GEV_EP_G1", "E155_NC_9GEV_EP_F1"],
"e155_en_g1f1": ["E155_NC_9GEV_EN_G1", "E155_NC_9GEV_EN_F1"],
}

0 comments on commit 9db14a7

Please sign in to comment.