Пример #1
0
 def apply_pattern(self, pattern: numpy.ndarray) -> None:
     self._validate_patterns(pattern)
     data_pointer = pattern.ctypes.data_as(ctypes.POINTER(ctypes.c_double))
     status = BMC.SetArray(self._dm, data_pointer, None)
     if status:
         raise Exception(BMC.ErrorString(status))
Пример #2
0
 def _do_apply_pattern(self, pattern: numpy.ndarray) -> None:
     data_pointer = pattern.ctypes.data_as(ctypes.POINTER(ctypes.c_double))
     status = BMC.SetArray(self._dm, data_pointer, None)
     if status:
         raise microscope.DeviceError(BMC.ErrorString(status))