These functions implement hologram propagation in holopy, a Python library for digital holography.
ps_propagate(data, d, L, beam_c, out_schema = None) is a function that propagates a hologram along the optical axis by a specified distance or set of distances. The inputs are:
data: aholopyxarray containing the hologram to propagated: the distance(s) in meters to propagate the hologramL: the distance from screen to pinhole in metersbeam_c: the x,y coordinates in pixels of the center of the beamout_schema: optional size and pixel spacing of output image.
The function returns an xarray containing the propagated hologram(s) with updated metadata.
ps_propagate_plane(data, d, L, beam_c, out_schema = None, old_Ip = False) is a helper function called by ps_propagate() that propagates a hologram for a single plane. The inputs are similar to ps_propagate(), but also include:
old_Ip: a boolean indicating whether to use a previously computedIpvalue to speed up calculations.
propagate(data, d, medium_index=None, illum_wavelen=None, cfsp=0, gradient_filter=False) is a wrapper function for ps_propagate() that takes additional parameters:
medium_index: the refractive index of the mediumillum_wavelen: the wavelength of the illumination sourcecfsp: integer cascaded free-space propagation factor for transfer function calculationgradient_filter: a float specifying a distance to subtract a second propagated result to enhance contrast of rapidly varying features.
The three functions work together to calculate the transfer function and propagate a hologram. They implement the algorithm described in Jericho and Kreuzer, “Point Source Digital In-Line Holographic Microscopy,” Chapter 1 of Coherent Light Microscopy, Springer, 2010.




