zaber-motion 7.11.0__py3-none-win_arm64.whl → 7.12.0__py3-none-win_arm64.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.
@@ -669,7 +669,7 @@ class AxisSettings:
669
669
  axis_settings=list(axis_settings),
670
670
  )
671
671
  response = call(
672
- "device/get_many_settings",
672
+ "device/get_many_axis_settings",
673
673
  request,
674
674
  dto.GetAxisSettingResults.from_binary)
675
675
  return response.results
@@ -694,7 +694,7 @@ class AxisSettings:
694
694
  axis_settings=list(axis_settings),
695
695
  )
696
696
  response = await call_async(
697
- "device/get_many_settings",
697
+ "device/get_many_axis_settings",
698
698
  request,
699
699
  dto.GetAxisSettingResults.from_binary)
700
700
  return response.results
@@ -720,7 +720,7 @@ class AxisSettings:
720
720
  axis_settings=list(axis_settings),
721
721
  )
722
722
  response = call(
723
- "device/get_sync_settings",
723
+ "device/get_sync_axis_settings",
724
724
  request,
725
725
  dto.GetAxisSettingResults.from_binary)
726
726
  return response.results
@@ -746,7 +746,7 @@ class AxisSettings:
746
746
  axis_settings=list(axis_settings),
747
747
  )
748
748
  response = await call_async(
749
- "device/get_sync_settings",
749
+ "device/get_sync_axis_settings",
750
750
  request,
751
751
  dto.GetAxisSettingResults.from_binary)
752
752
  return response.results
@@ -1,6 +1,7 @@
1
1
  # ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== #
2
2
  # ============== DO NOT EDIT DIRECTLY ============== #
3
3
  from typing import TYPE_CHECKING, List
4
+ from ..dto.ascii.pvt_sequence_data import PvtSequenceData
4
5
  from ..dto import requests as dto
5
6
  from ..call import call, call_async
6
7
 
@@ -74,6 +75,46 @@ class PvtBuffer:
74
75
  dto.StreamBufferGetContentResponse.from_binary)
75
76
  return response.buffer_lines
76
77
 
78
+ def retrieve_sequence_data(
79
+ self
80
+ ) -> PvtSequenceData:
81
+ """
82
+ Gets the buffer contents as a PvtSequenceData object.
83
+
84
+ Returns:
85
+ The PVT data loaded from the buffer.
86
+ """
87
+ request = dto.PvtBufferGetSequenceDataRequest(
88
+ interface_id=self.device.connection.interface_id,
89
+ device=self.device.device_address,
90
+ buffer_id=self.buffer_id,
91
+ )
92
+ response = call(
93
+ "device/pvt_buffer_get_data",
94
+ request,
95
+ PvtSequenceData.from_binary)
96
+ return response
97
+
98
+ async def retrieve_sequence_data_async(
99
+ self
100
+ ) -> PvtSequenceData:
101
+ """
102
+ Gets the buffer contents as a PvtSequenceData object.
103
+
104
+ Returns:
105
+ The PVT data loaded from the buffer.
106
+ """
107
+ request = dto.PvtBufferGetSequenceDataRequest(
108
+ interface_id=self.device.connection.interface_id,
109
+ device=self.device.device_address,
110
+ buffer_id=self.buffer_id,
111
+ )
112
+ response = await call_async(
113
+ "device/pvt_buffer_get_data",
114
+ request,
115
+ PvtSequenceData.from_binary)
116
+ return response
117
+
77
118
  def erase(
78
119
  self
79
120
  ) -> None:
@@ -525,6 +525,8 @@ class PvtSequence:
525
525
  per axis, And the values arrays for each sequence must be equal in length to each other and also to the
526
526
  times sequence.
527
527
 
528
+ Does not support native units.
529
+
528
530
  Args:
529
531
  positions: Positions for the axes to move through, relative to their home positions.
530
532
  Each MeasurementSequence represents a sequence of positions along a particular dimension.
@@ -569,6 +571,8 @@ class PvtSequence:
569
571
  per axis, And the values arrays for each sequence must be equal in length to each other and also to the
570
572
  times sequence.
571
573
 
574
+ Does not support native units.
575
+
572
576
  Args:
573
577
  positions: Positions for the axes to move through, relative to their home positions.
574
578
  Each MeasurementSequence represents a sequence of positions along a particular dimension.
@@ -610,6 +614,8 @@ class PvtSequence:
610
614
  velocity measurement sequence per axis, and the values arrays for each sequence
611
615
  must be equal in length to each other and also to the times sequence.
612
616
 
617
+ Does not support native units.
618
+
613
619
  Args:
614
620
  velocities: The sequence of velocities for each axis.
615
621
  Each MeasurementSequence represents a sequence of velocities along particular dimension.
@@ -647,6 +653,8 @@ class PvtSequence:
647
653
  velocity measurement sequence per axis, and the values arrays for each sequence
648
654
  must be equal in length to each other and also to the times sequence.
649
655
 
656
+ Does not support native units.
657
+
650
658
  Args:
651
659
  velocities: The sequence of velocities for each axis.
652
660
  Each MeasurementSequence represents a sequence of velocities along particular dimension.
@@ -670,6 +678,108 @@ class PvtSequence:
670
678
  PvtSequenceData.from_binary)
671
679
  return response
672
680
 
