API: pySLM2.util package

pySLM2.util.controller module

class pySLM2.util.controller.ALPController(invert=False, version='4.3')[source]

Bases: DMDControllerBase

MAX_UINT8 = 255

This class implements the control function for interacting the controller from Vialux.

Parameters:
  • invert (bool) – If true, invert the on/off mirrors in the hologram.

  • version (str) – Version of the ALP library fom Vialux.

See also

ALP4.ALP4

property Nx: int
property Ny: int
close()[source]
initialize()[source]
load_multiple(dmd_states: List[ndarray])[source]
load_single(dmd_state)[source]
class pySLM2.util.controller.DMDControllerBase(invert=False)[source]

Bases: object

Base class for the DMD controller.

property Nx: int
property Ny: int
close()[source]
fire_software_trigger()[source]
initialize()[source]
is_initialized()[source]
load_multiple(dmd_states: List[ndarray])[source]
load_sequence(images)[source]
load_single(dmd_state)[source]
number_image(i)[source]
class pySLM2.util.controller.LuxbeamController(ip, invert=False, timeout=None)[source]

Bases: DMDControllerBase

This class implements the control function for interacting the controller from Visitech.

Parameters:
  • ip (str) – IP address of the controller.

  • invert (bool) – If true, invert the on/off mirrors in the hologram.

  • timeout (None or float) – Timeout of the network socket.

See also

Luxbeam.Luxbeam

property Nx: int
property Ny: int
close()[source]
fire_software_trigger()[source]
initialize()[source]
load_multiple(dmd_states: List[ndarray])[source]
load_single(dmd_state)[source]

pySLM2.util.sample module

pySLM2.util.sample.number_image(i, Nx: int, Ny: int)[source]

Create a image that shows the number.

Parameters:
  • i (int) – Number to be displayed on the DMD.

  • Nx (int) – Number of pixel of the DMD in x direction (width).

  • Ny (int) – Number of pixel of the DMD in y direction (height).

Returns:

img – The binary image that contains the number.

Return type:

numpy.ndarray