Skip to content
Snippets Groups Projects

Handle multi-pulse data

Merged Danilo Enoque Ferreira de Lima requested to merge pulses into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -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])
Loading