From 0a536eb0b9aec6b715b2f4c2bbf03b1ebf0e6ef1 Mon Sep 17 00:00:00 2001 From: toonhasenack Date: Mon, 6 May 2024 15:27:56 +0200 Subject: [PATCH] Changes implemented --- .../nnpdf_data/filter_utils/eic_utils.py | 8 ++++-- .../new_commondata/EIC_NC_211GEV_EP/filter.py | 5 +++- .../EIC_NC_211GEV_EP/uncertainties.yaml | 26 +++++++++---------- .../new_commondata/EIC_NC_43GEV_EP/filter.py | 5 +++- .../EIC_NC_43GEV_EP/uncertainties.yaml | 24 ++++++++--------- .../new_commondata/EIC_NC_67GEV_EP/filter.py | 5 +++- .../EIC_NC_67GEV_EP/uncertainties.yaml | 24 ++++++++--------- 7 files changed, 55 insertions(+), 42 deletions(-) diff --git a/nnpdf_data/nnpdf_data/filter_utils/eic_utils.py b/nnpdf_data/nnpdf_data/filter_utils/eic_utils.py index c7a6399f68..07ec9de229 100644 --- a/nnpdf_data/nnpdf_data/filter_utils/eic_utils.py +++ b/nnpdf_data/nnpdf_data/filter_utils/eic_utils.py @@ -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. @@ -184,7 +185,10 @@ 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": { @@ -192,7 +196,7 @@ def write_data( "treatment": "ADD", "type": "UNCORR", }, - "sys": {"description": "systematic uncertainty", "treatment": "ADD", "type": "UNCORR"}, + "sys": {"description": "systematic uncertainty", "treatment": "MULT", "type": "CORR"}, } # ----------------------------------------------------------------- diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/filter.py b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/filter.py index 1d4d4af877..9071198010 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/filter.py +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/filter.py @@ -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) diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/uncertainties.yaml index 1c59b5709e..23c9761e03 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_211GEV_EP/uncertainties.yaml @@ -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 diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/filter.py b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/filter.py index cf94f19908..9c7fbac958 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/filter.py +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/filter.py @@ -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) diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/uncertainties.yaml index cddd6430ed..af1a19a6bd 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_43GEV_EP/uncertainties.yaml @@ -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 diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/filter.py b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/filter.py index e7520141fb..fd117219f8 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/filter.py +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/filter.py @@ -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) diff --git a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/uncertainties.yaml b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/uncertainties.yaml index 3cdde3fad7..b5e7cfcbf4 100644 --- a/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/uncertainties.yaml +++ b/nnpdf_data/nnpdf_data/new_commondata/EIC_NC_67GEV_EP/uncertainties.yaml @@ -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