Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of additional systematic uncertainty in EIC data #2069

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions nnpdf_data/nnpdf_data/filter_utils/eic_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def write_data(
asym: bool = True,
abserr: Optional[Union[np.ndarray, None]] = None,
add_fluctuate: bool = False,
sys_error: float = 0.0,
) -> None:
"""Write the input kinematics, central values, and uncertainties
into the new commondata format.
Expand Down Expand Up @@ -184,15 +185,18 @@ def write_data(

# -----------------------------------------------------------------
# Prepare the uncertainty values
errors = [{"stat": float(d["abs"]), "sys": 0.0} for _, d in df.iterrows()]
errors = [
{"stat": float(d["abs"]), "sys": float(data_central[i] * sys_error)}
for i, d in df.iterrows()
]

error_definition = {
"stat": {
"description": "statistical uncertainty",
"treatment": "ADD",
"type": "UNCORR",
},
"sys": {"description": "systematic uncertainty", "treatment": "ADD", "type": "UNCORR"},
"sys": {"description": "systematic uncertainty", "treatment": "MULT", "type": "CORR"},
}

# -----------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
df = read_txt_data(input_txt)
cv_preds = read_central_values(Path("./rawdata/EIC_NC_211GEV_EP.yaml"))
fluctuated_cv = fluctuate_data(cv_preds, df["abs"].values)
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True)
# Flat systematic error of 3.2% due to beam polarization
# from Yuxiang suggestion
sys_error = 0.032
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True, sys_error=sys_error)
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ definitions:
type: UNCORR
sys:
description: systematic uncertainty
treatment: ADD
type: UNCORR
treatment: MULT
type: CORR
bins:
- stat: 0.00260049
sys: 0.0
sys: 0.0005262674566292198
- stat: 0.0032644
sys: 0.0
sys: 0.0006948311251004375
- stat: 0.00393122
sys: 0.0
sys: 0.0007873575493742746
- stat: 0.00450892
sys: 0.0
sys: 0.0006420715545079917
- stat: 0.00525977
sys: 0.0
sys: 0.001080542239345155
- stat: 0.00597521
sys: 0.0
sys: 0.001209460706547277
- stat: 0.00679294
sys: 0.0
sys: 0.0011841980538993809
- stat: 0.00758583
sys: 0.0
sys: 0.0006537127364699953
- stat: 0.00805148
sys: 0.0
sys: 0.0009465784380735705
- stat: 0.00877917
sys: 0.0
sys: 0.0007436513063664077
- stat: 0.0101136
sys: 0.0
sys: 0.0011504705487424141
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
df = read_txt_data(input_txt)
cv_preds = read_central_values(Path("./rawdata/EIC_NC_43GEV_EP.yaml"))
fluctuated_cv = fluctuate_data(cv_preds, df["abs"].values)
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True)
# Flat systematic error of 3.2% due to beam polarization
# from Yuxiang suggestion
sys_error = 0.032
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True, sys_error=sys_error)
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ definitions:
type: UNCORR
sys:
description: systematic uncertainty
treatment: ADD
type: UNCORR
treatment: MULT
type: CORR
bins:
- stat: 0.00672086
sys: 0.0
sys: 0.0013573793771477641
- stat: 0.00767392
sys: 0.0
sys: 0.001916707735550931
- stat: 0.00822064
sys: 0.0
sys: 0.002413601690792145
- stat: 0.00935268
sys: 0.0
sys: 0.0026595972847857164
- stat: 0.00979612
sys: 0.0
sys: 0.00427643635436818
- stat: 0.0110492
sys: 0.0
sys: 0.005606454032048129
- stat: 0.0118684
sys: 0.0
sys: 0.006925769467099229
- stat: 0.0134677
sys: 0.0
sys: 0.008045478371171437
- stat: 0.0156306
sys: 0.0
sys: 0.011808083761866825
- stat: 0.0205952
sys: 0.0
sys: 0.016122165035993685
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
df = read_txt_data(input_txt)
cv_preds = read_central_values(Path("./rawdata/EIC_NC_67GEV_EP.yaml"))
fluctuated_cv = fluctuate_data(cv_preds, df["abs"].values)
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True)
# Flat systematic error of 3.2% due to beam polarization
# from Yuxiang suggestion
sys_error = 0.032
write_data(df, asym=False, abserr=fluctuated_cv, add_fluctuate=True, sys_error=sys_error)
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ definitions:
type: UNCORR
sys:
description: systematic uncertainty
treatment: ADD
type: UNCORR
treatment: MULT
type: CORR
bins:
- stat: 0.0044181
sys: 0.0
sys: 0.0014207399940720385
- stat: 0.00523863
sys: 0.0
sys: 0.0016104484919313307
- stat: 0.00594865
sys: 0.0
sys: 0.0016818854412173213
- stat: 0.00659991
sys: 0.0
sys: 0.0014623710529683164
- stat: 0.00739964
sys: 0.0
sys: 0.0021765139226716146
- stat: 0.00834399
sys: 0.0
sys: 0.002573825524645206
- stat: 0.00923507
sys: 0.0
sys: 0.0029692135284708626
- stat: 0.0103193
sys: 0.0
sys: 0.0030621344913334997
- stat: 0.0115804
sys: 0.0
sys: 0.004901422989356397
- stat: 0.0135544
sys: 0.0
sys: 0.008160077586764392