681
+ @staticmethod
682
+ def generate_velocities_and_times(
683
+ positions: List[MeasurementSequence],
684
+ target_speed: Measurement,
685
+ target_acceleration: Measurement,
686
+ resample_number: Optional[int] = None
687
+ ) -> PvtSequenceData:
688
+ """
689
+ Generates sequences of velocities and times for a sequence of positions.
690
+ This function fits a geometric spline (not-a-knot cubic for sequences of >3 points,
691
+ natural cubic for 3, and a straight line for 2) over the position sequence
692
+ and then calculates the velocity and time information by traversing it using a
693
+ trapezoidal motion profile.
694
+
695
+ This generation scheme attempts to keep speed and acceleration less than the
696
+ specified target values, but does not guarantee it. Generally speaking, a higher
697
+ resample number will bring the generated trajectory closer to respecting these
698
+ limits.
699
+
700
+ Note that consecutive duplicate points will be automatically removed as they
701
+ have no geometric significance without additional time information. Also note that
702
+ for multi-dimensional paths this function expects axes to be linear and orthogonal,
703
+ however for paths of a single dimension rotary units are accepted.
704
+
705
+ Does not support native units.
706
+
707
+ Args:
708
+ positions: Positions for the axes to move through, relative to their home positions.
709
+ target_speed: The target speed used to generate positions and times.
710
+ target_acceleration: The target acceleration used to generate positions and times.
711
+ resample_number: The number of points to resample the sequence by.
712
+ Leave undefined to use the specified points.
713
+
714
+ Returns:
715
+ Object containing the generated PVT sequence. Note that returned time sequence is always relative.
716
+ """
717
+ if target_speed.value <= 0 or target_acceleration.value <= 0:
718
+ raise ValueError('Target speed and acceleration values must be greater than zero.')
719
+
720
+ request = dto.PvtGenerateVelocitiesAndTimesRequest(
721
+ positions=positions,
722
+ target_speed=target_speed,
723
+ target_acceleration=target_acceleration,
724
+ resample_number=resample_number,
725
+ )
726
+ response = call(
727
+ "device/pvt_generate_velocities_and_times",
728
+ request,
729
+ PvtSequenceData.from_binary)
730
+ return response
731
+
732
+ @staticmethod
733
+ async def generate_velocities_and_times_async(
734
+ positions: List[MeasurementSequence],
735
+ target_speed: Measurement,
736
+ target_acceleration: Measurement,
737
+ resample_number: Optional[int] = None
738
+ ) -> PvtSequenceData:
739
+ """
740
+ Generates sequences of velocities and times for a sequence of positions.
741
+ This function fits a geometric spline (not-a-knot cubic for sequences of >3 points,
742
+ natural cubic for 3, and a straight line for 2) over the position sequence
743
+ and then calculates the velocity and time information by traversing it using a
744
+ trapezoidal motion profile.
745
+
746
+ This generation scheme attempts to keep speed and acceleration less than the
747
+ specified target values, but does not guarantee it. Generally speaking, a higher
748
+ resample number will bring the generated trajectory closer to respecting these
749
+ limits.
750
+
751
+ Note that consecutive duplicate points will be automatically removed as they
752
+ have no geometric significance without additional time information. Also note that
753
+ for multi-dimensional paths this function expects axes to be linear and orthogonal,
754
+ however for paths of a single dimension rotary units are accepted.
755
+
756
+ Does not support native units.
757
+
758
+ Args:
759
+ positions: Positions for the axes to move through, relative to their home positions.
760
+ target_speed: The target speed used to generate positions and times.
761
+ target_acceleration: The target acceleration used to generate positions and times.
762
+ resample_number: The number of points to resample the sequence by.
763
+ Leave undefined to use the specified points.
764
+
765
+ Returns:
766
+ Object containing the generated PVT sequence. Note that returned time sequence is always relative.
767
+ """
768
+ if target_speed.value <= 0 or target_acceleration.value <= 0:
769
+ raise ValueError('Target speed and acceleration values must be greater than zero.')
770
+
771
+ request = dto.PvtGenerateVelocitiesAndTimesRequest(
772
+ positions=positions,
773
+ target_speed=target_speed,
774
+ target_acceleration=target_acceleration,
775
+ resample_number=resample_number,
776
+ )
777
+ response = await call_async(
778
+ "device/pvt_generate_velocities_and_times",
779
+ request,
780
+ PvtSequenceData.from_binary)
781
+ return response
782
+
673
783
  def wait_until_idle(
674
784
  self,
675
785
  throw_error_on_fault: bool = True
@@ -1203,6 +1313,42 @@ class PvtSequence:
1203
1313
  PvtCsvData.from_binary)
1204
1314
  return response
1205
1315
 
