proxtoolbox.Problems¶
Created on Mon Dec 29 15:46:43 2015
@author: rebecca
The “Problems”-module contains all mathematical problems that can already be solved by the ProxToolbox.
-
class
proxtoolbox.Problems.
Ptychography
(new_config={})[source]¶ Bases:
proxtoolbox.Problems.problems.Problem
Ptychography Problem
References
[1] R. Hesse, D.R. Luke, S. Sabach, and M.K. Tam, “Proximal Heterogeneous Block Implicit-Explicit Method and Application to Blind Ptychographic Diffraction Imaging”, SIAM J. Imaging Sciences, 8(1):426–457, 2015. Initialization of Ptychography problem
Parameters: - config : dict, optional - Dictionary containing the problem configuration. If unspecified, Ptychography.config is used.
-
_gaussu
(rho, z, l, wnull)[source]¶ Calculates the electric field component of a Gaussian beam
Parameters: - rho : array_like - Input image
- z : int - Position on the Z axis
- l : int/float - Wave length
- wnull : number - Waist radius
Returns: - array_like - Field amplitude
-
_get_ptychography_data
()[source]¶ Generates an experiment on-the-fly. If you want to load existing data or make your own experiments, you can overload this.
Returns: - d1x : number - Pixel dimension
- d1y : number - Pixel dimension
- positions : array_like
- probe : array_like
- sample_plane : array_like
- i_exp : array_like
-
_prop_nf_pa
(im, l, delta_z, dx, dy)[source]¶ Propagates a 2D-wave field within a paraxial approximation into the optical near field.
Parameters: - im : array_like - Incident 2D wave field
- l : number - Wave length
- delta_z : number - Propagation distance
- dx, dy : int - Pixel widths in horizontal and vertical direction
Returns: - array_like - Propagated wave field
-
class
proxtoolbox.Problems.
Ptychography_NTT_01_26210
(config={'Nx': 192, 'Ny': 192, 'Nz': 1, 'algorithm': <class 'proxtoolbox.Problems.ptychography.PALM'>, 'beta0': 1, 'beta_max': 1, 'beta_switch': 30, 'between_blocks_scheme': 'averaged', 'block_cols': 2, 'block_maxiter': 1, 'block_rows': 2, 'block_tol': 1.0, 'blocking_scheme': 'single_view', 'blocking_switch': False, 'bs_factor': 1, 'bs_mask': None, 'ignore_error': False, 'maxiter': 2, 'noise': None, 'nx': 26, 'ny': 26, 'object_guess_type': 'constant', 'overrelax': 1, 'probe_guess_type': 'robin_initial', 'probe_mask_gamma': 1, 'ptychography_prox': 'Rodenburg', 'rmsfraction': 0.5, 'rodenburg_inner_it': 1, 'sample_area_center': (0.5, 0.5), 'scan_stepsize': 3.5e-07, 'scan_type': 'raster', 'switch_object_support_constraint': False, 'switch_probemask': False, 'tol': -1, 'warmup': True, 'warmup_alg': <class 'proxtoolbox.Problems.ptychography.PALM'>, 'warmup_maxiter': 0, 'within_blocks_scheme': 'none'})[source]¶ Bases:
proxtoolbox.Problems.ptychography.Ptychography
Ptychography NTT 01 26210
Initialization based on
Ptychography
-
_get_ptychography_data
()[source]¶ Overloads the corresponding method of
Ptychography
to create other experiment data
-
-
class
proxtoolbox.Problems.
Sudoku
(new_config={})[source]¶ Bases:
proxtoolbox.Problems.problems.Problem
Sudoku Problem
The goal of a standard Sudoku puzzle is to fill a 9x9 array with the numbers from 1 to 9. Every row, every column and each of the 9 3x3 subblocks should contain each number only once.
Starting point is a grid that already contains several numbers. Usually, there exists a unique solution.
The initialization of a Sudoku instance takes the default configuration and updates the parameters with the arguments in new_config.
Parameters: - new_config : dict, optional - Parameters to initialize the problem. If unspecified, the default config is used.