get_obj_z_shift

get_obj_z_shift#

ptyrad.constraints.get_obj_z_shift(obj_phase, threshold=95, scale=1, max_shift=10)[source]#

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

Parameters:
  • obj_phase – tensor (omode, z, y, x), phase values in radians

  • threshold – threshold factor used to remove weak intensities in the image

  • scale – scaling factor applied to the measured shift

  • max_shift – maximum allowed shift in pixels

Returns:

float, signed shift (positive = shift down in z)