1316
+ def submit_sequence_data(
1317
+ self,
1318
+ sequence_data: PvtSequenceData
1319
+ ) -> None:
1320
+ """
1321
+ Writes the contents of a PvtSequenceData object to the sequence.
1322
+
1323
+ Args:
1324
+ sequence_data: The PVT sequence data to submit.
1325
+ """
1326
+ request = dto.PvtSubmitSequenceDataRequest(
1327
+ interface_id=self.device.connection.interface_id,
1328
+ device=self.device.device_address,
1329
+ stream_id=self.pvt_id,
1330
+ sequence_data=sequence_data,
1331
+ )
1332
+ call("device/stream_pvt_submit_data", request)
1333
+
1334
+ async def submit_sequence_data_async(
1335
+ self,
1336
+ sequence_data: PvtSequenceData
1337
+ ) -> None:
1338
+ """
1339
+ Writes the contents of a PvtSequenceData object to the sequence.
1340
+
1341
+ Args:
1342
+ sequence_data: The PVT sequence data to submit.
1343
+ """
1344
+ request = dto.PvtSubmitSequenceDataRequest(
1345
+ interface_id=self.device.connection.interface_id,
1346
+ device=self.device.device_address,
1347
+ stream_id=self.pvt_id,
1348
+ sequence_data=sequence_data,
1349
+ )
1350
+ await call_async("device/stream_pvt_submit_data", request)
1351
+
1206
1352
  def set_digital_output(
1207
1353
  self,
1208
1354
  channel_number: int,
@@ -141,12 +141,15 @@ from .oscilloscope_request import OscilloscopeRequest as OscilloscopeRequest
141
141
  from .oscilloscope_start_request import OscilloscopeStartRequest as OscilloscopeStartRequest
142
142
  from .prepare_command_request import PrepareCommandRequest as PrepareCommandRequest
143
143
  from .process_on import ProcessOn as ProcessOn
144
+ from .pvt_buffer_get_sequence_data_request import PvtBufferGetSequenceDataRequest as PvtBufferGetSequenceDataRequest
144
145
  from .pvt_generate_positions_request import PvtGeneratePositionsRequest as PvtGeneratePositionsRequest
146
+ from .pvt_generate_velocities_and_times_request import PvtGenerateVelocitiesAndTimesRequest as PvtGenerateVelocitiesAndTimesRequest
145
147
  from .pvt_generate_velocities_request import PvtGenerateVelocitiesRequest as PvtGenerateVelocitiesRequest
146
148
  from .pvt_load_csv_request import PvtLoadCsvRequest as PvtLoadCsvRequest
147
149
  from .pvt_point_request import PvtPointRequest as PvtPointRequest
148
150
  from .pvt_points_request import PvtPointsRequest as PvtPointsRequest
149
151
  from .pvt_save_csv_request import PvtSaveCsvRequest as PvtSaveCsvRequest
152
+ from .pvt_submit_sequence_data_request import PvtSubmitSequenceDataRequest as PvtSubmitSequenceDataRequest
150
153
  from .renumber_request import RenumberRequest as RenumberRequest
151
154
  from .response_type import ResponseType as ResponseType
152
155
  from .servo_tuning_paramset_response import ServoTuningParamsetResponse as ServoTuningParamsetResponse
@@ -0,0 +1,79 @@
1
+ # This file is generated. Do not modify by hand.
2
+ # pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
3
+ from dataclasses import dataclass
4
+ from typing import Any, Dict
5
+ import decimal
6
+ import zaber_bson
7
+
8
+
9
+ @dataclass
10
+ class PvtBufferGetSequenceDataRequest:
11
+
12
+ interface_id: int = 0
13
+
14
+ device: int = 0
15
+
16
+ buffer_id: int = 0
17
+
18
+ @staticmethod
19
+ def zero_values() -> 'PvtBufferGetSequenceDataRequest':
20
+ return PvtBufferGetSequenceDataRequest(
21
+ interface_id=0,
22
+ device=0,
23
+ buffer_id=0,
24
+ )
25
+
26
+ @staticmethod
27
+ def from_binary(data_bytes: bytes) -> 'PvtBufferGetSequenceDataRequest':
28
+ """" Deserialize a binary representation of this class. """
29
+ data = zaber_bson.loads(data_bytes) # type: Dict[str, Any]
30
+ return PvtBufferGetSequenceDataRequest.from_dict(data)
31
+
32
+ def to_binary(self) -> bytes:
33
+ """" Serialize this class to a binary representation. """
34
+ self.validate()
35
+ return zaber_bson.dumps(self.to_dict()) # type: ignore
36
+
37
+ def to_dict(self) -> Dict[str, Any]:
38
+ return {
39
+ 'interfaceId': int(self.interface_id),
40
+ 'device': int(self.device),
41
+ 'bufferId': int(self.buffer_id),
42
+ }
43
+
44
+ @staticmethod
45
+ def from_dict(data: Dict[str, Any]) -> 'PvtBufferGetSequenceDataRequest':
46
+ return PvtBufferGetSequenceDataRequest(
47
+ interface_id=data.get('interfaceId'), # type: ignore
48
+ device=data.get('device'), # type: ignore
49
+ buffer_id=data.get('bufferId'), # type: ignore
50
+ )
51
+
52
+ def validate(self) -> None:
53
+ """" Validates the properties of the instance. """
54
+ if self.interface_id is None:
55
+ raise ValueError(f'Property "InterfaceId" of "PvtBufferGetSequenceDataRequest" is None.')
56
+
57
+ if not isinstance(self.interface_id, (int, float, decimal.Decimal)):
58
+ raise ValueError(f'Property "InterfaceId" of "PvtBufferGetSequenceDataRequest" is not a number.')
59
+
60
+ if int(self.interface_id) != self.interface_id:
61
+ raise ValueError(f'Property "InterfaceId" of "PvtBufferGetSequenceDataRequest" is not integer value.')
62
+
63
+ if self.device is None:
64
+ raise ValueError(f'Property "Device" of "PvtBufferGetSequenceDataRequest" is None.')
65
+
66
+ if not isinstance(self.device, (int, float, decimal.Decimal)):
67
+ raise ValueError(f'Property "Device" of "PvtBufferGetSequenceDataRequest" is not a number.')
68
+
69
+ if int(self.device) != self.device:
70
+ raise ValueError(f'Property "Device" of "PvtBufferGetSequenceDataRequest" is not integer value.')
71
+
72
+ if self.buffer_id is None:
73
+ raise ValueError(f'Property "BufferId" of "PvtBufferGetSequenceDataRequest" is None.')
74
+
75
+ if not isinstance(self.buffer_id, (int, float, decimal.Decimal)):
76
+ raise ValueError(f'Property "BufferId" of "PvtBufferGetSequenceDataRequest" is not a number.')
77
+
78
+ if int(self.buffer_id) != self.buffer_id:
79
+ raise ValueError(f'Property "BufferId" of "PvtBufferGetSequenceDataRequest" is not integer value.')
@@ -0,0 +1,96 @@
1
+ # This file is generated. Do not modify by hand.
2
+ # pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
3
+ from dataclasses import dataclass, field
4
+ from typing import Any, Dict, List, Optional
5
+ import decimal
6
+ from collections.abc import Iterable
7
+ import zaber_bson
8
+ from ..ascii.measurement_sequence import MeasurementSequence
9
+ from ..measurement import Measurement
10
+
11
+
12
+ @dataclass
13
+ class PvtGenerateVelocitiesAndTimesRequest:
14
+
15
+ positions: List[MeasurementSequence] = field(default_factory=list)
16
+
17
+ target_speed: Measurement = field(default_factory=Measurement.zero_values)
18
+
19
+ target_acceleration: Measurement = field(default_factory=Measurement.zero_values)
20
+
21
+ resample_number: Optional[int] = None
22
+
23
+ @staticmethod
24
+ def zero_values() -> 'PvtGenerateVelocitiesAndTimesRequest':
25
+ return PvtGenerateVelocitiesAndTimesRequest(
26
+ positions=[],
27
+ target_speed=Measurement.zero_values(),
28
+ target_acceleration=Measurement.zero_values(),
29
+ resample_number=None,
30
+ )
31
+
32
+ @staticmethod
33
+ def from_binary(data_bytes: bytes) -> 'PvtGenerateVelocitiesAndTimesRequest':
34
+ """" Deserialize a binary representation of this class. """
35
+ data = zaber_bson.loads(data_bytes) # type: Dict[str, Any]
36
+ return PvtGenerateVelocitiesAndTimesRequest.from_dict(data)
37
+
38
+ def to_binary(self) -> bytes:
39
+ """" Serialize this class to a binary representation. """
40
+ self.validate()
41
+ return zaber_bson.dumps(self.to_dict()) # type: ignore
42
+
43
+ def to_dict(self) -> Dict[str, Any]:
44
+ return {
45
+ 'positions': [item.to_dict() for item in self.positions] if self.positions is not None else [],
46
+ 'targetSpeed': self.target_speed.to_dict(),
47
+ 'targetAcceleration': self.target_acceleration.to_dict(),
48
+ 'resampleNumber': int(self.resample_number) if self.resample_number is not None else None,
49
+ }
50
+
51
+ @staticmethod
52
+ def from_dict(data: Dict[str, Any]) -> 'PvtGenerateVelocitiesAndTimesRequest':
53
+ return PvtGenerateVelocitiesAndTimesRequest(
54
+ positions=[MeasurementSequence.from_dict(item) for item in data.get('positions')], # type: ignore
55
+ target_speed=Measurement.from_dict(data.get('targetSpeed')), # type: ignore
56
+ target_acceleration=Measurement.from_dict(data.get('targetAcceleration')), # type: ignore
57
+ resample_number=data.get('resampleNumber'), # type: ignore
58
+ )
59
+
60
+ def validate(self) -> None:
61
+ """" Validates the properties of the instance. """
62
+ if self.positions is not None:
63
+ if not isinstance(self.positions, Iterable):
64
+ raise ValueError('Property "Positions" of "PvtGenerateVelocitiesAndTimesRequest" is not iterable.')
65
+
66
+ for i, positions_item in enumerate(self.positions):
67
+ if positions_item is None:
68
+ raise ValueError(f'Item {i} in property "Positions" of "PvtGenerateVelocitiesAndTimesRequest" is None.')
69
+
70
+ if not isinstance(positions_item, MeasurementSequence):
71
+ raise ValueError(f'Item {i} in property "Positions" of "PvtGenerateVelocitiesAndTimesRequest" is not an instance of "MeasurementSequence".')
72
+
73
+ positions_item.validate()
74
+
75
+ if self.target_speed is None:
76
+ raise ValueError(f'Property "TargetSpeed" of "PvtGenerateVelocitiesAndTimesRequest" is None.')
77
+
78
+ if not isinstance(self.target_speed, Measurement):
79
+ raise ValueError(f'Property "TargetSpeed" of "PvtGenerateVelocitiesAndTimesRequest" is not an instance of "Measurement".')
80
+
81
+ self.target_speed.validate()
82
+
83
+ if self.target_acceleration is None:
84
+ raise ValueError(f'Property "TargetAcceleration" of "PvtGenerateVelocitiesAndTimesRequest" is None.')
85
+
86
+ if not isinstance(self.target_acceleration, Measurement):
87
+ raise ValueError(f'Property "TargetAcceleration" of "PvtGenerateVelocitiesAndTimesRequest" is not an instance of "Measurement".')
88
+
89
+ self.target_acceleration.validate()
90
+
91
+ if self.resample_number is not None:
92
+ if not isinstance(self.resample_number, (int, float, decimal.Decimal)):
93
+ raise ValueError(f'Property "ResampleNumber" of "PvtGenerateVelocitiesAndTimesRequest" is not a number.')
94
+
95
+ if int(self.resample_number) != self.resample_number:
96
+ raise ValueError(f'Property "ResampleNumber" of "PvtGenerateVelocitiesAndTimesRequest" is not integer value.')
@@ -0,0 +1,93 @@
1
+ # This file is generated. Do not modify by hand.
2
+ # pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
3
+ from dataclasses import dataclass, field
4
+ from typing import Any, Dict
5
+ import decimal
6
+ import zaber_bson
7
+ from ..ascii.pvt_sequence_data import PvtSequenceData
8
+
9
+
10
+ @dataclass
11
+ class PvtSubmitSequenceDataRequest:
12
+
13
+ interface_id: int = 0
14
+
15
+ device: int = 0
16
+
17
+ stream_id: int = 0
18
+
19
+ sequence_data: PvtSequenceData = field(default_factory=PvtSequenceData.zero_values)
20
+
21
+ @staticmethod
22
+ def zero_values() -> 'PvtSubmitSequenceDataRequest':
23
+ return PvtSubmitSequenceDataRequest(
24
+ interface_id=0,
25
+ device=0,
26
+ stream_id=0,
27
+ sequence_data=PvtSequenceData.zero_values(),
28
+ )
29
+
30
+ @staticmethod
31
+ def from_binary(data_bytes: bytes) -> 'PvtSubmitSequenceDataRequest':
32
+ """" Deserialize a binary representation of this class. """
33
+ data = zaber_bson.loads(data_bytes) # type: Dict[str, Any]
34
+ return PvtSubmitSequenceDataRequest.from_dict(data)
35
+
36
+ def to_binary(self) -> bytes:
37
+ """" Serialize this class to a binary representation. """
38
+ self.validate()
39
+ return zaber_bson.dumps(self.to_dict()) # type: ignore
40
+
41
+ def to_dict(self) -> Dict[str, Any]:
42
+ return {
43
+ 'interfaceId': int(self.interface_id),
44
+ 'device': int(self.device),
45
+ 'streamId': int(self.stream_id),
46
+ 'sequenceData': self.sequence_data.to_dict(),
47
+ }
48
+
49
+ @staticmethod
50
+ def from_dict(data: Dict[str, Any]) -> 'PvtSubmitSequenceDataRequest':
51
+ return PvtSubmitSequenceDataRequest(
52
+ interface_id=data.get('interfaceId'), # type: ignore
53
+ device=data.get('device'), # type: ignore
54
+ stream_id=data.get('streamId'), # type: ignore
55
+ sequence_data=PvtSequenceData.from_dict(data.get('sequenceData')), # type: ignore
56
+ )
57
+
58
+ def validate(self) -> None:
59
+ """" Validates the properties of the instance. """
60
+ if self.interface_id is None:
61
+ raise ValueError(f'Property "InterfaceId" of "PvtSubmitSequenceDataRequest" is None.')
62
+
63
+ if not isinstance(self.interface_id, (int, float, decimal.Decimal)):
64
+ raise ValueError(f'Property "InterfaceId" of "PvtSubmitSequenceDataRequest" is not a number.')
65
+
66
+ if int(self.interface_id) != self.interface_id:
67
+ raise ValueError(f'Property "InterfaceId" of "PvtSubmitSequenceDataRequest" is not integer value.')
68
+
69
+ if self.device is None:
70
+ raise ValueError(f'Property "Device" of "PvtSubmitSequenceDataRequest" is None.')
71
+
72
+ if not isinstance(self.device, (int, float, decimal.Decimal)):
73
+ raise ValueError(f'Property "Device" of "PvtSubmitSequenceDataRequest" is not a number.')
74
+
75
+ if int(self.device) != self.device:
76
+ raise ValueError(f'Property "Device" of "PvtSubmitSequenceDataRequest" is not integer value.')
77
+
78
+ if self.stream_id is None:
79
+ raise ValueError(f'Property "StreamId" of "PvtSubmitSequenceDataRequest" is None.')
80
+
81
+ if not isinstance(self.stream_id, (int, float, decimal.Decimal)):
82
+ raise ValueError(f'Property "StreamId" of "PvtSubmitSequenceDataRequest" is not a number.')
83
+
84
+ if int(self.stream_id) != self.stream_id:
85
+ raise ValueError(f'Property "StreamId" of "PvtSubmitSequenceDataRequest" is not integer value.')
86
+
87
+ if self.sequence_data is None:
88
+ raise ValueError(f'Property "SequenceData" of "PvtSubmitSequenceDataRequest" is None.')
89
+
90
+ if not isinstance(self.sequence_data, PvtSequenceData):
91
+ raise ValueError(f'Property "SequenceData" of "PvtSubmitSequenceDataRequest" is not an instance of "PvtSequenceData".')
92
+
93
+ self.sequence_data.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.11.0",
174
+ version="7.12.0",
175
175
  )
