pymodaq 4.2.3__py3-none-any.whl → 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymodaq might be problematic. Click here for more details.
- pymodaq/__init__.py +30 -23
- pymodaq/control_modules/daq_move.py +27 -14
- pymodaq/control_modules/daq_move_ui.py +33 -16
- pymodaq/control_modules/daq_viewer.py +38 -28
- pymodaq/control_modules/daq_viewer_ui.py +6 -6
- pymodaq/control_modules/mocks.py +1 -1
- pymodaq/control_modules/move_utility_classes.py +19 -10
- pymodaq/control_modules/utils.py +18 -12
- pymodaq/control_modules/viewer_utility_classes.py +13 -4
- pymodaq/dashboard.py +166 -118
- pymodaq/examples/custom_app.py +13 -16
- pymodaq/examples/custom_viewer.py +7 -7
- pymodaq/examples/function_plotter.py +13 -12
- pymodaq/examples/parameter_ex.py +50 -25
- pymodaq/examples/tcp_client.py +1 -1
- pymodaq/extensions/__init__.py +1 -1
- pymodaq/extensions/bayesian/bayesian_optimisation.py +15 -12
- pymodaq/extensions/bayesian/utils.py +10 -10
- pymodaq/extensions/console.py +10 -13
- pymodaq/extensions/{daq_logger.py → daq_logger/daq_logger.py} +36 -56
- 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 +153 -247
- pymodaq/extensions/daq_scan_ui.py +11 -9
- pymodaq/extensions/h5browser.py +8 -8
- pymodaq/extensions/pid/__init__.py +6 -3
- pymodaq/extensions/pid/daq_move_PID.py +4 -2
- pymodaq/extensions/pid/pid_controller.py +15 -12
- pymodaq/extensions/pid/utils.py +10 -5
- pymodaq/extensions/utils.py +5 -3
- pymodaq/post_treatment/load_and_plot.py +10 -7
- pymodaq/resources/preset_default.xml +1 -1
- pymodaq/utils/array_manipulation.py +4 -384
- pymodaq/utils/calibration_camera.py +12 -9
- pymodaq/utils/chrono_timer.py +7 -5
- pymodaq/utils/config.py +3 -450
- pymodaq/utils/daq_utils.py +6 -664
- pymodaq/utils/data.py +9 -2774
- pymodaq/utils/exceptions.py +0 -4
- pymodaq/utils/gui_utils/__init__.py +8 -8
- pymodaq/utils/gui_utils/loader_utils.py +38 -0
- pymodaq/utils/gui_utils/utils.py +6 -138
- pymodaq/utils/h5modules/__init__.py +0 -4
- pymodaq/utils/h5modules/module_saving.py +15 -8
- pymodaq/utils/leco/__init__.py +2 -2
- pymodaq/utils/leco/daq_move_LECODirector.py +2 -2
- pymodaq/utils/leco/daq_xDviewer_LECODirector.py +2 -2
- pymodaq/utils/leco/director_utils.py +2 -2
- pymodaq/utils/leco/leco_director.py +3 -3
- pymodaq/utils/leco/pymodaq_listener.py +2 -2
- pymodaq/utils/leco/utils.py +1 -1
- pymodaq/utils/logger.py +4 -76
- pymodaq/utils/managers/batchscan_manager.py +16 -19
- pymodaq/utils/managers/modules_manager.py +10 -7
- pymodaq/utils/managers/overshoot_manager.py +3 -5
- pymodaq/utils/managers/preset_manager.py +37 -15
- pymodaq/utils/managers/preset_manager_utils.py +11 -9
- pymodaq/utils/managers/remote_manager.py +12 -10
- pymodaq/utils/math_utils.py +4 -572
- pymodaq/utils/parameter/__init__.py +4 -11
- pymodaq/utils/parameter/utils.py +4 -299
- 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/serializer.py +64 -16
- pymodaq/utils/tcp_ip/tcp_server_client.py +10 -8
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/METADATA +5 -3
- pymodaq-5.0.0.dist-info/RECORD +123 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/WHEEL +1 -1
- 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/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/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/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/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 -234
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources_rc.py +0 -127150
- pymodaq/resources/QtDesigner_Ressources/icons.svg +0 -142
- pymodaq/resources/VERSION +0 -1
- pymodaq/resources/config_template.toml +0 -90
- 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/enums.py +0 -76
- 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 -93
- 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/lcd.py +0 -111
- 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 -102
- pymodaq/utils/h5modules/backends.py +0 -1022
- pymodaq/utils/h5modules/browsing.py +0 -625
- pymodaq/utils/h5modules/data_saving.py +0 -1101
- 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 -282
- pymodaq/utils/managers/roi_manager.py +0 -726
- pymodaq/utils/messenger.py +0 -66
- pymodaq/utils/parameter/ioxml.py +0 -542
- 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 -145
- 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 -274
- pymodaq/utils/plotting/data_viewers/viewer0D.py +0 -298
- pymodaq/utils/plotting/data_viewers/viewer1D.py +0 -820
- 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.2.3.dist-info/RECORD +0 -438
- /pymodaq/{post_treatment/daq_analysis → extensions/daq_logger}/__init__.py +0 -0
- /pymodaq/{utils/abstract/logger.py → extensions/daq_logger/abstract.py} +0 -0
- /pymodaq/{resources/QtDesigner_Ressources → extensions/daq_logger/db}/__init__.py +0 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/entry_points.txt +0 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/licenses/LICENSE +0 -0
pymodaq/__init__.py
CHANGED
|
@@ -29,23 +29,42 @@ try:
|
|
|
29
29
|
# with open(str(Path(__file__).parent.joinpath('resources/VERSION')), 'r') as fvers:
|
|
30
30
|
# __version__ = fvers.read().strip()
|
|
31
31
|
|
|
32
|
-
from
|
|
33
|
-
from
|
|
32
|
+
from pymodaq_utils.logger import set_logger
|
|
33
|
+
from pymodaq_utils.utils import get_version
|
|
34
34
|
__version__ = get_version()
|
|
35
35
|
try:
|
|
36
36
|
logger = set_logger('pymodaq', add_handler=True, base_logger=True)
|
|
37
37
|
except Exception:
|
|
38
38
|
print("Couldn't create the local folder to store logs , presets...")
|
|
39
|
+
|
|
40
|
+
logger.info('')
|
|
41
|
+
logger.info('')
|
|
42
|
+
logger.info('************************')
|
|
43
|
+
logger.info('Starting PyMoDAQ modules')
|
|
44
|
+
logger.info('************************')
|
|
45
|
+
logger.info('')
|
|
46
|
+
logger.info('')
|
|
47
|
+
logger.info('************************')
|
|
48
|
+
logger.info('Initializing the pint unit register')
|
|
49
|
+
logger.info('************************')
|
|
50
|
+
ureg = UnitRegistry()
|
|
51
|
+
ureg.default_format = '~'
|
|
52
|
+
Q_ = ureg.Quantity
|
|
53
|
+
Unit = ureg.Unit
|
|
54
|
+
logger.info('')
|
|
55
|
+
logger.info('')
|
|
56
|
+
|
|
39
57
|
# in a try statement for compilation on readthedocs server but if this fail, you cannot use the code
|
|
40
|
-
from
|
|
41
|
-
from
|
|
42
|
-
from pymodaq.utils.daq_utils import get_instrument_plugins
|
|
43
|
-
|
|
58
|
+
from pymodaq_gui.plotting import data_viewers # imported here as to avoid circular imports later on
|
|
59
|
+
from pymodaq_gui.qt_utils import setLocale, set_qt_backend
|
|
60
|
+
from pymodaq.utils.daq_utils import copy_preset, get_instrument_plugins
|
|
61
|
+
|
|
62
|
+
from pymodaq_utils.config import Config
|
|
44
63
|
from pymodaq.utils.scanner.utils import register_scanners
|
|
45
|
-
from
|
|
64
|
+
from pymodaq_data.plotting.plotter.plotter import register_plotter, PlotterFactory
|
|
46
65
|
|
|
47
|
-
# issue on windows when using .NET code within multithreads, this below allows it but requires
|
|
48
|
-
# pywin32 (pythoncom) package
|
|
66
|
+
# issue on windows when using .NET code within multithreads, this below allows it but requires
|
|
67
|
+
# the pywin32 (pythoncom) package
|
|
49
68
|
if importlib.util.find_spec('clr') is not None:
|
|
50
69
|
try:
|
|
51
70
|
import pythoncom
|
|
@@ -58,13 +77,7 @@ try:
|
|
|
58
77
|
|
|
59
78
|
config = Config() # to ckeck for config file existence, otherwise create one
|
|
60
79
|
copy_preset()
|
|
61
|
-
|
|
62
|
-
logger.info('')
|
|
63
|
-
logger.info('************************')
|
|
64
|
-
logger.info('Starting PyMoDAQ modules')
|
|
65
|
-
logger.info('************************')
|
|
66
|
-
logger.info('')
|
|
67
|
-
logger.info('')
|
|
80
|
+
|
|
68
81
|
logger.info('************************')
|
|
69
82
|
logger.info(f"Setting Qt backend to: {config['qtbackend']['backend']} ...")
|
|
70
83
|
set_qt_backend()
|
|
@@ -77,13 +90,7 @@ try:
|
|
|
77
90
|
setLocale()
|
|
78
91
|
logger.info('')
|
|
79
92
|
logger.info('')
|
|
80
|
-
|
|
81
|
-
logger.info('Initializing the pint unit register')
|
|
82
|
-
logger.info('************************')
|
|
83
|
-
ureg = UnitRegistry()
|
|
84
|
-
Q_ = ureg.Quantity
|
|
85
|
-
logger.info('')
|
|
86
|
-
logger.info('')
|
|
93
|
+
|
|
87
94
|
logger.info('*************************************************************************')
|
|
88
95
|
logger.info(f"Getting the list of instrument plugins...")
|
|
89
96
|
logger.info('')
|
|
@@ -20,23 +20,26 @@ 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
|
-
from pymodaq.control_modules.move_utility_classes import params as daq_move_params
|
|
28
|
-
from pymodaq.utils import daq_utils as utils
|
|
29
|
-
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
|
|
30
26
|
from pymodaq.utils.gui_utils import get_splash_sc
|
|
31
|
-
from
|
|
27
|
+
from pymodaq_utils import config as config_mod
|
|
32
28
|
from pymodaq.utils.exceptions import ActuatorError
|
|
33
|
-
from
|
|
34
|
-
from pymodaq.utils.
|
|
35
|
-
from
|
|
36
|
-
|
|
37
|
-
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
|
|
38
35
|
|
|
36
|
+
from pymodaq.utils.h5modules import module_saving
|
|
37
|
+
from pymodaq.control_modules.utils import ParameterControlModule
|
|
38
|
+
from pymodaq.control_modules.daq_move_ui import DAQ_Move_UI
|
|
39
|
+
from pymodaq.control_modules.move_utility_classes import MoveCommand, DAQ_Move_base
|
|
40
|
+
from pymodaq.control_modules.move_utility_classes import params as daq_move_params
|
|
39
41
|
from pymodaq.utils.leco.pymodaq_listener import MoveActorListener, LECOMoveCommands
|
|
42
|
+
from pymodaq.utils.daq_utils import get_plugins
|
|
40
43
|
|
|
41
44
|
|
|
42
45
|
local_path = config_mod.get_set_local_dir()
|
|
@@ -44,7 +47,7 @@ sys.path.append(str(local_path))
|
|
|
44
47
|
logger = set_logger(get_module_name(__file__))
|
|
45
48
|
config = config_mod.Config()
|
|
46
49
|
|
|
47
|
-
DAQ_Move_Actuators =
|
|
50
|
+
DAQ_Move_Actuators = get_plugins('daq_move')
|
|
48
51
|
ACTUATOR_TYPES = [mov['name'] for mov in DAQ_Move_Actuators]
|
|
49
52
|
if len(ACTUATOR_TYPES) == 0:
|
|
50
53
|
raise ActuatorError('No installed Actuator')
|
|
@@ -479,6 +482,9 @@ class DAQ_Move(ParameterControlModule):
|
|
|
479
482
|
elif status.command == 'stop':
|
|
480
483
|
self.stop_motion()
|
|
481
484
|
|
|
485
|
+
elif status.command == 'units':
|
|
486
|
+
self.units = status.attribute
|
|
487
|
+
|
|
482
488
|
def get_actuator_value(self):
|
|
483
489
|
"""Get the current actuator value via the "get_actuator_value" command send to the hardware
|
|
484
490
|
|
|
@@ -551,8 +557,15 @@ class DAQ_Move(ParameterControlModule):
|
|
|
551
557
|
|
|
552
558
|
@property
|
|
553
559
|
def units(self):
|
|
560
|
+
"""Get/Set the units for the controller"""
|
|
554
561
|
return self.settings['move_settings', 'units']
|
|
555
562
|
|
|
563
|
+
@units.setter
|
|
564
|
+
def units(self, unit: str):
|
|
565
|
+
self.settings.child('move_settings', 'units').setValue(unit)
|
|
566
|
+
if self.ui is not None and config('actuator', 'display_units'):
|
|
567
|
+
self.ui.set_unit_as_suffix(unit)
|
|
568
|
+
|
|
556
569
|
def update_settings(self):
|
|
557
570
|
|
|
558
571
|
self.settings.child('main_settings', 'move_type').setValue(self._actuator_type)
|
|
@@ -9,16 +9,20 @@ from typing import List
|
|
|
9
9
|
import sys
|
|
10
10
|
|
|
11
11
|
from qtpy import QtWidgets
|
|
12
|
-
from qtpy.QtCore import Signal
|
|
12
|
+
from qtpy.QtCore import Signal, Qt
|
|
13
13
|
from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget, QToolBar, QComboBox
|
|
14
14
|
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
15
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
16
|
+
from pymodaq_utils.config import Config
|
|
17
|
+
from pymodaq_gui.utils.widgets import PushButtonIcon, LabelWithFont, SpinBox, QSpinBox_ro, QLED
|
|
18
|
+
from pymodaq_gui.utils import DockArea
|
|
19
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerDispatcher
|
|
20
|
+
|
|
18
21
|
from pymodaq.control_modules.utils import ControlModuleUI
|
|
19
|
-
from pymodaq.utils.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
from pymodaq.utils.data import DataToExport, DataActuator
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
config = Config()
|
|
22
26
|
|
|
23
27
|
|
|
24
28
|
class DAQ_Move_UI(ControlModuleUI):
|
|
@@ -151,11 +155,13 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
151
155
|
|
|
152
156
|
def setup_docks(self):
|
|
153
157
|
self.parent.setLayout(QVBoxLayout())
|
|
154
|
-
self.parent.layout().setSizeConstraint(QHBoxLayout.SetFixedSize)
|
|
158
|
+
#self.parent.layout().setSizeConstraint(QHBoxLayout.SetFixedSize)
|
|
155
159
|
self.parent.layout().setContentsMargins(2, 2, 2, 2)
|
|
156
160
|
|
|
157
161
|
widget = QWidget()
|
|
158
162
|
widget.setLayout(QHBoxLayout())
|
|
163
|
+
splitter_hor = QtWidgets.QSplitter(Qt.Orientation.Horizontal)
|
|
164
|
+
widget.layout().addWidget(splitter_hor)
|
|
159
165
|
self.parent.layout().addWidget(widget)
|
|
160
166
|
|
|
161
167
|
self.main_ui = QWidget()
|
|
@@ -174,9 +180,9 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
174
180
|
left_widget.layout().addWidget(self.control_ui)
|
|
175
181
|
left_widget.layout().setContentsMargins(0, 0, 0, 0)
|
|
176
182
|
left_widget.layout().addStretch()
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
widget.layout().addStretch()
|
|
183
|
+
splitter_hor.addWidget(left_widget)
|
|
184
|
+
splitter_hor.addWidget(self.settings_ui)
|
|
185
|
+
#widget.layout().addStretch()
|
|
180
186
|
|
|
181
187
|
# populate the main ui
|
|
182
188
|
self.move_toolbar = QToolBar()
|
|
@@ -187,9 +193,9 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
187
193
|
self.main_ui.layout().addWidget(self.toolbar, 0, 0, 1, 2)
|
|
188
194
|
self.main_ui.layout().addWidget(self.move_toolbar, 1, 0, 1, 2)
|
|
189
195
|
|
|
190
|
-
self.abs_value_sb = SpinBox()
|
|
196
|
+
self.abs_value_sb = SpinBox(step=0.1, dec=True)
|
|
191
197
|
self.abs_value_sb.setStyleSheet("background-color : lightgreen; color: black")
|
|
192
|
-
self.abs_value_sb_2 = SpinBox()
|
|
198
|
+
self.abs_value_sb_2 = SpinBox(step=0.1, dec=True)
|
|
193
199
|
self.abs_value_sb_2.setStyleSheet("background-color : lightcoral; color: black")
|
|
194
200
|
self.move_toolbar.addWidget(self.abs_value_sb)
|
|
195
201
|
self.move_toolbar.addWidget(self.abs_value_sb_2)
|
|
@@ -205,7 +211,9 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
205
211
|
self.main_ui.layout().addWidget(LabelWithFont('Current value:'), 4, 0)
|
|
206
212
|
self.move_done_led = QLED(readonly=True)
|
|
207
213
|
self.main_ui.layout().addWidget(self.move_done_led, 4, 1)
|
|
208
|
-
self.current_value_sb = QSpinBox_ro(font_size=
|
|
214
|
+
self.current_value_sb = QSpinBox_ro(font_size=20, min_height=27,
|
|
215
|
+
siPrefix=config('actuator', 'siprefix'),
|
|
216
|
+
)
|
|
209
217
|
self.main_ui.layout().addWidget(self.current_value_sb, 5, 0, 1, 2)
|
|
210
218
|
|
|
211
219
|
# populate the control ui
|
|
@@ -213,7 +221,7 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
213
221
|
self.control_ui.layout().addWidget(LabelWithFont('Abs. Value'), 0, 0)
|
|
214
222
|
self.find_home_pb = PushButtonIcon('home2', 'Find Home')
|
|
215
223
|
self.control_ui.layout().addWidget(self.find_home_pb, 0, 1)
|
|
216
|
-
self.abs_value_sb_bis = SpinBox()
|
|
224
|
+
self.abs_value_sb_bis = SpinBox(step=0.1, dec=True)
|
|
217
225
|
self.control_ui.layout().addWidget(self.abs_value_sb_bis, 1, 0)
|
|
218
226
|
self.move_abs_pb = PushButtonIcon('Move', 'Set Abs.',
|
|
219
227
|
tip='Set the value of the actuator to the set absolute value')
|
|
@@ -222,7 +230,7 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
222
230
|
self.move_rel_plus_pb = PushButtonIcon('MoveUp', 'Set Rel. (+)')
|
|
223
231
|
self.control_ui.layout().addWidget(self.move_rel_plus_pb, 2, 1)
|
|
224
232
|
|
|
225
|
-
self.rel_value_sb = SpinBox()
|
|
233
|
+
self.rel_value_sb = SpinBox(step=0.1, dec=True)
|
|
226
234
|
self.control_ui.layout().addWidget(self.rel_value_sb, 3, 0)
|
|
227
235
|
self.move_rel_minus_pb = PushButtonIcon('MoveDown', 'Set Rel. (-)')
|
|
228
236
|
self.control_ui.layout().addWidget(self.move_rel_minus_pb, 3, 1)
|
|
@@ -242,6 +250,14 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
242
250
|
self.statusbar.setMaximumHeight(30)
|
|
243
251
|
self.parent.layout().addWidget(self.statusbar)
|
|
244
252
|
|
|
253
|
+
def set_unit_as_suffix(self, unit: str):
|
|
254
|
+
"""Will append the actuator units in the value display"""
|
|
255
|
+
self.current_value_sb.setOpts(suffix=unit)
|
|
256
|
+
self.abs_value_sb_bis.setOpts(suffix=unit)
|
|
257
|
+
self.abs_value_sb.setOpts(suffix=unit)
|
|
258
|
+
self.abs_value_sb_2.setOpts(suffix=unit)
|
|
259
|
+
self.rel_value_sb.setOpts(suffix=unit)
|
|
260
|
+
|
|
245
261
|
def setup_actions(self):
|
|
246
262
|
self.add_action('move_abs', 'Move Abs', 'go_to_1', "Move to the set absolute value",
|
|
247
263
|
toolbar=self.move_toolbar)
|
|
@@ -311,6 +327,7 @@ class DAQ_Move_UI(ControlModuleUI):
|
|
|
311
327
|
self.actuators_combo.currentText()]))
|
|
312
328
|
|
|
313
329
|
def emit_move_abs(self, spinbox):
|
|
330
|
+
spinbox.editingFinished.emit()
|
|
314
331
|
self.command_sig.emit(ThreadCommand('move_abs', DataActuator(data=spinbox.value())))
|
|
315
332
|
|
|
316
333
|
def emit_move_rel(self, sign):
|
|
@@ -20,28 +20,36 @@ 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
|
+
|
|
47
|
+
from pymodaq.utils.gui_utils import get_splash_sc
|
|
40
48
|
from pymodaq.control_modules.daq_viewer_ui import DAQ_Viewer_UI
|
|
41
49
|
from pymodaq.control_modules.utils import DET_TYPES, get_viewer_plugins, DAQTypesEnum, DetectorError
|
|
42
|
-
from
|
|
43
|
-
from
|
|
44
|
-
from
|
|
50
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerBase
|
|
51
|
+
from pymodaq_gui.plotting.data_viewers import ViewersEnum
|
|
52
|
+
from pymodaq_utils.enums import enum_checker
|
|
45
53
|
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base
|
|
46
54
|
|
|
47
55
|
from pymodaq.utils.leco.pymodaq_listener import ViewerActorListener, LECOClientCommands
|
|
@@ -94,7 +102,7 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
94
102
|
|
|
95
103
|
listener_class = ViewerActorListener
|
|
96
104
|
|
|
97
|
-
def __init__(self, parent=None, title="Testing",
|
|
105
|
+
def __init__(self, parent: DockArea=None, title="Testing",
|
|
98
106
|
daq_type=config('viewer', 'daq_type'),
|
|
99
107
|
dock_settings=None, dock_viewer=None,
|
|
100
108
|
**kwargs):
|
|
@@ -666,19 +674,20 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
666
674
|
DetectorSaver, DetectorEnlargeableSaver, DetectorExtendedSaver
|
|
667
675
|
|
|
668
676
|
"""
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
dte
|
|
677
|
+
if dte is not None:
|
|
678
|
+
detector_node = self.module_and_data_saver.get_set_node(where)
|
|
679
|
+
dte = dte if not self.module_and_data_saver.h5saver.settings['save_raw_only'] else \
|
|
680
|
+
dte.get_data_from_source('raw') # filters depending on the source: raw or calculated
|
|
672
681
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
682
|
+
dte = DataToExport(name=dte.name, data= # filters depending on the extra argument 'save'
|
|
683
|
+
[dwa for dwa in dte if ('do_save' not in dwa.extra_attributes) or
|
|
684
|
+
('do_save' in dwa.extra_attributes and dwa.do_save)])
|
|
676
685
|
|
|
677
|
-
|
|
686
|
+
self.module_and_data_saver.add_data(detector_node, dte, **kwargs)
|
|
678
687
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
688
|
+
if init_step:
|
|
689
|
+
if self._do_bkg and self._bkg is not None:
|
|
690
|
+
self.module_and_data_saver.add_bkg(detector_node, self._bkg)
|
|
682
691
|
|
|
683
692
|
def _save_data(self, path=None, dte: DataToExport = None):
|
|
684
693
|
"""Private. Practical implementation to save data into a h5file altogether with metadata, axes, background...
|
|
@@ -1067,6 +1076,7 @@ class DAQ_Viewer(ParameterControlModule):
|
|
|
1067
1076
|
QtWidgets.QApplication.processEvents()
|
|
1068
1077
|
|
|
1069
1078
|
elif status.command == 'lcd':
|
|
1079
|
+
"""status.attribute should be a list of numpy arrays of shape (1,)"""
|
|
1070
1080
|
self._lcd.setvalues(status.attribute)
|
|
1071
1081
|
|
|
1072
1082
|
elif status.command == 'stop':
|
|
@@ -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
|
|
|
@@ -7,18 +7,18 @@ import numpy as np
|
|
|
7
7
|
from qtpy import QtWidgets
|
|
8
8
|
from qtpy.QtCore import QObject, Slot, Signal, QTimer
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
from
|
|
10
|
+
from pymodaq_utils.utils import ThreadCommand, find_keys_from_val
|
|
11
|
+
from pymodaq_utils import config as configmod
|
|
12
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
13
|
+
from pymodaq_utils.enums import BaseEnum, enum_checker
|
|
14
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
15
|
+
|
|
16
|
+
import pymodaq_gui.parameter.utils as putils
|
|
17
|
+
from pymodaq_gui.parameter import Parameter
|
|
18
|
+
from pymodaq_gui.parameter import ioxml
|
|
19
|
+
|
|
18
20
|
from pymodaq.utils.tcp_ip.tcp_server_client import TCPServer, tcp_parameters
|
|
19
|
-
from pymodaq.utils.messenger import deprecation_msg
|
|
20
21
|
from pymodaq.utils.data import DataActuator
|
|
21
|
-
from pymodaq.utils.enums import BaseEnum, enum_checker
|
|
22
22
|
from pymodaq.utils.tcp_ip.mysocket import Socket
|
|
23
23
|
from pymodaq.utils.tcp_ip.serializer import DeSerializer, Serializer
|
|
24
24
|
|
|
@@ -362,6 +362,14 @@ class DAQ_Move_base(QObject):
|
|
|
362
362
|
def target_position(self, value):
|
|
363
363
|
self.target_value = value
|
|
364
364
|
|
|
365
|
+
@property
|
|
366
|
+
def is_master(self) -> bool:
|
|
367
|
+
""" Get the controller master/slave status
|
|
368
|
+
|
|
369
|
+
new in version 4.3.0
|
|
370
|
+
"""
|
|
371
|
+
return self.settings['multiaxes', 'multi_status'] == 'Master'
|
|
372
|
+
|
|
365
373
|
@property
|
|
366
374
|
def controller_units(self):
|
|
367
375
|
""" Get/Set the units of this plugin"""
|
|
@@ -372,6 +380,7 @@ class DAQ_Move_base(QObject):
|
|
|
372
380
|
self._controller_units = units
|
|
373
381
|
try:
|
|
374
382
|
self.settings.child('units').setValue(units)
|
|
383
|
+
self.emit_status(ThreadCommand('units', units))
|
|
375
384
|
except Exception:
|
|
376
385
|
pass
|
|
377
386
|
|
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
|
|
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,12 +64,14 @@ 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')
|
|
@@ -123,7 +129,7 @@ class ControlModule(QObject):
|
|
|
123
129
|
self._tcpclient_thread = None
|
|
124
130
|
self._hardware_thread = None
|
|
125
131
|
self.module_and_data_saver = None
|
|
126
|
-
self.plugin_config: Optional[
|
|
132
|
+
self.plugin_config: Optional[Config] = None
|
|
127
133
|
|
|
128
134
|
def __repr__(self):
|
|
129
135
|
return f'{self.__class__.__name__}: {self.title}'
|
|
@@ -300,7 +306,7 @@ class ControlModule(QObject):
|
|
|
300
306
|
def show_config(self, config: Config) -> Config:
|
|
301
307
|
""" Display in a tree the current configuration"""
|
|
302
308
|
if config is not None:
|
|
303
|
-
from
|
|
309
|
+
from pymodaq_gui.utils.widgets.tree_toml import TreeFromToml
|
|
304
310
|
config_tree = TreeFromToml(config)
|
|
305
311
|
config_tree.show_dialog()
|
|
306
312
|
|
|
@@ -9,11 +9,12 @@ from easydict import EasyDict as edict
|
|
|
9
9
|
|
|
10
10
|
import numpy as np
|
|
11
11
|
from pymodaq.utils.math_utils import gauss1D, gauss2D
|
|
12
|
-
from
|
|
13
|
-
|
|
12
|
+
from pymodaq_utils.utils import ThreadCommand, getLineInfo
|
|
13
|
+
|
|
14
|
+
from pymodaq_utils.config import Config, get_set_local_dir
|
|
14
15
|
from pymodaq.utils.tcp_ip.tcp_server_client import TCPServer, tcp_parameters
|
|
15
|
-
from
|
|
16
|
-
from
|
|
16
|
+
from pymodaq_data.data import DataToExport, DataRaw
|
|
17
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
17
18
|
from pymodaq.utils.tcp_ip.mysocket import Socket
|
|
18
19
|
from pymodaq.utils.tcp_ip.serializer import DeSerializer, Serializer
|
|
19
20
|
|
|
@@ -197,6 +198,14 @@ class DAQ_Viewer_base(QObject):
|
|
|
197
198
|
except Exception as exc:
|
|
198
199
|
print(f"Error with old message signal stuff: {exc}")
|
|
199
200
|
|
|
201
|
+
@property
|
|
202
|
+
def is_master(self):
|
|
203
|
+
""" Get the controller master/slave status
|
|
204
|
+
|
|
205
|
+
new in version 4.3.0
|
|
206
|
+
"""
|
|
207
|
+
return self.settings['controller_status'] == 'Master'
|
|
208
|
+
|
|
200
209
|
def _emit_dte(self, dte: Union[DataToExport, list]):
|
|
201
210
|
if isinstance(dte, list):
|
|
202
211
|
deprecation_msg('Data emitted from the instrument plugins should be a DataToExport instance'
|