Commit 9517285b authored by Matthijs's avatar Matthijs
Browse files

folder structure to separate different cases

parent 73a6277f
......@@ -129,9 +129,8 @@ class SimpleAlgorithm:
if hasattr(self, 'truth'):
Relerrs = change.copy()
# Different algorithms will have different qualities that one
# should monitor. Since we take a fixed point perspective, the main
# thing to monitor is the change in the iterates.
# Different algorithms will have different qualities that one should monitor.
# Since we take a fixed point perspective, the main thing to monitor is the change in the iterates.
shadow = self.prox1.work(u)
##### LOOP
......@@ -143,18 +142,15 @@ class SimpleAlgorithm:
u_new = self.evaluate(u)
if self.diagnostic:
# the next prox operation only gets used in the computation of
# the size of the gap. This extra step is not
# required in alternating projections, which makes RAAR
# the next prox operation only gets used in the computation of the size of the gap.
# This extra step is not required in alternating projections, which makes RAAR a bit slower
u2 = self.prox2.work(u_new)
u1 = self.prox1.work(u2)
# compute the normalized change in successive iterates:
# change(iter) = sum(sum((feval('P_M',M,u)-tmp).^2))/norm_data;
# compute the normalized change in successive iterates
tmp_change = 0
tmp_gap = 0
tmp_shadow = 0
# the simple case, where everything can be calculated in one difference
if self.product_space_dimension == 1 or (p == 1 and q == 1):
tmp_change = phase_offset_compensated_norm(u, u_new, norm_type='fro', norm_factor=norm_data) ** 2
......@@ -216,9 +212,8 @@ class SimpleAlgorithm:
# update iterate
u = u_new
if self.diagnostic:
# For Douglas-Rachford,in general it is appropriate to monitor the SHADOWS of the iterates, since in
# the convex case these converge even for beta=1.
# (see Bauschke-Combettes-Luke, J. Approx. Theory, 2004)
# For Douglas-Rachford, in general it is appropriate to monitor the SHADOWS of the iterates, since in
# the convex case these converge even for beta=1. (see Bauschke-Combettes-Luke, J. Approx. Theory, 2004)
shadow = u2
##### POSTPROCESSING
......
from .orbitaltomog_data_processor import support_from_autocorrelation
from proxtoolbox.Utilities.OrbitalTomog.array_tools import shifted_fft, shifted_ifft
from proxtoolbox.Utilities.OrbitalTomog.binning import bin_2d_array, bin_array
from proxtoolbox.Problems.OrbitalTomog.planar_molecule.orbitaltomog_data_processor import support_from_autocorrelation
from proxtoolbox.Utilities.OrbitalTomog.array_tools import shifted_fft
from proxtoolbox.Utilities.OrbitalTomog.binning import bin_array
import numpy as np
from skimage.io import imread
from .Graphics.stack_viewer import XYZStackViewer
from proxtoolbox.Problems.OrbitalTomog.Graphics.stack_viewer import XYZStackViewer
def data_processor(config):
......
......@@ -103,7 +103,7 @@ new_config = {
'lambda_switch': 100,
'sparsity_parameter': 100,
'use_sparsity_with_support': False,
'use_sparsity_with_support': True,
'symmetry_type': 1, # -1 for antissymmetric functions, 1 for symmetric ones.
'symmetry_axis': -1, # which axis is symmetric. (mirror plane perpendicular to this axis)
......
from proxtoolbox.Problems.OrbitalTomog import coronene_config # base config
from proxtoolbox.Problems.OrbitalTomog import orbitaltomog_data_processor # extends config
from proxtoolbox.Problems.OrbitalTomog.planar_molecule import coronene_config, orbitaltomog_data_processor
from proxtoolbox.Problems.OrbitalTomog.phase import Phase
# sys.path.append('../proxtoolbox/Problems/Phase')
......
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