176
176
  call_sync("library/check_version", request)
177
177
 
@@ -28,6 +28,8 @@ class Microscope:
28
28
  """
29
29
  return self._connection
30
30
 
31
+ _illuminator: Optional[Illuminator]
32
+
31
33
  @property
32
34
  def illuminator(self) -> Optional[Illuminator]:
33
35
  """
@@ -35,6 +37,8 @@ class Microscope:
35
37
  """
36
38
  return self._illuminator
37
39
 
40
+ _focus_axis: Optional[Axis]
41
+
38
42
  @property
39
43
  def focus_axis(self) -> Optional[Axis]:
40
44
  """
@@ -42,6 +46,8 @@ class Microscope:
42
46
  """
43
47
  return self._focus_axis
44
48
 
49
+ _x_axis: Optional[Axis]
50
+
45
51
  @property
46
52
  def x_axis(self) -> Optional[Axis]:
47
53
  """
@@ -49,6 +55,8 @@ class Microscope:
49
55
  """
50
56
  return self._x_axis
51
57
 
58
+ _y_axis: Optional[Axis]
59
+
52
60
  @property
53
61
  def y_axis(self) -> Optional[Axis]:
54
62
  """
@@ -56,6 +64,8 @@ class Microscope:
56
64
  """
57
65
  return self._y_axis
58
66
 
67
+ _plate: Optional[AxisGroup]
68
+
59
69
  @property
60
70
  def plate(self) -> Optional[AxisGroup]:
61
71
  """
