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
|
@@ -20,28 +20,37 @@ import numpy as np
|
|
|
20
20
|
from qtpy import QtWidgets
|
|
21
21
|
from qtpy.QtCore import Qt, QObject, Slot, QThread, Signal
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
from
|
|
23
|
+
|
|
24
|
+
from pymodaq_data.data import DataToExport, Axis, DataDistribution
|
|
25
|
+
from pymodaq.utils.data import DataFromPlugins
|
|
26
|
+
|
|
27
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
25
28
|
from pymodaq.control_modules.utils import ParameterControlModule
|
|
26
|
-
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
|
|
30
|
-
from
|
|
29
|
+
|
|
30
|
+
from pymodaq_gui.utils.file_io import select_file
|
|
31
|
+
from pymodaq_gui.utils.widgets.lcd import LCD
|
|
32
|
+
|
|
33
|
+
from pymodaq_utils.config import Config, get_set_local_dir
|
|
34
|
+
from pymodaq_gui.h5modules.browsing import browse_data
|
|
35
|
+
from pymodaq_gui.h5modules.saving import H5Saver
|
|
31
36
|
from pymodaq.utils.h5modules import module_saving
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
|
|
35
|
-
from
|
|
37
|
+
from pymodaq_data.h5modules.backends import Node
|
|
38
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
39
|
+
|
|
40
|
+
from pymodaq_gui.parameter import ioxml, Parameter
|
|
41
|
+
from pymodaq_gui.parameter import utils as putils
|
|
36
42
|
from pymodaq.control_modules.viewer_utility_classes import params as daq_viewer_params
|
|
37
|
-
from
|
|
38
|
-
from
|
|
39
|
-
from
|
|
43
|
+
from pymodaq_utils import utils
|
|
44
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
45
|
+
from pymodaq_gui.utils import DockArea, Dock
|
|
46
|
+
from pymodaq_gui.utils.utils import mkQApp
|
|
47
|
+
|
|
48
|
+
from pymodaq.utils.gui_utils import get_splash_sc
|
|
40
49
|
from pymodaq.control_modules.daq_viewer_ui import DAQ_Viewer_UI
|
|
41
50
|
from pymodaq.control_modules.utils import DET_TYPES, get_viewer_plugins, DAQTypesEnum, DetectorError
|
|
42
|
-
from
|
|
43
|
-
from
|
|
44
|
-
from
|
|
51
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerBase
|
|
52
|
+
from pymodaq_gui.plotting.data_viewers import ViewersEnum
|
|
53
|
+
from pymodaq_utils.enums import enum_checker
|
|
45
54
|
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base
|
|
46
55
|
|
|
47
56
|
from pymodaq.utils.leco.pymodaq_listener import ViewerActorListener, LECOClientCommands
|
|
@@ -261,6 +270,20 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
261
270
|
deprecation_msg('viewers_docks is a deprecated property use viewer_docks instead')
|
|
262
271
|
return self.viewer_docks
|
|
263
272
|
|
|
273
|
+
@property
|
|
274
|
+
def master(self) -> bool:
|
|
275
|
+
""" Get/Set programmatically the Master/Slave status of a detector"""
|
|
276
|
+
if self.initialized_state:
|
|
277
|
+
return self.settings['detector_settings', 'controller_status'] == 'Master'
|
|
278
|
+
else:
|
|
279
|
+
return True
|
|
280
|
+
|
|
281
|
+
@master.setter
|
|
282
|
+
def master(self, is_master: bool):
|
|
283
|
+
if self.initialized_state:
|
|
284
|
+
self.settings.child('detector_settings', 'controller_status').setValue(
|
|
285
|
+
'Master' if is_master else 'Slave')
|
|
286
|
+
|
|
264
287
|
def daq_type_changed_from_ui(self, daq_type: DAQTypesEnum):
|
|
265
288
|
""" Apply changes from the selection of a different DAQTypesEnum in the UI
|
|
266
289
|
|
|
@@ -368,7 +391,7 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
368
391
|
return self._viewers
|
|
369
392
|
|
|
370
393
|
@viewers.setter
|
|
371
|
-
def viewers(self, viewers):
|
|
394
|
+
def viewers(self, viewers: List[ViewerBase]):
|
|
372
395
|
for viewer in self._viewers:
|
|
373
396
|
try:
|
|
374
397
|
viewer.data_to_export_signal.disconnect()
|
|
@@ -384,6 +407,11 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
384
407
|
lambda roi_info: self.command_hardware.emit(
|
|
385
408
|
ThreadCommand('roi_select',
|
|
386
409
|
dict(roi_info=roi_info, ind_viewer=ind_viewer))))
|
|
410
|
+
viewer.crosshair_dragged.connect(
|
|
411
|
+
lambda crosshair_info: self.command_hardware.emit(
|
|
412
|
+
ThreadCommand('crosshair',
|
|
413
|
+
dict(crosshair_info=crosshair_info, ind_viewer=ind_viewer))))
|
|
414
|
+
|
|
387
415
|
|
|
388
416
|
self._viewers = viewers
|
|
389
417
|
|
|
@@ -996,7 +1024,8 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
996
1024
|
if self.settings.child('main_settings', 'overshoot', 'stop_overshoot').value():
|
|
997
1025
|
for dwa in dte:
|
|
998
1026
|
for data_array in dwa.data:
|
|
999
|
-
if any(data_array >= self.settings
|
|
1027
|
+
if np.any(data_array >= self.settings['main_settings', 'overshoot',
|
|
1028
|
+
'overshoot_value']):
|
|
1000
1029
|
self.overshoot_signal.emit(True)
|
|
1001
1030
|
|
|
1002
1031
|
def get_scaling_options(self):
|
|
@@ -1038,11 +1067,11 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
1038
1067
|
super().thread_status(status, 'detector')
|
|
1039
1068
|
|
|
1040
1069
|
if status.command == "ini_detector":
|
|
1041
|
-
self.update_status("detector initialized: " + str(status.attribute[
|
|
1070
|
+
self.update_status("detector initialized: " + str(status.attribute['initialized']))
|
|
1042
1071
|
if self.ui is not None:
|
|
1043
|
-
self.ui.detector_init = status.attribute[
|
|
1044
|
-
if status.attribute[
|
|
1045
|
-
self.controller = status.attribute[
|
|
1072
|
+
self.ui.detector_init = status.attribute['initialized']
|
|
1073
|
+
if status.attribute['initialized']:
|
|
1074
|
+
self.controller = status.attribute['controller']
|
|
1046
1075
|
self._initialized_state = True
|
|
1047
1076
|
else:
|
|
1048
1077
|
self._initialized_state = False
|
|
@@ -1206,7 +1235,7 @@ class DAQ_Detector(QObject):
|
|
|
1206
1235
|
"""
|
|
1207
1236
|
if command.command == "ini_detector":
|
|
1208
1237
|
status = self.ini_detector(*command.attribute)
|
|
1209
|
-
self.status_sig.emit(ThreadCommand(command.command,
|
|
1238
|
+
self.status_sig.emit(ThreadCommand(command.command, status))
|
|
1210
1239
|
|
|
1211
1240
|
elif command.command == "close":
|
|
1212
1241
|
status = self.close()
|
|
@@ -1408,7 +1437,7 @@ class DAQ_Detector(QObject):
|
|
|
1408
1437
|
def close(self):
|
|
1409
1438
|
""" Call the close method of the instrument plugin class
|
|
1410
1439
|
"""
|
|
1411
|
-
if self.detector is not None:
|
|
1440
|
+
if self.detector is not None and self.detector.controller is not None:
|
|
1412
1441
|
status = self.detector.close()
|
|
1413
1442
|
return status
|
|
1414
1443
|
|
|
@@ -1436,16 +1465,12 @@ def main(init_qt=True, init_det=False):
|
|
|
1436
1465
|
""" Method called to start the DAQ_Viewer in standalone mode"""
|
|
1437
1466
|
|
|
1438
1467
|
if init_qt: # used for the test suite
|
|
1439
|
-
app =
|
|
1440
|
-
if config('style', 'darkstyle'):
|
|
1441
|
-
import qdarkstyle
|
|
1442
|
-
app.setStyleSheet(qdarkstyle.load_stylesheet(qdarkstyle.DarkPalette))
|
|
1468
|
+
app = mkQApp("PyMoDAQ Viewer")
|
|
1443
1469
|
|
|
1444
1470
|
win = QtWidgets.QMainWindow()
|
|
1445
1471
|
area = DockArea()
|
|
1446
1472
|
win.setCentralWidget(area)
|
|
1447
1473
|
win.resize(1000, 500)
|
|
1448
|
-
win.setWindowTitle('PyMoDAQ Viewer')
|
|
1449
1474
|
win.show()
|
|
1450
1475
|
|
|
1451
1476
|
title = "Testing"
|
|
@@ -15,13 +15,13 @@ from qtpy.QtWidgets import QVBoxLayout, QWidget, QComboBox
|
|
|
15
15
|
from pymodaq.utils.daq_utils import ThreadCommand
|
|
16
16
|
from pymodaq.control_modules.utils import ControlModuleUI
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
18
|
+
from pymodaq_gui.utils.widgets import PushButtonIcon, LabelWithFont, QLED
|
|
19
|
+
from pymodaq_gui.utils import Dock
|
|
20
|
+
from pymodaq_utils.config import Config
|
|
21
21
|
from pymodaq.control_modules.utils import DET_TYPES, DAQTypesEnum
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
22
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerFactory, ViewerDispatcher
|
|
23
|
+
from pymodaq_gui.plotting.data_viewers import ViewersEnum
|
|
24
|
+
from pymodaq_utils.enums import enum_checker
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
viewer_factory = ViewerFactory()
|
pymodaq/control_modules/mocks.py
CHANGED
|
@@ -5,7 +5,7 @@ Created the 16/03/2023
|
|
|
5
5
|
@author: Sebastien Weber
|
|
6
6
|
"""
|
|
7
7
|
from pymodaq.utils.parameter import Parameter
|
|
8
|
-
from
|
|
8
|
+
from pymodaq_gui.h5modules import saving
|
|
9
9
|
from pymodaq.utils.h5modules.module_saving import DetectorSaver, ActuatorSaver, ScanSaver
|
|
10
10
|
|
|
11
11
|
|
|
@@ -10,20 +10,27 @@ import numpy as np
|
|
|
10
10
|
from qtpy import QtWidgets
|
|
11
11
|
from qtpy.QtCore import QObject, Slot, Signal, QTimer
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
from
|
|
13
|
+
from pymodaq_utils.utils import ThreadCommand, find_keys_from_val
|
|
14
|
+
from pymodaq_utils import config as configmod
|
|
15
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
16
|
+
from pymodaq_utils.enums import BaseEnum, enum_checker
|
|
17
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
18
|
+
|
|
19
|
+
import pymodaq_gui.parameter.utils as putils
|
|
20
|
+
from pymodaq_gui.parameter import Parameter
|
|
21
|
+
from pymodaq_gui.parameter import ioxml
|
|
22
|
+
from pymodaq_gui.utils.utils import mkQApp
|
|
23
|
+
|
|
21
24
|
from pymodaq.utils.tcp_ip.tcp_server_client import TCPServer, tcp_parameters
|
|
25
|
+
|
|
26
|
+
from pymodaq_data.data import DataUnitError, Q_
|
|
27
|
+
|
|
22
28
|
from pymodaq.utils.messenger import deprecation_msg
|
|
23
|
-
from pymodaq.utils.data import DataActuator
|
|
24
|
-
from
|
|
25
|
-
|
|
26
|
-
from
|
|
29
|
+
from pymodaq.utils.data import DataActuator
|
|
30
|
+
from pymodaq_utils.enums import BaseEnum, enum_checker
|
|
31
|
+
|
|
32
|
+
from pymodaq_utils.serialize.mysocket import Socket
|
|
33
|
+
from pymodaq_utils.serialize.serializer_legacy import DeSerializer, Serializer
|
|
27
34
|
from pymodaq import Unit
|
|
28
35
|
from pint.errors import OffsetUnitCalculusError
|
|
29
36
|
|
|
@@ -67,11 +74,11 @@ class DataActuatorType(BaseEnum):
|
|
|
67
74
|
def comon_parameters(epsilon=config('actuator', 'epsilon_default'),
|
|
68
75
|
epsilons=None):
|
|
69
76
|
if epsilons is not None:
|
|
70
|
-
epsilon=epsilons
|
|
77
|
+
epsilon = epsilons
|
|
71
78
|
if isinstance(epsilon, list):
|
|
72
|
-
epsilon=epsilon[0]
|
|
79
|
+
epsilon = epsilon[0]
|
|
73
80
|
elif isinstance(epsilon, dict):
|
|
74
|
-
epsilon=epsilon[list[epsilon.keys()][0]]
|
|
81
|
+
epsilon = epsilon[list[epsilon.keys()][0]]
|
|
75
82
|
|
|
76
83
|
return [{'title': 'Units:', 'name': 'units', 'type': 'str', 'value': '', 'readonly': True},
|
|
77
84
|
{'title': 'Epsilon:', 'name': 'epsilon', 'type': 'float',
|
|
@@ -124,7 +131,7 @@ def comon_parameters_fun(is_multiaxes=False, axes_names=None,
|
|
|
124
131
|
|
|
125
132
|
Parameters
|
|
126
133
|
----------
|
|
127
|
-
is_multiaxes: bool
|
|
134
|
+
is_multiaxes: bool
|
|
128
135
|
If True, display the particular settings to define which axis the controller is driving
|
|
129
136
|
axes_names: deprecated, use axis_names
|
|
130
137
|
axis_names: list of str or dictionnary of string as key and integer as value
|
|
@@ -140,7 +147,7 @@ def comon_parameters_fun(is_multiaxes=False, axes_names=None,
|
|
|
140
147
|
axes_names = ['']
|
|
141
148
|
axis_names = axes_names
|
|
142
149
|
|
|
143
|
-
is_multiaxes = len(axis_names) > 1
|
|
150
|
+
is_multiaxes = len(axis_names) > 1 or is_multiaxes
|
|
144
151
|
if isinstance(axis_names, list):
|
|
145
152
|
if len(axis_names) > 0:
|
|
146
153
|
axis_name = axis_names[0]
|
|
@@ -149,11 +156,14 @@ def comon_parameters_fun(is_multiaxes=False, axes_names=None,
|
|
|
149
156
|
axis_name = ''
|
|
150
157
|
elif isinstance(axis_names, dict):
|
|
151
158
|
axis_name = axis_names[list(axis_names.keys())[0]]
|
|
159
|
+
else:
|
|
160
|
+
raise ValueError('axis_names should be either a list of string or a dict with strings '
|
|
161
|
+
'as keys')
|
|
152
162
|
params = [
|
|
153
163
|
{'title': 'MultiAxes:', 'name': 'multiaxes', 'type': 'group',
|
|
154
|
-
'visible':
|
|
155
|
-
{'title': '
|
|
156
|
-
'
|
|
164
|
+
'visible': True, 'children': [
|
|
165
|
+
{'title': 'Controller ID:', 'name': 'controller_ID', 'type': 'int', 'value': 0,
|
|
166
|
+
'default': 0},
|
|
157
167
|
{'title': 'Status:', 'name': 'multi_status', 'type': 'list',
|
|
158
168
|
'value': 'Master' if master else 'Slave', 'limits': ['Master', 'Slave']},
|
|
159
169
|
{'title': 'Axis:', 'name': 'axis', 'type': 'list', 'limits': axis_names,
|
|
@@ -168,7 +178,7 @@ params = [
|
|
|
168
178
|
{'title': 'Actuator type:', 'name': 'move_type', 'type': 'str', 'value': '', 'readonly': True},
|
|
169
179
|
{'title': 'Actuator name:', 'name': 'module_name', 'type': 'str', 'value': '', 'readonly': True},
|
|
170
180
|
{'title': 'Plugin Config:', 'name': 'plugin_config', 'type': 'bool_push', 'label': 'Show Config', },
|
|
171
|
-
|
|
181
|
+
|
|
172
182
|
{'title': 'Refresh value (ms):', 'name': 'refresh_timeout', 'type': 'int',
|
|
173
183
|
'value': config('actuator', 'refresh_timeout_ms')},
|
|
174
184
|
{'title': 'TCP/IP options:', 'name': 'tcpip', 'type': 'group', 'visible': True, 'expanded': False,
|
|
@@ -205,13 +215,13 @@ def main(plugin_file, init=True, title='test'):
|
|
|
205
215
|
from qtpy import QtWidgets
|
|
206
216
|
from pymodaq.control_modules.daq_move import DAQ_Move
|
|
207
217
|
from pathlib import Path
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
|
|
219
|
+
act = Path(plugin_file).stem.split('daq_move_')[1]
|
|
220
|
+
|
|
221
|
+
app = mkQApp("PyMoDAQ Viewer")
|
|
212
222
|
|
|
213
223
|
widget = QtWidgets.QWidget()
|
|
214
|
-
prog = DAQ_Move(widget, title=title,)
|
|
224
|
+
prog = DAQ_Move(widget, title=title, actuator=act)
|
|
215
225
|
widget.show()
|
|
216
226
|
prog.actuator = Path(plugin_file).stem[9:]
|
|
217
227
|
if init:
|
|
@@ -507,9 +517,10 @@ class DAQ_Move_base(QObject):
|
|
|
507
517
|
old_controller = slave_controller
|
|
508
518
|
|
|
509
519
|
self.status.update(edict(info="", controller=None, initialized=False))
|
|
510
|
-
if
|
|
520
|
+
if not self.is_master:
|
|
511
521
|
if old_controller is None:
|
|
512
|
-
raise Exception('no controller has been defined externally while this axe
|
|
522
|
+
raise Exception('no controller has been defined externally while this axe '
|
|
523
|
+
'is a slave one')
|
|
513
524
|
else:
|
|
514
525
|
controller = old_controller
|
|
515
526
|
else: # Master stage
|
|
@@ -581,7 +592,6 @@ class DAQ_Move_base(QObject):
|
|
|
581
592
|
"""
|
|
582
593
|
return self.settings['multiaxes', 'multi_status'] == 'Master'
|
|
583
594
|
|
|
584
|
-
|
|
585
595
|
@property
|
|
586
596
|
def ispolling(self):
|
|
587
597
|
""" Get/Set the polling status"""
|
|
@@ -596,18 +606,11 @@ class DAQ_Move_base(QObject):
|
|
|
596
606
|
|
|
597
607
|
Return the new position eventually coerced within the bounds
|
|
598
608
|
"""
|
|
599
|
-
if self.settings
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
self.emit_status(ThreadCommand('outofbounds', []))
|
|
605
|
-
elif position < self.settings.child('bounds', 'min_bound').value():
|
|
606
|
-
position = DataActuator(self._title,
|
|
607
|
-
data=self.settings.child('bounds', 'min_bound').value(),
|
|
608
|
-
units=self.axis_unit
|
|
609
|
-
)
|
|
610
|
-
self.emit_status(ThreadCommand('outofbounds', []))
|
|
609
|
+
if self.settings['bounds', 'is_bounds']:
|
|
610
|
+
for data_array in position:
|
|
611
|
+
data_array[data_array > self.settings['bounds', 'max_bound']] = self.settings['bounds', 'max_bound']
|
|
612
|
+
data_array[data_array < self.settings['bounds', 'min_bound']] = self.settings['bounds', 'min_bound']
|
|
613
|
+
self.emit_status(ThreadCommand('outofbounds', []))
|
|
611
614
|
return position
|
|
612
615
|
|
|
613
616
|
def get_actuator_value(self):
|
|
@@ -617,6 +620,10 @@ class DAQ_Move_base(QObject):
|
|
|
617
620
|
else:
|
|
618
621
|
raise NotImplementedError
|
|
619
622
|
|
|
623
|
+
|
|
624
|
+
def close(self):
|
|
625
|
+
raise NotImplementedError
|
|
626
|
+
|
|
620
627
|
def move_abs(self, value: Union[float, DataActuator]):
|
|
621
628
|
if hasattr(self, 'move_Abs'):
|
|
622
629
|
deprecation_msg('move_Abs method in plugins is deprecated, use move_abs', 3)
|
|
@@ -773,6 +780,7 @@ class DAQ_Move_base(QObject):
|
|
|
773
780
|
logger.info('Timeout activated')
|
|
774
781
|
else:
|
|
775
782
|
self.poll_timer.stop()
|
|
783
|
+
self.current_value = self.get_actuator_value()
|
|
776
784
|
logger.debug(f'Current value: {self._current_value}')
|
|
777
785
|
self.move_done(self._current_value)
|
|
778
786
|
|
|
@@ -907,13 +915,13 @@ class DAQ_Move_TCP_server(DAQ_Move_base, TCPServer):
|
|
|
907
915
|
|
|
908
916
|
pos = self.get_position_with_scaling(pos)
|
|
909
917
|
self._current_value = pos
|
|
910
|
-
self.emit_status(ThreadCommand('get_actuator_value',
|
|
918
|
+
self.emit_status(ThreadCommand('get_actuator_value', pos))
|
|
911
919
|
|
|
912
920
|
elif command == 'move_done':
|
|
913
921
|
pos = DeSerializer(sock).dwa_deserialization()
|
|
914
922
|
pos = self.get_position_with_scaling(pos)
|
|
915
923
|
self._current_value = pos
|
|
916
|
-
self.emit_status(ThreadCommand('move_done',
|
|
924
|
+
self.emit_status(ThreadCommand('move_done', pos))
|
|
917
925
|
else:
|
|
918
926
|
self.send_command(sock, command)
|
|
919
927
|
|
pymodaq/control_modules/utils.py
CHANGED
|
@@ -11,18 +11,22 @@ from easydict import EasyDict as edict
|
|
|
11
11
|
|
|
12
12
|
from qtpy import QtCore
|
|
13
13
|
from qtpy.QtCore import Signal, QObject, Qt, Slot, QThread
|
|
14
|
-
|
|
15
|
-
from
|
|
16
|
-
from
|
|
14
|
+
|
|
15
|
+
from pymodaq_utils.utils import ThreadCommand, find_dict_in_list_from_key_val
|
|
16
|
+
from pymodaq_utils.config import Config
|
|
17
|
+
from pymodaq_utils.enums import BaseEnum, enum_checker
|
|
18
|
+
from pymodaq_utils.logger import get_base_logger, set_logger, get_module_name
|
|
19
|
+
|
|
20
|
+
from pymodaq_gui.utils.custom_app import CustomApp
|
|
21
|
+
from pymodaq_gui.parameter import Parameter, ioxml
|
|
22
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
23
|
+
from pymodaq_gui.plotting.data_viewers import ViewersEnum
|
|
24
|
+
|
|
17
25
|
from pymodaq.utils.tcp_ip.tcp_server_client import TCPClient
|
|
18
|
-
from pymodaq.utils.parameter import Parameter, ioxml
|
|
19
|
-
from pymodaq.utils.managers.parameter_manager import ParameterManager
|
|
20
|
-
from pymodaq.utils.enums import BaseEnum, enum_checker
|
|
21
|
-
from pymodaq.utils.plotting.data_viewers import ViewersEnum
|
|
22
26
|
from pymodaq.utils.exceptions import DetectorError
|
|
23
|
-
from pymodaq.utils import config as configmod
|
|
24
27
|
from pymodaq.utils.leco.pymodaq_listener import ActorListener, LECOClientCommands, LECOCommands
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
from pymodaq.utils.daq_utils import get_plugins
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
class DAQTypesEnum(BaseEnum):
|
|
@@ -60,17 +64,21 @@ class DAQTypesEnum(BaseEnum):
|
|
|
60
64
|
def get_dim(self):
|
|
61
65
|
return self.value.split('Viewer')[1].split('D')[0]
|
|
62
66
|
|
|
67
|
+
|
|
63
68
|
DAQ_TYPES = DAQTypesEnum
|
|
64
69
|
|
|
65
70
|
DET_TYPES = {'DAQ0D': get_plugins('daq_0Dviewer'),
|
|
66
71
|
'DAQ1D': get_plugins('daq_1Dviewer'),
|
|
67
72
|
'DAQ2D': get_plugins('daq_2Dviewer'),
|
|
68
|
-
'DAQND': get_plugins('daq_NDviewer'),
|
|
73
|
+
'DAQND': get_plugins('daq_NDviewer'),
|
|
74
|
+
}
|
|
69
75
|
|
|
70
76
|
if len(DET_TYPES['DAQ0D']) == 0:
|
|
71
77
|
raise DetectorError('No installed Detector')
|
|
72
78
|
|
|
79
|
+
|
|
73
80
|
config = Config()
|
|
81
|
+
logger = set_logger(get_module_name(__file__))
|
|
74
82
|
|
|
75
83
|
|
|
76
84
|
class ViewerError(Exception):
|
|
@@ -123,11 +131,14 @@ class ControlModule(QObject):
|
|
|
123
131
|
self._tcpclient_thread = None
|
|
124
132
|
self._hardware_thread = None
|
|
125
133
|
self.module_and_data_saver = None
|
|
126
|
-
self.plugin_config: Optional[
|
|
134
|
+
self.plugin_config: Optional[Config] = None
|
|
127
135
|
|
|
128
136
|
def __repr__(self):
|
|
129
137
|
return f'{self.__class__.__name__}: {self.title}'
|
|
130
138
|
|
|
139
|
+
def custom_command(self, command: str, **kwargs):
|
|
140
|
+
self.command_hardware.emit(ThreadCommand(command, kwargs))
|
|
141
|
+
|
|
131
142
|
def thread_status(self, status: ThreadCommand, control_module_type='detector'):
|
|
132
143
|
"""Get back info (using the ThreadCommand object) from the hardware
|
|
133
144
|
|
|
@@ -138,7 +149,8 @@ class ControlModule(QObject):
|
|
|
138
149
|
----------
|
|
139
150
|
status: ThreadCommand
|
|
140
151
|
The info returned from the hardware, the command (str) can be either:
|
|
141
|
-
* Update_Status: display messages and log info
|
|
152
|
+
* Update_Status: display messages and log info (deprecated)
|
|
153
|
+
* update_status: display info on the UI status bar
|
|
142
154
|
* close: close the current thread and delete corresponding attribute on cascade.
|
|
143
155
|
* update_settings: Update the "detector setting" node in the settings tree.
|
|
144
156
|
* update_main_settings: update the "main setting" node in the settings tree
|
|
@@ -154,6 +166,9 @@ class ControlModule(QObject):
|
|
|
154
166
|
else:
|
|
155
167
|
self.update_status(status.attribute[0])
|
|
156
168
|
|
|
169
|
+
elif status.command == 'update_status':
|
|
170
|
+
self.update_status(status.attribute)
|
|
171
|
+
|
|
157
172
|
elif status.command == "close":
|
|
158
173
|
try:
|
|
159
174
|
self.update_status(status.attribute[0])
|
|
@@ -167,7 +182,7 @@ class ControlModule(QObject):
|
|
|
167
182
|
self._hardware_thread.terminate()
|
|
168
183
|
self.update_status('thread is locked?!', 'log')
|
|
169
184
|
except Exception as e:
|
|
170
|
-
|
|
185
|
+
logger.exception(f'Wrong call to the "close" command: \n{str(e)}')
|
|
171
186
|
|
|
172
187
|
self._initialized_state = False
|
|
173
188
|
self.init_signal.emit(self._initialized_state)
|
|
@@ -182,7 +197,7 @@ class ControlModule(QObject):
|
|
|
182
197
|
elif status.attribute[2] == 'options':
|
|
183
198
|
self.settings.child('main_settings', *status.attribute[0]).setOpts(**status.attribute[1])
|
|
184
199
|
except Exception as e:
|
|
185
|
-
|
|
200
|
+
logger.exception(f'Wrong call to the "update_main_settings" command: \n{str(e)}')
|
|
186
201
|
|
|
187
202
|
elif status.command == 'update_settings':
|
|
188
203
|
# using this the settings shown in the UI for the plugin reflects the real plugin settings
|
|
@@ -190,7 +205,7 @@ class ControlModule(QObject):
|
|
|
190
205
|
self.settings.sigTreeStateChanged.disconnect(
|
|
191
206
|
self.parameter_tree_changed) # any changes on the detcetor settings will update accordingly the gui
|
|
192
207
|
except Exception as e:
|
|
193
|
-
|
|
208
|
+
logger.exception(str(e))
|
|
194
209
|
try:
|
|
195
210
|
if status.attribute[2] == 'value':
|
|
196
211
|
self.settings.child(f'{control_module_type}_settings',
|
|
@@ -209,9 +224,18 @@ class ControlModule(QObject):
|
|
|
209
224
|
*status.attribute[0]).addChild(status.attribute[1][0])
|
|
210
225
|
|
|
211
226
|
except Exception as e:
|
|
212
|
-
|
|
227
|
+
logger.exception(f'Wrong call to the "update_settings" command: \n{str(e)}')
|
|
213
228
|
self.settings.sigTreeStateChanged.connect(self.parameter_tree_changed)
|
|
214
229
|
|
|
230
|
+
elif status.command == 'update_ui':
|
|
231
|
+
try:
|
|
232
|
+
if self.ui is not None:
|
|
233
|
+
if hasattr(self.ui, status.attribute):
|
|
234
|
+
getattr(self.ui, status.attribute)(*status.args,
|
|
235
|
+
**status.kwargs)
|
|
236
|
+
except Exception as e:
|
|
237
|
+
logger.info(f'Wrong call to the "update_ui" command: \n{str(e)}')
|
|
238
|
+
|
|
215
239
|
elif status.command == 'raise_timeout':
|
|
216
240
|
self.raise_timeout()
|
|
217
241
|
|
|
@@ -295,12 +319,12 @@ class ControlModule(QObject):
|
|
|
295
319
|
def show_log(self):
|
|
296
320
|
"""Open the log file in the default text editor"""
|
|
297
321
|
import webbrowser
|
|
298
|
-
webbrowser.open(get_base_logger(
|
|
322
|
+
webbrowser.open(get_base_logger(logger).handlers[0].baseFilename)
|
|
299
323
|
|
|
300
324
|
def show_config(self, config: Config) -> Config:
|
|
301
325
|
""" Display in a tree the current configuration"""
|
|
302
326
|
if config is not None:
|
|
303
|
-
from
|
|
327
|
+
from pymodaq_gui.utils.widgets.tree_toml import TreeFromToml
|
|
304
328
|
config_tree = TreeFromToml(config)
|
|
305
329
|
config_tree.show_dialog()
|
|
306
330
|
|
|
@@ -320,7 +344,7 @@ class ControlModule(QObject):
|
|
|
320
344
|
self.ui.display_status(txt)
|
|
321
345
|
self.status_sig.emit(txt)
|
|
322
346
|
if log:
|
|
323
|
-
|
|
347
|
+
logger.info(txt)
|
|
324
348
|
|
|
325
349
|
def manage_ui_actions(self, action_name: str, attribute: str, value):
|
|
326
350
|
"""Method to manage actions for the UI (if any).
|
|
@@ -358,7 +382,6 @@ class ParameterControlModule(ParameterManager, ControlModule):
|
|
|
358
382
|
listener_class: Type[ActorListener] = ActorListener
|
|
359
383
|
|
|
360
384
|
def __init__(self, **kwargs):
|
|
361
|
-
QObject.__init__(self)
|
|
362
385
|
ParameterManager.__init__(self, action_list=('save', 'update'))
|
|
363
386
|
ControlModule.__init__(self)
|
|
364
387
|
|