Skip to content

Commit

Permalink
commondata test fail when importing validphys
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkrack committed Dec 8, 2024
1 parent a3a958b commit 87108f8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions nnpdf_data/nnpdf_data/filter_utils/hera_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas as pd
from os import PathLike
import yaml
from validphys.api import API
#from validphys.api import API

@dataclass
class commondata:
Expand Down Expand Up @@ -91,14 +91,14 @@ def write_new_commondata(self, data_filename: str | PathLike,

# Subroutines for testing the implementation of the commondata.

# Obtain the covariance matrix for a given variant.
def _covmat(name: str, var: str):
inp = {"dataset_input": {"dataset": name, "variant": var}, "theoryid": 700, "use_cuts": "internal"}
return API.covmat_from_systematics(**inp)

# Compare the covariance matrices of two different variants. True if close.
def covmat_is_close(name: str, var1: str, var2: str) -> bool:
return np.isclose(_covmat(name,var1),_covmat(name,var2)).all()
## Obtain the covariance matrix for a given variant.
#def _covmat(name: str, var: str):
# inp = {"dataset_input": {"dataset": name, "variant": var}, "theoryid": 700, "use_cuts": "internal"}
# return API.covmat_from_systematics(**inp)
#
## Compare the covariance matrices of two different variants. True if close.
#def covmat_is_close(name: str, var1: str, var2: str) -> bool:
# return np.isclose(_covmat(name,var1),_covmat(name,var2)).all()



Expand Down

0 comments on commit 87108f8

Please sign in to comment.