Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nam
ProxPython
Commits
bc4a08ae
Commit
bc4a08ae
authored
Apr 23, 2020
by
Matthijs
Browse files
first guess actually in the object domain
parent
26dcd7bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Problems/OrbitalTomog/molecule_3d/orbital_tomog_3d_data_processor.py
View file @
bc4a08ae
...
@@ -71,6 +71,10 @@ def data_processor(config):
...
@@ -71,6 +71,10 @@ def data_processor(config):
# Initial guess
# Initial guess
ph_init
=
2
*
np
.
pi
*
np
.
random
.
random_sample
(
config
[
'data'
].
shape
)
ph_init
=
2
*
np
.
pi
*
np
.
random
.
random_sample
(
config
[
'data'
].
shape
)
config
[
'u_0'
]
=
config
[
'data'
]
*
np
.
exp
(
1j
*
ph_init
)
config
[
'u_0'
]
=
config
[
'data'
]
*
np
.
exp
(
1j
*
ph_init
)
if
'fourier_shift_arrays'
in
config
and
config
[
'fourier_shift_arrays'
]:
config
[
'u_0'
]
=
shifted_fft
(
config
[
'u_0'
])
else
:
config
[
'u_0'
]
=
np
.
fft
.
fftn
(
config
[
'u_0'
])
if
config
[
'dataprocessor_plotting'
]:
if
config
[
'dataprocessor_plotting'
]:
input_viewer
=
XYZStackViewer
(
config
[
'data'
],
cmap
=
'viridis'
)
input_viewer
=
XYZStackViewer
(
config
[
'data'
],
cmap
=
'viridis'
)
...
...
proxtoolbox/Problems/OrbitalTomog/planar_molecule/orbitaltomog_data_processor.py
View file @
bc4a08ae
...
@@ -77,6 +77,7 @@ def data_processor(config):
...
@@ -77,6 +77,7 @@ def data_processor(config):
# Initial guess
# Initial guess
ph_init
=
2
*
np
.
pi
*
np
.
random
.
rand
(
ny
,
nx
)
ph_init
=
2
*
np
.
pi
*
np
.
random
.
rand
(
ny
,
nx
)
config
[
'u_0'
]
=
inp
*
np
.
exp
(
1j
*
ph_init
)
config
[
'u_0'
]
=
inp
*
np
.
exp
(
1j
*
ph_init
)
config
[
'u_0'
]
=
np
.
fft
.
fftn
(
config
[
'u_0'
])
if
(
'use_sparsity_with_support'
in
config
if
(
'use_sparsity_with_support'
in
config
and
config
[
'use_sparsity_with_support'
]
and
config
[
'use_sparsity_with_support'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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