Commit 747e8f3f authored by Matthijs's avatar Matthijs
Browse files

decreased figure sizes for normal viewing (based on 15inch screen)

parent 4cc032b8
......@@ -35,47 +35,34 @@ from .stack_viewer import XYZStackViewer, SingleStackViewer
def Phase_graphics(config, output):
# algortihm=config['algorithm']
# beta0 = config['beta_0']
# beta_max = config['beta_max']
# u_0 = config['u_0']
if output['u1'].ndim == 2:
u = output['u1']
u2 = output['u2']
else:
u = output['u1'][:, :, 0]
u2 = output['u2'][:, :, 0]
# iter = output['iter']
change = output['change']
f, ((ax1, ax2), (ax3, ax4)) = subplots(2, 2, figsize=(12,8))
f, ((ax1, ax2), (ax3, ax4)) = subplots(2, 2, figsize=(9, 6))
im = ax1.imshow(np.abs(u), cmap='gray')
f.colorbar(im, ax=ax1)
ax1.set_title('best approximation amplitude - physical constraint satisfied')
ax1.set_title('best approximation amplitude: \nphysical constraint satisfied')
im = ax2.imshow(complex_to_rgb(u))
# im = ax2.imshow(np.real(u), cmap='gray')
# f.colorbar(im, ax=ax2)
ax2.set_title('best approximation phase - physical constraint satisfied')
ax2.set_title('best approximation phase: \nphysical constraint satisfied')
im = ax3.imshow(np.abs(u2), cmap='gray')
f.colorbar(im, ax=ax3)
ax3.set_title('best approximation amplitude - Fourier constraint satisfied')
ax3.set_title('best approximation amplitude: \nFourier constraint satisfied')
im = ax4.imshow(complex_to_rgb(u2))
# im = ax4.imshow(np.real(u2), cmap='gray')
# f.colorbar(im, ax=ax4)
ax4.set_title('best approximation amplitude - Fourier constraint satisfied')
ax4.set_title('best approximation amplitude: \nFourier constraint satisfied')
f.tight_layout()
g, ((bx1, bx2), (bx3, bx4)) = subplots(2, 2, figsize=(12,8))
g, ((bx1, bx2), (bx3, bx4)) = subplots(2, 2, figsize=(9, 6))
im = bx1.imshow(np.abs(u), cmap='gray')
f.colorbar(im, ax=bx1)
bx1.set_title('best approximation amplitude - physical constraint satisfied')
bx1.set_title('best approximation amplitude: \nphysical constraint satisfied')
im = bx2.imshow(np.real(u), cmap='gray')
f.colorbar(im, ax=bx2)
bx2.set_title('best approximation phase - physical constraint satisfied')
bx2.set_title('best approximation phase: \nphysical constraint satisfied')
bx3.semilogy(change)
bx3.set_xlabel('iteration')
bx3.set_ylabel('$||x^{2k+2}-x^{2k}||$')
......@@ -83,7 +70,7 @@ def Phase_graphics(config, output):
bx4.semilogy(output['gap'])
bx4.set_xlabel('iteration')
bx4.set_ylabel('$||x^{2k+1}-x^{2k}||$')
f.tight_layout()
show()
......
......@@ -84,7 +84,7 @@ def data_processor(config):
config['sparsity_support'] = binary_dilation(autocorrelation > 0.01 * np.amax(autocorrelation)).astype(np.uint)
if config['dataprocessor_plotting']:
plt.figure(figsize=(15, 4))
plt.figure(figsize=(10, 3.5))
plt.subplot(131)
plt.imshow(inp)
plt.colorbar()
......
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