Commit ce126a43 authored by Matthijs's avatar Matthijs
Browse files

simple 3d graphics solution

parent f1a734f7
......@@ -88,5 +88,22 @@ def Phase_graphics(config, output):
def Phase_graphics_3d(config, output):
# TODO: combine 3D graphics and convergence plots
return 0
"""
Make 3d plots and convergence plots for a three-dimensional phase retrieval problem.
:return: physical constraint plot, fourier constraint plot, convergence plots
"""
phys_constraint_plot = XYZStackViewer(output['u1'])
fourier_constraint_plot = XYZStackViewer(output['u2'])
convergence_plots, ax = subplots(1, 2, figsize=(6, 3.5))
ax[0].semilogy(output['change'])
ax[0].set_xlabel('iteration')
ax[0].set_ylabel('$||x^{2k+2}-x^{2k}||$')
if "diagnostic" in config:
ax[1].semilogy(output['gap'])
ax[1].set_xlabel('iteration')
ax[1].set_ylabel('$||x^{2k+1}-x^{2k}||$')
show()
return phys_constraint_plot, fourier_constraint_plot, convergence_plots
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