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
90226372
Commit
90226372
authored
Mar 30, 2020
by
Matthijs
Browse files
3D compatibility for _postsolve
parent
4f6fc4cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Problems/OrbitalTomog/phase.py
View file @
90226372
...
...
@@ -14,8 +14,6 @@ class Phase(Problem):
"""
Phase Problem
"""
config
=
{}
def
__init__
(
self
,
new_config
):
"""
The initialization of a Phase instance takes the default configuration
...
...
@@ -134,7 +132,7 @@ class Phase(Problem):
"""
Prepares argument for actual solving routine
"""
pass
# Actually nothing for the phase problem
pass
# Actually nothing for the phase problem
def
_solve
(
self
):
"""
...
...
@@ -171,8 +169,8 @@ class Phase(Problem):
# # Old code, developed for 2D orbital imaging:
# yc, xc = int(self.config['Ny'] / 2), int(self.config["Nx"] / 2)
# for key in ['u', 'u1', 'u2']:
# self.output[key] = array_tools.roll_to_pos(self.output[key], yc, xc, move_maximum=True)
# first move maximum
# self.output[key] = array_tools.roll_to_pos(self.output[key], yc, xc)
# then move center of mass.
# self.output[key] = array_tools.roll_to_pos(self.output[key], yc, xc, move_maximum=True)
# self.output[key] = array_tools.roll_to_pos(self.output[key], yc, xc)
# # This sequence will work for objects *with a small support* even if they lie over the edge of the array
# if 'interpolate_result' in self.config and self.config['interpolate_result']:
# self.output[key] = interpolation.fourier_interpolate(self.output[key])
...
...
@@ -188,3 +186,15 @@ class Phase(Problem):
print
(
self
.
elapsed_time
)
_graphics
=
getattr
(
Graphics
,
self
.
config
[
'graphics_display'
])
_graphics
(
self
.
config
,
self
.
output
)
def
save
(
self
):
"""
Saves inputs and outputs of the reconstruction procedure
Necessary inputs: save directory,
:return:
"""
# TODO: some basic procedure. perhaps just a python pickle? (of the config and output dictionaries)
raise
NotImplementedError
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