pymodaq 4.4.7__py3-none-any.whl → 5.0.1__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/__init__.py +57 -91
- pymodaq/control_modules/daq_move.py +64 -46
- pymodaq/control_modules/daq_move_ui.py +34 -12
- pymodaq/control_modules/daq_viewer.py +55 -30
- pymodaq/control_modules/daq_viewer_ui.py +6 -6
- pymodaq/control_modules/mocks.py +1 -1
- pymodaq/control_modules/move_utility_classes.py +51 -43
- pymodaq/control_modules/utils.py +43 -20
- pymodaq/control_modules/viewer_utility_classes.py +54 -18
- pymodaq/daq_utils/daq_utils.py +6 -0
- pymodaq/dashboard.py +639 -323
- pymodaq/examples/function_plotter.py +13 -12
- pymodaq/examples/tcp_client.py +1 -1
- pymodaq/extensions/__init__.py +1 -1
- pymodaq/extensions/bayesian/bayesian_optimisation.py +44 -32
- pymodaq/extensions/bayesian/utils.py +10 -10
- pymodaq/extensions/console.py +7 -6
- pymodaq/extensions/daq_logger/__init__.py +1 -0
- pymodaq/extensions/{daq_logger.py → daq_logger/daq_logger.py} +30 -30
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger.py +16 -15
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger_models.py +2 -0
- pymodaq/{utils/h5modules → extensions/daq_logger}/h5logging.py +7 -8
- pymodaq/extensions/daq_scan.py +42 -34
- pymodaq/extensions/daq_scan_ui.py +18 -18
- pymodaq/extensions/h5browser.py +2 -3
- pymodaq/extensions/pid/__init__.py +4 -2
- pymodaq/extensions/pid/daq_move_PID.py +3 -3
- pymodaq/extensions/pid/pid_controller.py +59 -50
- pymodaq/extensions/pid/utils.py +10 -5
- pymodaq/extensions/utils.py +33 -3
- pymodaq/post_treatment/load_and_plot.py +10 -7
- pymodaq/resources/preset_default.xml +1 -1
- pymodaq/updater.py +107 -0
- pymodaq/utils/array_manipulation.py +4 -384
- pymodaq/utils/calibration_camera.py +12 -9
- pymodaq/utils/chrono_timer.py +11 -10
- pymodaq/utils/config.py +3 -458
- pymodaq/utils/daq_utils.py +9 -715
- pymodaq/utils/data.py +17 -2959
- pymodaq/utils/enums.py +4 -74
- pymodaq/utils/exceptions.py +0 -4
- pymodaq/utils/gui_utils/__init__.py +8 -8
- pymodaq/utils/gui_utils/loader_utils.py +26 -1
- pymodaq/utils/gui_utils/utils.py +8 -162
- pymodaq/utils/gui_utils/widgets/lcd.py +6 -109
- pymodaq/utils/h5modules/__init__.py +0 -4
- pymodaq/utils/h5modules/module_saving.py +9 -8
- pymodaq/utils/leco/__init__.py +2 -2
- pymodaq/utils/leco/daq_move_LECODirector.py +3 -6
- pymodaq/utils/leco/daq_xDviewer_LECODirector.py +5 -5
- pymodaq/utils/leco/director_utils.py +2 -2
- pymodaq/utils/leco/leco_director.py +3 -3
- pymodaq/utils/leco/pymodaq_listener.py +4 -3
- pymodaq/utils/leco/utils.py +11 -9
- pymodaq/utils/logger.py +4 -76
- pymodaq/utils/managers/batchscan_manager.py +16 -19
- pymodaq/utils/managers/modules_manager.py +30 -17
- pymodaq/utils/managers/overshoot_manager.py +48 -6
- pymodaq/utils/managers/preset_manager.py +39 -59
- pymodaq/utils/managers/preset_manager_utils.py +28 -22
- pymodaq/utils/managers/remote_manager.py +12 -10
- pymodaq/utils/math_utils.py +4 -582
- pymodaq/utils/messenger.py +4 -64
- pymodaq/utils/parameter/__init__.py +6 -9
- pymodaq/utils/parameter/utils.py +4 -328
- pymodaq/utils/scanner/scan_config.py +1 -1
- pymodaq/utils/scanner/scan_factory.py +16 -12
- pymodaq/utils/{plotting → scanner}/scan_selector.py +19 -20
- pymodaq/utils/scanner/scanner.py +10 -8
- pymodaq/utils/scanner/scanners/_1d_scanners.py +8 -5
- pymodaq/utils/scanner/scanners/_2d_scanners.py +5 -5
- pymodaq/utils/scanner/scanners/sequential.py +8 -8
- pymodaq/utils/scanner/scanners/tabular.py +9 -9
- pymodaq/utils/scanner/utils.py +6 -4
- pymodaq/utils/svg/svg_viewer2D.py +3 -4
- pymodaq/utils/tcp_ip/mysocket.py +4 -110
- pymodaq/utils/tcp_ip/serializer.py +4 -801
- pymodaq/utils/tcp_ip/tcp_server_client.py +15 -13
- pymodaq-5.0.1.dist-info/METADATA +242 -0
- pymodaq-5.0.1.dist-info/RECORD +122 -0
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/WHEEL +1 -1
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/entry_points.txt +1 -0
- pymodaq/examples/custom_app.py +0 -258
- pymodaq/examples/custom_viewer.py +0 -112
- pymodaq/examples/parameter_ex.py +0 -138
- pymodaq/examples/preset_MockCamera.xml +0 -1
- pymodaq/post_treatment/daq_measurement/daq_measurement_GUI.py +0 -142
- pymodaq/post_treatment/daq_measurement/daq_measurement_GUI.ui +0 -232
- pymodaq/post_treatment/daq_measurement/daq_measurement_main.py +0 -391
- pymodaq/post_treatment/daq_measurement/process_from_QtDesigner_DAQ_Measurement_GUI.bat +0 -2
- pymodaq/post_treatment/process_to_scalar.py +0 -263
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/1d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/2d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/3d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add_Step.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve_All.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Browse_Dir_Path.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Calculator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnGroup.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnNum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnText.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnTime.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnWave.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Close3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ColorPicker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Contract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Create.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/DeleteLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditOpen.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditRedo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditUndo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Ellipse.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EllipseFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ErrorMessage.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Exit.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Expand.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/FFT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/HLM.ico +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Histogram.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/LUT_LookUpTable.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Marker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Math.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MeasurementStudio_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Move.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveDown.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveUp.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Multiply.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewFile.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_Folder.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_1D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_2D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_sim.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Options.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Pass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RGB.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rectangle.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RectangleFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Redo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Region.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rendezvous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SELECT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Search.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SelectPolygon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Select_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Settings.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snap&Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Spreadsheet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Status.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Subtract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Vision.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Volts.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Wait2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_1_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_in.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_out.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_to_Selection.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/abort.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/advanced2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/algo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/autoscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/b_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/back.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/bg_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera_snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cartesian.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/close2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cluster2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/continuous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/data.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/delay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/error2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ethernet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/exit2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/fan.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/filter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/g_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/gear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grab.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/graph.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/green_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grey_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greyscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/home2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/information2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ini.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/input.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/integrator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/joystick.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/limiter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/load_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meshPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_contour.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_straight_line.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/movie.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multi_point.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multiplexer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/new.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openArrow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/overlay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pause.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/permute.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/phase.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/play.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/polar.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pole_zero.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerMeter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/properties.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/r_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/radiocontrolbutton.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/random.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/read2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/red_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/remove.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/reset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rgb_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/robot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rotation2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saturation.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saveTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/save_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_horizontally.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_vertically.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/search2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_none.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sort_ascend.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/spectrumAnalyzer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/start.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/status_cancelled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/surfacePlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/target.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/tree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/updateTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility_small.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/vector.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/verify.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/video.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/wait.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/waterfallPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/watershed.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/yellow_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zip_file.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomAuto.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomReset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.bat +0 -2
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.qrc +0 -238
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources_rc.py +0 -127453
- pymodaq/resources/QtDesigner_Ressources/__init__.py +0 -0
- pymodaq/resources/QtDesigner_Ressources/credit.rst +0 -7
- pymodaq/resources/QtDesigner_Ressources/icons.svg +0 -142
- pymodaq/resources/VERSION +0 -2
- pymodaq/resources/config_template.toml +0 -96
- pymodaq/resources/triangulation_data.npy +0 -0
- pymodaq/utils/abstract/__init__.py +0 -48
- pymodaq/utils/db/__init__.py +0 -0
- pymodaq/utils/db/db_logger/__init__.py +0 -0
- pymodaq/utils/factory.py +0 -82
- pymodaq/utils/gui_utils/custom_app.py +0 -133
- pymodaq/utils/gui_utils/dock.py +0 -107
- pymodaq/utils/gui_utils/file_io.py +0 -94
- pymodaq/utils/gui_utils/layout.py +0 -34
- pymodaq/utils/gui_utils/list_picker.py +0 -38
- pymodaq/utils/gui_utils/widgets/__init__.py +0 -5
- pymodaq/utils/gui_utils/widgets/label.py +0 -24
- pymodaq/utils/gui_utils/widgets/push.py +0 -149
- pymodaq/utils/gui_utils/widgets/qled.py +0 -62
- pymodaq/utils/gui_utils/widgets/spinbox.py +0 -24
- pymodaq/utils/gui_utils/widgets/table.py +0 -263
- pymodaq/utils/gui_utils/widgets/tree_layout.py +0 -188
- pymodaq/utils/gui_utils/widgets/tree_toml.py +0 -110
- pymodaq/utils/h5modules/backends.py +0 -1022
- pymodaq/utils/h5modules/browsing.py +0 -627
- pymodaq/utils/h5modules/data_saving.py +0 -1107
- pymodaq/utils/h5modules/exporter.py +0 -119
- pymodaq/utils/h5modules/exporters/__init__.py +0 -0
- pymodaq/utils/h5modules/exporters/base.py +0 -111
- pymodaq/utils/h5modules/exporters/flimj.py +0 -63
- pymodaq/utils/h5modules/exporters/hyperspy.py +0 -143
- pymodaq/utils/h5modules/saving.py +0 -866
- pymodaq/utils/h5modules/utils.py +0 -115
- pymodaq/utils/managers/action_manager.py +0 -489
- pymodaq/utils/managers/parameter_manager.py +0 -279
- pymodaq/utils/managers/roi_manager.py +0 -740
- pymodaq/utils/parameter/ioxml.py +0 -545
- pymodaq/utils/parameter/pymodaq_ptypes/__init__.py +0 -38
- pymodaq/utils/parameter/pymodaq_ptypes/bool.py +0 -31
- pymodaq/utils/parameter/pymodaq_ptypes/date.py +0 -126
- pymodaq/utils/parameter/pymodaq_ptypes/filedir.py +0 -143
- pymodaq/utils/parameter/pymodaq_ptypes/itemselect.py +0 -265
- pymodaq/utils/parameter/pymodaq_ptypes/led.py +0 -44
- pymodaq/utils/parameter/pymodaq_ptypes/list.py +0 -150
- pymodaq/utils/parameter/pymodaq_ptypes/numeric.py +0 -18
- pymodaq/utils/parameter/pymodaq_ptypes/pixmap.py +0 -175
- pymodaq/utils/parameter/pymodaq_ptypes/slide.py +0 -166
- pymodaq/utils/parameter/pymodaq_ptypes/table.py +0 -135
- pymodaq/utils/parameter/pymodaq_ptypes/tableview.py +0 -149
- pymodaq/utils/parameter/pymodaq_ptypes/text.py +0 -142
- pymodaq/utils/plotting/__init__.py +0 -0
- pymodaq/utils/plotting/data_viewers/__init__.py +0 -10
- pymodaq/utils/plotting/data_viewers/base.py +0 -286
- pymodaq/utils/plotting/data_viewers/viewer.py +0 -275
- pymodaq/utils/plotting/data_viewers/viewer0D.py +0 -298
- pymodaq/utils/plotting/data_viewers/viewer1D.py +0 -826
- pymodaq/utils/plotting/data_viewers/viewer1Dbasic.py +0 -231
- pymodaq/utils/plotting/data_viewers/viewer2D.py +0 -1118
- pymodaq/utils/plotting/data_viewers/viewer2D_basic.py +0 -146
- pymodaq/utils/plotting/data_viewers/viewerND.py +0 -800
- pymodaq/utils/plotting/gant_chart.py +0 -123
- pymodaq/utils/plotting/image_viewer.py +0 -97
- pymodaq/utils/plotting/items/__init__.py +0 -0
- pymodaq/utils/plotting/items/axis_scaled.py +0 -93
- pymodaq/utils/plotting/items/crosshair.py +0 -94
- pymodaq/utils/plotting/items/image.py +0 -388
- pymodaq/utils/plotting/navigator.py +0 -353
- pymodaq/utils/plotting/plotter/plotter.py +0 -94
- pymodaq/utils/plotting/plotter/plotters/__init__.py +0 -0
- pymodaq/utils/plotting/plotter/plotters/matplotlib_plotters.py +0 -134
- pymodaq/utils/plotting/plotter/plotters/qt_plotters.py +0 -78
- pymodaq/utils/plotting/utils/__init__.py +0 -0
- pymodaq/utils/plotting/utils/axes_viewer.py +0 -88
- pymodaq/utils/plotting/utils/filter.py +0 -585
- pymodaq/utils/plotting/utils/lineout.py +0 -226
- pymodaq/utils/plotting/utils/plot_utils.py +0 -579
- pymodaq/utils/plotting/utils/signalND.py +0 -1347
- pymodaq/utils/plotting/widgets.py +0 -76
- pymodaq/utils/qvariant.py +0 -12
- pymodaq/utils/slicing.py +0 -63
- pymodaq/utils/units.py +0 -216
- pymodaq-4.4.7.dist-info/METADATA +0 -163
- pymodaq-4.4.7.dist-info/RECORD +0 -446
- /pymodaq/{post_treatment/daq_analysis → daq_utils}/__init__.py +0 -0
- /pymodaq/{utils/abstract/logger.py → extensions/daq_logger/abstract.py} +0 -0
- /pymodaq/{post_treatment/daq_measurement → extensions/daq_logger/db}/__init__.py +0 -0
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/licenses/LICENSE +0 -0
pymodaq/__init__.py
CHANGED
|
@@ -6,112 +6,78 @@ from pathlib import Path
|
|
|
6
6
|
|
|
7
7
|
import warnings
|
|
8
8
|
|
|
9
|
+
import pymodaq_utils # to init stuff related to pymodaq_utils # necessary, leave it there
|
|
10
|
+
import pymodaq_data # to init stuff related to pymodaq_data # necessary, leave it there
|
|
11
|
+
import pymodaq_gui # to init stuff related to pymodaq_gui # necessary, leave it there
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
try:
|
|
12
|
-
from qtpy import QtWidgets
|
|
13
|
-
except ImportError as e:
|
|
14
|
-
msg = f"\n\n" \
|
|
15
|
-
f"****************************************************************************************\n" \
|
|
16
|
-
f"No Qt backend could be found in your system, please install either pyqt5/6 or pyside2/6.\n\n" \
|
|
17
|
-
f"pyqt5 is still preferred, while pyqt6 should mostly work.\n\n" \
|
|
18
|
-
f"do:\n" \
|
|
19
|
-
f"pip install pyqt5\n for instance\n"\
|
|
20
|
-
f"****************************************************************************************\n"
|
|
21
|
-
warnings.warn(msg, FutureWarning, 2)
|
|
22
|
-
sys.exit()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
check_qt_presence()
|
|
13
|
+
from pymodaq_data import Q_, Unit, ureg # necessary, leave it there
|
|
26
14
|
|
|
27
15
|
|
|
28
16
|
try:
|
|
29
17
|
# with open(str(Path(__file__).parent.joinpath('resources/VERSION')), 'r') as fvers:
|
|
30
18
|
# __version__ = fvers.read().strip()
|
|
31
19
|
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
__version__ = get_version()
|
|
20
|
+
from pymodaq_utils.logger import set_logger
|
|
21
|
+
from pymodaq_utils.utils import get_version
|
|
22
|
+
__version__ = get_version('pymodaq')
|
|
35
23
|
try:
|
|
36
24
|
logger = set_logger('pymodaq', add_handler=True, base_logger=True)
|
|
37
|
-
except Exception:
|
|
38
|
-
print("Couldn't create the local folder to store logs , presets...")
|
|
39
25
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
from pymodaq.utils.plotting.plotter.plotter import register_plotter, PlotterFactory
|
|
65
|
-
|
|
66
|
-
# issue on windows when using .NET code within multithreads, this below allows it but requires the
|
|
67
|
-
# pywin32 (pythoncom) package
|
|
68
|
-
if importlib.util.find_spec('clr') is not None:
|
|
26
|
+
from pymodaq.utils.daq_utils import copy_preset, get_instrument_plugins
|
|
27
|
+
|
|
28
|
+
from pymodaq_utils.config import Config
|
|
29
|
+
from pymodaq.utils.scanner.utils import register_scanners
|
|
30
|
+
from pymodaq_data.plotting.plotter.plotter import register_plotter, PlotterFactory
|
|
31
|
+
|
|
32
|
+
# issue on windows when using .NET code within multithreads, this below allows it but requires
|
|
33
|
+
# the pywin32 (pythoncom) package
|
|
34
|
+
if importlib.util.find_spec('clr') is not None:
|
|
35
|
+
try:
|
|
36
|
+
import pythoncom
|
|
37
|
+
pythoncom.CoInitialize()
|
|
38
|
+
except ModuleNotFoundError as e:
|
|
39
|
+
infos = "You have installed plugins requiring the pywin32 package to work correctly," \
|
|
40
|
+
" please type in *pip install pywin32* and restart PyMoDAQ"
|
|
41
|
+
print(infos)
|
|
42
|
+
logger.warning(infos)
|
|
43
|
+
|
|
44
|
+
config = Config() # to ckeck for config file existence, otherwise create one
|
|
45
|
+
copy_preset()
|
|
46
|
+
|
|
47
|
+
from pymodaq_utils.config import Config
|
|
48
|
+
from pymodaq.utils.scanner.utils import register_scanners
|
|
49
|
+
|
|
69
50
|
try:
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
# Need the config to exists before importing
|
|
52
|
+
from pymodaq_utils.environment import EnvironmentBackupManager
|
|
53
|
+
|
|
54
|
+
if config['backup']['keep_backup']:
|
|
55
|
+
ebm = EnvironmentBackupManager()
|
|
56
|
+
ebm.save_backup()
|
|
72
57
|
except ModuleNotFoundError as e:
|
|
73
|
-
infos = "
|
|
74
|
-
"
|
|
58
|
+
infos = "Your pymodaq_utils version is outdated and doesn't allow for automatic backup of pip packages." \
|
|
59
|
+
" You should update it."
|
|
75
60
|
print(infos)
|
|
76
61
|
logger.warning(infos)
|
|
77
62
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
logger.info('')
|
|
97
|
-
get_instrument_plugins()
|
|
98
|
-
logger.info('*************************************************************************')
|
|
99
|
-
|
|
100
|
-
logger.info('')
|
|
101
|
-
logger.info('')
|
|
102
|
-
logger.info('************************')
|
|
103
|
-
logger.info(f"Registering Scanners...")
|
|
104
|
-
register_scanners()
|
|
105
|
-
logger.info(f"Done")
|
|
106
|
-
logger.info('************************')
|
|
107
|
-
|
|
108
|
-
logger.info('')
|
|
109
|
-
logger.info('')
|
|
110
|
-
logger.info('************************')
|
|
111
|
-
logger.info(f"Registering plotters...")
|
|
112
|
-
register_plotter()
|
|
113
|
-
logger.info(f"Done")
|
|
114
|
-
logger.info('************************')
|
|
63
|
+
logger.info('*************************************************************************')
|
|
64
|
+
logger.info(f"Getting the list of instrument plugins...")
|
|
65
|
+
logger.info('')
|
|
66
|
+
get_instrument_plugins()
|
|
67
|
+
logger.info('*************************************************************************')
|
|
68
|
+
|
|
69
|
+
logger.info('')
|
|
70
|
+
logger.info('')
|
|
71
|
+
logger.info('************************')
|
|
72
|
+
logger.info(f"Registering Scanners...")
|
|
73
|
+
register_scanners()
|
|
74
|
+
logger.info(f"Done")
|
|
75
|
+
logger.info('************************')
|
|
76
|
+
|
|
77
|
+
except Exception:
|
|
78
|
+
print("Couldn't create the local folder to store logs , presets...")
|
|
79
|
+
|
|
80
|
+
|
|
115
81
|
|
|
116
82
|
except Exception as e:
|
|
117
83
|
try:
|
|
@@ -20,34 +20,42 @@ from qtpy import QtWidgets
|
|
|
20
20
|
|
|
21
21
|
from easydict import EasyDict as edict
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from pymodaq.control_modules.move_utility_classes import (MoveCommand, DAQ_Move_base,
|
|
27
|
-
DataActuatorType, check_units)
|
|
28
|
-
from pymodaq.control_modules.move_utility_classes import params as daq_move_params
|
|
29
|
-
from pymodaq.utils import daq_utils as utils
|
|
30
|
-
from pymodaq.utils.parameter import utils as putils
|
|
23
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
24
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
25
|
+
from pymodaq_utils import utils
|
|
31
26
|
from pymodaq.utils.gui_utils import get_splash_sc
|
|
32
|
-
from
|
|
27
|
+
from pymodaq_utils import config as config_mod
|
|
33
28
|
from pymodaq.utils.exceptions import ActuatorError
|
|
34
|
-
from
|
|
29
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
30
|
+
from pymodaq.utils.data import DataToExport, DataActuator
|
|
31
|
+
from pymodaq_data.h5modules.backends import Node
|
|
32
|
+
|
|
33
|
+
from pymodaq_gui.parameter import ioxml, Parameter
|
|
34
|
+
from pymodaq_gui.parameter import utils as putils
|
|
35
|
+
from pymodaq_gui.utils.utils import mkQApp
|
|
36
|
+
|
|
35
37
|
from pymodaq.utils.h5modules import module_saving
|
|
36
|
-
from pymodaq.utils
|
|
37
|
-
|
|
38
|
-
from pymodaq.
|
|
39
|
-
|
|
38
|
+
from pymodaq.control_modules.utils import ParameterControlModule
|
|
39
|
+
from pymodaq.control_modules.daq_move_ui import DAQ_Move_UI, ThreadCommand
|
|
40
|
+
from pymodaq.control_modules.move_utility_classes import (MoveCommand, DAQ_Move_base,
|
|
41
|
+
DataActuatorType, check_units,
|
|
42
|
+
DataUnitError)
|
|
40
43
|
|
|
44
|
+
|
|
45
|
+
from pymodaq.control_modules.move_utility_classes import params as daq_move_params
|
|
41
46
|
from pymodaq.utils.leco.pymodaq_listener import MoveActorListener, LECOMoveCommands
|
|
47
|
+
|
|
48
|
+
from pymodaq.utils.daq_utils import get_plugins
|
|
42
49
|
from pymodaq import Q_, Unit
|
|
43
50
|
|
|
44
51
|
|
|
52
|
+
|
|
45
53
|
local_path = config_mod.get_set_local_dir()
|
|
46
54
|
sys.path.append(str(local_path))
|
|
47
55
|
logger = set_logger(get_module_name(__file__))
|
|
48
56
|
config = config_mod.Config()
|
|
49
57
|
|
|
50
|
-
DAQ_Move_Actuators =
|
|
58
|
+
DAQ_Move_Actuators = get_plugins('daq_move')
|
|
51
59
|
ACTUATOR_TYPES = [mov['name'] for mov in DAQ_Move_Actuators]
|
|
52
60
|
if len(ACTUATOR_TYPES) == 0:
|
|
53
61
|
raise ActuatorError('No installed Actuator')
|
|
@@ -116,7 +124,7 @@ class DAQ_Move(ParameterControlModule):
|
|
|
116
124
|
self.splash_sc = get_splash_sc()
|
|
117
125
|
self._title = title
|
|
118
126
|
if len(ACTUATOR_TYPES) > 0: # will be 0 if no valid plugins are installed
|
|
119
|
-
self.actuator = ACTUATOR_TYPES[0]
|
|
127
|
+
self.actuator = kwargs.get('actuator', ACTUATOR_TYPES[0])
|
|
120
128
|
|
|
121
129
|
self.module_and_data_saver = module_saving.ActuatorSaver(self)
|
|
122
130
|
|
|
@@ -450,11 +458,10 @@ class DAQ_Move(ParameterControlModule):
|
|
|
450
458
|
super().thread_status(status, 'move')
|
|
451
459
|
|
|
452
460
|
if status.command == "ini_stage":
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
self.controller = status.attribute[0]['controller']
|
|
461
|
+
self.update_status(f"Stage initialized: {status.attribute['initialized']} "
|
|
462
|
+
f"info: {status.attribute['info']}")
|
|
463
|
+
if status.attribute['initialized']:
|
|
464
|
+
self.controller = status.attribute['controller']
|
|
458
465
|
if self.ui is not None:
|
|
459
466
|
self.ui.actuator_init = True
|
|
460
467
|
self._initialized_state = True
|
|
@@ -465,7 +472,10 @@ class DAQ_Move(ParameterControlModule):
|
|
|
465
472
|
self.init_signal.emit(self._initialized_state)
|
|
466
473
|
|
|
467
474
|
elif status.command == "get_actuator_value" or status.command == 'check_position':
|
|
468
|
-
|
|
475
|
+
if isinstance(status.attribute, DataActuator):
|
|
476
|
+
data_act: DataActuator = status.attribute
|
|
477
|
+
else:
|
|
478
|
+
data_act: DataActuator = status.attribute[0] # backcompatibility
|
|
469
479
|
data_act.name = self.title # for the DataActuator name to be the title of the DAQ_Move
|
|
470
480
|
if (not Unit(self.units).is_compatible_with(Unit(data_act.units)) and
|
|
471
481
|
data_act.units == ''): #this happens if the units have not been specified in
|
|
@@ -480,12 +490,15 @@ class DAQ_Move(ParameterControlModule):
|
|
|
480
490
|
self._current_value = data_act
|
|
481
491
|
self.current_value_signal.emit(self._current_value)
|
|
482
492
|
if self.settings['main_settings', 'tcpip', 'tcp_connected'] and self._send_to_tcpip:
|
|
483
|
-
self._command_tcpip.emit(ThreadCommand('position_is',
|
|
493
|
+
self._command_tcpip.emit(ThreadCommand('position_is', data_act))
|
|
484
494
|
if self.settings['main_settings', 'leco', 'leco_connected'] and self._send_to_tcpip:
|
|
485
|
-
self._command_tcpip.emit(ThreadCommand(LECOMoveCommands.POSITION,
|
|
495
|
+
self._command_tcpip.emit(ThreadCommand(LECOMoveCommands.POSITION, data_act))
|
|
486
496
|
|
|
487
497
|
elif status.command == "move_done":
|
|
488
|
-
|
|
498
|
+
if isinstance(status.attribute, DataActuator):
|
|
499
|
+
data_act: DataActuator = status.attribute
|
|
500
|
+
else:
|
|
501
|
+
data_act: DataActuator = status.attribute[0] # deprecated
|
|
489
502
|
data_act.name = self.title # for the DataActuator name to be the title of the DAQ_Move
|
|
490
503
|
if self.ui is not None:
|
|
491
504
|
self.ui.display_value(data_act)
|
|
@@ -494,9 +507,9 @@ class DAQ_Move(ParameterControlModule):
|
|
|
494
507
|
self._move_done_bool = True
|
|
495
508
|
self.move_done_signal.emit(data_act)
|
|
496
509
|
if self.settings.child('main_settings', 'tcpip', 'tcp_connected').value() and self._send_to_tcpip:
|
|
497
|
-
self._command_tcpip.emit(ThreadCommand('move_done',
|
|
510
|
+
self._command_tcpip.emit(ThreadCommand('move_done', data_act))
|
|
498
511
|
if self.settings.child('main_settings', 'leco', 'leco_connected').value() and self._send_to_tcpip:
|
|
499
|
-
self._command_tcpip.emit(ThreadCommand(LECOMoveCommands.MOVE_DONE,
|
|
512
|
+
self._command_tcpip.emit(ThreadCommand(LECOMoveCommands.MOVE_DONE, data_act))
|
|
500
513
|
|
|
501
514
|
elif status.command == 'outofbounds':
|
|
502
515
|
self.bounds_signal.emit(True)
|
|
@@ -616,10 +629,12 @@ class DAQ_Move(ParameterControlModule):
|
|
|
616
629
|
if ('°' in unit or 'degree' in unit) and not '°C' in unit:
|
|
617
630
|
# special cas as pint base unit for angles are radians
|
|
618
631
|
return '°'
|
|
619
|
-
elif 'W' in unit or 'watt' in unit:
|
|
632
|
+
elif 'W' in unit or 'watt' in unit.lower():
|
|
620
633
|
return 'W'
|
|
621
634
|
elif '°C' in unit or 'Celsius' in unit:
|
|
622
635
|
return '°C'
|
|
636
|
+
elif 'V' in unit or 'volt' in unit.lower():
|
|
637
|
+
return 'V'
|
|
623
638
|
else:
|
|
624
639
|
return str(Q_(1, unit).to_base_units().units)
|
|
625
640
|
|
|
@@ -711,17 +726,19 @@ class DAQ_Move_Hardware(QObject):
|
|
|
711
726
|
Uninitialize the stage closing the hardware.
|
|
712
727
|
|
|
713
728
|
"""
|
|
714
|
-
self.hardware.
|
|
729
|
+
if self.hardware is not None and self.hardware.controller is not None:
|
|
730
|
+
self.hardware.close()
|
|
715
731
|
|
|
716
732
|
return "Stage uninitialized"
|
|
717
733
|
|
|
718
734
|
def get_actuator_value(self):
|
|
719
735
|
"""Get the current position checking the hardware value.
|
|
720
736
|
"""
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
737
|
+
if self.hardware is not None:
|
|
738
|
+
pos = self.hardware.get_actuator_value()
|
|
739
|
+
if self.hardware.data_actuator_type == DataActuatorType.float:
|
|
740
|
+
pos = DataActuator(self._title, data=pos, units=self.hardware.axis_unit)
|
|
741
|
+
return pos
|
|
725
742
|
|
|
726
743
|
def check_position(self):
|
|
727
744
|
"""Get the current position checking the hardware position (deprecated)
|
|
@@ -817,7 +834,7 @@ class DAQ_Move_Hardware(QObject):
|
|
|
817
834
|
--------
|
|
818
835
|
DAQ_utils.ThreadCommand
|
|
819
836
|
"""
|
|
820
|
-
self.status_sig.emit(ThreadCommand("move_done",
|
|
837
|
+
self.status_sig.emit(ThreadCommand("move_done", pos))
|
|
821
838
|
|
|
822
839
|
def move_home(self):
|
|
823
840
|
"""
|
|
@@ -832,7 +849,7 @@ class DAQ_Move_Hardware(QObject):
|
|
|
832
849
|
"""Send the move_done signal back to the main class
|
|
833
850
|
"""
|
|
834
851
|
self._current_value = pos
|
|
835
|
-
self.status_sig.emit(ThreadCommand(command="move_done", attribute=
|
|
852
|
+
self.status_sig.emit(ThreadCommand(command="move_done", attribute=pos))
|
|
836
853
|
|
|
837
854
|
@Slot(ThreadCommand)
|
|
838
855
|
def queue_command(self, command: ThreadCommand):
|
|
@@ -860,10 +877,10 @@ class DAQ_Move_Hardware(QObject):
|
|
|
860
877
|
* **reset_stop_motion** command, set the motion_stopped attribute to false
|
|
861
878
|
"""
|
|
862
879
|
try:
|
|
880
|
+
logger.debug(f'Threadcommand {command.command} sent to {self.title}')
|
|
863
881
|
if command.command == "ini_stage":
|
|
864
|
-
status = self.ini_stage(
|
|
865
|
-
|
|
866
|
-
self.status_sig.emit(ThreadCommand(command=command.command, attribute=[status, 'log']))
|
|
882
|
+
status: edict = self.ini_stage(*command.attribute)
|
|
883
|
+
self.status_sig.emit(ThreadCommand(command=command.command, attribute=status))
|
|
867
884
|
|
|
868
885
|
elif command.command == "close":
|
|
869
886
|
status = self.close()
|
|
@@ -891,11 +908,13 @@ class DAQ_Move_Hardware(QObject):
|
|
|
891
908
|
else: # custom commands for particular plugins (see spectrometer module 'get_spectro_wl' for instance)
|
|
892
909
|
if hasattr(self.hardware, command.command):
|
|
893
910
|
cmd = getattr(self.hardware, command.command)
|
|
894
|
-
|
|
911
|
+
if isinstance(command.attribute, list):
|
|
912
|
+
cmd(*command.attribute)
|
|
913
|
+
elif isinstance(command.attribute, dict):
|
|
914
|
+
cmd(**command.attribute)
|
|
895
915
|
except Exception as e:
|
|
896
916
|
self.logger.exception(str(e))
|
|
897
917
|
|
|
898
|
-
|
|
899
918
|
def stop_motion(self):
|
|
900
919
|
"""
|
|
901
920
|
stop hardware motion with motion_stopped attribute updtaed to True and a status signal sended with an "update_status" Thread Command
|
|
@@ -906,7 +925,8 @@ class DAQ_Move_Hardware(QObject):
|
|
|
906
925
|
"""
|
|
907
926
|
self.status_sig.emit(ThreadCommand(command="Update_Status", attribute=["Motion stoping", 'log']))
|
|
908
927
|
self.motion_stoped = True
|
|
909
|
-
self.hardware.
|
|
928
|
+
if self.hardware is not None and self.hardware.controller is not None:
|
|
929
|
+
self.hardware.stop_motion()
|
|
910
930
|
self.hardware.poll_timer.stop()
|
|
911
931
|
|
|
912
932
|
@Slot(edict)
|
|
@@ -932,15 +952,13 @@ class DAQ_Move_Hardware(QObject):
|
|
|
932
952
|
setattr(self, path[-1], param.value())
|
|
933
953
|
|
|
934
954
|
elif path[0] == 'move_settings':
|
|
935
|
-
self.hardware
|
|
955
|
+
if self.hardware is not None:
|
|
956
|
+
self.hardware.update_settings(settings_parameter_dict)
|
|
936
957
|
|
|
937
958
|
|
|
938
959
|
def main(init_qt=True):
|
|
939
960
|
if init_qt: # used for the test suite
|
|
940
|
-
app =
|
|
941
|
-
if config('style', 'darkstyle'):
|
|
942
|
-
import qdarkstyle
|
|
943
|
-
app.setStyleSheet(qdarkstyle.load_stylesheet(qdarkstyle.DarkPalette))
|
|
961
|
+
app = mkQApp("PyMoDAQ Move")
|
|
944
962
|
|
|
945
963
|
widget = QtWidgets.QWidget()
|
|
946
964
|
prog = DAQ_Move(widget, title="test")
|
|
@@ -13,15 +13,18 @@ from qtpy import QtWidgets
|
|
|
13
13
|
from qtpy.QtCore import Signal, Qt
|
|
14
14
|
from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget, QToolBar, QComboBox
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
|
|
16
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
17
|
+
from pymodaq_utils.config import Config
|
|
18
|
+
|
|
19
|
+
from pymodaq_data import Q_
|
|
20
|
+
|
|
21
|
+
from pymodaq_gui.utils.widgets import PushButtonIcon, LabelWithFont, SpinBox, QSpinBox_ro, QLED, QSpinBoxWithShortcut
|
|
22
|
+
from pymodaq_gui.utils import DockArea
|
|
23
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerDispatcher
|
|
24
|
+
|
|
19
25
|
from pymodaq.control_modules.utils import ControlModuleUI
|
|
20
|
-
from pymodaq.utils.
|
|
21
|
-
from pymodaq.utils.plotting.data_viewers.viewer import ViewerDispatcher
|
|
22
|
-
from pymodaq.utils.data import DataWithAxes, DataToExport, DataActuator
|
|
26
|
+
from pymodaq.utils.data import DataToExport, DataActuator
|
|
23
27
|
|
|
24
|
-
from pymodaq.utils.config import Config
|
|
25
28
|
|
|
26
29
|
config = Config()
|
|
27
30
|
|
|
@@ -199,9 +202,9 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
199
202
|
self.main_ui.layout().addWidget(self.toolbar, 0, 0, 1, 2)
|
|
200
203
|
self.main_ui.layout().addWidget(self.move_toolbar, 1, 0, 1, 2)
|
|
201
204
|
|
|
202
|
-
self.abs_value_sb =
|
|
205
|
+
self.abs_value_sb = QSpinBoxWithShortcut(step=0.1, dec=True, siPrefix=config('actuator', 'siprefix'))
|
|
203
206
|
self.abs_value_sb.setStyleSheet("background-color : lightgreen; color: black")
|
|
204
|
-
self.abs_value_sb_2 =
|
|
207
|
+
self.abs_value_sb_2 = QSpinBoxWithShortcut(step=0.1, dec=True, siPrefix=config('actuator', 'siprefix'))
|
|
205
208
|
self.abs_value_sb_2.setStyleSheet("background-color : lightcoral; color: black")
|
|
206
209
|
self.move_toolbar.addWidget(self.abs_value_sb)
|
|
207
210
|
self.move_toolbar.addWidget(self.abs_value_sb_2)
|
|
@@ -227,7 +230,7 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
227
230
|
self.control_ui.layout().addWidget(LabelWithFont('Abs. Value'), 0, 0)
|
|
228
231
|
self.find_home_pb = PushButtonIcon('home2', 'Find Home')
|
|
229
232
|
self.control_ui.layout().addWidget(self.find_home_pb, 0, 1)
|
|
230
|
-
self.abs_value_sb_bis =
|
|
233
|
+
self.abs_value_sb_bis = QSpinBoxWithShortcut(step=0.1, dec=True, siPrefix=config('actuator', 'siprefix'))
|
|
231
234
|
self.control_ui.layout().addWidget(self.abs_value_sb_bis, 1, 0)
|
|
232
235
|
self.move_abs_pb = PushButtonIcon('Move', 'Set Abs.',
|
|
233
236
|
tip='Set the value of the actuator to the set absolute value')
|
|
@@ -236,7 +239,8 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
236
239
|
self.move_rel_plus_pb = PushButtonIcon('MoveUp', 'Set Rel. (+)')
|
|
237
240
|
self.control_ui.layout().addWidget(self.move_rel_plus_pb, 2, 1)
|
|
238
241
|
|
|
239
|
-
self.rel_value_sb =
|
|
242
|
+
self.rel_value_sb = QSpinBoxWithShortcut(step=0.1, dec=True, siPrefix=config('actuator', 'siprefix'),
|
|
243
|
+
key_sequences=("Ctrl+E","Ctrl+Shift+E"),)
|
|
240
244
|
self.control_ui.layout().addWidget(self.rel_value_sb, 3, 0)
|
|
241
245
|
self.move_rel_minus_pb = PushButtonIcon('MoveDown', 'Set Rel. (-)')
|
|
242
246
|
self.control_ui.layout().addWidget(self.move_rel_minus_pb, 3, 1)
|
|
@@ -256,6 +260,18 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
256
260
|
self.statusbar.setMaximumHeight(30)
|
|
257
261
|
self.parent.layout().addWidget(self.statusbar)
|
|
258
262
|
|
|
263
|
+
def set_abs_value_red(self, value: Q_):
|
|
264
|
+
self.abs_value_sb_2.setValue(value.m_as(self._unit))
|
|
265
|
+
|
|
266
|
+
def set_abs_value_green(self, value: Q_):
|
|
267
|
+
self.abs_value_sb.setValue(value.m_as(self._unit))
|
|
268
|
+
|
|
269
|
+
def set_abs_value(self, value: Q_):
|
|
270
|
+
self.abs_value_sb_bis.setValue(value.m_as(self._unit))
|
|
271
|
+
|
|
272
|
+
def set_rel_value(self, value: Q_):
|
|
273
|
+
self.rel_value_sb.setValue(value.m_as(self._unit))
|
|
274
|
+
|
|
259
275
|
def set_unit_as_suffix(self, unit: str):
|
|
260
276
|
"""Will append the actuator units in the value display"""
|
|
261
277
|
self._unit = unit
|
|
@@ -302,11 +318,17 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
302
318
|
self.connect_action('show_config', lambda: self.command_sig.emit(ThreadCommand('show_config', )))
|
|
303
319
|
|
|
304
320
|
self.move_abs_pb.clicked.connect(lambda: self.emit_move_abs(self.abs_value_sb_bis))
|
|
321
|
+
self.abs_value_sb.shortcut["Ctrl+E"].activated.connect(lambda: self.emit_move_abs(self.abs_value_sb))
|
|
322
|
+
self.abs_value_sb_2.shortcut["Ctrl+E"].activated.connect(lambda: self.emit_move_abs(self.abs_value_sb_2))
|
|
323
|
+
self.abs_value_sb_bis.shortcut["Ctrl+E"].activated.connect(lambda: self.emit_move_abs(self.abs_value_sb_bis))
|
|
324
|
+
|
|
305
325
|
|
|
306
326
|
self.rel_value_sb.valueChanged.connect(lambda: self.command_sig.emit(
|
|
307
327
|
ThreadCommand('rel_value', self.rel_value_sb.value())))
|
|
308
328
|
self.move_rel_plus_pb.clicked.connect(lambda: self.emit_move_rel('+'))
|
|
309
329
|
self.move_rel_minus_pb.clicked.connect(lambda: self.emit_move_rel('-'))
|
|
330
|
+
self.rel_value_sb.shortcut["Ctrl+E"].activated.connect(lambda: self.emit_move_rel('+'))
|
|
331
|
+
self.rel_value_sb.shortcut["Ctrl+Shift+E"].activated.connect(lambda: self.emit_move_rel('-'))
|
|
310
332
|
|
|
311
333
|
self.find_home_pb.clicked.connect(lambda: self.command_sig.emit(ThreadCommand('find_home', )))
|
|
312
334
|
self.stop_pb.clicked.connect(lambda: self.command_sig.emit(ThreadCommand('stop', )))
|
|
@@ -350,7 +372,7 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
350
372
|
|
|
351
373
|
|
|
352
374
|
def main(init_qt=True):
|
|
353
|
-
from
|
|
375
|
+
from pymodaq_gui.utils.dock import DockArea
|
|
354
376
|
if init_qt: # used for the test suite
|
|
355
377
|
app = QtWidgets.QApplication(sys.argv)
|
|
356
378
|
|