Skip to content
Snippets Groups Projects
Commit d2894a77 authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Fixed chi2 plot to include single pulse axis.

parent 1954f34f
No related branches found
No related tags found
1 merge request!10Handle multi-pulse data
This commit is part of merge request !10. Comments created here will be created in the context of that merge request.
......@@ -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])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment