PropLUT Class
The PropLUT class is used to create and store a look-up-table (LUT) of propagators
for subsequent faster refocusing to multiple depths using the angular spectrum method. An
instance of this class is returned by methods such as Holo.make_propagator_LUT().
The propagators are created at instantiation, and then are extracted as required using the
propagator() method.
- class pyholoscope.PropLUT(img_size, wavelength, pixel_size, depth_range, num_depths, propagation_method='angular_spectrum', correct_pixel_size=False, source_distance=None, use_numba=True, precision='single')
Stores a propagator look up table (LUT).
The LUT contains angular spectrum propagators for the specified parameters.
- __init__(img_size, wavelength, pixel_size, depth_range, num_depths, propagation_method='angular_spectrum', correct_pixel_size=False, source_distance=None, use_numba=True, precision='single')
Creates a propagator look up table (LUT) containing angular spectrum propagators.
- Arguments:
- img_sizeint or tuple of (int, int)
size of propagators, square or rectangular
- wavelength: float
wavelength of light
- pixel_sizefloat
physical size of pixels
- depth_range: tuple
range of depths to generate propagators for
- num_depthsint
number of depths to generate propagators for
- Keyword Arguments:
- propagation_methodstr
wave propagation model, ‘angular_spectrum’ (default) or ‘fresnel’
- correct_pixel_sizebool
if True, applies effective pixel-size correction based on source_distance during propagator generation
- source_distancefloat or None
point-source to camera distance, required when correct_pixel_size is True
- numbabool
flag to use numba for speed up (default = False)
- precisionstr
‘single’ or ‘double’ (default = ‘single’)
- propagator(depth)
Returns the propagator from the LUT which is closest to requested depth. If depth is outside the range of the propagators, function returns None.
- Parameters:
- depthfloat
refocus depth for requested propagator