diff --git a/pes_to_spec/test/offline_analysis.py b/pes_to_spec/test/offline_analysis.py index 0b3f2fc50a6fe68c2b4f0b6dec81acdb9b0e8d65..a257ab1dea0f67daac9102ecf79fdaa6c90290e8 100755 --- a/pes_to_spec/test/offline_analysis.py +++ b/pes_to_spec/test/offline_analysis.py @@ -300,7 +300,7 @@ def main(): # chi2 w.r.t XGM intensity erange = spec_raw_pe[0,-1] - spec_raw_pe[0,0] de = (spec_raw_pe[0,1] - spec_raw_pe[0,0]) - chi2 = np.sum((spec_smooth - spec_pred["expected"])**2/(spec_pred["total_unc"]**2), axis=1) + chi2 = np.sum((spec_smooth[:, np.newaxis] - spec_pred["expected"])**2/(spec_pred["total_unc"]**2), axis=1) ndof = float(spec_smooth.shape[1]) - 1.0 fig = plt.figure(figsize=(12, 8)) gs = GridSpec(1, 1) @@ -369,7 +369,7 @@ def main(): plt.close(fig) # rmse - rmse = np.sqrt(np.mean((spec_smooth - spec_pred["expected"])**2, axis=1)) + rmse = np.sqrt(np.mean((spec_smooth[:, np.newaxis] - spec_pred["expected"])**2, axis=1)) fig = plt.figure(figsize=(12, 8)) gs = GridSpec(1, 1) ax = fig.add_subplot(gs[0, 0])