Commit 9f48a61e authored by Philipp Arras's avatar Philipp Arras
Browse files

More plotting

parent 81a0d8b6
Pipeline #27595 passed with stage
in 1 minute and 28 seconds
......@@ -80,12 +80,17 @@ plt.legend()
plt.savefig('Krylov_reconstruction.png')
plt.close()
pltdict = {'alpha': .2, 'linewidth': .2}
pltdict = {'alpha': .3, 'linewidth': .2}
for i in range(N_samps):
if i == 0:
plt.plot(sky(samps_old[i]).val, color='b', **pltdict, label='Traditional samples')
plt.plot(sky(samps[i]).val, color='r', **pltdict, label='Krylov samples')
else:
plt.plot(sky(samps_old[i]).val, color='b', **pltdict)
plt.plot(sky(samps[i]).val, color='r', **pltdict)
plt.plot((s_x - m_x).val, color='k')
plt.savefig('Krylov_samples.png')
plt.plot((s_x - m_x).val, color='k', label='signal - mean')
plt.legend()
plt.savefig('Krylov_samples_residuals.png')
plt.close()
D_hat_old = ift.Field.zeros(x_space).val
......@@ -93,10 +98,10 @@ D_hat_new = ift.Field.zeros(x_space).val
for i in range(N_samps):
D_hat_old += sky(samps_old[i]).val**2
D_hat_new += sky(samps[i]).val**2
plt.plot(np.sqrt(D_hat_old / N_samps), 'r--', label='Old uncertainty')
plt.plot(np.sqrt(D_hat_old / N_samps), 'r--', label='Traditional uncertainty')
plt.plot(-np.sqrt(D_hat_old / N_samps), 'r--')
plt.fill_between(range(len(D_hat_new)), -np.sqrt(D_hat_new / N_samps), np.sqrt(
D_hat_new / N_samps), facecolor='0.5', alpha=0.5, label='New unvertainty')
D_hat_new / N_samps), facecolor='0.5', alpha=0.5, label='Krylov unvertainty')
plt.plot((s_x - m_x).val, color='k', label='signal - mean')
plt.legend()
plt.savefig('Krylov_uncertainty.png')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment