Skip to content

Commit

Permalink
added a fiatlux meta package
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff authored and RoyStegeman committed Oct 31, 2024
1 parent 6d5b6a2 commit 7f570d9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bins:
- x:
mid: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
setname: NNPDF_FIATLUX_NOTFIXED

version: 1
version_comment: Meta-dataset to allow for the evolution of the photon structure function

nnpdf_metadata:
nnpdf31_process: null
experiment: null

implemented_observables:
- observable_name: F2
observable:
description: F2 structure function
process_type: DIS
ndata: 1
plotting:
dataset_label: ''
kinematic_coverage: []
kinematics:
variables:
x:
label: $x$
file: kinematics.yaml
theory:
FK_tables:
- - FIATLUX_DIS_F2
data_uncertainties: []
- observable_name: FL
observable:
description: F2 structure function
process_type: DIS
ndata: 1
plotting:
dataset_label: ''
kinematic_coverage: []
kinematics:
variables:
x:
label: $x$
file: kinematics.yaml
theory:
FK_tables:
- - FIATLUX_DIS_FL
data_uncertainties: []
11 changes: 6 additions & 5 deletions validphys2/src/validphys/commondataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def check(self):
has been read, the observable selected and (likely) variants applied.
"""
# Check whether the data central or the uncertainties are empty for a non-positivity/integrability set
if not self.is_lagrange_multiplier:
if not self.is_nnpdf_special:
if self.data_central is None:
raise ValidationError(f"Missing `data_central` field for {self.name}")

Expand Down Expand Up @@ -503,8 +503,9 @@ def is_integrability(self):
return self.setname.startswith("NNPDF_INTEG")

@property
def is_lagrange_multiplier(self):
return self.is_positivity or self.is_integrability
def is_nnpdf_special(self):
"""Is this an NNPDF special dataset used for e.g., Lagrange multipliers or QED fits"""
return self.setname.startswith("NNPDF")

@property
def path_data_central(self):
Expand All @@ -518,7 +519,7 @@ def load_data_central(self):
pd.DataFrame
a dataframe containing the data
"""
if self.is_lagrange_multiplier:
if self.is_nnpdf_special:
data = np.zeros(self.ndata)
else:
datayaml = _quick_yaml_load(self.path_data_central)
Expand All @@ -545,7 +546,7 @@ def load_uncertainties(self):
pd.DataFrame
a dataframe containing the uncertainties
"""
if self.is_lagrange_multiplier:
if self.is_nnpdf_special:
return pd.DataFrame([{}] * self.ndata, index=range(1, self.ndata + 1))

all_df = []
Expand Down

0 comments on commit 7f570d9

Please sign in to comment.