Skip to content

Commit

Permalink
add alphas variations covmat function
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyStegeman committed Feb 14, 2024
1 parent dbca6eb commit 23ee5d5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion validphys2/src/validphys/theorycovariance/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 23ee5d5

Please sign in to comment.