ptyrad.constraints

ptyrad.constraints#

Physical constraints that directly modify optimizable tensors with specified intervals of iterations

Classes

CombinedConstraint(constraint_params[, ...])

Applies iteration-wise in-place constraints on optimizable tensors.

Functions

complex_ratio_constraint(model, alpha1, alpha2)

get_obj_z_shift(obj_phase[, threshold, ...])

Compute z-shift from the center-of-mass (CoM) of the object phase.

kr_filter(obj, radius, width)

Apply kr_filter using the 2D sigmoid filter

kz_filter(obj[, beta_regularize_layers, ...])

Apply kz_filter using the arctan filter

orthogonalize_modes_vec(modes[, sort])

orthogonalize the modes using SVD

shift_obj_along_z(objc, z_shift)

Apply a subpixel shift along z using Fourier shift theorem.

sort_by_mode_int(modes)