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

Files changed (399) hide show
  1. pymodaq/__init__.py +30 -23
  2. pymodaq/control_modules/daq_move.py +27 -14
  3. pymodaq/control_modules/daq_move_ui.py +33 -16
  4. pymodaq/control_modules/daq_viewer.py +38 -28
  5. pymodaq/control_modules/daq_viewer_ui.py +6 -6
  6. pymodaq/control_modules/mocks.py +1 -1
  7. pymodaq/control_modules/move_utility_classes.py +19 -10
  8. pymodaq/control_modules/utils.py +18 -12
  9. pymodaq/control_modules/viewer_utility_classes.py +13 -4
  10. pymodaq/dashboard.py +166 -118
  11. pymodaq/examples/custom_app.py +13 -16
  12. pymodaq/examples/custom_viewer.py +7 -7
  13. pymodaq/examples/function_plotter.py +13 -12
  14. pymodaq/examples/parameter_ex.py +50 -25
  15. pymodaq/examples/tcp_client.py +1 -1
  16. pymodaq/extensions/__init__.py +1 -1
  17. pymodaq/extensions/bayesian/bayesian_optimisation.py +15 -12
  18. pymodaq/extensions/bayesian/utils.py +10 -10
  19. pymodaq/extensions/console.py +10 -13
  20. pymodaq/extensions/{daq_logger.py → daq_logger/daq_logger.py} +36 -56
  21. pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger.py +16 -15
  22. pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger_models.py +2 -0
  23. pymodaq/{utils/h5modules → extensions/daq_logger}/h5logging.py +7 -8
  24. pymodaq/extensions/daq_scan.py +153 -247
  25. pymodaq/extensions/daq_scan_ui.py +11 -9
  26. pymodaq/extensions/h5browser.py +8 -8
  27. pymodaq/extensions/pid/__init__.py +6 -3
  28. pymodaq/extensions/pid/daq_move_PID.py +4 -2
  29. pymodaq/extensions/pid/pid_controller.py +15 -12
  30. pymodaq/extensions/pid/utils.py +10 -5
  31. pymodaq/extensions/utils.py +5 -3
  32. pymodaq/post_treatment/load_and_plot.py +10 -7
  33. pymodaq/resources/preset_default.xml +1 -1
  34. pymodaq/utils/array_manipulation.py +4 -384
  35. pymodaq/utils/calibration_camera.py +12 -9
  36. pymodaq/utils/chrono_timer.py +7 -5
  37. pymodaq/utils/config.py +3 -450
  38. pymodaq/utils/daq_utils.py +6 -664
  39. pymodaq/utils/data.py +9 -2774
  40. pymodaq/utils/exceptions.py +0 -4
  41. pymodaq/utils/gui_utils/__init__.py +8 -8
  42. pymodaq/utils/gui_utils/loader_utils.py +38 -0
  43. pymodaq/utils/gui_utils/utils.py +6 -138
  44. pymodaq/utils/h5modules/__init__.py +0 -4
  45. pymodaq/utils/h5modules/module_saving.py +15 -8
  46. pymodaq/utils/leco/__init__.py +2 -2
  47. pymodaq/utils/leco/daq_move_LECODirector.py +2 -2
  48. pymodaq/utils/leco/daq_xDviewer_LECODirector.py +2 -2
  49. pymodaq/utils/leco/director_utils.py +2 -2
  50. pymodaq/utils/leco/leco_director.py +3 -3
  51. pymodaq/utils/leco/pymodaq_listener.py +2 -2
  52. pymodaq/utils/leco/utils.py +1 -1
  53. pymodaq/utils/logger.py +4 -76
  54. pymodaq/utils/managers/batchscan_manager.py +16 -19
  55. pymodaq/utils/managers/modules_manager.py +10 -7
  56. pymodaq/utils/managers/overshoot_manager.py +3 -5
  57. pymodaq/utils/managers/preset_manager.py +37 -15
  58. pymodaq/utils/managers/preset_manager_utils.py +11 -9
  59. pymodaq/utils/managers/remote_manager.py +12 -10
  60. pymodaq/utils/math_utils.py +4 -572
  61. pymodaq/utils/parameter/__init__.py +4 -11
  62. pymodaq/utils/parameter/utils.py +4 -299
  63. pymodaq/utils/scanner/scan_config.py +1 -1
  64. pymodaq/utils/scanner/scan_factory.py +16 -12
  65. pymodaq/utils/{plotting → scanner}/scan_selector.py +19 -20
  66. pymodaq/utils/scanner/scanner.py +10 -8
  67. pymodaq/utils/scanner/scanners/_1d_scanners.py +8 -5
  68. pymodaq/utils/scanner/scanners/_2d_scanners.py +5 -5
  69. pymodaq/utils/scanner/scanners/sequential.py +8 -8
  70. pymodaq/utils/scanner/scanners/tabular.py +9 -9
  71. pymodaq/utils/scanner/utils.py +6 -4
  72. pymodaq/utils/svg/svg_viewer2D.py +3 -4
  73. pymodaq/utils/tcp_ip/serializer.py +64 -16
  74. pymodaq/utils/tcp_ip/tcp_server_client.py +10 -8
  75. {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/METADATA +5 -3
  76. pymodaq-5.0.0.dist-info/RECORD +123 -0
  77. {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/WHEEL +1 -1
  78. pymodaq/post_treatment/process_to_scalar.py +0 -263
  79. pymodaq/resources/QtDesigner_Ressources/Icon_Library/1d.png +0 -0
  80. pymodaq/resources/QtDesigner_Ressources/Icon_Library/2d.png +0 -0
  81. pymodaq/resources/QtDesigner_Ressources/Icon_Library/3d.png +0 -0
  82. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add2.png +0 -0
  83. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add_Step.png +0 -0
  84. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve.png +0 -0
  85. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve_All.png +0 -0
  86. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Browse_Dir_Path.png +0 -0
  87. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Calculator.png +0 -0
  88. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnGroup.png +0 -0
  89. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnNum.png +0 -0
  90. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnText.png +0 -0
  91. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnTime.png +0 -0
  92. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnWave.png +0 -0
  93. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Close3.png +0 -0
  94. pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll.png +0 -0
  95. pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll_32.png +0 -0
  96. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ColorPicker.png +0 -0
  97. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Contract.png +0 -0
  98. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Create.png +0 -0
  99. pymodaq/resources/QtDesigner_Ressources/Icon_Library/DeleteLayer.png +0 -0
  100. pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditOpen.png +0 -0
  101. pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditRedo.png +0 -0
  102. pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditUndo.png +0 -0
  103. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Ellipse.png +0 -0
  104. pymodaq/resources/QtDesigner_Ressources/Icon_Library/EllipseFilled.png +0 -0
  105. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error.png +0 -0
  106. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ErrorMessage.png +0 -0
  107. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error_16.png +0 -0
  108. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Exit.png +0 -0
  109. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Expand.png +0 -0
  110. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll.png +0 -0
  111. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll_32.png +0 -0
  112. pymodaq/resources/QtDesigner_Ressources/Icon_Library/FFT.png +0 -0
  113. pymodaq/resources/QtDesigner_Ressources/Icon_Library/HLM.ico +0 -0
  114. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help.png +0 -0
  115. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help_32.png +0 -0
  116. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Histogram.png +0 -0
  117. pymodaq/resources/QtDesigner_Ressources/Icon_Library/LUT_LookUpTable.png +0 -0
  118. pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass.png +0 -0
  119. pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass_24.png +0 -0
  120. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Marker.png +0 -0
  121. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Math.png +0 -0
  122. pymodaq/resources/QtDesigner_Ressources/Icon_Library/MeasurementStudio_32.png +0 -0
  123. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Move.png +0 -0
  124. pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveDown.png +0 -0
  125. pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveUp.png +0 -0
  126. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Multiply.png +0 -0
  127. pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewFile.png +0 -0
  128. pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewLayer.png +0 -0
  129. pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_File.png +0 -0
  130. pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_Folder.png +0 -0
  131. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open.png +0 -0
  132. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_1D.png +0 -0
  133. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_2D.png +0 -0
  134. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File.png +0 -0
  135. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File_32.png +0 -0
  136. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_sim.png +0 -0
  137. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Options.png +0 -0
  138. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope.png +0 -0
  139. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope_16.png +0 -0
  140. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Pass.png +0 -0
  141. pymodaq/resources/QtDesigner_Ressources/Icon_Library/RGB.png +0 -0
  142. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rectangle.png +0 -0
  143. pymodaq/resources/QtDesigner_Ressources/Icon_Library/RectangleFilled.png +0 -0
  144. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Redo.png +0 -0
  145. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh.png +0 -0
  146. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh2.png +0 -0
  147. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh_32.png +0 -0
  148. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Region.png +0 -0
  149. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rendezvous.png +0 -0
  150. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SELECT.png +0 -0
  151. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save.png +0 -0
  152. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll.png +0 -0
  153. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll_32.png +0 -0
  154. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs.png +0 -0
  155. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs_32.png +0 -0
  156. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_24.png +0 -0
  157. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_32.png +0 -0
  158. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Search.png +0 -0
  159. pymodaq/resources/QtDesigner_Ressources/Icon_Library/SelectPolygon.png +0 -0
  160. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Select_24.png +0 -0
  161. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Settings.png +0 -0
  162. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snap&Save.png +0 -0
  163. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot.png +0 -0
  164. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2.png +0 -0
  165. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_16.png +0 -0
  166. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_32.png +0 -0
  167. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Spreadsheet.png +0 -0
  168. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics.png +0 -0
  169. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics2.png +0 -0
  170. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Status.png +0 -0
  171. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Subtract.png +0 -0
  172. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Vision.png +0 -0
  173. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Volts.png +0 -0
  174. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Wait2.png +0 -0
  175. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_1_1.png +0 -0
  176. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_in.png +0 -0
  177. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_out.png +0 -0
  178. pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_to_Selection.png +0 -0
  179. pymodaq/resources/QtDesigner_Ressources/Icon_Library/abort.png +0 -0
  180. pymodaq/resources/QtDesigner_Ressources/Icon_Library/advanced2.png +0 -0
  181. pymodaq/resources/QtDesigner_Ressources/Icon_Library/autoscale.png +0 -0
  182. pymodaq/resources/QtDesigner_Ressources/Icon_Library/b_icon.png +0 -0
  183. pymodaq/resources/QtDesigner_Ressources/Icon_Library/back.png +0 -0
  184. pymodaq/resources/QtDesigner_Ressources/Icon_Library/bg_icon.png +0 -0
  185. pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera.png +0 -0
  186. pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera_snap.png +0 -0
  187. pymodaq/resources/QtDesigner_Ressources/Icon_Library/cartesian.png +0 -0
  188. pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear2.png +0 -0
  189. pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear_ROI.png +0 -0
  190. pymodaq/resources/QtDesigner_Ressources/Icon_Library/close2.png +0 -0
  191. pymodaq/resources/QtDesigner_Ressources/Icon_Library/cluster2.png +0 -0
  192. pymodaq/resources/QtDesigner_Ressources/Icon_Library/color.png +0 -0
  193. pymodaq/resources/QtDesigner_Ressources/Icon_Library/color2.png +0 -0
  194. pymodaq/resources/QtDesigner_Ressources/Icon_Library/continuous.png +0 -0
  195. pymodaq/resources/QtDesigner_Ressources/Icon_Library/data.png +0 -0
  196. pymodaq/resources/QtDesigner_Ressources/Icon_Library/delay.png +0 -0
  197. pymodaq/resources/QtDesigner_Ressources/Icon_Library/download.png +0 -0
  198. pymodaq/resources/QtDesigner_Ressources/Icon_Library/download2.png +0 -0
  199. pymodaq/resources/QtDesigner_Ressources/Icon_Library/error2.png +0 -0
  200. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ethernet.png +0 -0
  201. pymodaq/resources/QtDesigner_Ressources/Icon_Library/exit2.png +0 -0
  202. pymodaq/resources/QtDesigner_Ressources/Icon_Library/fan.png +0 -0
  203. pymodaq/resources/QtDesigner_Ressources/Icon_Library/filter2.png +0 -0
  204. pymodaq/resources/QtDesigner_Ressources/Icon_Library/g_icon.png +0 -0
  205. pymodaq/resources/QtDesigner_Ressources/Icon_Library/gear2.png +0 -0
  206. pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to.png +0 -0
  207. pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_1.png +0 -0
  208. pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_2.png +0 -0
  209. pymodaq/resources/QtDesigner_Ressources/Icon_Library/grab.png +0 -0
  210. pymodaq/resources/QtDesigner_Ressources/Icon_Library/graph.png +0 -0
  211. pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2.png +0 -0
  212. pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2_32.png +0 -0
  213. pymodaq/resources/QtDesigner_Ressources/Icon_Library/green_light.png +0 -0
  214. pymodaq/resources/QtDesigner_Ressources/Icon_Library/grey_icon.png +0 -0
  215. pymodaq/resources/QtDesigner_Ressources/Icon_Library/greyscale.png +0 -0
  216. pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1.png +0 -0
  217. pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1_32.png +0 -0
  218. pymodaq/resources/QtDesigner_Ressources/Icon_Library/home2.png +0 -0
  219. pymodaq/resources/QtDesigner_Ressources/Icon_Library/information2.png +0 -0
  220. pymodaq/resources/QtDesigner_Ressources/Icon_Library/ini.png +0 -0
  221. pymodaq/resources/QtDesigner_Ressources/Icon_Library/integrator.png +0 -0
  222. pymodaq/resources/QtDesigner_Ressources/Icon_Library/joystick.png +0 -0
  223. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green.png +0 -0
  224. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green_16.png +0 -0
  225. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red.png +0 -0
  226. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red_16.png +0 -0
  227. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow.png +0 -0
  228. pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow_16.png +0 -0
  229. pymodaq/resources/QtDesigner_Ressources/Icon_Library/limiter.png +0 -0
  230. pymodaq/resources/QtDesigner_Ressources/Icon_Library/load_ROI.png +0 -0
  231. pymodaq/resources/QtDesigner_Ressources/Icon_Library/meshPlot.png +0 -0
  232. pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter.png +0 -0
  233. pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter2.png +0 -0
  234. pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter_32.png +0 -0
  235. pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_contour.png +0 -0
  236. pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_straight_line.png +0 -0
  237. pymodaq/resources/QtDesigner_Ressources/Icon_Library/movie.png +0 -0
  238. pymodaq/resources/QtDesigner_Ressources/Icon_Library/multi_point.png +0 -0
  239. pymodaq/resources/QtDesigner_Ressources/Icon_Library/multiplexer.png +0 -0
  240. pymodaq/resources/QtDesigner_Ressources/Icon_Library/new.png +0 -0
  241. pymodaq/resources/QtDesigner_Ressources/Icon_Library/openArrow.png +0 -0
  242. pymodaq/resources/QtDesigner_Ressources/Icon_Library/openTree.png +0 -0
  243. pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope2.png +0 -0
  244. pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope3.png +0 -0
  245. pymodaq/resources/QtDesigner_Ressources/Icon_Library/overlay.png +0 -0
  246. pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2.png +0 -0
  247. pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2_16.png +0 -0
  248. pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass_32.png +0 -0
  249. pymodaq/resources/QtDesigner_Ressources/Icon_Library/pause.png +0 -0
  250. pymodaq/resources/QtDesigner_Ressources/Icon_Library/permute.png +0 -0
  251. pymodaq/resources/QtDesigner_Ressources/Icon_Library/phase.png +0 -0
  252. pymodaq/resources/QtDesigner_Ressources/Icon_Library/play.png +0 -0
  253. pymodaq/resources/QtDesigner_Ressources/Icon_Library/polar.png +0 -0
  254. pymodaq/resources/QtDesigner_Ressources/Icon_Library/pole_zero.png +0 -0
  255. pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerMeter.png +0 -0
  256. pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch.png +0 -0
  257. pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch_16.png +0 -0
  258. pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2.png +0 -0
  259. pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2_32.png +0 -0
  260. pymodaq/resources/QtDesigner_Ressources/Icon_Library/properties.png +0 -0
  261. pymodaq/resources/QtDesigner_Ressources/Icon_Library/r_icon.png +0 -0
  262. pymodaq/resources/QtDesigner_Ressources/Icon_Library/radiocontrolbutton.png +0 -0
  263. pymodaq/resources/QtDesigner_Ressources/Icon_Library/read2.png +0 -0
  264. pymodaq/resources/QtDesigner_Ressources/Icon_Library/red_light.png +0 -0
  265. pymodaq/resources/QtDesigner_Ressources/Icon_Library/remove.png +0 -0
  266. pymodaq/resources/QtDesigner_Ressources/Icon_Library/reset.png +0 -0
  267. pymodaq/resources/QtDesigner_Ressources/Icon_Library/rgb_icon.png +0 -0
  268. pymodaq/resources/QtDesigner_Ressources/Icon_Library/robot.png +0 -0
  269. pymodaq/resources/QtDesigner_Ressources/Icon_Library/rotation2.png +0 -0
  270. pymodaq/resources/QtDesigner_Ressources/Icon_Library/run2.png +0 -0
  271. pymodaq/resources/QtDesigner_Ressources/Icon_Library/run_all.png +0 -0
  272. pymodaq/resources/QtDesigner_Ressources/Icon_Library/saturation.png +0 -0
  273. pymodaq/resources/QtDesigner_Ressources/Icon_Library/saveTree.png +0 -0
  274. pymodaq/resources/QtDesigner_Ressources/Icon_Library/save_ROI.png +0 -0
  275. pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_horizontally.png +0 -0
  276. pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_vertically.png +0 -0
  277. pymodaq/resources/QtDesigner_Ressources/Icon_Library/search2.png +0 -0
  278. pymodaq/resources/QtDesigner_Ressources/Icon_Library/select2.png +0 -0
  279. pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all.png +0 -0
  280. pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all2.png +0 -0
  281. pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_none.png +0 -0
  282. pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence.png +0 -0
  283. pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence2.png +0 -0
  284. pymodaq/resources/QtDesigner_Ressources/Icon_Library/snap.png +0 -0
  285. pymodaq/resources/QtDesigner_Ressources/Icon_Library/sort_ascend.png +0 -0
  286. pymodaq/resources/QtDesigner_Ressources/Icon_Library/spectrumAnalyzer.png +0 -0
  287. pymodaq/resources/QtDesigner_Ressources/Icon_Library/start.png +0 -0
  288. pymodaq/resources/QtDesigner_Ressources/Icon_Library/status_cancelled.png +0 -0
  289. pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop.png +0 -0
  290. pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop2.png +0 -0
  291. pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop3.png +0 -0
  292. pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop_all.png +0 -0
  293. pymodaq/resources/QtDesigner_Ressources/Icon_Library/sum.png +0 -0
  294. pymodaq/resources/QtDesigner_Ressources/Icon_Library/surfacePlot.png +0 -0
  295. pymodaq/resources/QtDesigner_Ressources/Icon_Library/tree.png +0 -0
  296. pymodaq/resources/QtDesigner_Ressources/Icon_Library/updateTree.png +0 -0
  297. pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility2.png +0 -0
  298. pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility_small.png +0 -0
  299. pymodaq/resources/QtDesigner_Ressources/Icon_Library/vector.png +0 -0
  300. pymodaq/resources/QtDesigner_Ressources/Icon_Library/verify.png +0 -0
  301. pymodaq/resources/QtDesigner_Ressources/Icon_Library/video.png +0 -0
  302. pymodaq/resources/QtDesigner_Ressources/Icon_Library/wait.png +0 -0
  303. pymodaq/resources/QtDesigner_Ressources/Icon_Library/waterfallPlot.png +0 -0
  304. pymodaq/resources/QtDesigner_Ressources/Icon_Library/watershed.png +0 -0
  305. pymodaq/resources/QtDesigner_Ressources/Icon_Library/yellow_light.png +0 -0
  306. pymodaq/resources/QtDesigner_Ressources/Icon_Library/zip_file.png +0 -0
  307. pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomAuto.png +0 -0
  308. pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomReset.png +0 -0
  309. pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.bat +0 -2
  310. pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.qrc +0 -234
  311. pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources_rc.py +0 -127150
  312. pymodaq/resources/QtDesigner_Ressources/icons.svg +0 -142
  313. pymodaq/resources/VERSION +0 -1
  314. pymodaq/resources/config_template.toml +0 -90
  315. pymodaq/resources/triangulation_data.npy +0 -0
  316. pymodaq/utils/abstract/__init__.py +0 -48
  317. pymodaq/utils/db/__init__.py +0 -0
  318. pymodaq/utils/db/db_logger/__init__.py +0 -0
  319. pymodaq/utils/enums.py +0 -76
  320. pymodaq/utils/factory.py +0 -82
  321. pymodaq/utils/gui_utils/custom_app.py +0 -133
  322. pymodaq/utils/gui_utils/dock.py +0 -107
  323. pymodaq/utils/gui_utils/file_io.py +0 -93
  324. pymodaq/utils/gui_utils/layout.py +0 -34
  325. pymodaq/utils/gui_utils/list_picker.py +0 -38
  326. pymodaq/utils/gui_utils/widgets/__init__.py +0 -5
  327. pymodaq/utils/gui_utils/widgets/label.py +0 -24
  328. pymodaq/utils/gui_utils/widgets/lcd.py +0 -111
  329. pymodaq/utils/gui_utils/widgets/push.py +0 -149
  330. pymodaq/utils/gui_utils/widgets/qled.py +0 -62
  331. pymodaq/utils/gui_utils/widgets/spinbox.py +0 -24
  332. pymodaq/utils/gui_utils/widgets/table.py +0 -263
  333. pymodaq/utils/gui_utils/widgets/tree_layout.py +0 -188
  334. pymodaq/utils/gui_utils/widgets/tree_toml.py +0 -102
  335. pymodaq/utils/h5modules/backends.py +0 -1022
  336. pymodaq/utils/h5modules/browsing.py +0 -625
  337. pymodaq/utils/h5modules/data_saving.py +0 -1101
  338. pymodaq/utils/h5modules/exporter.py +0 -119
  339. pymodaq/utils/h5modules/exporters/__init__.py +0 -0
  340. pymodaq/utils/h5modules/exporters/base.py +0 -111
  341. pymodaq/utils/h5modules/exporters/flimj.py +0 -63
  342. pymodaq/utils/h5modules/exporters/hyperspy.py +0 -143
  343. pymodaq/utils/h5modules/saving.py +0 -866
  344. pymodaq/utils/h5modules/utils.py +0 -115
  345. pymodaq/utils/managers/action_manager.py +0 -489
  346. pymodaq/utils/managers/parameter_manager.py +0 -282
  347. pymodaq/utils/managers/roi_manager.py +0 -726
  348. pymodaq/utils/messenger.py +0 -66
  349. pymodaq/utils/parameter/ioxml.py +0 -542
  350. pymodaq/utils/parameter/pymodaq_ptypes/__init__.py +0 -38
  351. pymodaq/utils/parameter/pymodaq_ptypes/bool.py +0 -31
  352. pymodaq/utils/parameter/pymodaq_ptypes/date.py +0 -126
  353. pymodaq/utils/parameter/pymodaq_ptypes/filedir.py +0 -143
  354. pymodaq/utils/parameter/pymodaq_ptypes/itemselect.py +0 -265
  355. pymodaq/utils/parameter/pymodaq_ptypes/led.py +0 -44
  356. pymodaq/utils/parameter/pymodaq_ptypes/list.py +0 -150
  357. pymodaq/utils/parameter/pymodaq_ptypes/numeric.py +0 -18
  358. pymodaq/utils/parameter/pymodaq_ptypes/pixmap.py +0 -175
  359. pymodaq/utils/parameter/pymodaq_ptypes/slide.py +0 -145
  360. pymodaq/utils/parameter/pymodaq_ptypes/table.py +0 -135
  361. pymodaq/utils/parameter/pymodaq_ptypes/tableview.py +0 -149
  362. pymodaq/utils/parameter/pymodaq_ptypes/text.py +0 -142
  363. pymodaq/utils/plotting/__init__.py +0 -0
  364. pymodaq/utils/plotting/data_viewers/__init__.py +0 -10
  365. pymodaq/utils/plotting/data_viewers/base.py +0 -286
  366. pymodaq/utils/plotting/data_viewers/viewer.py +0 -274
  367. pymodaq/utils/plotting/data_viewers/viewer0D.py +0 -298
  368. pymodaq/utils/plotting/data_viewers/viewer1D.py +0 -820
  369. pymodaq/utils/plotting/data_viewers/viewer1Dbasic.py +0 -231
  370. pymodaq/utils/plotting/data_viewers/viewer2D.py +0 -1118
  371. pymodaq/utils/plotting/data_viewers/viewer2D_basic.py +0 -146
  372. pymodaq/utils/plotting/data_viewers/viewerND.py +0 -800
  373. pymodaq/utils/plotting/gant_chart.py +0 -123
  374. pymodaq/utils/plotting/image_viewer.py +0 -97
  375. pymodaq/utils/plotting/items/__init__.py +0 -0
  376. pymodaq/utils/plotting/items/axis_scaled.py +0 -93
  377. pymodaq/utils/plotting/items/crosshair.py +0 -94
  378. pymodaq/utils/plotting/items/image.py +0 -388
  379. pymodaq/utils/plotting/navigator.py +0 -353
  380. pymodaq/utils/plotting/plotter/plotter.py +0 -94
  381. pymodaq/utils/plotting/plotter/plotters/__init__.py +0 -0
  382. pymodaq/utils/plotting/plotter/plotters/matplotlib_plotters.py +0 -134
  383. pymodaq/utils/plotting/plotter/plotters/qt_plotters.py +0 -78
  384. pymodaq/utils/plotting/utils/__init__.py +0 -0
  385. pymodaq/utils/plotting/utils/axes_viewer.py +0 -88
  386. pymodaq/utils/plotting/utils/filter.py +0 -585
  387. pymodaq/utils/plotting/utils/lineout.py +0 -226
  388. pymodaq/utils/plotting/utils/plot_utils.py +0 -579
  389. pymodaq/utils/plotting/utils/signalND.py +0 -1347
  390. pymodaq/utils/plotting/widgets.py +0 -76
  391. pymodaq/utils/qvariant.py +0 -12
  392. pymodaq/utils/slicing.py +0 -63
  393. pymodaq/utils/units.py +0 -216
  394. pymodaq-4.2.3.dist-info/RECORD +0 -438
  395. /pymodaq/{post_treatment/daq_analysis → extensions/daq_logger}/__init__.py +0 -0
  396. /pymodaq/{utils/abstract/logger.py → extensions/daq_logger/abstract.py} +0 -0
  397. /pymodaq/{resources/QtDesigner_Ressources → extensions/daq_logger/db}/__init__.py +0 -0
  398. {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/entry_points.txt +0 -0
  399. {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/licenses/LICENSE +0 -0
pymodaq/dashboard.py CHANGED
@@ -13,31 +13,33 @@ from qtpy.QtCore import Qt, QObject, Slot, QThread, Signal
13
13
  from time import perf_counter
14
14
  import numpy as np
15
15
 
16
- from pymodaq.utils.logger import set_logger, get_module_name
17
- from pymodaq.utils.gui_utils import DockArea, Dock, select_file
18
- import pymodaq.utils.gui_utils.layout as layout_mod
19
- from pymodaq.utils.gui_utils.utils import start_qapplication
20
- from pymodaq.utils.messenger import messagebox
21
- from pymodaq.utils.parameter import utils as putils
22
- from pymodaq.utils import daq_utils as utils
16
+ from pymodaq_plugin_manager.manager import PluginManager
17
+ from pymodaq_plugin_manager.validate import get_pypi_pymodaq
18
+
19
+ from pymodaq_utils.logger import set_logger, get_module_name
20
+ from pymodaq_utils import utils
21
+ from pymodaq_utils.utils import get_version, find_dict_in_list_from_key_val
22
+ from pymodaq_utils import config as configmod
23
+
24
+ from pymodaq_gui.parameter import ParameterTree, Parameter
25
+ from pymodaq_gui.utils import DockArea, Dock, select_file
26
+ import pymodaq_gui.utils.layout as layout_mod
27
+ from pymodaq_gui.messenger import messagebox
28
+ from pymodaq_gui.parameter import utils as putils
29
+ from pymodaq_gui.managers.roi_manager import ROISaver
30
+
23
31
  from pymodaq.utils.managers.modules_manager import ModulesManager
24
- from pymodaq.utils.daq_utils import get_version, find_dict_in_list_from_key_val
25
32
  from pymodaq.utils.managers.preset_manager import PresetManager
26
33
  from pymodaq.utils.managers.overshoot_manager import OvershootManager
27
34
  from pymodaq.utils.managers.remote_manager import RemoteManager
28
- from pymodaq.utils.managers.roi_manager import ROISaver
29
35
  from pymodaq.utils.exceptions import DetectorError, ActuatorError, PIDError, MasterSlaveError
30
- from pymodaq.utils import config as configmod
31
- from pymodaq.utils.parameter import ParameterTree, Parameter
36
+ from pymodaq.utils.daq_utils import get_instrument_plugins
32
37
  from pymodaq.utils.leco.utils import start_coordinator
38
+ from pymodaq.utils import config as config_mod_pymodaq
33
39
  from pymodaq.control_modules.daq_move import DAQ_Move
34
40
  from pymodaq.control_modules.daq_viewer import DAQ_Viewer
35
-
36
41
  from pymodaq import extensions as extmod
37
42
 
38
- from pymodaq_plugin_manager.manager import PluginManager
39
- from pymodaq_plugin_manager.validate import get_pypi_pymodaq
40
- from pymodaq.utils.daq_utils import get_instrument_plugins
41
43
 
42
44
  get_instrument_plugins()
43
45
 
@@ -47,12 +49,12 @@ config = configmod.Config()
47
49
 
48
50
  local_path = configmod.get_set_local_dir()
49
51
  now = datetime.datetime.now()
50
- preset_path = configmod.get_set_preset_path()
52
+ preset_path = config_mod_pymodaq.get_set_preset_path()
51
53
  log_path = configmod.get_set_log_path()
52
- layout_path = configmod.get_set_layout_path()
53
- overshoot_path = configmod.get_set_overshoot_path()
54
- roi_path = configmod.get_set_roi_path()
55
- remote_path = configmod.get_set_remote_path()
54
+ layout_path = config_mod_pymodaq.get_set_layout_path()
55
+ overshoot_path = config_mod_pymodaq.get_set_overshoot_path()
56
+ roi_path = config_mod_pymodaq.get_set_roi_path()
57
+ remote_path = config_mod_pymodaq.get_set_remote_path()
56
58
 
57
59
  extensions = extmod.get_extensions()
58
60
 
@@ -124,11 +126,13 @@ class DashBoard(QObject):
124
126
 
125
127
  def set_extra_preset_params(self, params, param_options=[]):
126
128
  self.extra_params = params
127
- self.preset_manager = PresetManager(path=self.preset_path, extra_params=params, param_options=param_options)
129
+ self.preset_manager = PresetManager(path=self.preset_path, extra_params=params,
130
+ param_options=param_options)
128
131
 
129
132
  def add_status(self, txt):
130
133
  """
131
- Add the QListWisgetItem initialized with txt informations to the User Interface logger_list and to the save_parameters.logger array.
134
+ Add the QListWisgetItem initialized with txt informations to the User Interface
135
+ logger_list and to the save_parameters.logger array.
132
136
 
133
137
  =============== =========== ======================
134
138
  **Parameters** **Type** **Description**
@@ -229,13 +233,14 @@ class DashBoard(QObject):
229
233
  return self.bayesian_module
230
234
 
231
235
  def load_extension_from_name(self, name: str) -> dict:
232
- self.load_extensions_module(find_dict_in_list_from_key_val(extensions, 'name', name))
236
+ return self.load_extensions_module(find_dict_in_list_from_key_val(extensions, 'name', name))
233
237
 
234
238
  def load_extensions_module(self, ext: dict):
235
239
  """ Init and load an extension from a plugin package
236
240
 
237
241
  ext: dict
238
- dictionary containing info on the extension plugin package and class to be loaded, it contains four
242
+ dictionary containing info on the extension plugin package and class to be loaded,
243
+ it contains four
239
244
  keys:
240
245
 
241
246
  * pkg: the name of the plugin package
@@ -255,7 +260,7 @@ class DashBoard(QObject):
255
260
  self.extension_windows[-1].setWindowTitle(ext['name'])
256
261
  module = import_module(f"{ext['pkg']}.extensions.{ext['module']}")
257
262
  klass = getattr(module, ext['class_name'])
258
- self.extensions[ext['class_name']] = klass(dockarea=area, dashboard=self)
263
+ self.extensions[ext['class_name']] = klass(area, dashboard=self)
259
264
  self.extension_windows[-1].show()
260
265
  return self.extensions[ext['class_name']]
261
266
 
@@ -317,12 +322,13 @@ class DashBoard(QObject):
317
322
  load_overshoot = self.overshoot_menu.addMenu('Load Overshoots')
318
323
 
319
324
  slots_over = dict([])
320
- for ind_file, file in enumerate(configmod.get_set_overshoot_path().iterdir()):
325
+ for ind_file, file in enumerate(config_mod_pymodaq.get_set_overshoot_path().iterdir()):
321
326
  if file.suffix == '.xml':
322
327
  filestem = file.stem
323
328
  slots_over[filestem] = load_overshoot.addAction(filestem)
324
329
  slots_over[filestem].triggered.connect(
325
- self.create_menu_slot_over(configmod.get_set_overshoot_path().joinpath(file)))
330
+ self.create_menu_slot_over(
331
+ config_mod_pymodaq.get_set_overshoot_path().joinpath(file)))
326
332
 
327
333
  self.roi_menu = menubar.addMenu('ROI Modes')
328
334
  action_new_roi = self.roi_menu.addAction('Save Current ROIs as a file')
@@ -333,12 +339,12 @@ class DashBoard(QObject):
333
339
  load_roi = self.roi_menu.addMenu('Load roi configs')
334
340
 
335
341
  slots = dict([])
336
- for ind_file, file in enumerate(configmod.get_set_roi_path().iterdir()):
342
+ for ind_file, file in enumerate(config_mod_pymodaq.get_set_roi_path().iterdir()):
337
343
  if file.suffix == '.xml':
338
344
  filestem = file.stem
339
345
  slots[filestem] = load_roi.addAction(filestem)
340
346
  slots[filestem].triggered.connect(
341
- self.create_menu_slot_roi(configmod.get_set_roi_path().joinpath(file)))
347
+ self.create_menu_slot_roi(config_mod_pymodaq.get_set_roi_path().joinpath(file)))
342
348
 
343
349
  self.remote_menu = menubar.addMenu('Remote/Shortcuts Control')
344
350
  self.remote_menu.addAction('New remote config.', self.create_remote)
@@ -347,12 +353,13 @@ class DashBoard(QObject):
347
353
  load_remote = self.remote_menu.addMenu('Load remote config.')
348
354
 
349
355
  slots = dict([])
350
- for ind_file, file in enumerate(configmod.get_set_remote_path().iterdir()):
356
+ for ind_file, file in enumerate(config_mod_pymodaq.get_set_remote_path().iterdir()):
351
357
  if file.suffix == '.xml':
352
358
  filestem = file.stem
353
359
  slots[filestem] = load_remote.addAction(filestem)
354
360
  slots[filestem].triggered.connect(
355
- self.create_menu_slot_remote(configmod.get_set_remote_path().joinpath(file)))
361
+ self.create_menu_slot_remote(
362
+ config_mod_pymodaq.get_set_remote_path().joinpath(file)))
356
363
 
357
364
  # actions menu
358
365
  self.actions_menu = menubar.addMenu('Extensions')
@@ -449,7 +456,8 @@ class DashBoard(QObject):
449
456
 
450
457
  def modify_remote(self):
451
458
  try:
452
- path = select_file(start_path=configmod.get_set_remote_path(), save=False, ext='xml')
459
+ path = select_file(start_path=config_mod_pymodaq.get_set_remote_path(), save=False,
460
+ ext='xml')
453
461
  if path != '':
454
462
  self.remote_manager.set_file_remote(path)
455
463
 
@@ -460,7 +468,8 @@ class DashBoard(QObject):
460
468
 
461
469
  def modify_overshoot(self):
462
470
  try:
463
- path = select_file(start_path=configmod.get_set_overshoot_path(), save=False, ext='xml')
471
+ path = select_file(start_path=config_mod_pymodaq.get_set_overshoot_path(),
472
+ save=False, ext='xml')
464
473
  if path != '':
465
474
  self.overshoot_manager.set_file_overshoot(path)
466
475
 
@@ -471,7 +480,8 @@ class DashBoard(QObject):
471
480
 
472
481
  def modify_roi(self):
473
482
  try:
474
- path = select_file(start_path=configmod.get_set_roi_path(), save=False, ext='xml')
483
+ path = select_file(start_path=config_mod_pymodaq.get_set_roi_path(),
484
+ save=False, ext='xml')
475
485
  if path != '':
476
486
  self.roi_saver.set_file_roi(path)
477
487
 
@@ -490,9 +500,10 @@ class DashBoard(QObject):
490
500
  self.remove_preset_related_files(path.name)
491
501
  if self.detector_modules:
492
502
  mssg = QtWidgets.QMessageBox()
493
- mssg.setText('You have to restart the application to take the modifications into account!\n\n'
494
- 'The related files: ROI, Layout, Overshoot and Remote will be deleted'
495
- ' if existing!\n\n'
503
+ mssg.setText('You have to restart the application to take the modifications'
504
+ ' into account!\n\n'
505
+ 'The related files: ROI, Layout, Overshoot and Remote will be'
506
+ ' deleted if existing!\n\n'
496
507
  'Quitting the application...')
497
508
  mssg.exec()
498
509
  self.restart_fun()
@@ -503,10 +514,10 @@ class DashBoard(QObject):
503
514
  logger.exception(str(e))
504
515
 
505
516
  def remove_preset_related_files(self, name):
506
- configmod.get_set_roi_path().joinpath(name).unlink(missing_ok=True)
507
- configmod.get_set_layout_path().joinpath(name).unlink(missing_ok=True)
508
- configmod.get_set_overshoot_path().joinpath(name).unlink(missing_ok=True)
509
- configmod.get_set_remote_path().joinpath(name).unlink(missing_ok=True)
517
+ config_mod_pymodaq.get_set_roi_path().joinpath(name).unlink(missing_ok=True)
518
+ config_mod_pymodaq.get_set_layout_path().joinpath(name).unlink(missing_ok=True)
519
+ config_mod_pymodaq.get_set_overshoot_path().joinpath(name).unlink(missing_ok=True)
520
+ config_mod_pymodaq.get_set_remote_path().joinpath(name).unlink(missing_ok=True)
510
521
 
511
522
  def quit_fun(self):
512
523
  """
@@ -564,7 +575,8 @@ class DashBoard(QObject):
564
575
  ret = False
565
576
  mssg = QtWidgets.QMessageBox()
566
577
  if ask:
567
- mssg.setText('You have to restart the application to take the modifications into account!')
578
+ mssg.setText('You have to restart the application to take the'
579
+ ' modifications into account!')
568
580
  mssg.setInformativeText("Do you want to restart?")
569
581
  mssg.setStandardButtons(mssg.Ok | mssg.Cancel)
570
582
  ret = mssg.exec()
@@ -606,7 +618,8 @@ class DashBoard(QObject):
606
618
  path = layout_path.joinpath(self.preset_file.stem + '.dock')
607
619
  self.save_layout_state(path)
608
620
 
609
- def add_move(self, plug_name, plug_settings, plug_type, move_docks, move_forms, actuators_modules):
621
+ def add_move(self, plug_name, plug_settings, plug_type, move_docks, move_forms,
622
+ actuators_modules):
610
623
 
611
624
  move_docks.append(Dock(plug_name, size=(150, 250)))
612
625
  if len(move_docks) == 1:
@@ -634,14 +647,16 @@ class DashBoard(QObject):
634
647
  move_docks[-1].addWidget(move_forms[-1])
635
648
  actuators_modules.append(mov_mod_tmp)
636
649
 
637
- def add_det(self, plug_name, plug_settings, det_docks_settings, det_docks_viewer, detector_modules):
650
+ def add_det(self, plug_name, plug_settings, det_docks_settings, det_docks_viewer,
651
+ detector_modules):
638
652
 
639
653
  plug_type = plug_settings.child('main_settings', 'DAQ_type').value()
640
654
  plug_subtype = plug_settings.child('main_settings', 'detector_type').value()
641
655
  det_docks_settings.append(Dock(plug_name + " settings", size=(150, 250)))
642
656
  det_docks_viewer.append(Dock(plug_name + " viewer", size=(350, 350)))
643
657
  if len(detector_modules) == 0:
644
- self.logger_dock.area.addDock(det_docks_settings[-1], 'bottom') # dockarea of the logger dock
658
+ self.logger_dock.area.addDock(det_docks_settings[-1], 'bottom')
659
+ # dockarea of the logger dock
645
660
  else:
646
661
  self.dockarea.addDock(det_docks_settings[-1], 'right',
647
662
  detector_modules[-1].viewer_docks[-1])
@@ -705,12 +720,13 @@ class DashBoard(QObject):
705
720
  for plug in plugins:
706
721
  plug['ID'] = plug['value'].child('params', 'main_settings', 'controller_ID').value()
707
722
  if plug["type"] == 'det':
708
- plug['status'] = plug['value'].child('params', 'detector_settings', 'controller_status').value()
723
+ plug['status'] = plug['value'].child(
724
+ 'params', 'detector_settings', 'controller_status').value()
709
725
  else:
710
- if 'multiaxes' in [child.name() for child in plug['value'].child('params',
711
- 'move_settings').children()]:
712
- plug['status'] = plug['value'].child('params', 'move_settings',
713
- 'multiaxes', 'multi_status').value()
726
+ if 'multiaxes' in [child.name() for child in plug['value'].child(
727
+ 'params', 'move_settings').children()]:
728
+ plug['status'] = plug['value'].child(
729
+ 'params', 'move_settings', 'multiaxes', 'multi_status').value()
714
730
  else:
715
731
  plug['status'] = 'Master'
716
732
 
@@ -733,8 +749,9 @@ class DashBoard(QObject):
733
749
  plug_name = plugin['value'].child('name').value()
734
750
  plug_init = plugin['value'].child('init').value()
735
751
  plug_settings = plugin['value'].child('params')
736
- self.splash_sc.showMessage('Loading {:s} module: {:s}'.format(plugin['type'], plug_name),
737
- color=Qt.white)
752
+ self.splash_sc.showMessage(
753
+ 'Loading {:s} module: {:s}'.format(plugin['type'], plug_name),
754
+ color=Qt.white)
738
755
 
739
756
  if plugin['type'] == 'move':
740
757
  plug_type = plug_settings.child('main_settings', 'move_type').value()
@@ -752,10 +769,11 @@ class DashBoard(QObject):
752
769
  QtWidgets.QApplication.processEvents()
753
770
  master_controller = actuators_modules[-1].controller
754
771
  elif plugin['status'] == "Master" and len(plug_IDs) > 1:
755
- raise MasterSlaveError(f'The instrument {plug_name} defined as Master has to be '
756
- f'initialized (init checked in the preset) in order to init '
757
- f'its associated slave instrument'
758
- )
772
+ raise MasterSlaveError(
773
+ f'The instrument {plug_name} defined as Master has to be '
774
+ f'initialized (init checked in the preset) in order to init '
775
+ f'its associated slave instrument'
776
+ )
759
777
  else:
760
778
  if plugin['status'] != "Slave":
761
779
  raise MasterSlaveError(f'The instrument {plug_name} should'
@@ -783,10 +801,11 @@ class DashBoard(QObject):
783
801
  QtWidgets.QApplication.processEvents()
784
802
  master_controller = detector_modules[-1].controller
785
803
  elif plugin['status'] == "Master" and len(plug_IDs) > 1:
786
- raise MasterSlaveError(f'The instrument {plug_name} defined as Master has to be '
787
- f'initialized (init checked in the preset) in order to init '
788
- f'its associated slave instrument'
789
- )
804
+ raise MasterSlaveError(
805
+ f'The instrument {plug_name} defined as Master has to be '
806
+ f'initialized (init checked in the preset) in order to init '
807
+ f'its associated slave instrument'
808
+ )
790
809
  else:
791
810
  if plugin['status'] != "Slave":
792
811
  raise MasterSlaveError(f'The instrument {plug_name} should'
@@ -875,7 +894,8 @@ class DashBoard(QObject):
875
894
  if remote_action['action_type'] == 'shortcut':
876
895
  if remote_action['action_name'] not in self.shortcuts:
877
896
  self.shortcuts[remote_action['action_name']] = \
878
- QtWidgets.QShortcut(QtGui.QKeySequence(remote_action['action_dict']['shortcut']), self.dockarea)
897
+ QtWidgets.QShortcut(
898
+ QtGui.QKeySequence(remote_action['action_dict']['shortcut']), self.dockarea)
879
899
  self.activate_shortcut(self.shortcuts[remote_action['action_name']],
880
900
  remote_action['action_dict'],
881
901
  activate=remote_action['action_dict']['activated'])
@@ -918,18 +938,20 @@ class DashBoard(QObject):
918
938
  contained in self.joysticks
919
939
  """
920
940
 
921
- # # Specifi action for axis to get their values even if it doesn't change (in which case it would'nt trigger events)
922
941
  for action_dict in self.joysticks.values():
923
942
  if action_dict['activated'] and action_dict['actionner_type'].lower() == 'axis':
924
943
  if action_dict['module_type'] == 'act':
925
- joy = utils.find_dict_in_list_from_key_val(self.joysticks_obj, 'id', action_dict['joystickID'])
944
+ joy = utils.find_dict_in_list_from_key_val(self.joysticks_obj, 'id',
945
+ action_dict['joystickID'])
926
946
  val = joy['obj'].get_axis(action_dict['actionnerID'])
927
947
  if abs(val) > 1e-4:
928
- module = self.modules_manager.get_mod_from_name(action_dict['module_name'],
929
- mod=action_dict['module_type'])
948
+ module = self.modules_manager.get_mod_from_name(
949
+ action_dict['module_name'],
950
+ mod=action_dict['module_type'])
930
951
  action = getattr(module, action_dict['action'])
931
952
  if module.move_done_bool:
932
- action(val * 1 * module.settings.child('move_settings', 'epsilon').value())
953
+ action(val * 1 * module.settings.child(
954
+ 'move_settings', 'epsilon').value())
933
955
 
934
956
  # # For other actions use the event loop
935
957
  for event in self.pygame.event.get(): # User did something.
@@ -945,18 +967,21 @@ class DashBoard(QObject):
945
967
  if len(selection) > 1:
946
968
  for action_dict in self.joysticks.values():
947
969
  if action_dict['activated']:
948
- module = self.modules_manager.get_mod_from_name(action_dict['module_name'],
949
- mod=action_dict['module_type'])
970
+ module = self.modules_manager.get_mod_from_name(
971
+ action_dict['module_name'],
972
+ mod=action_dict['module_type'])
950
973
  if action_dict['module_type'] == 'det':
951
974
  action = getattr(module, action_dict['action'])
952
975
  else:
953
976
  action = getattr(module, action_dict['action'])
954
977
 
955
978
  if action_dict['joystickID'] == selection['joy']:
956
- if action_dict['actionner_type'].lower() == 'button' and 'button' in selection:
979
+ if (action_dict['actionner_type'].lower() == 'button' and
980
+ 'button' in selection):
957
981
  if action_dict['actionnerID'] == selection['button']:
958
982
  action()
959
- elif action_dict['actionner_type'].lower() == 'hat' and 'hat' in selection:
983
+ elif (action_dict['actionner_type'].lower() == 'hat' and
984
+ 'hat' in selection):
960
985
  if action_dict['actionnerID'] == selection['hat']:
961
986
  action(selection['value'])
962
987
 
@@ -964,7 +989,8 @@ class DashBoard(QObject):
964
989
 
965
990
  def activate_shortcut(self, shortcut, action=None, activate=True):
966
991
  """
967
- action = dict(shortcut=action.child(('shortcut')).value(), activated=True, name=f'action{ind:02d}',
992
+ action = dict(shortcut=action.child(('shortcut')).value(), activated=True,
993
+ name=f'action{ind:02d}',
968
994
  action=action.child(('action')).value(), module_name=module)
969
995
  Parameters
970
996
  ----------
@@ -986,7 +1012,8 @@ class DashBoard(QObject):
986
1012
  pass
987
1013
 
988
1014
  def create_activated_shortcut(self, action):
989
- module = self.modules_manager.get_mod_from_name(action['module_name'], mod=action['module_type'])
1015
+ module = self.modules_manager.get_mod_from_name(action['module_name'],
1016
+ mod=action['module_type'])
990
1017
  if action['module_type'] == 'det':
991
1018
  return lambda: getattr(module, action['action'])()
992
1019
  else:
@@ -1007,19 +1034,23 @@ class DashBoard(QObject):
1007
1034
  det_titles = [det.title for det in self.detector_modules]
1008
1035
  move_titles = [move.title for move in self.actuators_modules]
1009
1036
 
1010
- for det_param in self.overshoot_manager.overshoot_params.child(('Detectors')).children():
1037
+ for det_param in self.overshoot_manager.overshoot_params.child(
1038
+ 'Detectors').children():
1011
1039
  if det_param.child(('trig_overshoot')).value():
1012
1040
  det_index = det_titles.index(det_param.opts['title'])
1013
1041
  det_module = self.detector_modules[det_index]
1014
- det_module.settings.child('main_settings', 'overshoot', 'stop_overshoot').setValue(True)
1015
- det_module.settings.child('main_settings', 'overshoot', 'overshoot_value').setValue(
1016
- det_param.child(('overshoot_value')).value())
1042
+ det_module.settings.child(
1043
+ 'main_settings', 'overshoot', 'stop_overshoot').setValue(True)
1044
+ det_module.settings.child(
1045
+ 'main_settings', 'overshoot', 'overshoot_value').setValue(
1046
+ det_param['overshoot_value'])
1017
1047
  for move_param in det_param.child(('params')).children():
1018
- if move_param.child(('move_overshoot')).value():
1048
+ if move_param['move_overshoot']:
1019
1049
  move_index = move_titles.index(move_param.opts['title'])
1020
1050
  move_module = self.actuators_modules[move_index]
1021
1051
  det_module.overshoot_signal.connect(
1022
- self.create_overshoot_fun(move_module, move_param.child(('position')).value()))
1052
+ self.create_overshoot_fun(
1053
+ move_module, move_param['position']))
1023
1054
 
1024
1055
  except Exception as e:
1025
1056
  logger.exception(str(e))
@@ -1038,10 +1069,12 @@ class DashBoard(QObject):
1038
1069
  """
1039
1070
  | Set the managers mode from the given filename.
1040
1071
  |
1041
- | In case of "mock" or "canon" move, set the corresponding managers calling set_(*)_preset procedure.
1072
+ | In case of "mock" or "canon" move, set the corresponding managers calling
1073
+ set_(*)_preset procedure.
1042
1074
  |
1043
1075
  | Else set the managers file using set_file_preset function.
1044
- | Once done connect the move and detector modules to logger to recipe/transmit informations.
1076
+ | Once done connect the move and detector modules to logger to recipe/transmit
1077
+ informations.
1045
1078
 
1046
1079
  Finally update DAQ_scan_settings tree with :
1047
1080
  * Detectors
@@ -1081,14 +1114,16 @@ class DashBoard(QObject):
1081
1114
  self.mainwindow.setVisible(True)
1082
1115
  for area in self.dockarea.tempAreas:
1083
1116
  area.window().setVisible(True)
1084
- messagebox(text=f'{str(error)}\nQuitting the application...', title='Incompatibility')
1117
+ messagebox(text=f'{str(error)}\nQuitting the application...',
1118
+ title='Incompatibility')
1085
1119
  logger.exception(str(error))
1086
1120
 
1087
1121
  self.quit_fun()
1088
1122
  return
1089
1123
 
1090
1124
  if not (not actuators_modules and not detector_modules):
1091
- self.update_status('Preset mode ({}) has been loaded'.format(filename.name), log_type='log')
1125
+ self.update_status('Preset mode ({}) has been loaded'.format(filename.name),
1126
+ log_type='log')
1092
1127
  self.settings.child('loaded_files', 'preset_file').setValue(filename.name)
1093
1128
  self.actuators_modules = actuators_modules
1094
1129
  self.detector_modules = detector_modules
@@ -1110,7 +1145,8 @@ class DashBoard(QObject):
1110
1145
  for child in putils.iter_children_params(
1111
1146
  self.preset_manager.preset_params.child('model_settings'),
1112
1147
  []):
1113
- preset_path = self.preset_manager.preset_params.child('model_settings').childPath(child)
1148
+ preset_path = self.preset_manager.preset_params.child(
1149
+ 'model_settings').childPath(child)
1114
1150
  path = ['models', 'model_params']
1115
1151
  path.extend(preset_path)
1116
1152
  self.pid_module.settings.child(*path).setValue(child.value())
@@ -1119,9 +1155,10 @@ class DashBoard(QObject):
1119
1155
  self.preset_manager.preset_params.child('pid_models').value())['class']
1120
1156
  for setp in model_class.setpoints_names:
1121
1157
  self.add_move(setp, None, 'PID', [], [], actuators_modules)
1122
- actuators_modules[-1].controller = dict(curr_point=self.pid_module.curr_points_signal,
1123
- setpoint=self.pid_module.setpoints_signal,
1124
- emit_curr_points=self.pid_module.emit_curr_points_sig)
1158
+ actuators_modules[-1].controller = dict(
1159
+ curr_point=self.pid_module.curr_points_signal,
1160
+ setpoint=self.pid_module.setpoints_signal,
1161
+ emit_curr_points=self.pid_module.emit_curr_points_sig)
1125
1162
  actuators_modules[-1].init_hardware_ui()
1126
1163
  QtWidgets.QApplication.processEvents()
1127
1164
  self.poll_init(actuators_modules[-1])
@@ -1129,7 +1166,8 @@ class DashBoard(QObject):
1129
1166
 
1130
1167
  # Update actuators modules and module manager
1131
1168
  self.actuators_modules = actuators_modules
1132
- self.modules_manager = ModulesManager(self.detector_modules, self.actuators_modules)
1169
+ self.modules_manager = ModulesManager(self.detector_modules,
1170
+ self.actuators_modules)
1133
1171
 
1134
1172
  except Exception as e:
1135
1173
  raise PIDError('Could not load the PID extension and create setpoints actuators'
@@ -1141,16 +1179,18 @@ class DashBoard(QObject):
1141
1179
  # #
1142
1180
 
1143
1181
  #####################################################
1144
- self.overshoot_manager = OvershootManager(det_modules=[det.title for det in detector_modules],
1145
- actuators_modules=[move.title for move in actuators_modules])
1182
+ self.overshoot_manager = OvershootManager(
1183
+ det_modules=[det.title for det in detector_modules],
1184
+ actuators_modules=[move.title for move in actuators_modules])
1146
1185
  # load overshoot if present
1147
1186
  file = filename.name
1148
1187
  path = overshoot_path.joinpath(file)
1149
1188
  if path.is_file():
1150
1189
  self.set_overshoot_configuration(path)
1151
1190
 
1152
- self.remote_manager = RemoteManager(actuators=[move.title for move in actuators_modules],
1153
- detectors=[det.title for det in detector_modules])
1191
+ self.remote_manager = RemoteManager(
1192
+ actuators=[move.title for move in actuators_modules],
1193
+ detectors=[det.title for det in detector_modules])
1154
1194
  # load remote file if present
1155
1195
  file = filename.name
1156
1196
  path = remote_path.joinpath(file)
@@ -1195,22 +1235,23 @@ class DashBoard(QObject):
1195
1235
  def update_init_tree(self):
1196
1236
  for act in self.actuators_modules:
1197
1237
  name = ''.join(act.title.split()) # remove empty spaces
1198
- if act.title not in [ac.title() for ac in putils.iter_children_params(self.settings.child(('actuators')), [])]:
1238
+ if act.title not in [ac.title() for ac in putils.iter_children_params(
1239
+ self.settings.child('actuators'), [])]:
1199
1240
 
1200
- self.settings.child(('actuators')).addChild(
1241
+ self.settings.child('actuators').addChild(
1201
1242
  {'title': act.title, 'name': name, 'type': 'led', 'value': False})
1202
1243
  QtWidgets.QApplication.processEvents()
1203
1244
  self.settings.child('actuators', name).setValue(act.initialized_state)
1204
1245
 
1205
1246
  for det in self.detector_modules:
1206
1247
  name = ''.join(det.title.split()) # remove empty spaces
1207
- if det.title not in [de.title() for de in putils.iter_children_params(self.settings.child(('detectors')), [])]:
1208
- self.settings.child(('detectors')).addChild(
1248
+ if det.title not in [de.title() for de in putils.iter_children_params(
1249
+ self.settings.child('detectors'), [])]:
1250
+ self.settings.child('detectors').addChild(
1209
1251
  {'title': det.title, 'name': name, 'type': 'led', 'value': False})
1210
1252
  QtWidgets.QApplication.processEvents()
1211
1253
  self.settings.child('detectors', name).setValue(det.initialized_state)
1212
1254
 
1213
- Slot(bool)
1214
1255
  def stop_moves(self, overshoot):
1215
1256
  """
1216
1257
  Foreach module of the move module object list, stop motion.
@@ -1231,7 +1272,7 @@ class DashBoard(QObject):
1231
1272
  webbrowser.open(logging.getLogger('pymodaq').handlers[0].baseFilename)
1232
1273
 
1233
1274
  def show_config(self):
1234
- from pymodaq.utils.gui_utils.widgets.tree_toml import TreeFromToml
1275
+ from pymodaq_gui.utils.widgets.tree_toml import TreeFromToml
1235
1276
  config_tree = TreeFromToml()
1236
1277
  config_tree.show_dialog()
1237
1278
 
@@ -1249,15 +1290,21 @@ class DashBoard(QObject):
1249
1290
  self.logger_dock.addWidget(splitter)
1250
1291
 
1251
1292
  self.settings = Parameter.create(name='init_settings', type='group', children=[
1252
- {'title': 'Log level', 'name': 'log_level', 'type': 'list', 'value': config('general', 'debug_level'),
1293
+ {'title': 'Log level', 'name': 'log_level', 'type': 'list',
1294
+ 'value': config('general', 'debug_level'),
1253
1295
  'limits': config('general', 'debug_levels')},
1254
1296
 
1255
1297
  {'title': 'Loaded presets', 'name': 'loaded_files', 'type': 'group', 'children': [
1256
- {'title': 'Preset file', 'name': 'preset_file', 'type': 'str', 'value': '', 'readonly': True},
1257
- {'title': 'Overshoot file', 'name': 'overshoot_file', 'type': 'str', 'value': '', 'readonly': True},
1258
- {'title': 'Layout file', 'name': 'layout_file', 'type': 'str', 'value': '', 'readonly': True},
1259
- {'title': 'ROI file', 'name': 'roi_file', 'type': 'str', 'value': '', 'readonly': True},
1260
- {'title': 'Remote file', 'name': 'remote_file', 'type': 'str', 'value': '', 'readonly': True},
1298
+ {'title': 'Preset file', 'name': 'preset_file', 'type': 'str', 'value': '',
1299
+ 'readonly': True},
1300
+ {'title': 'Overshoot file', 'name': 'overshoot_file', 'type': 'str', 'value': '',
1301
+ 'readonly': True},
1302
+ {'title': 'Layout file', 'name': 'layout_file', 'type': 'str', 'value': '',
1303
+ 'readonly': True},
1304
+ {'title': 'ROI file', 'name': 'roi_file', 'type': 'str', 'value': '',
1305
+ 'readonly': True},
1306
+ {'title': 'Remote file', 'name': 'remote_file', 'type': 'str', 'value': '',
1307
+ 'readonly': True},
1261
1308
  ]},
1262
1309
  {'title': 'Actuators Init.', 'name': 'actuators', 'type': 'group', 'children': []},
1263
1310
  {'title': 'Detectors Init.', 'name': 'detectors', 'type': 'group', 'children': []},
@@ -1297,11 +1344,6 @@ class DashBoard(QObject):
1297
1344
 
1298
1345
  Once done emit the update settings signal to link the commit.
1299
1346
 
1300
- =============== =================================== ================================================================
1301
- **Parameters** **Type** **Description**
1302
- *param* instance of ppyqtgraph parameter the parameter to be checked
1303
- *changes* tuple list Contain the (param,changes,info) list listing the changes made
1304
- =============== =================================== ================================================================
1305
1347
 
1306
1348
  """
1307
1349
 
@@ -1322,7 +1364,9 @@ class DashBoard(QObject):
1322
1364
  def show_about(self):
1323
1365
  self.splash_sc.setVisible(True)
1324
1366
  self.splash_sc.showMessage(
1325
- "PyMoDAQ version {:}\nModular Acquisition with Python\nWritten by Sébastien Weber".format(get_version()),
1367
+ f"PyMoDAQ version {get_version('pymodaq')}\n"
1368
+ f"Modular Acquisition with Python\n"
1369
+ f"Written by Sébastien Weber",
1326
1370
  QtCore.Qt.AlignRight, QtCore.Qt.white)
1327
1371
 
1328
1372
  def check_version(self, show=True):
@@ -1339,13 +1383,15 @@ class DashBoard(QObject):
1339
1383
  ret = msgBox.exec()
1340
1384
 
1341
1385
  if ret == msgBox.Ok:
1342
- command = [sys.executable, '-m', 'pip', 'install', f'pymodaq=={str(available_version)}']
1386
+ command = [sys.executable, '-m', 'pip', 'install',
1387
+ f'pymodaq=={str(available_version)}']
1343
1388
  subprocess.Popen(command)
1344
1389
 
1345
1390
  self.restart_fun()
1346
1391
  else:
1347
1392
  if show:
1348
- msgBox.setText(f"Your version of PyMoDAQ, {str(current_version)}, is up to date!")
1393
+ msgBox.setText(f"Your version of PyMoDAQ,"
1394
+ f" {str(current_version)}, is up to date!")
1349
1395
  ret = msgBox.exec()
1350
1396
  except Exception as e:
1351
1397
  logger.exception("Error while checking the available PyMoDAQ version")
@@ -1357,9 +1403,12 @@ class DashBoard(QObject):
1357
1403
  In case of :
1358
1404
  * *scan* : Set parameters showing top false
1359
1405
  * *dataset* : Set parameters showing top false
1360
- * *managers* : Set parameters showing top false. Add the save/cancel buttons to the accept/reject dialog (to save managers parameters in a xml file).
1406
+ * *managers* : Set parameters showing top false.
1407
+ Add the save/cancel buttons to the accept/reject dialog
1408
+ (to save managers parameters in a xml file).
1361
1409
 
1362
- Finally, in case of accepted managers type info, save the managers parameters in a xml file.
1410
+ Finally, in case of accepted managers type info,
1411
+ save the managers parameters in a xml file.
1363
1412
 
1364
1413
  =============== =========== ====================================
1365
1414
  **Parameters** **Type** **Description**
@@ -1414,9 +1463,9 @@ class DashBoard(QObject):
1414
1463
  pass
1415
1464
 
1416
1465
 
1417
- def main(init_qt=True):
1418
- if init_qt: # used for the test suite
1419
- app = start_qapplication()
1466
+ def main():
1467
+ from pymodaq_gui.utils.utils import mkQApp
1468
+ app = mkQApp('Dashboard')
1420
1469
 
1421
1470
  win = QtWidgets.QMainWindow()
1422
1471
  area = DockArea()
@@ -1426,8 +1475,7 @@ def main(init_qt=True):
1426
1475
 
1427
1476
  # win.setVisible(False)
1428
1477
  prog = DashBoard(area)
1429
- if init_qt:
1430
- sys.exit(app.exec())
1478
+ app.exec()
1431
1479
  return prog, win
1432
1480
 
1433
1481