@@ -63,6 +73,8 @@ class Microscope:
63
73
  """
64
74
  return self._plate
65
75
 
76
+ _objective_changer: Optional[ObjectiveChanger]
77
+
66
78
  @property
67
79
  def objective_changer(self) -> Optional[ObjectiveChanger]:
68
80
  """
@@ -70,6 +82,8 @@ class Microscope:
70
82
  """
71
83
  return self._objective_changer
72
84
 
85
+ _filter_changer: Optional[FilterChanger]
86
+
73
87
  @property
74
88
  def filter_changer(self) -> Optional[FilterChanger]:
75
89
  """
@@ -77,6 +91,8 @@ class Microscope:
77
91
  """
78
92
  return self._filter_changer
79
93
 
94
+ _autofocus: Optional[Autofocus]
95
+
80
96
  @property
81
97
  def autofocus(self) -> Optional[Autofocus]:
82
98
  """
@@ -84,6 +100,8 @@ class Microscope:
84
100
  """
85
101
  return self._autofocus
86
102
 
103
+ _camera_trigger: Optional[CameraTrigger]
104
+
87
105
  @property
88
106
  def camera_trigger(self) -> Optional[CameraTrigger]:
89
107
  """
@@ -98,31 +116,7 @@ class Microscope:
98
116
  """
99
117
  self._connection: Connection = connection
100
118
  self._config: MicroscopeConfig = MicroscopeConfig.from_binary(MicroscopeConfig.to_binary(config))
101
- self._illuminator: Optional[Illuminator] = Illuminator(Device(connection, config.illuminator))\
102
- if config.illuminator else None
103
- self._focus_axis: Optional[Axis] = Axis(Device(connection, config.focus_axis.device), config.focus_axis.axis)\
104
- if config.focus_axis and config.focus_axis.device else None
105
- self._x_axis: Optional[Axis] = Axis(Device(connection, config.x_axis.device), config.x_axis.axis)\
106
- if config.x_axis and config.x_axis.device else None
107
- self._y_axis: Optional[Axis] = Axis(Device(connection, config.y_axis.device), config.y_axis.axis)\
108
- if config.y_axis and config.y_axis.device else None
109
- self._plate: Optional[AxisGroup] = AxisGroup([self._x_axis, self._y_axis])\
110
- if self._x_axis is not None and self._y_axis is not None else None
111
- self._objective_changer: Optional[ObjectiveChanger] = ObjectiveChanger(
112
- Device(connection, config.objective_changer),
113
- self._focus_axis)\
114
- if config.objective_changer and self._focus_axis else None
115
- self._filter_changer: Optional[FilterChanger] = FilterChanger(Device(connection, config.filter_changer))\
116
- if config.filter_changer else None
117
- self._autofocus: Optional[Autofocus] = Autofocus(
118
- config.autofocus,
119
- self._focus_axis,
120
- self._objective_changer.turret if self._objective_changer else None)\
121
- if config.autofocus and self._focus_axis else None
122
- self._camera_trigger: Optional[CameraTrigger] = CameraTrigger(
123
- Device(connection, config.camera_trigger.device),
124
- config.camera_trigger.channel)\
125
- if config.camera_trigger and config.camera_trigger.device else None
119
+ self._initialize_components()
126
120
 
127
121
  @staticmethod
128
122
  def find(
@@ -266,3 +260,56 @@ class Microscope:
266
260
  request,
267
261
  dto.StringResponse.from_binary)
268
262
  return response.value
263
+
264
+ def _initialize_components(self) -> None:
265
+ """
266
+ Initializes the components of the microscope based on the configuration.
267
+ """
268
+ if self._config.illuminator:
269
+ self._illuminator = Illuminator(Device(self._connection, self._config.illuminator))
270
+ else:
271
+ self._illuminator = None
272
+
273
+ if self._config.focus_axis and self._config.focus_axis.device:
274
+ self._focus_axis = Axis(
275
+ Device(self._connection, self._config.focus_axis.device), self._config.focus_axis.axis)
276
+ else:
277
+ self._focus_axis = None
278
+
279
+ if self._config.x_axis and self._config.x_axis.device:
280
+ self._x_axis = Axis(Device(self._connection, self._config.x_axis.device), self._config.x_axis.axis)
281
+ else:
282
+ self._x_axis = None
283
+
284
+ if self._config.y_axis and self._config.y_axis.device:
285
+ self._y_axis = Axis(Device(self._connection, self._config.y_axis.device), self._config.y_axis.axis)
286
+ else:
287
+ self._y_axis = None
288
+
289
+ if self._x_axis is not None and self._y_axis is not None:
290
+ self._plate = AxisGroup([self._x_axis, self._y_axis])
291
+ else:
292
+ self._plate = None
293
+
294
+ if self._config.objective_changer and self._focus_axis:
295
+ self._objective_changer = ObjectiveChanger(
296
+ Device(self._connection, self._config.objective_changer), self._focus_axis)
297
+ else:
298
+ self._objective_changer = None
299
+
300
+ if self._config.filter_changer:
301
+ self._filter_changer = FilterChanger(Device(self._connection, self._config.filter_changer))
302
+ else:
303
+ self._filter_changer = None
304
+
305
+ if self._config.autofocus and self._focus_axis:
306
+ turret = self._objective_changer.turret if self._objective_changer else None
307
+ self._autofocus = Autofocus(self._config.autofocus, self._focus_axis, turret)
308
+ else:
309
+ self._autofocus = None
310
+
311
+ if self._config.camera_trigger and self._config.camera_trigger.device:
312
+ trigger_device = Device(self._connection, self._config.camera_trigger.device)
313
+ self._camera_trigger = CameraTrigger(trigger_device, self._config.camera_trigger.channel)
314
+ else:
315
+ self._camera_trigger = None
zaber_motion/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.11.0"
1
+ __version__ = "7.12.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zaber_motion
3
- Version: 7.11.0
3
+ Version: 7.12.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,18 +9,18 @@ zaber_motion/call.py,sha256=X8iXJdlO1AvnMeDFmKXEPY8UFQWn8EXZmoXzcWO_ihc,5404
9
9
  zaber_motion/convert_exception.py,sha256=0ANPUmugxDvCGMURPN8Lqyi-3cU80L323xrsF19wbIk,8625
10
10
  zaber_motion/dto_object.py,sha256=TrwKMn_dbeh4DnCToS507G5eRJiW0_ZcGj9Q5RaSjqY,377
11
11
  zaber_motion/events.py,sha256=8UB_4SZz3HDb8VqborlHQGt7w0Nd11rEYblbVQxyckE,3510
12
- zaber_motion/library.py,sha256=dHu6ttlqn3sPOzG9qrL7O_niTfI2c-rwPBgfEwxvfvE,5676
12
+ zaber_motion/library.py,sha256=n52ZF5eqVyZhmEhOT9FtQs9bspq1NhJ6zXRnW87zvuU,5676
13
13
  zaber_motion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  zaber_motion/serialization.py,sha256=0yLY0dA7XRjMAlI-wr92arZ6yRO97CyC_Rzc9BBHJRk,1019
15
15
  zaber_motion/tools.py,sha256=ZI8xYDa6SFlMghP2qklV73Z0TJcezC6trdAAXVI6PoM,2291
16
16
  zaber_motion/unit_table.py,sha256=DtphJjbzD1LSHpd4-idwIE2Dif89L7RrmeQI3LkOp40,2583
17
17
  zaber_motion/units.py,sha256=h1sEuCQR0q8SeCdWd2V8X62VZJBxMda9Kef724f6yc0,11059
18
- zaber_motion/version.py,sha256=s4AVy7jNqNQ5suOMa5Fi48x6WYwWPVbkHbg0eCL_BB4,24
18
+ zaber_motion/version.py,sha256=jsr3qlCs2gAQMzbbiLbkdZkfjd31L0EnhkU_La2b81A,24
19
19
  zaber_motion/ascii/__init__.py,sha256=9RFjxHOckdwD6DlAvmVfpWhR1U9-lWyU1t3EE0C2Glc,4921
20
20
  zaber_motion/ascii/all_axes.py,sha256=-g226GCRClqolpwZSYQj_ohuVfyBf6YPNSt3BxXxme4,11145
21
21
  zaber_motion/ascii/axis.py,sha256=sBJ3RqqgAO0y3NAbxHp6yUBj8ES1yCykFMScYkkGyK4,59336
22
22
  zaber_motion/ascii/axis_group.py,sha256=YqaiAoj2r0v_TdRrlVSB8ayyYdrHWGnCAKtbApCKCd8,13330
23
- zaber_motion/ascii/axis_settings.py,sha256=IBNQpSaiVI2Fm93MJjEH9yExV7DIcFUDOpntOSJ6DFI,24233
23
+ zaber_motion/ascii/axis_settings.py,sha256=m27Tech_tQmyTyPb3TBQ0XifMLJgmjwzh_blr3S75DM,24253
24
24
  zaber_motion/ascii/connection.py,sha256=ZP7AEA_6qUU6cteI5Yft45BOAGhM--OvNAGOsCSgewo,39671
25
25
  zaber_motion/ascii/device.py,sha256=0ulmpigib2cqYyhOYZZM9RJyOv1_s6hoQUEYN1kQ8FU,30648
26
26
  zaber_motion/ascii/device_io.py,sha256=iuihkckfF6IeXN5OFw-9tIuyPjLSg5g5BAwO2BrMdGY,40558
@@ -29,9 +29,9 @@ zaber_motion/ascii/lockstep.py,sha256=Rsek-jna6mNS7VaLRLMPi6WYwVzR03HziPiAM9qCSZ
29
29
  zaber_motion/ascii/oscilloscope.py,sha256=g8-E1gm9DIHZkEVY-xMQpbMc3dS4VQ_39D8MC7cNHsg,20951
30
30
  zaber_motion/ascii/oscilloscope_data.py,sha256=PCuBTGKkDgKeFxNgvp7UHbHo9DvC57zIoySPyU0Cd7k,7470
31
31
  zaber_motion/ascii/pvt.py,sha256=wn82O2BA0ihmqUCJ-FlvbveLL_bdxQsyktxThby_Vn8,2980
32
- zaber_motion/ascii/pvt_buffer.py,sha256=9kY0HjyNMRr6buE6zbWNKAyclTN6TgduQSDPh_O392M,3285
32
+ zaber_motion/ascii/pvt_buffer.py,sha256=u-NpYQTnSdNY3KRpbfjOISEmE5Xb1Kx2inzYXCJwD74,4596
33
33
  zaber_motion/ascii/pvt_io.py,sha256=g7kT5nRR4DZMb7mlvp_6-0HLxZfs4Mn0r8nkE42-mbI,22882
34
- zaber_motion/ascii/pvt_sequence.py,sha256=UJ3RH2PUAHPC1BOStqF2QZoudn2-YMV8pKZ9rVIPjb8,52845
34
+ zaber_motion/ascii/pvt_sequence.py,sha256=u3Tn0jCfKmIbIlRz0LQNLIySf5D77SlzogVFfQhfEiM,59291
35
35
  zaber_motion/ascii/servo_tuner.py,sha256=3SErwUwjtLVZqng7BuaooGIkCGHZ4l6qpVzEqCfnDVs,23982
36
36
  zaber_motion/ascii/setting_constants.py,sha256=EzbS04WLNGkq8FK_BUulM2YJe_IYqhpyoL1VPEWq9uY,31684
37
37
  zaber_motion/ascii/storage.py,sha256=osMUAKY3wlFUx1bU12Txr95-c5o4JLEzIlRwqiTrJY0,27054
@@ -153,7 +153,7 @@ zaber_motion/dto/product/__init__.py,sha256=86E40zuNYyjmUZbI633rB2PjjvhltcZ1KQ3O
153
153
  zaber_motion/dto/product/process_controller_mode.py,sha256=CCiUqQHSuxui8Bn_qDFDgh5NdyREdC9eH3uWHQD4v54,241
154
154
  zaber_motion/dto/product/process_controller_source.py,sha256=nW-vvxjqEaSVnhZrgIFNxq0Gvn5qmJsdpe2dY_fOEAY,2649
155
155
  zaber_motion/dto/product/process_controller_source_sensor.py,sha256=2LvWeTrbG7OqTS26OZRGQtOUyBAjy6LaB9k9hoVEMSM,228
156
- zaber_motion/dto/requests/__init__.py,sha256=SUx64zMQNyFytEPTpp0kqJr5PK1SQ4KmkU6VBrlelo0,23631
156
+ zaber_motion/dto/requests/__init__.py,sha256=4quX2Z2SGcNej0J0wJhCC3mg4dFRW0rFmHRA-bCgReY,23990
157
157
  zaber_motion/dto/requests/alert_event_wrapper.py,sha256=5py6PY1Ao_lkD3K_FvDHyW6pTDmOFl30Jh5lIwljB9E,3135
158
158
  zaber_motion/dto/requests/autofocus_focus_request.py,sha256=9IGsIMqwoBryeo5onGrqWMcD5WFR7dEtnfU_DWHL4A8,5403
159
159
  zaber_motion/dto/requests/autofocus_get_objective_params_request.py,sha256=2p79lpPqgJzOqglYym7qU4JT1IQ7jmkRn-bZhReQSiw,5472
@@ -295,13 +295,16 @@ zaber_motion/dto/requests/oscilloscope_request.py,sha256=f2sSjYUWmIwwlDTc4XsA360
295
295
  zaber_motion/dto/requests/oscilloscope_start_request.py,sha256=XxJ5zTlvD19iF2BeIx8OneEgffvP2P_mOHk0IknY3eU,3211
296
296
  zaber_motion/dto/requests/prepare_command_request.py,sha256=jIQmZuURR788Dvq3iXj06fuGgsoOpY1rGK9_a3bpLSM,4553
297
297
  zaber_motion/dto/requests/process_on.py,sha256=M47KOjxUnp78cf_uEovbLGFpAmCF9DSJ6GjcscJ8jqE,3914
298
+ zaber_motion/dto/requests/pvt_buffer_get_sequence_data_request.py,sha256=47sdsi9Uc--SFxvPM8oh2gWRJfVrABXCMumhzF_AwB0,3258
298
299
  zaber_motion/dto/requests/pvt_csv_request.py,sha256=fTVlAptcAa1jHEbyJoGxkbZviiDmuPCfoEkZUT94gB0,2201
299
300
  zaber_motion/dto/requests/pvt_generate_positions_request.py,sha256=-tvA0J8rsrSwhHh4PuaiyNNMNQqTo6XfOhtvXKkMlw0,3251
301
+ zaber_motion/dto/requests/pvt_generate_velocities_and_times_request.py,sha256=la0fIzNJ8Cw4MOHcYWEOvDH332AxRaqMlwVwQ9KoTJI,4689
300
302
  zaber_motion/dto/requests/pvt_generate_velocities_request.py,sha256=EBIslmNb5oF03oMLgx5uQl8rhNFNc679UGHv8etc5YQ,4455
301
303
  zaber_motion/dto/requests/pvt_load_csv_request.py,sha256=HRkNbjB310QecZMAbmevrlZQuAUy5kMbCULifguMmJs,1513
302
304
  zaber_motion/dto/requests/pvt_point_request.py,sha256=ndffqql0mg54NEb2udMh3BSYN4G84tE32qwk81eCzq4,6287
303
305
  zaber_motion/dto/requests/pvt_points_request.py,sha256=3JgA6BElXfLUWsfdXh5WiU2jjIoQyrdSWHa6cI51-Q4,6471
304
306
  zaber_motion/dto/requests/pvt_save_csv_request.py,sha256=SD9idafiFcKb7rflNH8ErM3ces5Qo-x-pMtCQHt2g2g,3120
307
+ zaber_motion/dto/requests/pvt_submit_sequence_data_request.py,sha256=7SRSlQsrGxM4VHv0X3Hx9IDeoPsv22qcxDaLDmRB-Gk,3960
305
308
  zaber_motion/dto/requests/renumber_request.py,sha256=YpCaph7eXEl68SQMAXg1lDIj7fFn2r0v3qhtYmERpRs,2981
306
309
  zaber_motion/dto/requests/response_type.py,sha256=YRIVY7w7Iw7rvLluMBw_C3dCfSCiRunURDib8wHFlpw,133
307
310
  zaber_motion/dto/requests/servo_tuning_paramset_response.py,sha256=wiaLXPS7Cx-oVD-CIchOhrW6isKs3LxIY0rVG83Shbk,1938
@@ -477,15 +480,15 @@ zaber_motion/microscopy/camera_trigger.py,sha256=WqKqdaIhF68BnvYE6C4ygY3f5uoCGTG
477
480
  zaber_motion/microscopy/filter_changer.py,sha256=8nTMWfF89IoEy5sueZA-v6sHEc-xhLuL6cl6k-G2RTQ,4826
478
481
  zaber_motion/microscopy/illuminator.py,sha256=hh-4_p7DlPfMFBqGd8jn0QSB11bcsGEH5xEQeyrV7p4,4308
479
482
  zaber_motion/microscopy/illuminator_channel.py,sha256=d7T1nppREWStueDASnj6_RUJqu3-YfHPY3J4KH6KRx0,21130
480
- zaber_motion/microscopy/microscope.py,sha256=O8a9TbdzGWscu7LBIYaaRqviiOJy2eKPRFmrlwp2Jd0,9129
483
+ zaber_motion/microscopy/microscope.py,sha256=2f02iWTypslE9xjnrIIYfty-XmBVOLQVuxoSqrLDsG0,10096
481
484
  zaber_motion/microscopy/objective_changer.py,sha256=YdIUczXXijOpiOWKmj1OIcbTZvuls24AqoRju3Z8kT0,13960
482
485
  zaber_motion/microscopy/wdi_autofocus_provider.py,sha256=YF1AKSr4RNnDs2xGb3J67CpdNT4TVyYxvOnCLoArqHw,11891
483
486
  zaber_motion/product/__init__.py,sha256=ZGZzfMmsd1ZWwLk0SZ3Ac1Une88SZQHuuzEFGgd6ork,538
484
487
  zaber_motion/product/process.py,sha256=o5GoKjC7eTVwTrfeugqvfTmg-UARhyTTbDDmoGCQ8Q8,28345
485
488
  zaber_motion/product/process_controller.py,sha256=GVYMALlFWEcvLipPk1GF-M7LcoKfCf5_YqFMeFseCpg,4327
486
- zaber_motion-7.11.0.dist-info/licenses/LICENSE.txt,sha256=H7YIgjgmcE_L-pfvZTWUoLrk7p0LiiKQh5_oeIWux-k,111363
487
- zaber_motion_bindings/zaber-motion-core-windows-arm64.dll,sha256=nPwyW2rsh_x6nIvAZsAD2hWjPfjfqLYilc3-n0FbtIM,14636544
488
- zaber_motion-7.11.0.dist-info/METADATA,sha256=2O7rQxEak-A0yMw1FMS8ARCyj46mjYiPmeiG6vW0aWk,129839
489
- zaber_motion-7.11.0.dist-info/WHEEL,sha256=PtZ7_1TP6Cu1E5x_voSGj5l6q0pu2rBD8e6tfv65a50,97
490
- zaber_motion-7.11.0.dist-info/top_level.txt,sha256=ypgkPvPad6Oge50CT6unnvxCEliKUB6olL6CUUER1SA,51
491
- zaber_motion-7.11.0.dist-info/RECORD,,
489
+ zaber_motion-7.12.0.dist-info/licenses/LICENSE.txt,sha256=H7YIgjgmcE_L-pfvZTWUoLrk7p0LiiKQh5_oeIWux-k,111363
490
+ zaber_motion_bindings/zaber-motion-core-windows-arm64.dll,sha256=y5UkhePLKFciyPFIQ2mUGPhmYYlMkZBnQkz_FiQnoKs,14781952
491
+ zaber_motion-7.12.0.dist-info/METADATA,sha256=bciDrSBFojhKeLJh5RdzW2bIQuZ50vasFW1DAeqN-U0,129839
492
+ zaber_motion-7.12.0.dist-info/WHEEL,sha256=PtZ7_1TP6Cu1E5x_voSGj5l6q0pu2rBD8e6tfv65a50,97
493
+ zaber_motion-7.12.0.dist-info/top_level.txt,sha256=ypgkPvPad6Oge50CT6unnvxCEliKUB6olL6CUUER1SA,51
494
+ zaber_motion-7.12.0.dist-info/RECORD,,