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
747e8f3f
Commit
747e8f3f
authored
Apr 22, 2020
by
Matthijs
Browse files
decreased figure sizes for normal viewing (based on 15inch screen)
parent
4cc032b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Problems/OrbitalTomog/Graphics/Phase_graphics.py
View file @
747e8f3f
...
...
@@ -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:
\n
physical 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:
\n
physical 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:
\n
Fourier 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:
\n
Fourier 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
:
\n
physical 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
:
\n
physical 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
()
...
...
proxtoolbox/Problems/OrbitalTomog/planar_molecule/orbitaltomog_data_processor.py
View file @
747e8f3f
...
...
@@ -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
=
(
1
5
,
4
))
plt
.
figure
(
figsize
=
(
1
0
,
3.5
))
plt
.
subplot
(
131
)
plt
.
imshow
(
inp
)
plt
.
colorbar
()
...
...
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