pymodaq 4.4.7__py3-none-any.whl → 5.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymodaq might be problematic. Click here for more details.
- pymodaq/__init__.py +57 -91
- pymodaq/control_modules/daq_move.py +64 -46
- pymodaq/control_modules/daq_move_ui.py +34 -12
- pymodaq/control_modules/daq_viewer.py +55 -30
- pymodaq/control_modules/daq_viewer_ui.py +6 -6
- pymodaq/control_modules/mocks.py +1 -1
- pymodaq/control_modules/move_utility_classes.py +51 -43
- pymodaq/control_modules/utils.py +43 -20
- pymodaq/control_modules/viewer_utility_classes.py +54 -18
- pymodaq/daq_utils/daq_utils.py +6 -0
- pymodaq/dashboard.py +639 -323
- pymodaq/examples/function_plotter.py +13 -12
- pymodaq/examples/tcp_client.py +1 -1
- pymodaq/extensions/__init__.py +1 -1
- pymodaq/extensions/bayesian/bayesian_optimisation.py +44 -32
- pymodaq/extensions/bayesian/utils.py +10 -10
- pymodaq/extensions/console.py +7 -6
- pymodaq/extensions/daq_logger/__init__.py +1 -0
- pymodaq/extensions/{daq_logger.py → daq_logger/daq_logger.py} +30 -30
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger.py +16 -15
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger_models.py +2 -0
- pymodaq/{utils/h5modules → extensions/daq_logger}/h5logging.py +7 -8
- pymodaq/extensions/daq_scan.py +42 -34
- pymodaq/extensions/daq_scan_ui.py +18 -18
- pymodaq/extensions/h5browser.py +2 -3
- pymodaq/extensions/pid/__init__.py +4 -2
- pymodaq/extensions/pid/daq_move_PID.py +3 -3
- pymodaq/extensions/pid/pid_controller.py +59 -50
- pymodaq/extensions/pid/utils.py +10 -5
- pymodaq/extensions/utils.py +33 -3
- pymodaq/post_treatment/load_and_plot.py +10 -7
- pymodaq/resources/preset_default.xml +1 -1
- pymodaq/updater.py +107 -0
- pymodaq/utils/array_manipulation.py +4 -384
- pymodaq/utils/calibration_camera.py +12 -9
- pymodaq/utils/chrono_timer.py +11 -10
- pymodaq/utils/config.py +3 -458
- pymodaq/utils/daq_utils.py +9 -715
- pymodaq/utils/data.py +17 -2959
- pymodaq/utils/enums.py +4 -74
- pymodaq/utils/exceptions.py +0 -4
- pymodaq/utils/gui_utils/__init__.py +8 -8
- pymodaq/utils/gui_utils/loader_utils.py +26 -1
- pymodaq/utils/gui_utils/utils.py +8 -162
- pymodaq/utils/gui_utils/widgets/lcd.py +6 -109
- pymodaq/utils/h5modules/__init__.py +0 -4
- pymodaq/utils/h5modules/module_saving.py +9 -8
- pymodaq/utils/leco/__init__.py +2 -2
- pymodaq/utils/leco/daq_move_LECODirector.py +3 -6
- pymodaq/utils/leco/daq_xDviewer_LECODirector.py +5 -5
- pymodaq/utils/leco/director_utils.py +2 -2
- pymodaq/utils/leco/leco_director.py +3 -3
- pymodaq/utils/leco/pymodaq_listener.py +4 -3
- pymodaq/utils/leco/utils.py +11 -9
- pymodaq/utils/logger.py +4 -76
- pymodaq/utils/managers/batchscan_manager.py +16 -19
- pymodaq/utils/managers/modules_manager.py +30 -17
- pymodaq/utils/managers/overshoot_manager.py +48 -6
- pymodaq/utils/managers/preset_manager.py +39 -59
- pymodaq/utils/managers/preset_manager_utils.py +28 -22
- pymodaq/utils/managers/remote_manager.py +12 -10
- pymodaq/utils/math_utils.py +4 -582
- pymodaq/utils/messenger.py +4 -64
- pymodaq/utils/parameter/__init__.py +6 -9
- pymodaq/utils/parameter/utils.py +4 -328
- pymodaq/utils/scanner/scan_config.py +1 -1
- pymodaq/utils/scanner/scan_factory.py +16 -12
- pymodaq/utils/{plotting → scanner}/scan_selector.py +19 -20
- pymodaq/utils/scanner/scanner.py +10 -8
- pymodaq/utils/scanner/scanners/_1d_scanners.py +8 -5
- pymodaq/utils/scanner/scanners/_2d_scanners.py +5 -5
- pymodaq/utils/scanner/scanners/sequential.py +8 -8
- pymodaq/utils/scanner/scanners/tabular.py +9 -9
- pymodaq/utils/scanner/utils.py +6 -4
- pymodaq/utils/svg/svg_viewer2D.py +3 -4
- pymodaq/utils/tcp_ip/mysocket.py +4 -110
- pymodaq/utils/tcp_ip/serializer.py +4 -801
- pymodaq/utils/tcp_ip/tcp_server_client.py +15 -13
- pymodaq-5.0.1.dist-info/METADATA +242 -0
- pymodaq-5.0.1.dist-info/RECORD +122 -0
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/WHEEL +1 -1
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/entry_points.txt +1 -0
- pymodaq/examples/custom_app.py +0 -258
- pymodaq/examples/custom_viewer.py +0 -112
- pymodaq/examples/parameter_ex.py +0 -138
- pymodaq/examples/preset_MockCamera.xml +0 -1
- pymodaq/post_treatment/daq_measurement/daq_measurement_GUI.py +0 -142
- pymodaq/post_treatment/daq_measurement/daq_measurement_GUI.ui +0 -232
- pymodaq/post_treatment/daq_measurement/daq_measurement_main.py +0 -391
- pymodaq/post_treatment/daq_measurement/process_from_QtDesigner_DAQ_Measurement_GUI.bat +0 -2
- pymodaq/post_treatment/process_to_scalar.py +0 -263
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/1d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/2d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/3d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add_Step.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve_All.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Browse_Dir_Path.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Calculator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnGroup.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnNum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnText.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnTime.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnWave.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Close3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ColorPicker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Contract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Create.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/DeleteLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditOpen.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditRedo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditUndo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Ellipse.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EllipseFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ErrorMessage.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Exit.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Expand.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/FFT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/HLM.ico +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Histogram.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/LUT_LookUpTable.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Marker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Math.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MeasurementStudio_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Move.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveDown.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveUp.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Multiply.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewFile.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_Folder.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_1D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_2D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_sim.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Options.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Pass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RGB.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rectangle.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RectangleFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Redo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Region.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rendezvous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SELECT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Search.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SelectPolygon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Select_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Settings.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snap&Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Spreadsheet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Status.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Subtract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Vision.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Volts.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Wait2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_1_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_in.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_out.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_to_Selection.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/abort.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/advanced2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/algo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/autoscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/b_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/back.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/bg_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera_snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cartesian.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/close2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cluster2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/continuous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/data.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/delay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/error2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ethernet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/exit2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/fan.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/filter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/g_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/gear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grab.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/graph.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/green_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grey_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greyscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/home2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/information2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ini.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/input.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/integrator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/joystick.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/limiter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/load_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meshPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_contour.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_straight_line.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/movie.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multi_point.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multiplexer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/new.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openArrow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/overlay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pause.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/permute.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/phase.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/play.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/polar.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pole_zero.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerMeter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/properties.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/r_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/radiocontrolbutton.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/random.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/read2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/red_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/remove.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/reset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rgb_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/robot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rotation2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saturation.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saveTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/save_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_horizontally.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_vertically.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/search2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_none.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sort_ascend.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/spectrumAnalyzer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/start.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/status_cancelled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/surfacePlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/target.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/tree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/updateTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility_small.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/vector.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/verify.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/video.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/wait.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/waterfallPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/watershed.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/yellow_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zip_file.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomAuto.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomReset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.bat +0 -2
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.qrc +0 -238
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources_rc.py +0 -127453
- pymodaq/resources/QtDesigner_Ressources/__init__.py +0 -0
- pymodaq/resources/QtDesigner_Ressources/credit.rst +0 -7
- pymodaq/resources/QtDesigner_Ressources/icons.svg +0 -142
- pymodaq/resources/VERSION +0 -2
- pymodaq/resources/config_template.toml +0 -96
- pymodaq/resources/triangulation_data.npy +0 -0
- pymodaq/utils/abstract/__init__.py +0 -48
- pymodaq/utils/db/__init__.py +0 -0
- pymodaq/utils/db/db_logger/__init__.py +0 -0
- pymodaq/utils/factory.py +0 -82
- pymodaq/utils/gui_utils/custom_app.py +0 -133
- pymodaq/utils/gui_utils/dock.py +0 -107
- pymodaq/utils/gui_utils/file_io.py +0 -94
- pymodaq/utils/gui_utils/layout.py +0 -34
- pymodaq/utils/gui_utils/list_picker.py +0 -38
- pymodaq/utils/gui_utils/widgets/__init__.py +0 -5
- pymodaq/utils/gui_utils/widgets/label.py +0 -24
- pymodaq/utils/gui_utils/widgets/push.py +0 -149
- pymodaq/utils/gui_utils/widgets/qled.py +0 -62
- pymodaq/utils/gui_utils/widgets/spinbox.py +0 -24
- pymodaq/utils/gui_utils/widgets/table.py +0 -263
- pymodaq/utils/gui_utils/widgets/tree_layout.py +0 -188
- pymodaq/utils/gui_utils/widgets/tree_toml.py +0 -110
- pymodaq/utils/h5modules/backends.py +0 -1022
- pymodaq/utils/h5modules/browsing.py +0 -627
- pymodaq/utils/h5modules/data_saving.py +0 -1107
- pymodaq/utils/h5modules/exporter.py +0 -119
- pymodaq/utils/h5modules/exporters/__init__.py +0 -0
- pymodaq/utils/h5modules/exporters/base.py +0 -111
- pymodaq/utils/h5modules/exporters/flimj.py +0 -63
- pymodaq/utils/h5modules/exporters/hyperspy.py +0 -143
- pymodaq/utils/h5modules/saving.py +0 -866
- pymodaq/utils/h5modules/utils.py +0 -115
- pymodaq/utils/managers/action_manager.py +0 -489
- pymodaq/utils/managers/parameter_manager.py +0 -279
- pymodaq/utils/managers/roi_manager.py +0 -740
- pymodaq/utils/parameter/ioxml.py +0 -545
- pymodaq/utils/parameter/pymodaq_ptypes/__init__.py +0 -38
- pymodaq/utils/parameter/pymodaq_ptypes/bool.py +0 -31
- pymodaq/utils/parameter/pymodaq_ptypes/date.py +0 -126
- pymodaq/utils/parameter/pymodaq_ptypes/filedir.py +0 -143
- pymodaq/utils/parameter/pymodaq_ptypes/itemselect.py +0 -265
- pymodaq/utils/parameter/pymodaq_ptypes/led.py +0 -44
- pymodaq/utils/parameter/pymodaq_ptypes/list.py +0 -150
- pymodaq/utils/parameter/pymodaq_ptypes/numeric.py +0 -18
- pymodaq/utils/parameter/pymodaq_ptypes/pixmap.py +0 -175
- pymodaq/utils/parameter/pymodaq_ptypes/slide.py +0 -166
- pymodaq/utils/parameter/pymodaq_ptypes/table.py +0 -135
- pymodaq/utils/parameter/pymodaq_ptypes/tableview.py +0 -149
- pymodaq/utils/parameter/pymodaq_ptypes/text.py +0 -142
- pymodaq/utils/plotting/__init__.py +0 -0
- pymodaq/utils/plotting/data_viewers/__init__.py +0 -10
- pymodaq/utils/plotting/data_viewers/base.py +0 -286
- pymodaq/utils/plotting/data_viewers/viewer.py +0 -275
- pymodaq/utils/plotting/data_viewers/viewer0D.py +0 -298
- pymodaq/utils/plotting/data_viewers/viewer1D.py +0 -826
- pymodaq/utils/plotting/data_viewers/viewer1Dbasic.py +0 -231
- pymodaq/utils/plotting/data_viewers/viewer2D.py +0 -1118
- pymodaq/utils/plotting/data_viewers/viewer2D_basic.py +0 -146
- pymodaq/utils/plotting/data_viewers/viewerND.py +0 -800
- pymodaq/utils/plotting/gant_chart.py +0 -123
- pymodaq/utils/plotting/image_viewer.py +0 -97
- pymodaq/utils/plotting/items/__init__.py +0 -0
- pymodaq/utils/plotting/items/axis_scaled.py +0 -93
- pymodaq/utils/plotting/items/crosshair.py +0 -94
- pymodaq/utils/plotting/items/image.py +0 -388
- pymodaq/utils/plotting/navigator.py +0 -353
- pymodaq/utils/plotting/plotter/plotter.py +0 -94
- pymodaq/utils/plotting/plotter/plotters/__init__.py +0 -0
- pymodaq/utils/plotting/plotter/plotters/matplotlib_plotters.py +0 -134
- pymodaq/utils/plotting/plotter/plotters/qt_plotters.py +0 -78
- pymodaq/utils/plotting/utils/__init__.py +0 -0
- pymodaq/utils/plotting/utils/axes_viewer.py +0 -88
- pymodaq/utils/plotting/utils/filter.py +0 -585
- pymodaq/utils/plotting/utils/lineout.py +0 -226
- pymodaq/utils/plotting/utils/plot_utils.py +0 -579
- pymodaq/utils/plotting/utils/signalND.py +0 -1347
- pymodaq/utils/plotting/widgets.py +0 -76
- pymodaq/utils/qvariant.py +0 -12
- pymodaq/utils/slicing.py +0 -63
- pymodaq/utils/units.py +0 -216
- pymodaq-4.4.7.dist-info/METADATA +0 -163
- pymodaq-4.4.7.dist-info/RECORD +0 -446
- /pymodaq/{post_treatment/daq_analysis → daq_utils}/__init__.py +0 -0
- /pymodaq/{utils/abstract/logger.py → extensions/daq_logger/abstract.py} +0 -0
- /pymodaq/{post_treatment/daq_measurement → extensions/daq_logger/db}/__init__.py +0 -0
- {pymodaq-4.4.7.dist-info → pymodaq-5.0.1.dist-info}/licenses/LICENSE +0 -0
pymodaq/utils/logger.py
CHANGED
|
@@ -1,78 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
"""
|
|
3
|
-
Created the 27/10/2022
|
|
1
|
+
from pymodaq_utils.logger import set_logger, get_module_name, get_set_config_dir, get_base_logger
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
"""
|
|
7
|
-
import logging
|
|
8
|
-
import warnings
|
|
9
|
-
from logging.handlers import TimedRotatingFileHandler
|
|
10
|
-
from pathlib import Path
|
|
3
|
+
from pymodaq_utils.warnings import deprecation_msg
|
|
11
4
|
|
|
12
|
-
from pymodaq.
|
|
13
|
-
|
|
14
|
-
config = Config()
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def set_logger(logger_name, add_handler=False, base_logger=False, add_to_console=False, log_level=None,
|
|
18
|
-
logger_base_name='pymodaq') -> logging.Logger:
|
|
19
|
-
"""defines a logger of a given name and eventually add an handler to it
|
|
20
|
-
|
|
21
|
-
Parameters
|
|
22
|
-
----------
|
|
23
|
-
logger_name: (str) the name of the logger (usually it is the module name as returned by get_module_name
|
|
24
|
-
add_handler (bool) if True adds a TimedRotatingFileHandler to the logger instance (should be True if logger set from
|
|
25
|
-
main app
|
|
26
|
-
base_logger: (bool) specify if this is the parent logger (usually where one defines the handler)
|
|
27
|
-
|
|
28
|
-
Returns
|
|
29
|
-
-------
|
|
30
|
-
logger: (logging.Logger) logger instance
|
|
31
|
-
See Also
|
|
32
|
-
--------
|
|
33
|
-
get_module_name, logging.handlers.TimedRotatingFileHandler
|
|
34
|
-
"""
|
|
35
|
-
if not base_logger:
|
|
36
|
-
logger_name = f'{logger_base_name}.{logger_name}'
|
|
37
|
-
|
|
38
|
-
logger = logging.getLogger(logger_name)
|
|
39
|
-
log_path = get_set_config_dir('log', user=True)
|
|
40
|
-
if log_level is None:
|
|
41
|
-
log_level = config('general', 'debug_level')
|
|
42
|
-
logger.setLevel(log_level)
|
|
43
|
-
if add_handler:
|
|
44
|
-
log_file_path = log_path.joinpath(f'{logger_base_name}.log')
|
|
45
|
-
if not log_file_path.is_file():
|
|
46
|
-
log_file_path.touch(mode=0o777)
|
|
47
|
-
handler = TimedRotatingFileHandler(log_file_path, when='midnight')
|
|
48
|
-
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
49
|
-
handler.setFormatter(formatter)
|
|
50
|
-
logger.addHandler(handler)
|
|
51
|
-
|
|
52
|
-
logging.captureWarnings(True)
|
|
53
|
-
# only catch DeprecationWarning in DEBUG level
|
|
54
|
-
if log_level == 'DEBUG':
|
|
55
|
-
warnings.filterwarnings('default', category=DeprecationWarning)
|
|
56
|
-
else:
|
|
57
|
-
warnings.filterwarnings('ignore', category=DeprecationWarning)
|
|
58
|
-
warnings_logger = logging.getLogger("py.warnings")
|
|
59
|
-
warnings_logger.addHandler(handler)
|
|
60
|
-
|
|
61
|
-
if add_to_console:
|
|
62
|
-
console_handler = logging.StreamHandler()
|
|
63
|
-
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
64
|
-
console_handler.setFormatter(formatter)
|
|
65
|
-
logger.addHandler(console_handler)
|
|
66
|
-
return logger
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def get_base_logger(logger: logging.Logger) -> logging.Logger:
|
|
70
|
-
while logger.name != 'pymodaq':
|
|
71
|
-
logger = logger.parent
|
|
72
|
-
return logger
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def get_module_name(module__file__path):
|
|
76
|
-
"""from the full path of a module extract its name"""
|
|
77
|
-
path = Path(module__file__path)
|
|
78
|
-
return path.stem
|
|
5
|
+
deprecation_msg('Importing logger stuff from pymodaq is deprecated in pymodaq>5.0.0,'
|
|
6
|
+
'please use the pymodaq_utils package')
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
+
from collections import OrderedDict
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import sys
|
|
1
4
|
from typing import List
|
|
2
5
|
|
|
3
|
-
import pymodaq.utils.config
|
|
4
|
-
import pymodaq.utils.gui_utils.dock
|
|
5
|
-
import pymodaq.utils.gui_utils.file_io
|
|
6
|
-
import pymodaq.utils.messenger
|
|
7
6
|
from qtpy import QtWidgets, QtCore
|
|
8
|
-
import sys
|
|
9
|
-
import os
|
|
10
7
|
|
|
11
|
-
from
|
|
8
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
9
|
+
from pymodaq_utils import config as config_mod
|
|
10
|
+
|
|
11
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
12
|
+
from pymodaq_gui.utils import Dock, file_io, DockArea
|
|
13
|
+
from pymodaq_gui.parameter import ioxml
|
|
14
|
+
from pymodaq_gui.messenger import messagebox
|
|
15
|
+
|
|
12
16
|
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
13
|
-
from pymodaq.utils.gui_utils import Dock
|
|
14
|
-
from pymodaq.utils.logger import set_logger, get_module_name
|
|
15
|
-
from pymodaq.utils import config as config_mod
|
|
16
|
-
from pymodaq.utils.parameter import ioxml
|
|
17
17
|
from pymodaq.utils.scanner import Scanner
|
|
18
18
|
from pymodaq.utils.scanner.scan_factory import ScannerBase
|
|
19
|
-
from pymodaq.utils.
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
from collections import OrderedDict
|
|
22
|
-
from pymodaq.utils.messenger import messagebox
|
|
19
|
+
from pymodaq.utils.config import get_set_batch_path
|
|
23
20
|
|
|
24
21
|
logger = set_logger(get_module_name(__file__))
|
|
25
22
|
|
|
26
|
-
batch_path =
|
|
23
|
+
batch_path = get_set_batch_path()
|
|
27
24
|
|
|
28
25
|
params = [
|
|
29
26
|
{'title': 'Actuators/Detectors Selection', 'name': 'modules', 'type': 'group', 'children': [
|
|
@@ -92,7 +89,7 @@ class BatchManager(ParameterManager):
|
|
|
92
89
|
|
|
93
90
|
"""
|
|
94
91
|
if filename is None or filename is False:
|
|
95
|
-
filename =
|
|
92
|
+
filename = file_io.select_file(start_path=self.batch_path, save=False, ext='xml')
|
|
96
93
|
if filename == '':
|
|
97
94
|
return
|
|
98
95
|
|
|
@@ -301,7 +298,7 @@ class BatchScanner(QtCore.QObject):
|
|
|
301
298
|
|
|
302
299
|
def load_file(self, filepath=None):
|
|
303
300
|
if filepath is None:
|
|
304
|
-
path =
|
|
301
|
+
path = file_io.select_file(start_path=batch_path, save=False, ext='xml')
|
|
305
302
|
if path != '':
|
|
306
303
|
filepath = path
|
|
307
304
|
else:
|
|
@@ -319,7 +316,7 @@ def main_batch_scanner():
|
|
|
319
316
|
from pymodaq.control_modules.mocks import MockDAQMove, MockDAQViewer
|
|
320
317
|
app = QtWidgets.QApplication(sys.argv)
|
|
321
318
|
win = QtWidgets.QMainWindow()
|
|
322
|
-
area =
|
|
319
|
+
area = DockArea()
|
|
323
320
|
win.setCentralWidget(area)
|
|
324
321
|
|
|
325
322
|
# prog = BatchManager(msgbox=False, actuators=['Xaxis', 'Yaxis'], detectors=['Det0D', 'Det1D'])
|
|
@@ -5,12 +5,16 @@ from qtpy.QtCore import QObject, Signal, Slot, QThread
|
|
|
5
5
|
from qtpy import QtWidgets
|
|
6
6
|
import time
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
|
|
12
|
-
from
|
|
13
|
-
|
|
8
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
9
|
+
from pymodaq_utils import utils
|
|
10
|
+
from pymodaq_utils.config import Config
|
|
11
|
+
|
|
12
|
+
from pymodaq_data.data import DataToExport
|
|
13
|
+
|
|
14
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
15
|
+
from pymodaq_gui.utils import Dock
|
|
16
|
+
|
|
17
|
+
from pymodaq.utils.data import DataActuator
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
if TYPE_CHECKING:
|
|
@@ -35,6 +39,7 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
35
39
|
selected_actuators: list of DAQ_Move
|
|
36
40
|
sublist of actuators
|
|
37
41
|
"""
|
|
42
|
+
settings_name = 'ModulesManagerSettings'
|
|
38
43
|
detectors_changed = Signal(list)
|
|
39
44
|
actuators_changed = Signal(list)
|
|
40
45
|
det_done_signal = Signal(DataToExport) # dte here contains DataWithAxes
|
|
@@ -113,7 +118,7 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
113
118
|
modules = [modules]
|
|
114
119
|
return [mod.title for mod in modules]
|
|
115
120
|
|
|
116
|
-
def get_mods_from_names(self, names, mod='det'):
|
|
121
|
+
def get_mods_from_names(self, names, mod='det') -> List[Union['DAQ_Move', 'DAQ_Viewer']]:
|
|
117
122
|
"""Getter of a list of given modules from their name (title)
|
|
118
123
|
|
|
119
124
|
Parameters
|
|
@@ -168,9 +173,14 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
168
173
|
|
|
169
174
|
@property
|
|
170
175
|
def detectors_all(self):
|
|
171
|
-
"""Get the list of all detectors"""
|
|
176
|
+
"""Get/Set the list of all detectors"""
|
|
172
177
|
return self._detectors
|
|
173
178
|
|
|
179
|
+
@detectors_all.setter
|
|
180
|
+
def detectors_all(self, detectors: List['DAQ_Viewer']):
|
|
181
|
+
self._detectors = detectors
|
|
182
|
+
|
|
183
|
+
|
|
174
184
|
@property
|
|
175
185
|
def actuators(self) -> List['DAQ_Move']:
|
|
176
186
|
"""Get the list of selected actuators"""
|
|
@@ -181,6 +191,10 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
181
191
|
"""Get the list of all actuators"""
|
|
182
192
|
return self._actuators
|
|
183
193
|
|
|
194
|
+
@actuators_all.setter
|
|
195
|
+
def actuators_all(self, actuators: List['DAQ_Move']):
|
|
196
|
+
self._actuators = actuators
|
|
197
|
+
|
|
184
198
|
@property
|
|
185
199
|
def modules(self):
|
|
186
200
|
"""Get the list of all detectors and actuators"""
|
|
@@ -240,11 +254,11 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
240
254
|
elif param.name() == 'actuators':
|
|
241
255
|
self.actuators_changed.emit(param.value()['selected'])
|
|
242
256
|
|
|
243
|
-
def get_det_data_list(self):
|
|
257
|
+
def get_det_data_list(self) -> DataToExport:
|
|
244
258
|
"""Do a snap of selected detectors, to get the list of all the data and processed data"""
|
|
245
259
|
|
|
246
260
|
self.connect_detectors()
|
|
247
|
-
datas: DataToExport = self.
|
|
261
|
+
datas: DataToExport = self.grab_data()
|
|
248
262
|
|
|
249
263
|
data_list0D = datas.get_full_names('data0D')
|
|
250
264
|
data_list1D = datas.get_full_names('data1D')
|
|
@@ -261,6 +275,7 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
261
275
|
dict(all_items=data_listND, selected=[]))
|
|
262
276
|
|
|
263
277
|
self.connect_detectors(False)
|
|
278
|
+
return datas
|
|
264
279
|
|
|
265
280
|
def get_selected_probed_data(self, dim='0D'):
|
|
266
281
|
"""Get the name of selected data names of a given dimensionality
|
|
@@ -272,7 +287,7 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
272
287
|
"""
|
|
273
288
|
return self.settings.child('data_dimensions', f'det_data_list{dim.upper()}').value()['selected']
|
|
274
289
|
|
|
275
|
-
def
|
|
290
|
+
def grab_data(self, **kwargs):
|
|
276
291
|
"""Do a single grab of connected and selected detectors"""
|
|
277
292
|
self.det_done_datas = DataToExport(name=__class__.__name__, control_module='DAQ_Viewer')
|
|
278
293
|
self._received_data = 0
|
|
@@ -296,6 +311,10 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
296
311
|
self.det_done_signal.emit(self.det_done_datas)
|
|
297
312
|
return self.det_done_datas
|
|
298
313
|
|
|
314
|
+
def grab_datas(self, **kwargs):
|
|
315
|
+
""" For back compatibility but use self.grab_data"""
|
|
316
|
+
return self.grab_data(**kwargs)
|
|
317
|
+
|
|
299
318
|
def connect_actuators(self, connect=True, slot=None, signal='move_done'):
|
|
300
319
|
"""Connect the selected actuators signal to a given or default slot
|
|
301
320
|
|
|
@@ -478,11 +497,6 @@ class ModulesManager(QObject, ParameterManager):
|
|
|
478
497
|
self.det_done_flag = True
|
|
479
498
|
self.settings.child('det_done').setValue(self.det_done_flag)
|
|
480
499
|
|
|
481
|
-
# if data.name not in list(self.det_done_datas.keys()):
|
|
482
|
-
# self.det_done_datas[data['name']] = data
|
|
483
|
-
# if len(self.det_done_datas.items()) == len(self.detectors):
|
|
484
|
-
# self.det_done_flag = True
|
|
485
|
-
|
|
486
500
|
|
|
487
501
|
if __name__ == '__main__':
|
|
488
502
|
import sys
|
|
@@ -490,7 +504,6 @@ if __name__ == '__main__':
|
|
|
490
504
|
app = QtWidgets.QApplication(sys.argv)
|
|
491
505
|
from qtpy.QtCore import QThread
|
|
492
506
|
from pymodaq.utils.gui_utils import DockArea
|
|
493
|
-
from pyqtgraph.dockarea import Dock
|
|
494
507
|
from pymodaq.control_modules.daq_viewer import DAQ_Viewer
|
|
495
508
|
from pymodaq.control_modules.daq_move import DAQ_Move
|
|
496
509
|
|
|
@@ -2,11 +2,9 @@ from qtpy import QtWidgets
|
|
|
2
2
|
import sys
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from pyqtgraph.parametertree.parameterTypes.basetypes import GroupParameter
|
|
9
|
-
from pymodaq.utils.gui_utils import select_file
|
|
5
|
+
from pymodaq_gui.parameter import ioxml, Parameter, ParameterTree
|
|
6
|
+
from pymodaq_gui.parameter.pymodaq_ptypes import registerParameterType, GroupParameter
|
|
7
|
+
from pymodaq_gui.utils import select_file
|
|
10
8
|
|
|
11
9
|
# check if overshoot_configurations directory exists on the drive
|
|
12
10
|
from pymodaq.utils.config import get_set_overshoot_path
|
|
@@ -120,6 +118,8 @@ class OvershootManager:
|
|
|
120
118
|
self.det_modules = det_modules
|
|
121
119
|
self.actuators_modules = actuators_modules
|
|
122
120
|
|
|
121
|
+
self._activated = False
|
|
122
|
+
|
|
123
123
|
if msgbox:
|
|
124
124
|
msgBox = QtWidgets.QMessageBox()
|
|
125
125
|
msgBox.setText("Overshoot Manager?")
|
|
@@ -140,12 +140,21 @@ class OvershootManager:
|
|
|
140
140
|
else: # cancel
|
|
141
141
|
pass
|
|
142
142
|
|
|
143
|
+
@property
|
|
144
|
+
def activated(self) -> bool:
|
|
145
|
+
return self._activated
|
|
146
|
+
|
|
147
|
+
@activated.setter
|
|
148
|
+
def activated(self, status: bool):
|
|
149
|
+
self._activated = status
|
|
150
|
+
|
|
143
151
|
def set_file_overshoot(self, filename, show=True):
|
|
144
152
|
"""
|
|
145
153
|
|
|
146
154
|
"""
|
|
147
155
|
children = ioxml.XML_file_to_parameter(filename)
|
|
148
|
-
self.overshoot_params = Parameter.create(title='Overshoot', name='Overshoot', type='group',
|
|
156
|
+
self.overshoot_params = Parameter.create(title='Overshoot', name='Overshoot', type='group',
|
|
157
|
+
children=children)
|
|
149
158
|
if show:
|
|
150
159
|
self.show_overshoot()
|
|
151
160
|
|
|
@@ -191,6 +200,39 @@ class OvershootManager:
|
|
|
191
200
|
ioxml.parameter_to_xml_file(
|
|
192
201
|
self.overshoot_params, os.path.join(overshoot_path, self.overshoot_params.child('filename').value()))
|
|
193
202
|
|
|
203
|
+
def activate_overshoot(self, det_modules, act_modules, status: bool):
|
|
204
|
+
det_titles = [det.title for det in det_modules]
|
|
205
|
+
move_titles = [move.title for move in act_modules]
|
|
206
|
+
|
|
207
|
+
if self.overshoot_params is not None:
|
|
208
|
+
for det_param in self.overshoot_params.child(
|
|
209
|
+
'Detectors').children():
|
|
210
|
+
if det_param['trig_overshoot']:
|
|
211
|
+
det_index = det_titles.index(det_param.opts['title'])
|
|
212
|
+
det_module = det_modules[det_index]
|
|
213
|
+
det_module.settings.child(
|
|
214
|
+
'main_settings', 'overshoot', 'stop_overshoot').setValue(status)
|
|
215
|
+
det_module.settings.child(
|
|
216
|
+
'main_settings', 'overshoot', 'overshoot_value').setValue(
|
|
217
|
+
det_param['overshoot_value'])
|
|
218
|
+
for move_param in det_param.child('params').children():
|
|
219
|
+
if move_param['move_overshoot']:
|
|
220
|
+
move_index = move_titles.index(move_param.opts['title'])
|
|
221
|
+
move_module = act_modules[move_index]
|
|
222
|
+
if status:
|
|
223
|
+
det_module.overshoot_signal.connect(
|
|
224
|
+
self.create_overshoot_fun(
|
|
225
|
+
move_module, move_param['position']))
|
|
226
|
+
else:
|
|
227
|
+
try:
|
|
228
|
+
det_module.overshoot_signal.disconnect()
|
|
229
|
+
except Exception as e:
|
|
230
|
+
pass
|
|
231
|
+
|
|
232
|
+
@staticmethod
|
|
233
|
+
def create_overshoot_fun(move_module, position):
|
|
234
|
+
return lambda: move_module.move_abs(position)
|
|
235
|
+
|
|
194
236
|
|
|
195
237
|
if __name__ == '__main__':
|
|
196
238
|
app = QtWidgets.QApplication(sys.argv)
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
from pymodaq.extensions import get_models
|
|
2
|
-
import pymodaq.utils.config
|
|
3
|
-
from pymodaq.utils.logger import set_logger, get_module_name, get_module_name
|
|
4
|
-
from pymodaq.utils.gui_utils.file_io import select_file
|
|
5
|
-
from qtpy import QtWidgets
|
|
6
|
-
import sys
|
|
7
1
|
import os
|
|
8
|
-
from pymodaq.utils.parameter import ParameterTree, Parameter
|
|
9
|
-
from pymodaq.utils.parameter import ioxml
|
|
10
|
-
from pymodaq.utils.messenger import dialog as dialogbox
|
|
11
|
-
from pymodaq.utils import daq_utils as utils
|
|
12
2
|
from pathlib import Path
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
from qtpy import QtWidgets
|
|
6
|
+
|
|
7
|
+
import pymodaq_utils.config as config_mod
|
|
8
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
9
|
+
|
|
10
|
+
from pymodaq_gui.utils.file_io import select_file
|
|
11
|
+
from pymodaq_gui.parameter import ParameterTree, Parameter
|
|
12
|
+
from pymodaq_gui.parameter import ioxml
|
|
13
|
+
from pymodaq_gui.messenger import dialog as dialogbox
|
|
14
|
+
from pymodaq.utils import config as config_mod_pymodaq
|
|
15
|
+
from pymodaq.extensions import get_models
|
|
16
|
+
|
|
13
17
|
import pymodaq.utils.managers.preset_manager_utils # to register move and det types
|
|
14
18
|
|
|
15
19
|
logger = set_logger(get_module_name(__file__))
|
|
16
20
|
|
|
17
21
|
# check if preset_mode directory exists on the drive
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
layout_path = pymodaq.utils.config.get_set_layout_path()
|
|
22
|
-
|
|
23
|
-
pid_models = [mod['name'] for mod in get_models()]
|
|
22
|
+
preset_path = config_mod_pymodaq.get_set_preset_path()
|
|
23
|
+
overshoot_path = config_mod_pymodaq.get_set_overshoot_path()
|
|
24
|
+
layout_path = config_mod_pymodaq.get_set_layout_path()
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class PresetManager:
|
|
@@ -34,8 +35,8 @@ class PresetManager:
|
|
|
34
35
|
self.extra_params = extra_params
|
|
35
36
|
self.param_options = param_options
|
|
36
37
|
self.preset_path = path
|
|
37
|
-
self.preset_params = None
|
|
38
|
-
|
|
38
|
+
self.preset_params: Parameter = None
|
|
39
|
+
|
|
39
40
|
if msgbox:
|
|
40
41
|
msgBox = QtWidgets.QMessageBox()
|
|
41
42
|
msgBox.setText("Preset Manager?")
|
|
@@ -56,33 +57,28 @@ class PresetManager:
|
|
|
56
57
|
else: # cancel
|
|
57
58
|
pass
|
|
58
59
|
|
|
60
|
+
@property
|
|
61
|
+
def filename(self) -> str:
|
|
62
|
+
try:
|
|
63
|
+
return self.preset_params['filename']
|
|
64
|
+
except:
|
|
65
|
+
return None
|
|
66
|
+
|
|
59
67
|
def set_file_preset(self, filename, show=True):
|
|
60
68
|
"""
|
|
61
69
|
|
|
62
70
|
"""
|
|
63
71
|
status = False
|
|
64
|
-
self.pid_type = False
|
|
65
72
|
children = ioxml.XML_file_to_parameter(filename)
|
|
66
73
|
self.preset_params = Parameter.create(title='Preset', name='Preset', type='group', children=children)
|
|
67
74
|
if show:
|
|
68
75
|
status = self.show_preset()
|
|
69
76
|
return status
|
|
70
77
|
|
|
71
|
-
def get_set_pid_model_params(self, model_file):
|
|
72
|
-
self.preset_params.child('model_settings').clearChildren()
|
|
73
|
-
model = get_models(model_file)
|
|
74
|
-
if model is not None:
|
|
75
|
-
params = model['class'].params
|
|
76
|
-
self.preset_params.child('model_settings').addChildren(params)
|
|
77
78
|
|
|
78
79
|
def set_new_preset(self):
|
|
79
|
-
self.pid_type = False
|
|
80
80
|
param = [
|
|
81
81
|
{'title': 'Filename:', 'name': 'filename', 'type': 'str', 'value': 'preset_default'},
|
|
82
|
-
{'title': 'Use PID as actuator:', 'name': 'use_pid', 'type': 'bool', 'value': False},
|
|
83
|
-
# {'title': 'Saving options:', 'name': 'saving_options', 'type': 'group', 'children': H5Saver.params},
|
|
84
|
-
{'title': 'PID models:', 'name': 'pid_models', 'type': 'list', 'visible': False,
|
|
85
|
-
'limits': pid_models},
|
|
86
82
|
{'title': 'Model Settings:', 'name': 'model_settings', 'type': 'group', 'visible': False, 'children': []},
|
|
87
83
|
]
|
|
88
84
|
params_move = [
|
|
@@ -98,9 +94,6 @@ class PresetManager:
|
|
|
98
94
|
except Exception as e:
|
|
99
95
|
logger.exception(str(e))
|
|
100
96
|
|
|
101
|
-
if len(pid_models) != 0:
|
|
102
|
-
self.get_set_pid_model_params(pid_models[0])
|
|
103
|
-
|
|
104
97
|
self.preset_params.sigTreeStateChanged.connect(self.parameter_tree_changed)
|
|
105
98
|
|
|
106
99
|
status = self.show_preset()
|
|
@@ -125,12 +118,6 @@ class PresetManager:
|
|
|
125
118
|
data[0].child('params', 'main_settings', 'module_name').setValue(data[0].child('name').value())
|
|
126
119
|
|
|
127
120
|
elif change == 'value':
|
|
128
|
-
|
|
129
|
-
if param.name() == 'use_pid':
|
|
130
|
-
self.preset_params.child('pid_models').show(param.value())
|
|
131
|
-
self.preset_params.child('model_settings').show(param.value())
|
|
132
|
-
if param.name() == 'pid_models' and param.value() != '':
|
|
133
|
-
self.get_set_pid_model_params(param.value())
|
|
134
121
|
if param.name() == 'name':
|
|
135
122
|
param.parent().child('params', 'main_settings', 'module_name').setValue(param.value())
|
|
136
123
|
|
|
@@ -144,8 +131,8 @@ class PresetManager:
|
|
|
144
131
|
dialog = QtWidgets.QDialog()
|
|
145
132
|
vlayout = QtWidgets.QVBoxLayout()
|
|
146
133
|
tree = ParameterTree()
|
|
147
|
-
tree.setMinimumWidth(400)
|
|
148
|
-
tree.setMinimumHeight(500)
|
|
134
|
+
# tree.setMinimumWidth(400)
|
|
135
|
+
# tree.setMinimumHeight(500)
|
|
149
136
|
tree.setParameters(self.preset_params, showTop=False)
|
|
150
137
|
|
|
151
138
|
vlayout.addWidget(tree)
|
|
@@ -161,20 +148,18 @@ class PresetManager:
|
|
|
161
148
|
dialog.setWindowTitle('Fill in information about this manager')
|
|
162
149
|
res = dialog.exec()
|
|
163
150
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
else:
|
|
167
|
-
path = self.preset_path
|
|
151
|
+
path = self.preset_path
|
|
152
|
+
file= None
|
|
168
153
|
|
|
169
154
|
if res == dialog.Accepted:
|
|
170
155
|
# save managers parameters in a xml file
|
|
171
156
|
# start = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
|
|
172
157
|
# start = os.path.join("..",'daq_scan')
|
|
173
|
-
filename_without_extension = self.
|
|
158
|
+
filename_without_extension = self.filename
|
|
174
159
|
|
|
175
160
|
try:
|
|
176
161
|
ioxml.parameter_to_xml_file(self.preset_params,
|
|
177
|
-
|
|
162
|
+
path.joinpath(filename_without_extension),
|
|
178
163
|
overwrite=False)
|
|
179
164
|
except FileExistsError as currenterror:
|
|
180
165
|
# logger.warning(str(currenterror)+"File " + filename_without_extension + ".xml exists")
|
|
@@ -183,24 +168,19 @@ class PresetManager:
|
|
|
183
168
|
message="File exist do you want to overwrite it ?")
|
|
184
169
|
if user_agreed:
|
|
185
170
|
ioxml.parameter_to_xml_file(self.preset_params,
|
|
186
|
-
|
|
171
|
+
path.joinpath(filename_without_extension))
|
|
187
172
|
logger.warning(f"File {filename_without_extension}.xml overwriten at user request")
|
|
188
173
|
else:
|
|
189
174
|
logger.warning(f"File {filename_without_extension}.xml wasn't saved at user request")
|
|
190
175
|
# emit status signal to dashboard to write : did not save ?
|
|
191
176
|
pass
|
|
192
177
|
|
|
193
|
-
if
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
file = os.path.splitext(self.preset_params.child('filename').value())[0]
|
|
201
|
-
file = os.path.join(layout_path, file + '.dock')
|
|
202
|
-
if os.path.isfile(file):
|
|
203
|
-
os.remove(file)
|
|
178
|
+
# check if overshoot configuration and layout configuration with same name exists => delete them if yes
|
|
179
|
+
over_shoot_file = overshoot_path.joinpath(self.filename + '.xml')
|
|
180
|
+
over_shoot_file.unlink(missing_ok=True)
|
|
181
|
+
|
|
182
|
+
layout_file = layout_path.joinpath(self.filename + '.dock')
|
|
183
|
+
layout_file.unlink(missing_ok=True)
|
|
204
184
|
|
|
205
185
|
return res == dialog.Accepted
|
|
206
186
|
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import random
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
3
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
4
|
+
from pymodaq_utils import utils
|
|
5
|
+
|
|
6
|
+
from pymodaq_gui.parameter.pymodaq_ptypes import registerParameterType, GroupParameter
|
|
7
|
+
from pymodaq_gui.parameter.utils import get_param_dict_from_name
|
|
8
|
+
|
|
5
9
|
from pymodaq.control_modules.move_utility_classes import params as daq_move_params
|
|
6
10
|
from pymodaq.control_modules.viewer_utility_classes import params as daq_viewer_params
|
|
11
|
+
from pymodaq.utils.daq_utils import get_plugins
|
|
7
12
|
|
|
8
|
-
from pyqtgraph.parametertree.Parameter import registerParameterType
|
|
9
|
-
from pyqtgraph.parametertree.parameterTypes.basetypes import GroupParameter
|
|
10
13
|
logger = set_logger(get_module_name(__file__))
|
|
11
14
|
|
|
12
|
-
DAQ_Move_Stage_type =
|
|
13
|
-
DAQ_0DViewer_Det_types =
|
|
14
|
-
DAQ_1DViewer_Det_types =
|
|
15
|
-
DAQ_2DViewer_Det_types =
|
|
16
|
-
DAQ_NDViewer_Det_types =
|
|
15
|
+
DAQ_Move_Stage_type = get_plugins('daq_move')
|
|
16
|
+
DAQ_0DViewer_Det_types = get_plugins('daq_0Dviewer')
|
|
17
|
+
DAQ_1DViewer_Det_types = get_plugins('daq_1Dviewer')
|
|
18
|
+
DAQ_2DViewer_Det_types = get_plugins('daq_2Dviewer')
|
|
19
|
+
DAQ_NDViewer_Det_types = get_plugins('daq_NDviewer')
|
|
17
20
|
|
|
18
21
|
|
|
19
22
|
def iterative_show_pb(params):
|
|
@@ -74,20 +77,23 @@ class PresetScalableGroupMove(GroupParameter):
|
|
|
74
77
|
for main_child in params:
|
|
75
78
|
if main_child['name'] == 'move_settings':
|
|
76
79
|
main_child['children'] = params_hardware
|
|
80
|
+
controller_dict = get_param_dict_from_name(params_hardware, 'controller_ID')
|
|
81
|
+
controller_dict['value'] = random.randint(0, 9999)
|
|
82
|
+
|
|
77
83
|
elif main_child['name'] == 'main_settings':
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
child['value'] = typ
|
|
81
|
-
if child['name'] == 'controller_ID':
|
|
82
|
-
child['value'] = random.randint(0, 9999)
|
|
84
|
+
typ_dict = get_param_dict_from_name(main_child['children'], 'move_type')
|
|
85
|
+
typ_dict['value'] = typ
|
|
83
86
|
|
|
84
|
-
child = {'title': 'Actuator {:02.0f}'.format(newindex),
|
|
87
|
+
child = {'title': 'Actuator {:02.0f}'.format(newindex),
|
|
88
|
+
'name': f'{name_prefix}{newindex:02.0f}',
|
|
85
89
|
'type': 'group',
|
|
86
|
-
'removable': True, '
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
'removable': True, 'renamable': False,
|
|
91
|
+
'children': [
|
|
92
|
+
{'title': 'Name:', 'name': 'name', 'type': 'str',
|
|
93
|
+
'value': 'Move {:02.0f}'.format(newindex)},
|
|
94
|
+
{'title': 'Init?:', 'name': 'init', 'type': 'bool', 'value': True},
|
|
95
|
+
{'title': 'Settings:', 'name': 'params', 'type': 'group', 'children': params},
|
|
96
|
+
]}
|
|
91
97
|
|
|
92
98
|
self.addChild(child)
|
|
93
99
|
|
|
@@ -153,8 +159,6 @@ class PresetScalableGroupDet(GroupParameter):
|
|
|
153
159
|
child['value'] = typ[6:]
|
|
154
160
|
if child['name'] == 'controller_status':
|
|
155
161
|
child['visible'] = True
|
|
156
|
-
if child['name'] == 'controller_ID':
|
|
157
|
-
child['value'] = random.randint(0, 9999)
|
|
158
162
|
|
|
159
163
|
if '0D' in typ:
|
|
160
164
|
parent_module = utils.find_dict_in_list_from_key_val(DAQ_0DViewer_Det_types, 'name', typ[6:])
|
|
@@ -184,6 +188,8 @@ class PresetScalableGroupDet(GroupParameter):
|
|
|
184
188
|
main_child['children'].remove(child)
|
|
185
189
|
|
|
186
190
|
main_child['children'].extend(params_hardware)
|
|
191
|
+
controller_dict = get_param_dict_from_name(main_child['children'], 'controller_ID')
|
|
192
|
+
controller_dict['value'] = random.randint(0, 9999)
|
|
187
193
|
|
|
188
194
|
child = {'title': 'Det {:02.0f}'.format(newindex), 'name': f'{name_prefix}{newindex:02.0f}',
|
|
189
195
|
'type': 'group', 'children': [
|