Commit 90226372 authored by Matthijs's avatar Matthijs
Browse files

3D compatibility for _postsolve

parent 4f6fc4cf
......@@ -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
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