Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nam
ProxPython
Commits
48b89094
Commit
48b89094
authored
Apr 24, 2020
by
Matthijs
Browse files
improved graphics
parent
f513c327
Changes
2
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Problems/OrbitalTomog/Graphics/Phase_graphics.py
View file @
48b89094
...
...
@@ -80,8 +80,9 @@ def Phase_graphics_3d(config, output):
:return: physical constraint plot, fourier constraint plot, convergence plots
"""
phys_constraint_plot
=
XYZStackViewer
(
output
[
'u1'
])
fourier_constraint_plot
=
XYZStackViewer
(
output
[
'u2'
])
phys_constraint_plot
=
XYZStackViewer
(
output
[
'u1'
],
name
=
'Physical constraint satisfied (%s)'
%
config
[
'constraint'
])
fourier_constraint_plot
=
XYZStackViewer
(
output
[
'u2'
],
name
=
'Fourier constraint satisfied'
)
convergence_plots
,
ax
=
subplots
(
1
,
2
,
figsize
=
(
7
,
3
))
ax
[
0
].
semilogy
(
output
[
'change'
])
...
...
@@ -93,6 +94,7 @@ def Phase_graphics_3d(config, output):
ax
[
1
].
set_xlabel
(
'iteration'
)
ax
[
1
].
set_title
(
'Gap'
)
ax
[
1
].
set_ylabel
(
'$||x^{2k+1}-x^{2k}||$'
)
convergence_plots
.
tight_layout
()
show
()
return
phys_constraint_plot
,
fourier_constraint_plot
,
convergence_plots
proxtoolbox/Problems/OrbitalTomog/Graphics/stack_viewer.py
View file @
48b89094
...
...
@@ -64,6 +64,7 @@ class XYZStackViewer:
defaults to abs() for complex data
:param name: Set the name of the figure to a string.
"""
# TODO: add toggles to set the data transformation, to None, Abs, Complex -> RGB
if
get_backend
()
not
in
good_backends
:
warn
(
Warning
(
'Current matplotlib backend may not allow for optimal funcionality! Use, e.g., Qt'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment