pymodaq 5.0.2__py3-none-any.whl → 5.0.3__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.
- pymodaq/extensions/daq_scan.py +44 -10
- pymodaq/utils/leco/utils.py +1 -1
- {pymodaq-5.0.2.dist-info → pymodaq-5.0.3.dist-info}/METADATA +1 -1
- {pymodaq-5.0.2.dist-info → pymodaq-5.0.3.dist-info}/RECORD +7 -7
- {pymodaq-5.0.2.dist-info → pymodaq-5.0.3.dist-info}/WHEEL +0 -0
- {pymodaq-5.0.2.dist-info → pymodaq-5.0.3.dist-info}/entry_points.txt +0 -0
- {pymodaq-5.0.2.dist-info → pymodaq-5.0.3.dist-info}/licenses/LICENSE +0 -0
pymodaq/extensions/daq_scan.py
CHANGED
|
@@ -602,7 +602,7 @@ class DAQScan(QObject, ParameterManager):
|
|
|
602
602
|
for ind, pos in enumerate(positions):
|
|
603
603
|
dte.append(DataActuator(actuators[ind].title, data=float(pos)))
|
|
604
604
|
|
|
605
|
-
self.modules_manager.move_actuators(dte)
|
|
605
|
+
self.modules_manager.move_actuators(dte, polling=False)
|
|
606
606
|
|
|
607
607
|
def value_changed(self, param):
|
|
608
608
|
"""
|
|
@@ -621,27 +621,52 @@ class DAQScan(QObject, ParameterManager):
|
|
|
621
621
|
self.settings.child('plot_options', 'plot_0d').setValue(dict(all_items=[], selected=[]))
|
|
622
622
|
self.settings.child('plot_options', 'plot_1d').setValue(dict(all_items=[], selected=[]))
|
|
623
623
|
|
|
624
|
-
def
|
|
624
|
+
def check_number_type_viewers(self) -> Tuple[
|
|
625
|
+
List[ViewersEnum],
|
|
626
|
+
List[str],
|
|
627
|
+
bool]:
|
|
628
|
+
""" Assert from selected options the number and type of needed viewers for live plotting
|
|
625
629
|
|
|
626
|
-
|
|
630
|
+
Return
|
|
631
|
+
------
|
|
632
|
+
List[ViewersEnum]: the list of needed viewers
|
|
633
|
+
List[str]: the list of data names to be plotted in the corresponding viewer
|
|
634
|
+
"""
|
|
635
|
+
viewer2D_overload = False
|
|
636
|
+
viewers_enum = [ViewersEnum.Viewer0D.increase_dim(self.scanner.n_axes)
|
|
627
637
|
for _ in range(len(self.settings['plot_options', 'plot_0d']['selected']))]
|
|
628
638
|
data_names = self.settings['plot_options', 'plot_0d']['selected'][:]
|
|
629
639
|
|
|
630
|
-
if self.settings['plot_options', 'group0D'] and len(viewers_enum) > 0 and ViewersEnum
|
|
631
|
-
viewers_enum = [ViewersEnum
|
|
640
|
+
if self.settings['plot_options', 'group0D'] and len(viewers_enum) > 0 and ViewersEnum.Viewer1D in viewers_enum:
|
|
641
|
+
viewers_enum = [ViewersEnum.Viewer1D]
|
|
632
642
|
data_names = [self.live_plotter.grouped_data0D_fullname]
|
|
633
|
-
elif self.settings['plot_options', 'group0D'] and len(viewers_enum) > 0 and
|
|
634
|
-
|
|
643
|
+
elif (self.settings['plot_options', 'group0D'] and len(viewers_enum) > 0 and
|
|
644
|
+
ViewersEnum.Viewer2D in viewers_enum):
|
|
645
|
+
viewers_enum = [ViewersEnum.Viewer2D]
|
|
646
|
+
n2Dplots = len(data_names)
|
|
647
|
+
if (self.settings['scan_options', 'scan_average'] > 1 and
|
|
648
|
+
self.settings['scan_options', 'average_on_top']):
|
|
649
|
+
n2Dplots *= 2
|
|
650
|
+
if n2Dplots > 3:
|
|
651
|
+
viewer2D_overload = True
|
|
635
652
|
data_names = [self.live_plotter.grouped_data0D_fullname]
|
|
636
653
|
|
|
637
654
|
if self.scanner.n_axes <= 1:
|
|
638
|
-
viewers_enum.extend([ViewersEnum
|
|
655
|
+
viewers_enum.extend([ViewersEnum.Viewer1D.increase_dim(self.scanner.n_axes)
|
|
639
656
|
for _ in range(len(self.settings['plot_options', 'plot_1d']['selected']))])
|
|
640
657
|
data_names.extend(self.settings['plot_options', 'plot_1d']['selected'][:])
|
|
641
658
|
if not self.settings['scan_options', 'average_on_top']:
|
|
642
659
|
|
|
643
660
|
viewers_enum = viewers_enum + viewers_enum
|
|
644
661
|
data_names = data_names + [f'{data_name}_averaged' for data_name in data_names]
|
|
662
|
+
|
|
663
|
+
return viewers_enum, data_names, viewer2D_overload
|
|
664
|
+
|
|
665
|
+
def prepare_viewers(self):
|
|
666
|
+
""" Assert from selected options the number and type of needed viewers for live plotting
|
|
667
|
+
and prepare them on the live plot panel
|
|
668
|
+
"""
|
|
669
|
+
viewers_enum, data_names, _ = self.check_number_type_viewers()
|
|
645
670
|
self.live_plotter.prepare_viewers(viewers_enum, viewers_name=data_names)
|
|
646
671
|
|
|
647
672
|
def update_status(self, txt: str, wait_time=0):
|
|
@@ -778,6 +803,15 @@ class DAQScan(QObject, ParameterManager):
|
|
|
778
803
|
f"limit in the config file ({config['scan']['steps_limit']}) or modify"
|
|
779
804
|
f" your scan settings.")
|
|
780
805
|
|
|
806
|
+
_, _, viewer2D_overload = self.check_number_type_viewers()
|
|
807
|
+
if viewer2D_overload:
|
|
808
|
+
messagebox(text=
|
|
809
|
+
'The number of live data chosen and the selected options '
|
|
810
|
+
'will not be able to render fully on the 2D live viewers. Consider changing '
|
|
811
|
+
'the options, such as "plot on top" for the averaging or "Group 0D data" '
|
|
812
|
+
'or the number of selected data')
|
|
813
|
+
return False
|
|
814
|
+
|
|
781
815
|
if self.modules_manager.Nactuators != self.scanner.n_axes:
|
|
782
816
|
messagebox(
|
|
783
817
|
text="There are not enough or too much selected move modules for this scan")
|
|
@@ -1048,13 +1082,13 @@ class DAQScanAcquisition(QObject):
|
|
|
1048
1082
|
self.set_ini_positions()
|
|
1049
1083
|
|
|
1050
1084
|
elif command.command == "move_stages":
|
|
1051
|
-
self.modules_manager.move_actuators(command.attribute)
|
|
1085
|
+
self.modules_manager.move_actuators(command.attribute, polling=False)
|
|
1052
1086
|
|
|
1053
1087
|
def set_ini_positions(self):
|
|
1054
1088
|
""" Set the actuators's positions totheir initial value as defined in the scanner """
|
|
1055
1089
|
try:
|
|
1056
1090
|
if self.scanner.scan_sub_type != 'Adaptive':
|
|
1057
|
-
self.modules_manager.move_actuators(self.scanner.positions_at(0))
|
|
1091
|
+
self.modules_manager.move_actuators(self.scanner.positions_at(0), polling=False)
|
|
1058
1092
|
|
|
1059
1093
|
except Exception as e:
|
|
1060
1094
|
logger.exception(str(e))
|
pymodaq/utils/leco/utils.py
CHANGED
|
@@ -39,7 +39,7 @@ def binary_serialization(
|
|
|
39
39
|
"""Serialize (binary) a pymodaq object, if it is not JSON compatible."""
|
|
40
40
|
if isinstance(pymodaq_object, get_args(JSON_TYPES)):
|
|
41
41
|
return pymodaq_object, None
|
|
42
|
-
elif isinstance(pymodaq_object, get_args(
|
|
42
|
+
elif isinstance(pymodaq_object, get_args(SERIALIZABLE)):
|
|
43
43
|
return None, [Serializer(pymodaq_object).to_bytes()]
|
|
44
44
|
else:
|
|
45
45
|
raise ValueError(
|
|
@@ -36,7 +36,7 @@ pymodaq/examples/Labview_TCP_Client/client_state.ctl,sha256=IxYi5Og0QXFB1e0VeBL2
|
|
|
36
36
|
pymodaq/examples/Labview_TCP_Client/cmd_types.ctl,sha256=gwuDyGcte11Zqx0C-U8ljRyYCQleUPh18MYqg9GtxPg,4618
|
|
37
37
|
pymodaq/extensions/__init__.py,sha256=PXelEHNgMwhjWlvxwObYU1joSLJnaIsFBZs9ZTR8w5c,470
|
|
38
38
|
pymodaq/extensions/console.py,sha256=kkuHHog_a2Y_5cYrAFTD7IGRQ4BA4NBQz4hrwFYanQY,2277
|
|
39
|
-
pymodaq/extensions/daq_scan.py,sha256=
|
|
39
|
+
pymodaq/extensions/daq_scan.py,sha256=bM-lat9ldaNg62seN8DaepA321NTZ0ViAMOUWTm46Iw,52132
|
|
40
40
|
pymodaq/extensions/daq_scan_ui.py,sha256=kKcXu2tNo-VJR7GQPNEXxMKiKitA4F3a_tOSamalWh0,10052
|
|
41
41
|
pymodaq/extensions/h5browser.py,sha256=7WbF2hj7sdU0kCqTxB4nXvfKGqUnoIsa2_AhCtCBNQo,1131
|
|
42
42
|
pymodaq/extensions/utils.py,sha256=18FvgD9vtwAvGdD01LiV0-jcGv0WNjYyDLSP-NFUjno,3042
|
|
@@ -86,7 +86,7 @@ pymodaq/utils/leco/desktop.ini,sha256=2zopClaSQqdFfIsC8CGo2Oc-14x9h1gV0-fUrDtLFm
|
|
|
86
86
|
pymodaq/utils/leco/director_utils.py,sha256=0inrKh5aI-1pQs3fTXYvmjvwZ6TiyEEAupr2Hw_pMj0,2105
|
|
87
87
|
pymodaq/utils/leco/leco_director.py,sha256=4QZVwU2tRM2OBNC4MV-a-JHDLgH_clJYKE8QVqymLgY,3145
|
|
88
88
|
pymodaq/utils/leco/pymodaq_listener.py,sha256=kK3IasfKAC8bYq7h95yqVyXkNROKdhzHeAZm_zOdNt8,10736
|
|
89
|
-
pymodaq/utils/leco/utils.py,sha256=
|
|
89
|
+
pymodaq/utils/leco/utils.py,sha256=RX24FFidWqyDOwqv-E9uO06vBeTdu5ZBZWXQQa995tI,2605
|
|
90
90
|
pymodaq/utils/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
91
|
pymodaq/utils/managers/batchscan_manager.py,sha256=rhz2qeVfePX0h8sjIY1tHQckIHIxKhH-zOIzvM0_1Ag,13666
|
|
92
92
|
pymodaq/utils/managers/modules_manager.py,sha256=LjYXl6TiFHUnoWpvX_Ht3uPg165C_klNgUVHI8suDbo,21076
|
|
@@ -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.
|
|
119
|
-
pymodaq-5.0.
|
|
120
|
-
pymodaq-5.0.
|
|
121
|
-
pymodaq-5.0.
|
|
122
|
-
pymodaq-5.0.
|
|
118
|
+
pymodaq-5.0.3.dist-info/METADATA,sha256=SdC4975JmDa4Hb5BcOtdFpOGnamJ3RWM-LfHgbh-454,12878
|
|
119
|
+
pymodaq-5.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
120
|
+
pymodaq-5.0.3.dist-info/entry_points.txt,sha256=DvPq6fmIPH2JNsCqHDhn1xEj1kX5tfuc7xQ8-l5S2EU,387
|
|
121
|
+
pymodaq-5.0.3.dist-info/licenses/LICENSE,sha256=VKOejxexXAe3XwfhAhcFGqeXQ12irxVHdeAojZwFEI8,1108
|
|
122
|
+
pymodaq-5.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|