zaber-motion 7.14.0__py3-none-macosx_10_4_universal2.whl → 7.15.0__py3-none-macosx_10_4_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,10 @@
1
1
  # This file is generated. Do not modify by hand.
2
2
  # pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
3
3
  from dataclasses import dataclass
4
- from typing import Any, Dict
4
+ from typing import Any, Dict, Optional
5
5
  import decimal
6
6
  import zaber_bson
7
+ from ..measurement import Measurement
7
8
 
8
9
 
9
10
  @dataclass
@@ -17,6 +18,8 @@ class ChannelOn:
17
18
 
18
19
  on: bool = False
19
20
 
21
+ duration: Optional[Measurement] = None
22
+
20
23
  @staticmethod
21
24
  def zero_values() -> 'ChannelOn':
22
25
  return ChannelOn(
@@ -24,6 +27,7 @@ class ChannelOn:
24
27
  device=0,
25
28
  axis=0,
26
29
  on=False,
30
+ duration=None,
27
31
  )
28
32
 
29
33
  @staticmethod
@@ -43,6 +47,7 @@ class ChannelOn:
43
47
  'device': int(self.device),
44
48
  'axis': int(self.axis),
45
49
  'on': bool(self.on),
50
+ 'duration': self.duration.to_dict() if self.duration is not None else None,
46
51
  }
47
52
 
48
53
  @staticmethod
@@ -52,6 +57,7 @@ class ChannelOn:
52
57
  device=data.get('device'), # type: ignore
53
58
  axis=data.get('axis'), # type: ignore
54
59
  on=data.get('on'), # type: ignore
60
+ duration=Measurement.from_dict(data.get('duration')) if data.get('duration') is not None else None, # type: ignore
55
61
  )
56
62
 
57
63
  def validate(self) -> None:
@@ -82,3 +88,9 @@ class ChannelOn:
82
88
 
83
89
  if int(self.axis) != self.axis:
84
90
  raise ValueError(f'Property "Axis" of "ChannelOn" is not integer value.')
91
+
92
+ if self.duration is not None:
93
+ if not isinstance(self.duration, Measurement):
94
+ raise ValueError(f'Property "Duration" of "ChannelOn" is not an instance of "Measurement".')
95
+
96
+ self.duration.validate()
zaber_motion/library.py CHANGED
@@ -171,7 +171,7 @@ class Library:
171
171
  """
172
172
  request = dto.CheckVersionRequest(
173
173
  host="py",
174
- version="7.14.0",
174
+ version="7.15.0",
175
175
  )
176
176
  call_sync("library/check_version", request)
177
177
 
@@ -55,6 +55,30 @@ class Illuminator:
55
55
 
56
56
  return IlluminatorChannel(self, channel_number)
57
57
 
58
+ def turn_off(
59
+ self
60
+ ) -> None:
61
+ """
62
+ Turns all channels off.
63
+ """
64
+ request = dto.DeviceEmptyRequest(
65
+ interface_id=self.device.connection.interface_id,
66
+ device=self.device.device_address,
67
+ )
68
+ call("illuminator/all_off", request)
69
+
70
+ async def turn_off_async(
71
+ self
72
+ ) -> None:
73
+ """
74
+ Turns all channels off.
75
+ """
76
+ request = dto.DeviceEmptyRequest(
77
+ interface_id=self.device.connection.interface_id,
78
+ device=self.device.device_address,
79
+ )
80
+ await call_async("illuminator/all_off", request)
81
+
58
82
  def __verify_is_illuminator(
59
83
  self
60
84
  ) -> None:
@@ -8,6 +8,7 @@ from ..dto.ascii.response import Response
8
8
  from ..ascii import Axis, AxisSettings, AxisStorage, Warnings
9
9
  from ..dto.ascii.set_state_axis_response import SetStateAxisResponse
10
10
  from ..dto.firmware_version import FirmwareVersion
11
+ from ..dto.measurement import Measurement
11
12
 
12
13
  if TYPE_CHECKING:
13
14
  from .illuminator import Illuminator
@@ -63,30 +64,42 @@ class IlluminatorChannel:
63
64
  self._warnings: Warnings = Warnings(illuminator.device, channel_number)
64
65
 
65
66
  def on(
66
- self
67
+ self,
68
+ duration: Optional[Measurement] = None
67
69
  ) -> None:
68
70
  """
69
71
  Turns this channel on.
72
+
73
+ Args:
74
+ duration: Duration for which to turn the channel on.
75
+ If not specified, the channel remains on until turned off.
70
76
  """
71
77
  request = dto.ChannelOn(
72
78
  interface_id=self.illuminator.device.connection.interface_id,
73
79
  device=self.illuminator.device.device_address,
74
80
  axis=self.channel_number,
75
81
  on=True,
82
+ duration=duration,
76
83
  )
77
84
  call("illuminator/on", request)
78
85
 
79
86
  async def on_async(
80
- self
87
+ self,
88
+ duration: Optional[Measurement] = None
81
89
  ) -> None:
82
90
  """
