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

@@ -499,6 +499,7 @@ class DAQ_Move(ParameterControlModule):
499
499
  self._command_tcpip.emit(ThreadCommand(LECOMoveCommands.MOVE_DONE, data_act))
500
500
 
501
501
  elif status.command == 'outofbounds':
502
+ logger.warning(f'The Actuator {self.title} has reached its defined bounds')
502
503
  self.bounds_signal.emit(True)
503
504
 
504
505
  elif status.command == 'set_allowed_values':
@@ -609,13 +609,18 @@ class DAQ_Move_base(QObject):
609
609
  if self.settings['bounds', 'is_bounds']:
610
610
  if self.data_actuator_type == DataActuatorType.DataActuator:
611
611
  for data_array in position:
612
+ if np.any(data_array > self.settings['bounds', 'max_bound']) or \
613
+ np.any(data_array < self.settings['bounds', 'min_bound']):
614
+ self.emit_status(ThreadCommand('outofbounds'))
612
615
  data_array[data_array > self.settings['bounds', 'max_bound']] = self.settings['bounds', 'max_bound']
613
616
  data_array[data_array < self.settings['bounds', 'min_bound']] = self.settings['bounds', 'min_bound']
614
- self.emit_status(ThreadCommand('outofbounds', []))
617
+
615
618
  else:
616
619
  if position > self.settings['bounds', 'max_bound']:
620
+ self.emit_status(ThreadCommand('outofbounds'))
617
621
  position = self.settings['bounds', 'max_bound']
618
622
  elif position < self.settings['bounds', 'min_bound']:
623
+ self.emit_status(ThreadCommand('outofbounds'))
619
624
  position = self.settings['bounds', 'min_bound']
620
625
  return position
621
626
 
pymodaq/dashboard.py CHANGED
@@ -890,7 +890,7 @@ class DashBoard(CustomApp):
890
890
  self.splash_sc.showMessage(mssg)
891
891
  QtWidgets.QApplication.processEvents()
892
892
 
893
- mov_mod_tmp.bounds_signal[bool].connect(self.stop_moves)
893
+ mov_mod_tmp.bounds_signal[bool].connect(self.do_stuff_from_out_bounds)
894
894
  move_docks[-1].addWidget(move_forms[-1])
895
895
  actuators_modules.append(mov_mod_tmp)
896
896
  return mov_mod_tmp
@@ -1139,7 +1139,7 @@ class DashBoard(CustomApp):
1139
1139
  QtWidgets.QApplication.processEvents()
1140
1140
 
1141
1141
  detector_modules[-1].settings.child('main_settings', 'overshoot').show()
1142
- detector_modules[-1].overshoot_signal[bool].connect(self.stop_moves)
1142
+ detector_modules[-1].overshoot_signal[bool].connect(self.stop_moves_from_overshoot)
1143
1143
 
1144
1144
  QtWidgets.QApplication.processEvents()
1145
1145
  # restore dock state if saved
@@ -1519,7 +1519,19 @@ class DashBoard(CustomApp):
1519
1519
  QtWidgets.QApplication.processEvents()
1520
1520
  self.settings.child('detectors', name).setValue(det.initialized_state)
1521
1521
 
1522
- def stop_moves(self, overshoot):
1522
+ def do_stuff_from_out_bounds(self, out_of_bounds: bool):
1523
+
1524
+ if out_of_bounds:
1525
+ logger.warning(f'Some actuators reached their bounds')
1526
+ if self.scan_module is not None:
1527
+ logger.warning(f'Stopping the DAQScan for out of bounds')
1528
+ self.scan_module.stop_scan()
1529
+
1530
+ def stop_moves_from_overshoot(self, overshoot):
1531
+ self.overshoot = overshoot
1532
+ self.stop_moves()
1533
+
1534
+ def stop_moves(self, *args, **kwargs):
1523
1535
  """
1524
1536
  Foreach module of the move module object list, stop motion.
1525
1537
 
@@ -1527,7 +1539,6 @@ class DashBoard(CustomApp):
1527
1539
  --------
1528
1540
  stop_scan, DAQ_Move_main.daq_move.stop_motion
1529
1541
  """
1530
- self.overshoot = overshoot
1531
1542
  if self.scan_module is not None:
1532
1543
  self.scan_module.stop_scan()
1533
1544
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymodaq
3
- Version: 5.0.9
3
+ Version: 5.0.10
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
@@ -1,15 +1,15 @@
1
1
  pymodaq/__init__.py,sha256=VtSBaXkrFtgRchmQN2dIet1X88h9r9M6C8OCD9WZPy0,3250
2
- pymodaq/dashboard.py,sha256=gbDGP34Wa0_7pO5I_nGlXqV4ahlDIsB8CaxhNVUdT_s,76688
2
+ pymodaq/dashboard.py,sha256=FHccIAKb9qjoDYIoKdJqk0_8HZFu3BDoTFT6EkGogzI,77122
3
3
  pymodaq/icon.ico,sha256=hOHHfNDENKphQvG1WDleSEYcHukneR2eRFJu8isIlD4,74359
4
4
  pymodaq/splash.png,sha256=ow8IECF3tPRUMA4tf2tMu1aRiMaxx91_Y2ckVxkrmF0,53114
5
5
  pymodaq/updater.py,sha256=JMCVRgAXwmlrKxZv3837E-LRhF0F8V-td_wODwCoXaY,3821
6
6
  pymodaq/control_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pymodaq/control_modules/daq_move.py,sha256=WXmtKz6-F68LTqpnTAer4SwropUgd7ZdfB_BYGdFkQY,38605
7
+ pymodaq/control_modules/daq_move.py,sha256=_2mjdDproHWmsOONP6FDc07InUsAIuE1YPvLQnhAP-4,38693
8
8
  pymodaq/control_modules/daq_move_ui.py,sha256=bdkRX0wjkQuFDr4OT1Q6jT_15DEWV1dn2R6WF50H23s,16811
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=nT-uccyXon8DFsDlVa66Sx2Ph2bXt9GrQsN91Th3Kso,44056
12
+ pymodaq/control_modules/move_utility_classes.py,sha256=xV_sUhNAPvOY9CFVymI4JbS5Vjyfmhqgu4efZWb_f1A,44368
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.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,,
118
+ pymodaq-5.0.10.dist-info/METADATA,sha256=C2YtDvXahWX5jBfN5m7xfkdxAQhPczxjLQjGyyaBvtA,12886
119
+ pymodaq-5.0.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
+ pymodaq-5.0.10.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
121
+ pymodaq-5.0.10.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
122
+ pymodaq-5.0.10.dist-info/RECORD,,