From 787fb70f29f09064bcd4495d283a00d31a033ddd Mon Sep 17 00:00:00 2001 From: Roy Stegeman Date: Tue, 14 Jan 2025 13:58:17 +0000 Subject: [PATCH] fix index labels used in mc2hessian --- validphys2/src/validphys/deltachi2.py | 2 +- validphys2/src/validphys/lhio.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/validphys2/src/validphys/deltachi2.py b/validphys2/src/validphys/deltachi2.py index a19005093c..0df292f728 100644 --- a/validphys2/src/validphys/deltachi2.py +++ b/validphys2/src/validphys/deltachi2.py @@ -120,7 +120,7 @@ def plot_delta_chi2_hessian_distribution(delta_chi2_hessian, pdf, total_chi2_dat ax.hist( delta_chi2, bins=bins, - label=f"{pdf.label} - $\chi^2_{0}$={total_chi2_data.central_result:.0f}", + label=fr"{pdf.label} - $\chi^2_0$={total_chi2_data.central_result:.0f}", ) ax.set_xlabel(r"$\Delta\chi^2$") ax.set_title(r"$\Delta\chi^2$ distribution") diff --git a/validphys2/src/validphys/lhio.py b/validphys2/src/validphys/lhio.py index d0d8f9d861..f9c70c7bf3 100644 --- a/validphys2/src/validphys/lhio.py +++ b/validphys2/src/validphys/lhio.py @@ -136,7 +136,7 @@ def big_matrix(gridlist): and the central value""" central_value = gridlist[0] X = pd.concat( - gridlist[1:], axis=1, keys=range(1, len(gridlist) + 1) # avoid confusion with rep0 + gridlist[1:], axis=1, keys=range(1, len(gridlist)) # avoid confusion with rep0 ).subtract(central_value, axis=0) if np.any(X.isnull()) or X.shape[0] != len(central_value): raise ValueError("Incompatible grid specifications")