ptyrad.init.initializer#

Initialize measurements, object, probe, probe positions, tilts, and other variables

This module is completely using NumPy for interoperability,

so users can initialize their data with PtyRAD first and reconstruct with other approaches later.

Classes

Initializer(init_params[, seed])

Numpy-based general purpose initializer used for initializing diffraction patterns, object, probe, scan patterns, etc.

class ptyrad.init.initializer.Initializer(init_params, seed=None)[source]#

Bases: object

Numpy-based general purpose initializer used for initializing diffraction patterns, object, probe, scan patterns, etc.

print_init_params()[source]#

Print the current init_params in the Initialzier object

init_cache()[source]#

Check if the source paths are the same, if so, we may cache that field to reduce file loading time

init_measurements()[source]#

Initialize diffraction patterns by loading and then processing it.

init_calibration()[source]#

Setting up reconstruction calibration (i.e., real and k-space pixel size)

set_variables_dict()[source]#

Initialize and set the init_variables dict used for downstream reconstructions

init_probe()[source]#

Initialize the probe by loading or simulating and then processing it.

init_pos()[source]#

Initialize the probe positions by loading and processing them.

init_obj()[source]#

Initialize the object by loading and processing it.

init_omode_occu()[source]#

Initialize the mixed-state object mode occupancy so each mode has a fixed weight

init_H()[source]#

Initialize the near-field Fresnel propagator for multislice ptychography

init_obj_tilts()[source]#

Initialize the object crystal tilts. Tilts can be global tilt (1,2) or pos-dependent tilt (N,2)

init_check()[source]#

Consistency check between input params with the initialized variables

init_provenance()[source]#

Collect reconstruction history (i.e., provenance) and params from loaded reconstructions. If it’s generated from simulation or custom array, the provenance entry would include relevant metadata. This is used to track the full history of sequential econstructions.

init_all()[source]#

Master init method that initializes all methods