83
91
  Turns this channel on.
92
+
93
+ Args:
94
+ duration: Duration for which to turn the channel on.
95
+ If not specified, the channel remains on until turned off.
84
96
  """
85
97
  request = dto.ChannelOn(
86
98
  interface_id=self.illuminator.device.connection.interface_id,
87
99
  device=self.illuminator.device.device_address,
88
100
  axis=self.channel_number,
89
101
  on=True,
102
+ duration=duration,
90
103
  )
91
104
  await call_async("illuminator/on", request)
92
105
 
zaber_motion/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.14.0"
1
+ __version__ = "7.15.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zaber_motion
3
- Version: 7.14.0
3
+ Version: 7.15.0
4
4
  Summary: An official library for communicating with Zaber devices.
5
5
  Author-email: "Zaber Technologies Inc." <contact@zaber.com>
6
6
  License: The MIT License (MIT)
@@ -9,13 +9,13 @@ zaber_motion/call.py,sha256=lH72duqcNvzh3Mae5JYZ5kIsyMRftSxSCgmWk9TjYik,5206
9
9
  zaber_motion/convert_exception.py,sha256=TZrdGkmaTR7QOAwoxIQ9sOkHtuVg1bVs-sxbEDn22V8,8487
10
10
  zaber_motion/dto_object.py,sha256=3gJU6AQCjiZcx2o7p2C9VTqw9apOM0i21ssmAM-VmEY,359
11
11
  zaber_motion/events.py,sha256=3Ebp8zEjlRSjKG-b3WVrncZ6juHlKJTNeL-oeYIGpuk,3398
12
- zaber_motion/library.py,sha256=Uc90w53L3GbE6UHl_-_Av4J1d56SF2Bxj4JS4WRXpXo,5497
12
+ zaber_motion/library.py,sha256=kQOuSWYkK3qRQsoEhzptSVuYQw1WA6AUCUpuKLAqWaA,5497
13
13
  zaber_motion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  zaber_motion/serialization.py,sha256=Fm53Bd_oAZ7yaTjtBss23Dps3ynWv8wUJT5JVQyqKVs,987
15
15
  zaber_motion/tools.py,sha256=O9IGJNGaaG7Sz2jGkexdJfgyJ5L4vsLXJKFUhZlKlCI,2213
16
16
  zaber_motion/unit_table.py,sha256=FV-6VegAm499BJBJ4tdXgkP2Hl2h-fIlLJWkMrHlPAM,2497
17
17
  zaber_motion/units.py,sha256=RCkeTZwhZFJg2hffBJFweAhDHLHZOkLUPel0e1Wzi3g,10853
18
- zaber_motion/version.py,sha256=HyLrDM036NFqqqTSta893ALzgsTY2LDDQ1vUG5gp5B8,23
18
+ zaber_motion/version.py,sha256=7fEfjwM_t9O0aF0c9YYiSetQQ0JtRurfonIbSteTTOs,23
19
19
  zaber_motion/ascii/__init__.py,sha256=hB91yrB-iTGuk270V97TQK09fMiMUwL3FEIKhLqMJfc,4848
20
20
  zaber_motion/ascii/all_axes.py,sha256=ZdeufI6s3Yxtf9S0FbCZQNklKqFXIEEEbLE2-ITuASA,10793
21
21
  zaber_motion/ascii/axis.py,sha256=2TBLd2Mwa1YHOy1bSA4HAbPi9V9XtZIzGgFazYR7E5U,57885
@@ -179,7 +179,7 @@ zaber_motion/dto/requests/binary_reply_only_event_wrapper.py,sha256=9NgbYE_qpvir
179
179
  zaber_motion/dto/requests/bool_response.py,sha256=iAUdE18td3ypl5MNF4otU8Qj9siRYyRktJKGoRA_dAg,1280
180
180
  zaber_motion/dto/requests/can_set_state_axis_response.py,sha256=nA88UD-1ntRNvR7J7NwlBsV0F0MMKNRQQcFhNdM9Ap4,2230
181
181
  zaber_motion/dto/requests/can_set_state_request.py,sha256=9NI_c2QZP5YPXsBAEEB5w_rZa2RcgV1nIpCSakTfNg4,3936
182
- zaber_motion/dto/requests/channel_on.py,sha256=bKmCSsR3hOCpi0BcQR5cP3JDIIFPMjmjtwkgZKT2K-U,2891
182
+ zaber_motion/dto/requests/channel_on.py,sha256=OVdsGxnCt_8N882JbM--aUEGujUH7nQbRLf3ABVQHnU,3471
183
183
  zaber_motion/dto/requests/channel_set_intensity.py,sha256=AXBA-zeMGjW8kJLWuE6Q_7n9huLOBpOpBJFiimA9NjI,3382
184
184
  zaber_motion/dto/requests/check_version_request.py,sha256=3iJ97HP89zLC_8TTeG-MsAcgE0L1kUtEj9qVNwblB9E,1822
185
185
  zaber_motion/dto/requests/custom_interface_close_request.py,sha256=EsRGQktDkPRWHJVgcTOMBiOID2WyNfnSDAY9RAr3OIA,2302
@@ -480,17 +480,17 @@ zaber_motion/microscopy/__init__.py,sha256=uSXl3xMPYzKuBfyNXkMdBa4oLSUFjG09y98He
480
480
  zaber_motion/microscopy/autofocus.py,sha256=_tLF_B3jS_Id1AZ3frkYsEV2xGMsOQbBUT3614nWT9k,23744
481
481
  zaber_motion/microscopy/camera_trigger.py,sha256=5Hq-5lfNzVF5-H5r5EvH9ZU2IVa7Ilj_RT-XQ3iH2G8,3475
482
482
  zaber_motion/microscopy/filter_changer.py,sha256=UPo-YxqUcBxCzA5gKV0UMK2kCJksO24qczFSl5UtiwA,4659
483
- zaber_motion/microscopy/illuminator.py,sha256=1_Rwc9oQp82MzqbACbRMGHWZvzhfHyvUbip5xvClunI,4169
484
- zaber_motion/microscopy/illuminator_channel.py,sha256=8qOMB_X17wGB5JYYhumcy7VtGCeE9iGb4SZKOT_VJtE,20514
483
+ zaber_motion/microscopy/illuminator.py,sha256=9cptJBwHx2rUkxm5WBSixrKOxRosiTWul0Ca00OBCSQ,4819
484
+ zaber_motion/microscopy/illuminator_channel.py,sha256=oC5xuCeecfjjxQdOHkRPHLcFrFdaptsYiyXhMZcrt10,21032
485
485
  zaber_motion/microscopy/microscope.py,sha256=NtjCkfhTZsiBvF2a7GDbQnx1volvmyelhVBdMbZuSx4,9781
486
486
  zaber_motion/microscopy/objective_changer.py,sha256=sgz6XmM75wOxmyLrM0tfwH2ek4VoGvaX0K53azMVCjM,13557
487
487
  zaber_motion/microscopy/wdi_autofocus_provider.py,sha256=tEUG0Lt3bfX2SNVESqYKJlpWXHikn09qOUXLdvMbY7I,15814
488
488
  zaber_motion/product/__init__.py,sha256=lno0C-gLBsHNPGnjp6bbXHX0cEk27cA8uFjq5vzmE9Q,531
489
489
  zaber_motion/product/process.py,sha256=RGDxS_kyb-66RJ5bWmRtamp0zARPigcwN-zVcVtl7MQ,27527
490
490
  zaber_motion/product/process_controller.py,sha256=RQ1rXrdvslqB-3UIXLfLD3D5vfr1xfT8B5jOmTXf-V0,4193
491
- zaber_motion_bindings/zaber-motion-core-darwin-uni.dylib,sha256=CBaVklNmL5R9g_7aML2ON5ceYB4Tt8d8Fbh1ROiKPNk,30262946
492
- zaber_motion-7.14.0.dist-info/LICENSE.txt,sha256=xNj9QcKqsI3WK5EBPeYbQAiDcnVe4xmIpCy65NYNVhA,109244
493
- zaber_motion-7.14.0.dist-info/METADATA,sha256=1Ht7tgihkP07RCMGsfFIDbUccOOFf6PCHwSUPqVWebA,127666
494
- zaber_motion-7.14.0.dist-info/WHEEL,sha256=XsmEfKMdB2yReC9plMyXBxhtkQEg2VDVwHfJppE9llo,110
495
- zaber_motion-7.14.0.dist-info/top_level.txt,sha256=ypgkPvPad6Oge50CT6unnvxCEliKUB6olL6CUUER1SA,51
496
- zaber_motion-7.14.0.dist-info/RECORD,,
491
+ zaber_motion_bindings/zaber-motion-core-darwin-uni.dylib,sha256=uiPtbm2ivtOeJ12k5mMETVzegdbJH1RL-9E4hMYg9IM,30428720
492
+ zaber_motion-7.15.0.dist-info/LICENSE.txt,sha256=xNj9QcKqsI3WK5EBPeYbQAiDcnVe4xmIpCy65NYNVhA,109244
493
+ zaber_motion-7.15.0.dist-info/METADATA,sha256=cXxzxz8F1Jfw_vJjPHWFbol5f6bYvf8kSr5Zy5tkKL4,127666
494
+ zaber_motion-7.15.0.dist-info/WHEEL,sha256=XsmEfKMdB2yReC9plMyXBxhtkQEg2VDVwHfJppE9llo,110
495
+ zaber_motion-7.15.0.dist-info/top_level.txt,sha256=ypgkPvPad6Oge50CT6unnvxCEliKUB6olL6CUUER1SA,51
496
+ zaber_motion-7.15.0.dist-info/RECORD,,