pymodaq 4.2.4__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 +28 -12
- 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 +164 -115
- pymodaq/examples/custom_app.py +13 -16
- pymodaq/examples/custom_viewer.py +6 -6
- 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 -708
- 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.4.dist-info → pymodaq-5.0.0.dist-info}/METADATA +5 -3
- pymodaq-5.0.0.dist-info/RECORD +123 -0
- 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 -94
- 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 -1105
- 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 -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.2.4.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.4.dist-info → pymodaq-5.0.0.dist-info}/WHEEL +0 -0
- {pymodaq-4.2.4.dist-info → pymodaq-5.0.0.dist-info}/entry_points.txt +0 -0
- {pymodaq-4.2.4.dist-info → pymodaq-5.0.0.dist-info}/licenses/LICENSE +0 -0
pymodaq/utils/parameter/utils.py
CHANGED
|
@@ -1,301 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
3
|
-
import numpy as np
|
|
4
|
-
from collections import OrderedDict
|
|
1
|
+
from pymodaq_gui.parameter.utils import *
|
|
5
2
|
|
|
6
|
-
from
|
|
3
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_widget_from_tree(parameter_tree, widget_instance):
|
|
13
|
-
widgets = []
|
|
14
|
-
for item in parameter_tree.listAllItems():
|
|
15
|
-
if hasattr(item, 'widget'):
|
|
16
|
-
if item.widget.__class__.__name__ == widget_instance.__name__:
|
|
17
|
-
widgets.append(item.widget)
|
|
18
|
-
return widgets
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def get_param_path(param):
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
Parameters
|
|
25
|
-
----------
|
|
26
|
-
param
|
|
27
|
-
|
|
28
|
-
Returns
|
|
29
|
-
-------
|
|
30
|
-
|
|
31
|
-
"""
|
|
32
|
-
path = [param.name()]
|
|
33
|
-
while param.parent() is not None:
|
|
34
|
-
path.append(param.parent().name())
|
|
35
|
-
param = param.parent()
|
|
36
|
-
return path[::-1]
|
|
37
|
-
|
|
38
|
-
def getOpts(param:Parameter,) -> OrderedDict:
|
|
39
|
-
"""Return an OrderedDict with tree structures of all opts for all children of this parameter
|
|
40
|
-
Parameters
|
|
41
|
-
----------
|
|
42
|
-
param: Parameter
|
|
43
|
-
Returns
|
|
44
|
-
-------
|
|
45
|
-
OrderedDict
|
|
46
|
-
"""
|
|
47
|
-
vals = OrderedDict()
|
|
48
|
-
for ch in param:
|
|
49
|
-
vals[ch.name()] = (ch.opts, getOpts(ch))
|
|
50
|
-
return vals
|
|
51
|
-
|
|
52
|
-
def getStruct(param:Parameter,) -> OrderedDict:
|
|
53
|
-
"""Return an OrderedDict with tree structures of all children of this parameter
|
|
54
|
-
Parameters
|
|
55
|
-
----------
|
|
56
|
-
param: Parameter
|
|
57
|
-
Returns
|
|
58
|
-
-------
|
|
59
|
-
OrderedDict
|
|
60
|
-
"""
|
|
61
|
-
vals = OrderedDict()
|
|
62
|
-
for ch in param:
|
|
63
|
-
vals[ch.name()] = (None, getStruct(ch))
|
|
64
|
-
return vals
|
|
65
|
-
|
|
66
|
-
def getValues(param:Parameter,) -> OrderedDict:
|
|
67
|
-
"""Return an OrderedDict with tree structures of all values for all children of this parameter
|
|
68
|
-
Parameters
|
|
69
|
-
----------
|
|
70
|
-
param: Parameter
|
|
71
|
-
Returns
|
|
72
|
-
-------
|
|
73
|
-
OrderedDict
|
|
74
|
-
"""
|
|
75
|
-
return param.getValues()
|
|
76
|
-
|
|
77
|
-
def compareParameters(param1:Parameter,param2:Parameter,opts:list=[])-> bool:
|
|
78
|
-
"""Compare the structure and the opts of two parameters with their children, return True if structure and all opts are identical
|
|
79
|
-
Parameters
|
|
80
|
-
----------
|
|
81
|
-
param1: Parameter
|
|
82
|
-
param2: Parameter
|
|
83
|
-
|
|
84
|
-
Returns
|
|
85
|
-
-------
|
|
86
|
-
Bool
|
|
87
|
-
"""
|
|
88
|
-
return getOpts(param1) == getOpts(param2)
|
|
89
|
-
|
|
90
|
-
def compareStructureParameter(param1:Parameter,param2:Parameter,)-> bool:
|
|
91
|
-
"""Compare the structure of two parameters with their children, return True if structure is identical
|
|
92
|
-
Parameters
|
|
93
|
-
----------
|
|
94
|
-
param1: Parameter
|
|
95
|
-
param2: Parameter
|
|
96
|
-
|
|
97
|
-
Returns
|
|
98
|
-
-------
|
|
99
|
-
Bool
|
|
100
|
-
"""
|
|
101
|
-
return getStruct(param1) == getStruct(param2)
|
|
102
|
-
|
|
103
|
-
def compareValuesParameter(param1:Parameter,param2:Parameter,)-> bool:
|
|
104
|
-
"""Compare the structure and the values of two parameters with their children, return True if structures and values are identical
|
|
105
|
-
Parameters
|
|
106
|
-
----------
|
|
107
|
-
param1: Parameter
|
|
108
|
-
param2: Parameter
|
|
109
|
-
|
|
110
|
-
Returns
|
|
111
|
-
-------
|
|
112
|
-
Bool
|
|
113
|
-
"""
|
|
114
|
-
return getValues(param1) == getValues(param2)
|
|
115
|
-
|
|
116
|
-
def iter_children(param, childlist=[]):
|
|
117
|
-
"""Get a list of parameters name under a given Parameter
|
|
118
|
-
| Returns all childrens names.
|
|
119
|
-
|
|
120
|
-
=============== ================================= ====================================
|
|
121
|
-
**Parameters** **Type** **Description**
|
|
122
|
-
*param* instance of pyqtgraph parameter the root node to be coursed
|
|
123
|
-
*childlist* list the child list recetion structure
|
|
124
|
-
=============== ================================= ====================================
|
|
125
|
-
|
|
126
|
-
Returns
|
|
127
|
-
-------
|
|
128
|
-
childlist : parameter list
|
|
129
|
-
The list of the children from the given node.
|
|
130
|
-
"""
|
|
131
|
-
for child in param.children():
|
|
132
|
-
childlist.append(child.name())
|
|
133
|
-
if child.hasChildren():
|
|
134
|
-
# if 'group' in child.type():
|
|
135
|
-
childlist.extend(iter_children(child, []))
|
|
136
|
-
return childlist
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
def iter_children_params(param, childlist=[]):
|
|
140
|
-
"""Get a list of parameters under a given Parameter
|
|
141
|
-
|
|
142
|
-
"""
|
|
143
|
-
for child in param.children():
|
|
144
|
-
childlist.append(child)
|
|
145
|
-
if child.hasChildren():
|
|
146
|
-
childlist.extend(iter_children_params(child, []))
|
|
147
|
-
return childlist
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def get_param_from_name(parent, name) -> Parameter:
|
|
151
|
-
"""Get Parameter under parent whose name is name
|
|
152
|
-
|
|
153
|
-
Parameters
|
|
154
|
-
----------
|
|
155
|
-
parent: Parameter
|
|
156
|
-
name: str
|
|
157
|
-
|
|
158
|
-
Returns
|
|
159
|
-
-------
|
|
160
|
-
Parameter
|
|
161
|
-
"""
|
|
162
|
-
for child in parent.children():
|
|
163
|
-
if child.name() == name:
|
|
164
|
-
return child
|
|
165
|
-
if child.hasChildren():
|
|
166
|
-
ch = get_param_from_name(child, name)
|
|
167
|
-
if ch is not None:
|
|
168
|
-
return ch
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
def is_name_in_dict(dict_tmp, name):
|
|
172
|
-
if 'name' in dict_tmp:
|
|
173
|
-
if dict_tmp['name'] == name:
|
|
174
|
-
return True
|
|
175
|
-
return False
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
def get_param_dict_from_name(parent_list, name, pop=False):
|
|
179
|
-
"""Get dict under parent whose name is name. The parent_list structure is the one used to init a Parameter object
|
|
180
|
-
|
|
181
|
-
Parameters
|
|
182
|
-
----------
|
|
183
|
-
parent_list: (list of dicts) as defined to init Parameter object
|
|
184
|
-
name: (str) value to find for the key: name
|
|
185
|
-
pop: (bool) if True remove the matched dict from parent
|
|
186
|
-
|
|
187
|
-
Returns
|
|
188
|
-
-------
|
|
189
|
-
dict the matched dict
|
|
190
|
-
"""
|
|
191
|
-
for index, parent_dict in enumerate(parent_list):
|
|
192
|
-
if is_name_in_dict(parent_dict, name):
|
|
193
|
-
if pop:
|
|
194
|
-
return parent_list.pop(index)
|
|
195
|
-
else:
|
|
196
|
-
return parent_dict
|
|
197
|
-
|
|
198
|
-
elif 'children' in parent_dict:
|
|
199
|
-
ch = get_param_dict_from_name(parent_dict['children'], name, pop)
|
|
200
|
-
if ch is not None:
|
|
201
|
-
return ch
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if __name__ == '__main__': # pragma: no cover
|
|
205
|
-
parent = [
|
|
206
|
-
{'title': 'Spectro Settings:', 'name': 'spectro_settings', 'type': 'group', 'expanded': True,
|
|
207
|
-
'children': [
|
|
208
|
-
{'title': 'Home Wavelength (nm):', 'name': 'spectro_wl_home', 'type': 'float', 'value': 600, 'min': 0,
|
|
209
|
-
'readonly': False},
|
|
210
|
-
{'title': 'Grating Settings:', 'name': 'grating_settings', 'type': 'group', 'expanded': True,
|
|
211
|
-
'children': [
|
|
212
|
-
{'title': 'Grating:', 'name': 'grating', 'type': 'list'},
|
|
213
|
-
{'title': 'Lines (/mm):', 'name': 'lines', 'type': 'int', 'readonly': True},
|
|
214
|
-
{'title': 'Blaze WL (nm):', 'name': 'blaze', 'type': 'str', 'readonly': True},
|
|
215
|
-
]},
|
|
216
|
-
]
|
|
217
|
-
},
|
|
218
|
-
]
|
|
219
|
-
|
|
220
|
-
d = get_param_dict_from_name(parent, 'lines')
|
|
221
|
-
|
|
222
|
-
d['readonly'] = False
|
|
223
|
-
print(parent[0]['children'][1]['children'])
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
def set_param_from_param(param_old, param_new):
|
|
227
|
-
"""
|
|
228
|
-
Walk through parameters children and set values using new parameter values.
|
|
229
|
-
"""
|
|
230
|
-
for child_old in param_old.children():
|
|
231
|
-
# try:
|
|
232
|
-
path = param_old.childPath(child_old)
|
|
233
|
-
child_new = param_new.child(*path)
|
|
234
|
-
param_type = child_old.type()
|
|
235
|
-
|
|
236
|
-
if 'group' not in param_type: # covers 'group', custom 'groupmove'...
|
|
237
|
-
# try:
|
|
238
|
-
if 'list' in param_type: # check if the value is in the limits of the old params
|
|
239
|
-
# (limits are usually set at initialization) but carefull as such paramater limits can be a list or a
|
|
240
|
-
# dict object
|
|
241
|
-
if isinstance(child_old.opts['limits'], list):
|
|
242
|
-
if child_new.value() not in child_old.opts['limits']:
|
|
243
|
-
new_limits = child_old.opts['limits'].copy()
|
|
244
|
-
new_limits.append(child_new.value())
|
|
245
|
-
child_old.setLimits(new_limits)
|
|
246
|
-
|
|
247
|
-
elif isinstance(child_old.opts['limits'], dict):
|
|
248
|
-
if child_new.value() not in child_old.opts['limits'].values():
|
|
249
|
-
child_new_key = find_keys_from_val(child_new.opts['limits'], child_new.value())[0]
|
|
250
|
-
new_limits = child_old.opts['limits'].copy()
|
|
251
|
-
new_limits.update({child_new_key: child_new.value()})
|
|
252
|
-
child_old.setLimits(new_limits)
|
|
253
|
-
|
|
254
|
-
child_old.setValue(child_new.value())
|
|
255
|
-
elif 'str' in param_type or 'browsepath' in param_type or 'text' in param_type:
|
|
256
|
-
if child_new.value() != "": # to make sure one doesnt overwrite something
|
|
257
|
-
child_old.setValue(child_new.value())
|
|
258
|
-
else:
|
|
259
|
-
child_old.setValue(child_new.value())
|
|
260
|
-
# except Exception as e:
|
|
261
|
-
# print(str(e))
|
|
262
|
-
else:
|
|
263
|
-
set_param_from_param(child_old, child_new)
|
|
264
|
-
# except Exception as e:
|
|
265
|
-
# print(str(e))
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
def scroll_log(scroll_val, min_val, max_val):
|
|
269
|
-
"""
|
|
270
|
-
Convert a scroll value [0-100] to a log scale between min_val and max_val
|
|
271
|
-
Parameters
|
|
272
|
-
----------
|
|
273
|
-
scroll
|
|
274
|
-
min_val
|
|
275
|
-
max_val
|
|
276
|
-
Returns
|
|
277
|
-
-------
|
|
278
|
-
|
|
279
|
-
"""
|
|
280
|
-
assert scroll_val >= 0
|
|
281
|
-
assert scroll_val <= 100
|
|
282
|
-
value = scroll_val * (np.log10(max_val) - np.log10(min_val)) / 100 + np.log10(min_val)
|
|
283
|
-
return 10 ** value
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
def scroll_linear(scroll_val, min_val, max_val):
|
|
287
|
-
"""
|
|
288
|
-
Convert a scroll value [0-100] to a linear scale between min_val and max_val
|
|
289
|
-
Parameters
|
|
290
|
-
----------
|
|
291
|
-
scroll
|
|
292
|
-
min_val
|
|
293
|
-
max_val
|
|
294
|
-
Returns
|
|
295
|
-
-------
|
|
296
|
-
|
|
297
|
-
"""
|
|
298
|
-
assert scroll_val >= 0
|
|
299
|
-
assert scroll_val <= 100
|
|
300
|
-
value = scroll_val * (max_val - min_val) / 100 + min_val
|
|
301
|
-
return value
|
|
5
|
+
deprecation_msg('Importing Parameter stuff from pymodaq is deprecated in pymodaq>5.0.0,'
|
|
6
|
+
'please use the pymodaq_gui.parameter module')
|
|
@@ -13,19 +13,23 @@ from typing import Callable, Union, List, Tuple, TYPE_CHECKING
|
|
|
13
13
|
import numpy as np
|
|
14
14
|
from qtpy import QtWidgets
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
|
|
22
|
-
from
|
|
23
|
-
|
|
16
|
+
from pymodaq_utils.factory import ObjectFactory
|
|
17
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
18
|
+
from pymodaq_utils.abstract import abstract_attribute
|
|
19
|
+
from pymodaq_utils import math_utils as mutils
|
|
20
|
+
from pymodaq_utils import config as configmod
|
|
21
|
+
|
|
22
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager, Parameter
|
|
23
|
+
|
|
24
|
+
from pymodaq_data.data import Axis, DataDistribution
|
|
25
|
+
|
|
24
26
|
from pymodaq.utils.scanner.scan_config import ScanConfig
|
|
27
|
+
from pymodaq_gui.config import ConfigSaverLoader
|
|
28
|
+
|
|
25
29
|
|
|
26
30
|
if TYPE_CHECKING:
|
|
27
31
|
from pymodaq.control_modules.daq_move import DAQ_Move
|
|
28
|
-
from pymodaq.utils.
|
|
32
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
logger = set_logger(get_module_name(__file__))
|
|
@@ -84,9 +88,9 @@ class ScannerBase(ScanParameterManager, metaclass=ABCMeta):
|
|
|
84
88
|
self.config = ScanConfig()
|
|
85
89
|
base_path = [act.title for act in actuators] + [self.scan_type, self.scan_subtype]
|
|
86
90
|
|
|
87
|
-
self.config_saver_loader =
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
self.config_saver_loader = ConfigSaverLoader(self.settings,
|
|
92
|
+
self.config,
|
|
93
|
+
base_path)
|
|
90
94
|
|
|
91
95
|
self.actuators: List[DAQ_Move] = actuators
|
|
92
96
|
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from collections import OrderedDict
|
|
1
3
|
import importlib
|
|
2
4
|
import time
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
+
import sys
|
|
6
|
+
from typing import List, Dict
|
|
5
7
|
|
|
6
8
|
import numpy as np
|
|
7
9
|
from qtpy import QtWidgets, QtCore
|
|
8
10
|
from qtpy.QtCore import QObject, Slot, QThread, Signal
|
|
9
|
-
|
|
10
|
-
from typing import List, Dict
|
|
11
|
-
from collections import OrderedDict
|
|
11
|
+
|
|
12
12
|
from pyqtgraph import ROI, RectROI, PolyLineROI, Point, LinearRegionItem
|
|
13
|
-
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
|
|
26
|
-
from pymodaq.utils.data import DataDim
|
|
13
|
+
|
|
14
|
+
from pymodaq_utils.factory import ObjectFactory
|
|
15
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
16
|
+
from pymodaq_utils import utils
|
|
17
|
+
|
|
18
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
19
|
+
from pymodaq_gui import utils as gutils
|
|
20
|
+
from pymodaq_gui.utils import DockArea, Dock
|
|
21
|
+
from pymodaq_gui.plotting.utils.plot_utils import QVector
|
|
22
|
+
from pymodaq_gui.parameter.pymodaq_ptypes import TableViewCustom
|
|
23
|
+
from pymodaq_gui.parameter import utils as putils
|
|
24
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerBase
|
|
25
|
+
|
|
27
26
|
|
|
28
27
|
logger = set_logger(get_module_name(__file__))
|
|
29
28
|
|
|
@@ -371,7 +370,7 @@ class ScanSelector(ParameterManager, QObject):
|
|
|
371
370
|
|
|
372
371
|
def update_selector_type(self):
|
|
373
372
|
self.remove_selector()
|
|
374
|
-
mod = importlib.import_module('.scan_selector', 'pymodaq.utils.
|
|
373
|
+
mod = importlib.import_module('.scan_selector', 'pymodaq.utils.scanner')
|
|
375
374
|
self.selector = selector_factory.create(self.settings['scan_options', 'selector_type'])
|
|
376
375
|
|
|
377
376
|
if self.selector_source is not None and self.selector is not None:
|
pymodaq/utils/scanner/scanner.py
CHANGED
|
@@ -2,17 +2,18 @@ from __future__ import annotations
|
|
|
2
2
|
from typing import Tuple, List, TYPE_CHECKING
|
|
3
3
|
from collections import OrderedDict
|
|
4
4
|
|
|
5
|
+
from qtpy.QtCore import QObject, Signal
|
|
6
|
+
from qtpy import QtWidgets
|
|
5
7
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
9
|
+
from pymodaq_utils.config import Config
|
|
10
|
+
import pymodaq_utils.utils as utils
|
|
11
|
+
|
|
12
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager, Parameter
|
|
8
13
|
|
|
9
|
-
from pymodaq.utils.logger import set_logger, get_module_name
|
|
10
|
-
from pymodaq.utils.config import Config
|
|
11
14
|
from pymodaq.utils.scanner.scan_factory import ScannerFactory, ScannerBase
|
|
12
|
-
from pymodaq.utils.managers.parameter_manager import ParameterManager, Parameter
|
|
13
|
-
import pymodaq.utils.daq_utils as utils
|
|
14
15
|
from pymodaq.utils.scanner.utils import ScanInfo
|
|
15
|
-
from pymodaq.utils.
|
|
16
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
16
17
|
from pymodaq.utils.data import DataToExport, DataActuator
|
|
17
18
|
|
|
18
19
|
if TYPE_CHECKING:
|
|
@@ -45,7 +46,8 @@ class Scanner(QObject, ParameterManager):
|
|
|
45
46
|
params = [
|
|
46
47
|
{'title': 'Calculate positions:', 'name': 'calculate_positions', 'type': 'action'},
|
|
47
48
|
{'title': 'N steps:', 'name': 'n_steps', 'type': 'int', 'value': 0, 'readonly': True},
|
|
48
|
-
{'title': 'Scan type:', 'name': 'scan_type', 'type': 'list',
|
|
49
|
+
{'title': 'Scan type:', 'name': 'scan_type', 'type': 'list',
|
|
50
|
+
'limits': scanner_factory.scan_types()},
|
|
49
51
|
{'title': 'Scan subtype:', 'name': 'scan_sub_type', 'type': 'list',
|
|
50
52
|
'limits': scanner_factory.scan_sub_types(scanner_factory.scan_types()[0])},
|
|
51
53
|
]
|
|
@@ -7,11 +7,14 @@ Created the 05/12/2022
|
|
|
7
7
|
from typing import List, Tuple, Any, TYPE_CHECKING
|
|
8
8
|
import re
|
|
9
9
|
import numpy as np
|
|
10
|
-
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
|
|
10
|
+
|
|
11
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
12
|
+
from pymodaq_utils import math_utils as mutils
|
|
13
|
+
from pymodaq_utils import config as configmod
|
|
14
|
+
|
|
15
|
+
from pymodaq_data.data import Axis, DataDistribution
|
|
16
|
+
|
|
17
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
15
18
|
|
|
16
19
|
from ..scan_factory import ScannerFactory, ScannerBase, ScanParameterManager
|
|
17
20
|
|
|
@@ -7,11 +7,11 @@ Created the 05/12/2022
|
|
|
7
7
|
from typing import List, Tuple, TYPE_CHECKING
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from pymodaq.utils.
|
|
10
|
+
from pymodaq_data.data import Axis, DataDistribution
|
|
11
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
12
|
+
from pymodaq_utils import math_utils as mutils
|
|
13
|
+
from pymodaq_utils import config as configmod
|
|
14
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
15
15
|
|
|
16
16
|
from ..scan_factory import ScannerFactory, ScannerBase, ScanParameterManager
|
|
17
17
|
|
|
@@ -9,15 +9,15 @@ from typing import List, Tuple, TYPE_CHECKING
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
11
|
from qtpy import QtCore, QtWidgets
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
12
|
+
from pymodaq_data.data import Axis, DataDistribution
|
|
13
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
14
|
+
from pymodaq_utils import math_utils as mutils
|
|
15
|
+
from pymodaq_utils import config as configmod
|
|
16
|
+
from pymodaq_gui import utils as gutils
|
|
17
17
|
from ..scan_factory import ScannerFactory, ScannerBase, ScanParameterManager
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from pymodaq.utils.
|
|
18
|
+
from pymodaq_gui.parameter import utils as putils
|
|
19
|
+
from pymodaq_gui.parameter.pymodaq_ptypes import TableViewCustom
|
|
20
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
21
21
|
|
|
22
22
|
logger = set_logger(get_module_name(__file__))
|
|
23
23
|
config = configmod.Config()
|
|
@@ -9,16 +9,16 @@ from typing import List, Tuple, TYPE_CHECKING
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
11
|
from qtpy import QtCore, QtWidgets
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
|
|
15
|
-
from
|
|
16
|
-
from
|
|
12
|
+
from pymodaq_data.data import Axis, DataDistribution
|
|
13
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
14
|
+
|
|
15
|
+
from pymodaq_utils import config as configmod
|
|
16
|
+
from pymodaq_gui import utils as gutils
|
|
17
17
|
from ..scan_factory import ScannerFactory, ScannerBase, ScanParameterManager
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from pymodaq.utils.
|
|
21
|
-
from
|
|
18
|
+
from pymodaq_gui.parameter import utils as putils
|
|
19
|
+
from pymodaq_gui.parameter.pymodaq_ptypes import TableViewCustom
|
|
20
|
+
from pymodaq.utils.scanner.scan_selector import Selector
|
|
21
|
+
from pymodaq_gui.plotting.utils.plot_utils import Point, get_sub_segmented_positions
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
24
|
from pymodaq.control_modules.daq_move import DAQ_Move
|
pymodaq/utils/scanner/utils.py
CHANGED
|
@@ -8,11 +8,13 @@ from importlib import import_module
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
11
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
12
|
+
from pymodaq_utils.config import Config
|
|
13
|
+
from pymodaq_utils.utils import get_entrypoints
|
|
14
|
+
from pymodaq_utils.enums import BaseEnum
|
|
15
|
+
|
|
14
16
|
from pymodaq.utils.scanner.scan_factory import ScannerFactory
|
|
15
|
-
|
|
17
|
+
|
|
16
18
|
|
|
17
19
|
logger = set_logger(get_module_name(__file__))
|
|
18
20
|
config = Config()
|
|
@@ -8,10 +8,9 @@ import sys
|
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
|
-
from qtpy import QtWidgets
|
|
12
|
-
from
|
|
13
|
-
from pymodaq.utils.
|
|
14
|
-
from pymodaq.utils.data import Axis, DataToExport, DataFromRoi, DataFromPlugins, DataRaw
|
|
11
|
+
from qtpy import QtWidgets
|
|
12
|
+
from pymodaq_gui.plotting.data_viewers.viewer2D import Viewer2D
|
|
13
|
+
from pymodaq.utils.data import Axis, DataFromRoi, DataFromPlugins
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
def main():
|