pymodaq 5.0.7__py3-none-any.whl → 5.0.9__py3-none-any.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.

Potentially problematic release.


This version of pymodaq might be problematic. Click here for more details.

@@ -607,10 +607,16 @@ class DAQ_Move_base(QObject):
607
607
  Return the new position eventually coerced within the bounds
608
608
  """
609
609
  if self.settings['bounds', 'is_bounds']:
610
- for data_array in position:
611
- data_array[data_array > self.settings['bounds', 'max_bound']] = self.settings['bounds', 'max_bound']
612
- data_array[data_array < self.settings['bounds', 'min_bound']] = self.settings['bounds', 'min_bound']
613
- self.emit_status(ThreadCommand('outofbounds', []))
610
+ if self.data_actuator_type == DataActuatorType.DataActuator:
611
+ for data_array in position:
612
+ data_array[data_array > self.settings['bounds', 'max_bound']] = self.settings['bounds', 'max_bound']
613
+ data_array[data_array < self.settings['bounds', 'min_bound']] = self.settings['bounds', 'min_bound']
614
+ self.emit_status(ThreadCommand('outofbounds', []))
615
+ else:
616
+ if position > self.settings['bounds', 'max_bound']:
617
+ position = self.settings['bounds', 'max_bound']
618
+ elif position < self.settings['bounds', 'min_bound']:
619
+ position = self.settings['bounds', 'min_bound']
614
620
  return position
615
621
 
616
622
  def get_actuator_value(self):
@@ -809,14 +815,21 @@ class DAQ_Move_base(QObject):
809
815
  """ Get the current position from the hardware with scaling conversion.
810
816
  """
811
817
  if self.settings['scaling', 'use_scaling']:
812
- pos = (pos - self.settings['scaling', 'offset']) * self.settings['scaling', 'scaling']
818
+ if self.data_actuator_type == DataActuatorType.float:
819
+ pos = (pos - self.settings['scaling', 'offset']) * self.settings['scaling', 'scaling']
820
+ else:
821
+ pos = (pos - Q_(self.settings['scaling', 'offset'],
822
+ self.axis_unit)) * self.settings['scaling', 'scaling']
813
823
  return pos
814
824
 
815
825
  def set_position_with_scaling(self, pos: DataActuator) -> DataActuator:
816
826
  """ Set the current position from the parameter and hardware with scaling conversion.
817
827
  """
818
828
  if self.settings['scaling', 'use_scaling']:
819
- pos = pos / self.settings['scaling', 'scaling'] + self.settings['scaling', 'offset']
829
+ if self.data_actuator_type == DataActuatorType.DataActuator:
830
+ pos = pos / self.settings['scaling', 'scaling'] + Q_(self.settings['scaling', 'offset'], self.axis_unit)
831
+ else:
832
+ pos = pos / self.settings['scaling', 'scaling'] + self.settings['scaling', 'offset']
820
833
  return pos
821
834
 
822
835
  def set_position_relative_with_scaling(self, pos: DataActuator) -> DataActuator:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymodaq
3
- Version: 5.0.7
3
+ Version: 5.0.9
4
4
  Summary: Modular Data Acquisition with Python
5
5
  Project-URL: Homepage, http://pymodaq.cnrs.fr
6
6
  Project-URL: Source, https://github.com/PyMoDAQ/PyMoDAQ
@@ -9,7 +9,7 @@ pymodaq/control_modules/daq_move_ui.py,sha256=bdkRX0wjkQuFDr4OT1Q6jT_15DEWV1dn2R
9
9
  pymodaq/control_modules/daq_viewer.py,sha256=f9WYEWIlVjnEakesObhsoLBIWfv1tv4Q8TopqfP8lsg,58602
10
10
  pymodaq/control_modules/daq_viewer_ui.py,sha256=7XTidYrYlzj--DbbE1Wx4UBjvp1upGpziGhSTPoMKCc,15677
11
11
  pymodaq/control_modules/mocks.py,sha256=CdczKJDAuM2oL7VvIpSBWiYtTCqK_6x9unxavezp3_s,1954
12
- pymodaq/control_modules/move_utility_classes.py,sha256=2byGqAv7XeDYswRaLnkc8UBZlquqeUrOfsCE_yPEmg0,43216
12
+ pymodaq/control_modules/move_utility_classes.py,sha256=nT-uccyXon8DFsDlVa66Sx2Ph2bXt9GrQsN91Th3Kso,44056
13
13
  pymodaq/control_modules/utils.py,sha256=E94gyLrh7fkeppwihHXcwNyKD3CqBZvkMkk8X4fl_UE,20897
14
14
  pymodaq/control_modules/viewer_utility_classes.py,sha256=1TcyAC7AiJNKvJ6OGNOYoyFvRCT-u6RBbFv-X8IkZYA,28076
15
15
  pymodaq/daq_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -115,8 +115,8 @@ pymodaq/utils/tcp_ip/__init__.py,sha256=1e_EK0AgvdoLAD_CSGGEaITZdy6OWCO7ih9IAIp7
115
115
  pymodaq/utils/tcp_ip/mysocket.py,sha256=03FaQskso8nLLAsN-ijX-RazXbeMezRnAPvsRxTQa4k,326
116
116
  pymodaq/utils/tcp_ip/serializer.py,sha256=Bp6ZpGqMdZlX4CnT371d7ZYqIp7UygsRsE9XFkWZrto,400
117
117
  pymodaq/utils/tcp_ip/tcp_server_client.py,sha256=eL-Q1HnnaAG8wfTUb9unEIiNFApMXzfzfveUWoC0_mg,30657
118
- pymodaq-5.0.7.dist-info/METADATA,sha256=NNuQWjJziLF9cXab6dlPxky6GusuU_WGpFQ5hPkeL8s,12885
119
- pymodaq-5.0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
- pymodaq-5.0.7.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
121
- pymodaq-5.0.7.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
122
- pymodaq-5.0.7.dist-info/RECORD,,
118
+ pymodaq-5.0.9.dist-info/METADATA,sha256=NpHHxGUyK4W_14veaqXPUs-qEQVXJFHw1NbPVpeOckU,12885
119
+ pymodaq-5.0.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
+ pymodaq-5.0.9.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
121
+ pymodaq-5.0.9.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
122
+ pymodaq-5.0.9.dist-info/RECORD,,