BioImager  3.6.0
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.testsuite.hardware Namespace Reference

Functions

def test_mirror_actuators (dm, time_interval=0.5)
 

Function Documentation

◆ test_mirror_actuators()

def microscope.testsuite.hardware.test_mirror_actuators (   dm,
  time_interval = 0.5 
)
Iterate over all actuators of a deformable mirror.

Args:
    dm (microscope.abc.DeformableMirror): The mirror to test.
    time_interval (float): Number of seconds between trying each
        actuator.

Definition at line 28 of file hardware.py.

28def test_mirror_actuators(dm, time_interval=0.5):
29 """Iterate over all actuators of a deformable mirror.
30
31 Args:
32 dm (microscope.abc.DeformableMirror): The mirror to test.
33 time_interval (float): Number of seconds between trying each
34 actuator.
35 """
36 base_value = 0.5
37 data = numpy.full((dm.n_actuators), base_value)
38 dm.apply_pattern(data)
39
40 time.sleep(time_interval)
41 for new_value in [1.0, 0.0]:
42 for i in range(dm.n_actuators):
43 data[i] = new_value
44 dm.apply_pattern(data)
45 time.sleep(time_interval)
46 data[i] = base_value
47
48 dm.apply_pattern(data)