Commit bc4a08ae authored by Matthijs's avatar Matthijs
Browse files

first guess actually in the object domain

parent 26dcd7bd
...@@ -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')
......
...@@ -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']
......
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