From 3d8fccadcb30c8dce7969d336c6e6030a5bf3397 Mon Sep 17 00:00:00 2001 From: RoyStegeman Date: Wed, 31 Jan 2024 18:18:17 +0000 Subject: [PATCH] add alphas variations covmat function --- .../validphys/theorycovariance/construction.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/validphys2/src/validphys/theorycovariance/construction.py b/validphys2/src/validphys/theorycovariance/construction.py index 17a993d451..5f488c83ac 100644 --- a/validphys2/src/validphys/theorycovariance/construction.py +++ b/validphys2/src/validphys/theorycovariance/construction.py @@ -99,6 +99,19 @@ def combine_by_type(each_dataset_results_central_bytheory): ) return process_info +def covmat_alphas(name1, name2, deltas1, deltas2): + """Returns the covariance sub-matrix for 3-pt alpha_s + variation given two dataset names and collections of the + alpha_s shifts. This is equivalent to 3 point factorisation + scale variation because it's fully correlated across all + processes. + NOTE: an edit has been made to redefine the covmat to account for + second order derivatives of the theory prediction wrt alpha_s. (see + section 1.1 of 2105.05114) + """ + s = 0.5 * np.outer(deltas1[0] - deltas1[1], deltas2[0] - deltas2[1]) + return s + def covmat_3fpt(name1, name2, deltas1, deltas2): """Returns theory covariance sub-matrix for 3pt factorisation scale variation *only*, given two dataset names and collections @@ -288,7 +301,9 @@ def compute_covs_pt_prescrip( deltas2 = deltas1 if l == 3: - if point_prescription == "3f point": + if point_prescription.startswith("alpha_s"): + s = covmat_alphas(name1, name2, deltas1, deltas2) + elif point_prescription == "3f point": s = covmat_3fpt(name1, name2, deltas1, deltas2) elif point_prescription == "3r point": s = covmat_3rpt(name1, name2, deltas1, deltas2)