hologradpy.hardware¶
This module provides to interface with the camera and the SLM.
Classes¶
Class storing experimental parameters and constant properties. |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
Functions¶
|
This function captures multiple camera images and calculates the average. |
Module Contents¶
- class hologradpy.hardware.ParamsBase¶
Bases:
abc.ABCClass storing experimental parameters and constant properties.
- abstract property wavelength¶
Wavelength [m].
- property k¶
Wavenumber [rad/m].
- abstract property beam_diameter¶
Diameter of incident Gaussian beam [m].
- abstract property fl¶
Focal length [m].
- n1 = 1.59847¶
- n2 = 1.76182¶
- r1 = 0.1377¶
- r2 = -0.1377¶
- r3 = -0.9304¶
- lens_aperture = 0.0483¶
- abstract property phi_path¶
- abstract property i_path¶
- abstract property data_path¶
Path to store data.
- crop = 32¶
- phi_filter_size = 5¶
- i_filter_size = 3¶
- class hologradpy.hardware.CameraBase(res, pitch, roi)¶
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- res¶
- pitch¶
- roi¶
- property cam_size¶
Calculates the physical size of the camera.
- Returns:
x, y dimensions of the camera [m].
- abstract start(n=1)¶
You have to implement this yourself. Starts the acquisition.
- Parameters:
n – Number of frames to be captured.
- abstract get_image(exp_time)¶
You have to implement this yourself. Acquires and returns a camera image of the shape determined by
self.roi.- Parameters:
exp_time – Exposure time.
- Returns:
Camera image of shape as defined by
self.roi
- abstract stop()¶
You have to implement this yourself. Stops the acquisition.
- hologradpy.hardware.get_image_avg(cam_obj, exp_time, n_avg)¶
This function captures multiple camera images and calculates the average.
- Parameters:
cam_obj – Instance of your own camera class which is a subclass of
CameraBase.exp_time – Exposure time.
n_avg – Number of frames to be averaged.
- Returns:
Averaged image.
- class hologradpy.hardware.SlmBase(res, pitch)¶
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- res¶
- pitch¶
- property slm_size¶
Calculates the physical size of the SLM.
- Returns:
x, y dimensions of the SLM [m].
- property meshgrid_slm¶
Calculates an x, y meshgrid using the pixel pitch and the native resolution of the SLM. :return: x, y meshgrid [m].
- abstract display(phi)¶
This function displays a phase pattern on the SLM. You have to implement this yourself.
- Parameters:
phi – SLM phase pattern [radians].
- Returns: