Skip to content

Commit

Permalink
Add covariance matrix sum plot
Browse files Browse the repository at this point in the history
  • Loading branch information
andreab1997 committed Nov 13, 2023
1 parent ea35b2b commit 0e03f8d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions validphys2/src/validphys/theorycovariance/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,13 @@ def experimentplustheory_normcovmat_custom(

return mat

@table
def experimentplustheory_covmat_singleprocess(procs_covmat, theory_covmat_singleprocess):
"""Calculates the covariance matrix for the experimental
plus theory covariance matrices."""
total_df = procs_covmat + theory_covmat_singleprocess
total_cov = (procs_covmat + theory_covmat_singleprocess).values
return total_cov

@table
def experimentplustheory_corrmat_singleprocess(procs_covmat, theory_covmat_singleprocess):
Expand Down
16 changes: 16 additions & 0 deletions validphys2/src/validphys/theorycovariance/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,22 @@ def plot_expplusblockthcorrmat_heatmap(experimentplusblocktheory_corrmat):
)
return fig

@figure
def plot_expplusthcovmat_heatmap_custom(
experimentplustheory_covmat_custom,
theoryids,
fivetheories,
):
"""Matrix plot of the exp + theory covariance matrix"""
l = len(theoryids)
if l == 5:
if fivetheories == "bar":
l = r"$\bar{5}$"
fig = plot_covmat_heatmap(
experimentplustheory_covmat_custom,
f"Experimental + Theory Covariance Matrix ({l} pt)",
)
return fig

@figure
def plot_expplusthcorrmat_heatmap_custom(
Expand Down

0 comments on commit 0e03f8d

Please sign in to comment.