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

@@ -512,14 +512,21 @@ class DAQ_Move(ParameterControlModule):
512
512
  elif status.command == 'units':
513
513
  self.units = status.attribute
514
514
 
515
- def _check_data_type(self, data_act: Union[list[np.ndarray], float, DataActuator]) -> DataActuator:
515
+ def _check_data_type(self, data_act: Union[list, np.ndarray, Number, DataActuator]) -> DataActuator:
516
516
  """ Make sure the data is a DataActuator
517
517
 
518
518
  Mostly to make sure DAQ_Move is backcompatible with old style plugins
519
519
  """
520
520
  if isinstance(data_act, list): # backcompatibility
521
- data_act = data_act[0]
522
- if isinstance(data_act, np.ndarray): # backcompatibility
521
+ if isinstance(data_act[0], Number):
522
+ data_act = DataActuator(data=[np.atleast_1d(val) for val in data_act], units=self.units)
523
+ elif isinstance(data_act[0], np.ndarray):
524
+ data_act = DataActuator(data=data_act, units=self.units)
525
+ elif isinstance(data_act[0], DataActuator):
526
+ data_act = data_act[0]
527
+ else:
528
+ raise TypeError('Unknown data type')
529
+ elif isinstance(data_act, np.ndarray): # backcompatibility
523
530
  data_act = DataActuator(data=[data_act], units=self.units)
524
531
  data_act.name = self.title # for the DataActuator name to be the title of the DAQ_Move
525
532
  if (not Unit(self.units).is_compatible_with(Unit(data_act.units)) and
@@ -783,7 +790,7 @@ class DAQ_Move_Hardware(QObject):
783
790
  try:
784
791
  infos = self.hardware.ini_stage(controller) # return edict(info="", controller=, stage=)
785
792
  except Exception as e:
786
- logger.exception('Hardware couldn\'t be initialized' + str(e))
793
+ logger.exception("Hardware couldn't be initialized", exc_info=e)
787
794
  infos = str(e), False
788
795
 
789
796
  if isinstance(infos, edict): # following old plugin templating
@@ -1309,7 +1309,7 @@ class DAQ_Detector(QObject):
1309
1309
  status.controller = self.detector.controller
1310
1310
 
1311
1311
  except Exception as e:
1312
- logger.exception('Hardware couldn\'t be initialized' + str(e))
1312
+ logger.exception("Hardware couldn't be initialized", exc_info=e)
1313
1313
  infos = str(e), False
1314
1314
  status.controller = None
1315
1315
 
@@ -697,7 +697,7 @@ class DAQ_Move_base(QObject):
697
697
  position = self.get_actuator_value()
698
698
  if position.name != self._title: # make sure the emitted DataActuator has the name of the real implementation
699
699
  #of the plugin
700
- position = DataActuator(self._title, data=position.value(),
700
+ position = DataActuator(self._title, data=position.value(self.axis_unit),
701
701
  units=self.axis_unit)
702
702
  self.move_done_signal.emit(position)
703
703
  self.move_is_done = True
@@ -12,7 +12,7 @@ from pymodaq_utils import utils
12
12
  from pymodaq_utils import config as config_mod
13
13
  from pymodaq_utils.enums import BaseEnum
14
14
 
15
- from pymodaq_gui.config import ConfigSaverLoader
15
+
16
16
  from pymodaq_utils.logger import set_logger, get_module_name
17
17
 
18
18
  from pymodaq_gui.plotting.data_viewers.viewer0D import Viewer0D
@@ -23,6 +23,11 @@ from pymodaq_gui import utils as gutils
23
23
  from pymodaq_gui.parameter import utils as putils
24
24
  from pymodaq_gui.h5modules.saving import H5Saver
25
25
 
26
+ try:
27
+ from pymodaq_gui.config_saver_loader import ConfigSaverLoader
28
+ except ModuleNotFoundError:
29
+ from pymodaq_gui.config import ConfigSaverLoader #backcompatibility
30
+
26
31
  from pymodaq_data.h5modules.data_saving import DataEnlargeableSaver
27
32
 
28
33
 
pymodaq/utils/config.py CHANGED
@@ -1,6 +1,9 @@
1
1
  from pymodaq_utils.config import (BaseConfig, Config, ConfigError, get_set_config_dir,
2
2
  USER, CONFIG_BASE_PATH, get_set_local_dir)
3
- from pymodaq_gui.config import get_set_roi_path
3
+ try:
4
+ from pymodaq_gui.config_saver_loader import get_set_roi_path
5
+ except ModuleNotFoundError:
6
+ from pymodaq_gui.config import get_set_roi_path
4
7
 
5
8
 
6
9
  def get_set_preset_path():
@@ -24,7 +24,12 @@ from pymodaq_gui.managers.parameter_manager import ParameterManager, Parameter
24
24
  from pymodaq_data.data import Axis, DataDistribution
25
25
 
26
26
  from pymodaq.utils.scanner.scan_config import ScanConfig
27
- from pymodaq_gui.config import ConfigSaverLoader
27
+ try:
28
+ from pymodaq_gui.config_saver_loader import ConfigSaverLoader
29
+ except ModuleNotFoundError:
30
+ from pymodaq_gui.config import ConfigSaverLoader
31
+
32
+ from pymodaq.utils.config import Config as ControlModulesConfig
28
33
 
29
34
 
30
35
  if TYPE_CHECKING:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymodaq
3
- Version: 5.0.16
3
+ Version: 5.0.18
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
@@ -3,12 +3,12 @@ pymodaq/dashboard.py,sha256=rUrtOdaK31SKhl1XFagZdvVAEqEwU37WAbplciE6MhE,75119
3
3
  pymodaq/icon.ico,sha256=hOHHfNDENKphQvG1WDleSEYcHukneR2eRFJu8isIlD4,74359
4
4
  pymodaq/splash.png,sha256=ow8IECF3tPRUMA4tf2tMu1aRiMaxx91_Y2ckVxkrmF0,53114
5
5
  pymodaq/control_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- pymodaq/control_modules/daq_move.py,sha256=wWzQpFxi1gPx4c03mUos1W3SVrGneVqVTq9k0RyZdnM,38859
6
+ pymodaq/control_modules/daq_move.py,sha256=tCEr_IivQkx9Q1TBdAIvxZb3jiClrsYuwbyT9DFH-7k,39275
7
7
  pymodaq/control_modules/daq_move_ui.py,sha256=bdkRX0wjkQuFDr4OT1Q6jT_15DEWV1dn2R6WF50H23s,16811
8
- pymodaq/control_modules/daq_viewer.py,sha256=f9WYEWIlVjnEakesObhsoLBIWfv1tv4Q8TopqfP8lsg,58602
8
+ pymodaq/control_modules/daq_viewer.py,sha256=XJUkKSmW4ktWSNIRsF_bZ-GG74h4-a82tGijZPrO3FA,58604
9
9
  pymodaq/control_modules/daq_viewer_ui.py,sha256=7XTidYrYlzj--DbbE1Wx4UBjvp1upGpziGhSTPoMKCc,15677
10
10
  pymodaq/control_modules/mocks.py,sha256=CdczKJDAuM2oL7VvIpSBWiYtTCqK_6x9unxavezp3_s,1954
11
- pymodaq/control_modules/move_utility_classes.py,sha256=xV_sUhNAPvOY9CFVymI4JbS5Vjyfmhqgu4efZWb_f1A,44368
11
+ pymodaq/control_modules/move_utility_classes.py,sha256=zAiOFNEiLVFSmNPMKQRVbWwx7osMgU7ocgBGraEOxF8,44382
12
12
  pymodaq/control_modules/utils.py,sha256=E94gyLrh7fkeppwihHXcwNyKD3CqBZvkMkk8X4fl_UE,20897
13
13
  pymodaq/control_modules/viewer_utility_classes.py,sha256=1TcyAC7AiJNKvJ6OGNOYoyFvRCT-u6RBbFv-X8IkZYA,28076
14
14
  pymodaq/daq_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,7 +40,7 @@ pymodaq/extensions/daq_scan_ui.py,sha256=kKcXu2tNo-VJR7GQPNEXxMKiKitA4F3a_tOSama
40
40
  pymodaq/extensions/h5browser.py,sha256=7WbF2hj7sdU0kCqTxB4nXvfKGqUnoIsa2_AhCtCBNQo,1131
41
41
  pymodaq/extensions/utils.py,sha256=18FvgD9vtwAvGdD01LiV0-jcGv0WNjYyDLSP-NFUjno,3042
42
42
  pymodaq/extensions/bayesian/__init__.py,sha256=QMV9tq8Axi6YjoGj4UguBO8Zvuh26r5s91bm6YU7Itk,55
43
- pymodaq/extensions/bayesian/bayesian_optimisation.py,sha256=25nAtpQxN2LnBUyUFDkbPRojBqqGxcLe7hruAVQZj_o,30297
43
+ pymodaq/extensions/bayesian/bayesian_optimisation.py,sha256=Wa1nBCLhQjFQmTK53Nx-6Uh4Q0NbcalqFM8zjM20648,30421
44
44
  pymodaq/extensions/bayesian/utils.py,sha256=PNBIHETkZNieExyd9gr8pqWAYXg3_1QW570pwbHbcQw,15473
45
45
  pymodaq/extensions/daq_logger/__init__.py,sha256=u-W6S5KmVKjOuRLbpnM0bqn9vCiJjW97RpW7iaKssKM,28
46
46
  pymodaq/extensions/daq_logger/abstract.py,sha256=I-t-2nSIVHHUfHJ-3IoqsuULZiIsXRe4saotaEL3-Fk,1095
@@ -63,7 +63,7 @@ pymodaq/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  pymodaq/utils/array_manipulation.py,sha256=lU-MwuAIv0ZFc0_E11w0TSX5AfGarJOG58yIZZk36GY,272
64
64
  pymodaq/utils/calibration_camera.py,sha256=WTRXFbacR5tL01rFH1JZ5ejEXGcxOVUM8kRA5GPyCc8,8869
65
65
  pymodaq/utils/chrono_timer.py,sha256=uBVtV3AW-m-fnHlMYgm1qYiuBpREdL1A93yJG78VAiM,7086
66
- pymodaq/utils/config.py,sha256=w0EkWEvUbLCq7nTNZQccaMWVILuFaGW1JsIgX3VIKKc,1155
66
+ pymodaq/utils/config.py,sha256=T4UjUsMN3CAw3nND_tU1L69VOL9_U7loYEJshINroZU,1257
67
67
  pymodaq/utils/conftests.py,sha256=3Ak8WEpa3EhAp73Yb1LLq8YFONhPqiL7gG9eSDIoTNc,58
68
68
  pymodaq/utils/daq_utils.py,sha256=AJIA6PTDKe2nzoL0hgSJRWA5PYhKwZsBKfpPh0QkoTc,6131
69
69
  pymodaq/utils/data.py,sha256=8iAchr5nkwDo_usgChX85MOQiHnrubPrvAg3MrYnumw,4415
@@ -97,7 +97,7 @@ pymodaq/utils/parameter/__init__.py,sha256=I5oOJu5nJbcn5sa7TdUP0QVNNZKBrKReeMHJG
97
97
  pymodaq/utils/parameter/utils.py,sha256=atxN31PFrLDPjpX0ITEL_ugBvreOVI-RfjbOU_YCMhw,247
98
98
  pymodaq/utils/scanner/__init__.py,sha256=LqY1QwGnJEgr8CcW8uLWzbWy55Nvkmjmww4nl7xMpYU,171
99
99
  pymodaq/utils/scanner/scan_config.py,sha256=GJeH8oeZ_zMtujwkLM1jpKDQFLFKIN1wlkxXbOv6nWM,325
100
- pymodaq/utils/scanner/scan_factory.py,sha256=fu4kQrAoYsXeVg1VlHT2cyLZTuCQBJcz6X97CgMb0kw,8577
100
+ pymodaq/utils/scanner/scan_factory.py,sha256=Y0jaeTTp6LhW_CdDeCP_nnIREfssahjdnBmry-3pJ5Y,8745
101
101
  pymodaq/utils/scanner/scan_selector.py,sha256=uu55xcijjg1fcvF59VVbtRLzXLoxb_3klEJPLiAuyws,16319
102
102
  pymodaq/utils/scanner/scanner.py,sha256=007u4TVDTvxRDWnuXCWDNVOiUmflAJB99EjQ33Fh7VM,10985
103
103
  pymodaq/utils/scanner/utils.py,sha256=YjjrWWKs9q_OgP5xK277IyEsMqp15qFxU19kQ8f5R-c,3680
@@ -114,8 +114,8 @@ pymodaq/utils/tcp_ip/__init__.py,sha256=1e_EK0AgvdoLAD_CSGGEaITZdy6OWCO7ih9IAIp7
114
114
  pymodaq/utils/tcp_ip/mysocket.py,sha256=03FaQskso8nLLAsN-ijX-RazXbeMezRnAPvsRxTQa4k,326
115
115
  pymodaq/utils/tcp_ip/serializer.py,sha256=Bp6ZpGqMdZlX4CnT371d7ZYqIp7UygsRsE9XFkWZrto,400
116
116
  pymodaq/utils/tcp_ip/tcp_server_client.py,sha256=eL-Q1HnnaAG8wfTUb9unEIiNFApMXzfzfveUWoC0_mg,30657
117
- pymodaq-5.0.16.dist-info/METADATA,sha256=AyhKhjh8_dbJYOmlVZIf6tzE4yBv0iMQPhG6MnFcBbo,12902
118
- pymodaq-5.0.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
119
- pymodaq-5.0.16.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
120
- pymodaq-5.0.16.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
121
- pymodaq-5.0.16.dist-info/RECORD,,
117
+ pymodaq-5.0.18.dist-info/METADATA,sha256=ZiEswU-Xq_Xw7qO1_s39JnB8CfgLx3zpgcNa_4llvLs,12902
118
+ pymodaq-5.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
119
+ pymodaq-5.0.18.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
120
+ pymodaq-5.0.18.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
121
+ pymodaq-5.0.18.dist-info/RECORD,,