pymodaq 4.2.3__py3-none-any.whl → 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymodaq might be problematic. Click here for more details.
- pymodaq/__init__.py +30 -23
- pymodaq/control_modules/daq_move.py +27 -14
- pymodaq/control_modules/daq_move_ui.py +33 -16
- pymodaq/control_modules/daq_viewer.py +38 -28
- pymodaq/control_modules/daq_viewer_ui.py +6 -6
- pymodaq/control_modules/mocks.py +1 -1
- pymodaq/control_modules/move_utility_classes.py +19 -10
- pymodaq/control_modules/utils.py +18 -12
- pymodaq/control_modules/viewer_utility_classes.py +13 -4
- pymodaq/dashboard.py +166 -118
- pymodaq/examples/custom_app.py +13 -16
- pymodaq/examples/custom_viewer.py +7 -7
- pymodaq/examples/function_plotter.py +13 -12
- pymodaq/examples/parameter_ex.py +50 -25
- pymodaq/examples/tcp_client.py +1 -1
- pymodaq/extensions/__init__.py +1 -1
- pymodaq/extensions/bayesian/bayesian_optimisation.py +15 -12
- pymodaq/extensions/bayesian/utils.py +10 -10
- pymodaq/extensions/console.py +10 -13
- pymodaq/extensions/{daq_logger.py → daq_logger/daq_logger.py} +36 -56
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger.py +16 -15
- pymodaq/{utils/db/db_logger → extensions/daq_logger/db}/db_logger_models.py +2 -0
- pymodaq/{utils/h5modules → extensions/daq_logger}/h5logging.py +7 -8
- pymodaq/extensions/daq_scan.py +153 -247
- pymodaq/extensions/daq_scan_ui.py +11 -9
- pymodaq/extensions/h5browser.py +8 -8
- pymodaq/extensions/pid/__init__.py +6 -3
- pymodaq/extensions/pid/daq_move_PID.py +4 -2
- pymodaq/extensions/pid/pid_controller.py +15 -12
- pymodaq/extensions/pid/utils.py +10 -5
- pymodaq/extensions/utils.py +5 -3
- pymodaq/post_treatment/load_and_plot.py +10 -7
- pymodaq/resources/preset_default.xml +1 -1
- pymodaq/utils/array_manipulation.py +4 -384
- pymodaq/utils/calibration_camera.py +12 -9
- pymodaq/utils/chrono_timer.py +7 -5
- pymodaq/utils/config.py +3 -450
- pymodaq/utils/daq_utils.py +6 -664
- pymodaq/utils/data.py +9 -2774
- pymodaq/utils/exceptions.py +0 -4
- pymodaq/utils/gui_utils/__init__.py +8 -8
- pymodaq/utils/gui_utils/loader_utils.py +38 -0
- pymodaq/utils/gui_utils/utils.py +6 -138
- pymodaq/utils/h5modules/__init__.py +0 -4
- pymodaq/utils/h5modules/module_saving.py +15 -8
- pymodaq/utils/leco/__init__.py +2 -2
- pymodaq/utils/leco/daq_move_LECODirector.py +2 -2
- pymodaq/utils/leco/daq_xDviewer_LECODirector.py +2 -2
- pymodaq/utils/leco/director_utils.py +2 -2
- pymodaq/utils/leco/leco_director.py +3 -3
- pymodaq/utils/leco/pymodaq_listener.py +2 -2
- pymodaq/utils/leco/utils.py +1 -1
- pymodaq/utils/logger.py +4 -76
- pymodaq/utils/managers/batchscan_manager.py +16 -19
- pymodaq/utils/managers/modules_manager.py +10 -7
- pymodaq/utils/managers/overshoot_manager.py +3 -5
- pymodaq/utils/managers/preset_manager.py +37 -15
- pymodaq/utils/managers/preset_manager_utils.py +11 -9
- pymodaq/utils/managers/remote_manager.py +12 -10
- pymodaq/utils/math_utils.py +4 -572
- pymodaq/utils/parameter/__init__.py +4 -11
- pymodaq/utils/parameter/utils.py +4 -299
- pymodaq/utils/scanner/scan_config.py +1 -1
- pymodaq/utils/scanner/scan_factory.py +16 -12
- pymodaq/utils/{plotting → scanner}/scan_selector.py +19 -20
- pymodaq/utils/scanner/scanner.py +10 -8
- pymodaq/utils/scanner/scanners/_1d_scanners.py +8 -5
- pymodaq/utils/scanner/scanners/_2d_scanners.py +5 -5
- pymodaq/utils/scanner/scanners/sequential.py +8 -8
- pymodaq/utils/scanner/scanners/tabular.py +9 -9
- pymodaq/utils/scanner/utils.py +6 -4
- pymodaq/utils/svg/svg_viewer2D.py +3 -4
- pymodaq/utils/tcp_ip/serializer.py +64 -16
- pymodaq/utils/tcp_ip/tcp_server_client.py +10 -8
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/METADATA +5 -3
- pymodaq-5.0.0.dist-info/RECORD +123 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/WHEEL +1 -1
- pymodaq/post_treatment/process_to_scalar.py +0 -263
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/1d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/2d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/3d.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Add_Step.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Approve_All.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Browse_Dir_Path.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Calculator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnGroup.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnNum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnText.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnTime.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ChnWave.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Close3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/CollapseAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ColorPicker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Contract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Create.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/DeleteLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditOpen.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditRedo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EditUndo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Ellipse.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/EllipseFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ErrorMessage.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Error_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Exit.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Expand.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ExpandAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/FFT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/HLM.ico +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Help_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Histogram.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/LUT_LookUpTable.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MagnifyingGlass_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Marker.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Math.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MeasurementStudio_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Move.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveDown.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/MoveUp.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Multiply.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewFile.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/NewLayer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/New_Folder.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_1D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_2D.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_File_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Open_sim.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Options.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Oscilloscope_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Pass.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RGB.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rectangle.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/RectangleFilled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Redo.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Refresh_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Region.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Rendezvous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SELECT.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAll_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SaveAs_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Save_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Search.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/SelectPolygon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Select_24.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Settings.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snap&Save.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Snapshot2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Spreadsheet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Statistics2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Status.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Subtract.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Vision.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Volts.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Wait2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_1_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_in.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_out.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/Zoom_to_Selection.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/abort.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/advanced2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/autoscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/b_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/back.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/bg_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/camera_snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cartesian.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/clear_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/close2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/cluster2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/color2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/continuous.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/data.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/delay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/download2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/error2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ethernet.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/exit2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/fan.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/filter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/g_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/gear2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/go_to_2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grab.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/graph.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greenLight2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/green_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/grey_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/greyscale.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/help1_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/home2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/information2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/ini.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/integrator.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/joystick.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_green_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_red_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/light_yellow_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/limiter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/load_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meshPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/meter_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_contour.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/move_straight_line.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/movie.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multi_point.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/multiplexer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/new.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openArrow.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/openTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/oscilloscope3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/overlay.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass2_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pass_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pause.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/permute.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/phase.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/play.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/polar.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/pole_zero.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerMeter.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/powerSwitch_16.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/print2_32.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/properties.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/r_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/radiocontrolbutton.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/read2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/red_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/remove.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/reset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rgb_icon.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/robot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/rotation2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/run_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saturation.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/saveTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/save_ROI.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_horizontally.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/scale_vertically.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/search2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_all2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/select_none.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sequence2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/snap.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sort_ascend.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/spectrumAnalyzer.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/start.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/status_cancelled.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop3.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/stop_all.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/sum.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/surfacePlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/tree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/updateTree.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility2.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/utility_small.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/vector.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/verify.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/video.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/wait.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/waterfallPlot.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/watershed.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/yellow_light.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zip_file.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomAuto.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/Icon_Library/zoomReset.png +0 -0
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.bat +0 -2
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources.qrc +0 -234
- pymodaq/resources/QtDesigner_Ressources/QtDesigner_ressources_rc.py +0 -127150
- pymodaq/resources/QtDesigner_Ressources/icons.svg +0 -142
- pymodaq/resources/VERSION +0 -1
- pymodaq/resources/config_template.toml +0 -90
- pymodaq/resources/triangulation_data.npy +0 -0
- pymodaq/utils/abstract/__init__.py +0 -48
- pymodaq/utils/db/__init__.py +0 -0
- pymodaq/utils/db/db_logger/__init__.py +0 -0
- pymodaq/utils/enums.py +0 -76
- pymodaq/utils/factory.py +0 -82
- pymodaq/utils/gui_utils/custom_app.py +0 -133
- pymodaq/utils/gui_utils/dock.py +0 -107
- pymodaq/utils/gui_utils/file_io.py +0 -93
- pymodaq/utils/gui_utils/layout.py +0 -34
- pymodaq/utils/gui_utils/list_picker.py +0 -38
- pymodaq/utils/gui_utils/widgets/__init__.py +0 -5
- pymodaq/utils/gui_utils/widgets/label.py +0 -24
- pymodaq/utils/gui_utils/widgets/lcd.py +0 -111
- pymodaq/utils/gui_utils/widgets/push.py +0 -149
- pymodaq/utils/gui_utils/widgets/qled.py +0 -62
- pymodaq/utils/gui_utils/widgets/spinbox.py +0 -24
- pymodaq/utils/gui_utils/widgets/table.py +0 -263
- pymodaq/utils/gui_utils/widgets/tree_layout.py +0 -188
- pymodaq/utils/gui_utils/widgets/tree_toml.py +0 -102
- pymodaq/utils/h5modules/backends.py +0 -1022
- pymodaq/utils/h5modules/browsing.py +0 -625
- pymodaq/utils/h5modules/data_saving.py +0 -1101
- pymodaq/utils/h5modules/exporter.py +0 -119
- pymodaq/utils/h5modules/exporters/__init__.py +0 -0
- pymodaq/utils/h5modules/exporters/base.py +0 -111
- pymodaq/utils/h5modules/exporters/flimj.py +0 -63
- pymodaq/utils/h5modules/exporters/hyperspy.py +0 -143
- pymodaq/utils/h5modules/saving.py +0 -866
- pymodaq/utils/h5modules/utils.py +0 -115
- pymodaq/utils/managers/action_manager.py +0 -489
- pymodaq/utils/managers/parameter_manager.py +0 -282
- pymodaq/utils/managers/roi_manager.py +0 -726
- pymodaq/utils/messenger.py +0 -66
- pymodaq/utils/parameter/ioxml.py +0 -542
- pymodaq/utils/parameter/pymodaq_ptypes/__init__.py +0 -38
- pymodaq/utils/parameter/pymodaq_ptypes/bool.py +0 -31
- pymodaq/utils/parameter/pymodaq_ptypes/date.py +0 -126
- pymodaq/utils/parameter/pymodaq_ptypes/filedir.py +0 -143
- pymodaq/utils/parameter/pymodaq_ptypes/itemselect.py +0 -265
- pymodaq/utils/parameter/pymodaq_ptypes/led.py +0 -44
- pymodaq/utils/parameter/pymodaq_ptypes/list.py +0 -150
- pymodaq/utils/parameter/pymodaq_ptypes/numeric.py +0 -18
- pymodaq/utils/parameter/pymodaq_ptypes/pixmap.py +0 -175
- pymodaq/utils/parameter/pymodaq_ptypes/slide.py +0 -145
- pymodaq/utils/parameter/pymodaq_ptypes/table.py +0 -135
- pymodaq/utils/parameter/pymodaq_ptypes/tableview.py +0 -149
- pymodaq/utils/parameter/pymodaq_ptypes/text.py +0 -142
- pymodaq/utils/plotting/__init__.py +0 -0
- pymodaq/utils/plotting/data_viewers/__init__.py +0 -10
- pymodaq/utils/plotting/data_viewers/base.py +0 -286
- pymodaq/utils/plotting/data_viewers/viewer.py +0 -274
- pymodaq/utils/plotting/data_viewers/viewer0D.py +0 -298
- pymodaq/utils/plotting/data_viewers/viewer1D.py +0 -820
- pymodaq/utils/plotting/data_viewers/viewer1Dbasic.py +0 -231
- pymodaq/utils/plotting/data_viewers/viewer2D.py +0 -1118
- pymodaq/utils/plotting/data_viewers/viewer2D_basic.py +0 -146
- pymodaq/utils/plotting/data_viewers/viewerND.py +0 -800
- pymodaq/utils/plotting/gant_chart.py +0 -123
- pymodaq/utils/plotting/image_viewer.py +0 -97
- pymodaq/utils/plotting/items/__init__.py +0 -0
- pymodaq/utils/plotting/items/axis_scaled.py +0 -93
- pymodaq/utils/plotting/items/crosshair.py +0 -94
- pymodaq/utils/plotting/items/image.py +0 -388
- pymodaq/utils/plotting/navigator.py +0 -353
- pymodaq/utils/plotting/plotter/plotter.py +0 -94
- pymodaq/utils/plotting/plotter/plotters/__init__.py +0 -0
- pymodaq/utils/plotting/plotter/plotters/matplotlib_plotters.py +0 -134
- pymodaq/utils/plotting/plotter/plotters/qt_plotters.py +0 -78
- pymodaq/utils/plotting/utils/__init__.py +0 -0
- pymodaq/utils/plotting/utils/axes_viewer.py +0 -88
- pymodaq/utils/plotting/utils/filter.py +0 -585
- pymodaq/utils/plotting/utils/lineout.py +0 -226
- pymodaq/utils/plotting/utils/plot_utils.py +0 -579
- pymodaq/utils/plotting/utils/signalND.py +0 -1347
- pymodaq/utils/plotting/widgets.py +0 -76
- pymodaq/utils/qvariant.py +0 -12
- pymodaq/utils/slicing.py +0 -63
- pymodaq/utils/units.py +0 -216
- pymodaq-4.2.3.dist-info/RECORD +0 -438
- /pymodaq/{post_treatment/daq_analysis → extensions/daq_logger}/__init__.py +0 -0
- /pymodaq/{utils/abstract/logger.py → extensions/daq_logger/abstract.py} +0 -0
- /pymodaq/{resources/QtDesigner_Ressources → extensions/daq_logger/db}/__init__.py +0 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/entry_points.txt +0 -0
- {pymodaq-4.2.3.dist-info → pymodaq-5.0.0.dist-info}/licenses/LICENSE +0 -0
pymodaq/examples/custom_app.py
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
from collections import OrderedDict
|
|
2
|
-
import datetime
|
|
3
|
-
import numpy as np
|
|
4
1
|
|
|
5
|
-
|
|
6
|
-
from pymodaq.utils.gui_utils.custom_app import CustomApp
|
|
7
|
-
from pymodaq.utils.gui_utils.dock import DockArea, Dock
|
|
8
|
-
from pymodaq.utils.gui_utils.file_io import select_file
|
|
9
|
-
from pymodaq.utils.config import Config
|
|
2
|
+
import datetime
|
|
10
3
|
|
|
11
4
|
from qtpy import QtWidgets
|
|
12
5
|
from qtpy.QtCore import Slot, QDate, QThread
|
|
13
6
|
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
7
|
+
from pymodaq_utils.config import Config
|
|
8
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
9
|
+
from pymodaq_gui.utils.custom_app import CustomApp
|
|
10
|
+
from pymodaq_gui.utils.dock import DockArea, Dock
|
|
11
|
+
from pymodaq_gui.utils.file_io import select_file
|
|
12
|
+
from pymodaq_gui.parameter import ioxml
|
|
13
|
+
from pymodaq_gui.plotting.data_viewers.viewer0D import Viewer0D
|
|
14
|
+
from pymodaq_gui.h5modules.browsing import H5Browser
|
|
15
|
+
from pymodaq_gui.h5modules.saving import H5Saver
|
|
16
|
+
from pymodaq_data.h5modules.data_saving import DataToExportSaver
|
|
17
|
+
from pymodaq_data.data import DataToExport
|
|
18
18
|
|
|
19
|
-
from pymodaq.
|
|
20
|
-
from pymodaq.utils.h5modules.saving import H5Saver
|
|
21
|
-
from pymodaq.utils.h5modules.data_saving import DataToExportSaver
|
|
22
|
-
from pymodaq.utils.data import DataToExport
|
|
19
|
+
from pymodaq.control_modules.daq_viewer import DAQ_Viewer
|
|
23
20
|
|
|
24
21
|
|
|
25
22
|
config = Config()
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from pymodaq_gui.utils.widgets.table import SpinBoxDelegate
|
|
2
|
+
from pymodaq_gui.parameter.utils import get_widget_from_tree
|
|
3
|
+
from pymodaq_gui.plotting.data_viewers.viewer2D import Viewer2D
|
|
4
4
|
from pymodaq.utils import gui_utils as gutils
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
5
|
+
from pymodaq_gui.utils import Dock
|
|
6
|
+
from pymodaq_gui.parameter import ParameterTree, Parameter
|
|
7
|
+
from pymodaq_gui.parameter.pymodaq_ptypes.tableview import TableViewCustom
|
|
8
8
|
from pymodaq.utils.scanner.scanners.tabular import TableModelTabular
|
|
9
9
|
from qtpy.QtCore import QObject, Qt, Slot
|
|
10
10
|
from qtpy import QtWidgets
|
|
@@ -96,7 +96,7 @@ if __name__ == '__main__':
|
|
|
96
96
|
Ny = 200
|
|
97
97
|
x = (np.linspace(0, Nx - 1, Nx) + 100) / 2
|
|
98
98
|
y = (np.linspace(0, Ny - 1, Ny) - 10) * 2
|
|
99
|
-
from pymodaq.utils.
|
|
99
|
+
from pymodaq.utils.math_utils import gauss2D
|
|
100
100
|
|
|
101
101
|
data_red = 3 * gauss2D(x, np.mean(x), (np.max(x)-np.min(x)) / 5, y, np.mean(y), (np.max(y)-np.min(y)) / 5, 1)
|
|
102
102
|
data_red += np.random.random(data_red.shape)
|
|
@@ -11,17 +11,13 @@ from qtpy.QtCore import Slot, QDate, QThread, QTimer
|
|
|
11
11
|
|
|
12
12
|
from pymodaq.utils import data as data_mod
|
|
13
13
|
from pymodaq.utils.logger import set_logger, get_module_name
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
14
|
+
from pymodaq_gui.utils.custom_app import CustomApp
|
|
15
|
+
from pymodaq_gui.utils.dock import DockArea, Dock
|
|
16
|
+
from pymodaq_data.data import DataRaw, Axis
|
|
17
|
+
from pymodaq_utils.config import Config
|
|
18
18
|
|
|
19
|
-
from
|
|
20
|
-
from pymodaq.utils import daq_utils as utils
|
|
19
|
+
from pymodaq_gui.plotting.data_viewers.viewer1D import Viewer1D
|
|
21
20
|
|
|
22
|
-
from pymodaq.utils.parameter import ioxml
|
|
23
|
-
from pymodaq.utils.plotting.data_viewers.viewer1D import Viewer1D
|
|
24
|
-
from pymodaq.utils.h5modules import H5Browser, H5Saver
|
|
25
21
|
|
|
26
22
|
config = Config()
|
|
27
23
|
logger = set_logger(get_module_name(__file__))
|
|
@@ -113,8 +109,14 @@ class FunctionPlotter(CustomApp):
|
|
|
113
109
|
|
|
114
110
|
function_vals = eval(f'np.{function_str}')
|
|
115
111
|
|
|
116
|
-
self.viewer.show_data(
|
|
117
|
-
|
|
112
|
+
self.viewer.show_data(DataRaw(name=function_str,
|
|
113
|
+
data=[function_vals],
|
|
114
|
+
labels=[function_str],
|
|
115
|
+
axes=[
|
|
116
|
+
data_mod.Axis(
|
|
117
|
+
data=x, label='An axis', units='arb. units')],
|
|
118
|
+
)
|
|
119
|
+
)
|
|
118
120
|
|
|
119
121
|
def value_changed(self, param):
|
|
120
122
|
if param.name() == 'add_function':
|
|
@@ -141,7 +143,6 @@ class FunctionPlotter(CustomApp):
|
|
|
141
143
|
self.timer.stop()
|
|
142
144
|
|
|
143
145
|
|
|
144
|
-
|
|
145
146
|
def main():
|
|
146
147
|
import sys
|
|
147
148
|
app = QtWidgets.QApplication(sys.argv)
|
pymodaq/examples/parameter_ex.py
CHANGED
|
@@ -4,58 +4,74 @@ Examples of custome parameter types derived from pyqtgraph
|
|
|
4
4
|
"""
|
|
5
5
|
import sys
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import pymodaq_gui.utils.widgets.table
|
|
8
8
|
from qtpy import QtWidgets, QtCore
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
from collections import OrderedDict
|
|
11
|
-
from
|
|
11
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class ParameterEx(ParameterManager):
|
|
15
15
|
params = [
|
|
16
16
|
{'title': 'Groups:', 'name': 'groups', 'type': 'group', 'children': [
|
|
17
17
|
{'title': 'A visible group:', 'name': 'agroup', 'type': 'group', 'children': []},
|
|
18
|
-
{'title': 'An hidden group:', 'name': 'bgroup', 'type': 'group', 'children': [],
|
|
18
|
+
{'title': 'An hidden group:', 'name': 'bgroup', 'type': 'group', 'children': [],
|
|
19
|
+
'visible': False}, # this
|
|
19
20
|
# visible option is not available in usual pyqtgraph group
|
|
20
21
|
]},
|
|
21
22
|
|
|
22
23
|
{'title': 'Numbers:', 'name': 'numbers', 'type': 'group', 'children': [
|
|
23
24
|
{'title': 'Standard float', 'name': 'afloat', 'type': 'float', 'value': 20., 'min': 1.,
|
|
24
25
|
'tip': 'displays this text as a tooltip'},
|
|
25
|
-
{'title': 'Linear Slide float', 'name': 'linearslidefloat', 'type': 'slide',
|
|
26
|
+
{'title': 'Linear Slide float', 'name': 'linearslidefloat', 'type': 'slide',
|
|
27
|
+
'value': 50, 'default': 50,
|
|
26
28
|
'min': 0,
|
|
27
29
|
'max': 123, 'subtype': 'linear'},
|
|
28
|
-
{'title': 'Linear int Slide', 'name': 'linearslideint', 'type': 'slide',
|
|
30
|
+
{'title': 'Linear int Slide', 'name': 'linearslideint', 'type': 'slide',
|
|
31
|
+
'value': 50, 'default': 50, 'step':1,
|
|
29
32
|
'min': 0,
|
|
30
33
|
'max': 123, 'subtype': 'linear', 'int': True},
|
|
31
|
-
{'title': '
|
|
34
|
+
{'title': 'Linear Slide with suffix', 'name': 'linearslidewithsuffixandsiPrefix',
|
|
35
|
+
'type': 'slide', 'value': 50, 'default': 50,
|
|
36
|
+
'min': 0,
|
|
37
|
+
'max': 1e6, 'subtype': 'linear','suffix':'V','siPrefix':True},
|
|
38
|
+
{'title': 'Log Slide float', 'name': 'logslidefloat', 'type': 'slide',
|
|
39
|
+
'value': 50, 'default': 50,
|
|
32
40
|
'min': 1e-5,
|
|
33
|
-
'max': 1e5, 'subtype': 'log'},
|
|
41
|
+
'max': 1e5, 'subtype': 'log','suffix':'V','siPrefix':True},
|
|
34
42
|
]},
|
|
35
43
|
|
|
36
44
|
{'title': 'Booleans:', 'name': 'booleans', 'type': 'group', 'children': [
|
|
37
45
|
{'title': 'Standard bool', 'name': 'abool', 'type': 'bool', 'value': True},
|
|
38
|
-
{'title': 'bool push', 'name': 'aboolpush', 'type': 'bool_push', 'value': True,
|
|
39
|
-
|
|
40
|
-
{'title': 'A led', 'name': '
|
|
46
|
+
{'title': 'bool push', 'name': 'aboolpush', 'type': 'bool_push', 'value': True,
|
|
47
|
+
'label': 'action'},
|
|
48
|
+
{'title': 'A led', 'name': 'aled', 'type': 'led', 'value': False,
|
|
49
|
+
'tip': 'a led you cannot toggle'},
|
|
50
|
+
{'title': 'A led', 'name': 'anotherled', 'type': 'led_push', 'value': True,
|
|
51
|
+
'tip': 'a led you can toggle'},
|
|
41
52
|
]},
|
|
42
53
|
|
|
43
54
|
{'title': 'DateTime:', 'name': 'datetimes', 'type': 'group', 'children': [
|
|
44
|
-
{'title': 'Time:', 'name': 'atime', 'type': 'time',
|
|
45
|
-
|
|
55
|
+
{'title': 'Time:', 'name': 'atime', 'type': 'time',
|
|
56
|
+
'value': QtCore.QTime.currentTime()},
|
|
57
|
+
{'title': 'Date:', 'name': 'adate', 'type': 'date',
|
|
58
|
+
'value': QtCore.QDate.currentDate(),
|
|
46
59
|
'format': 'dd/MM/yyyy'},
|
|
47
60
|
{'title': 'DateTime:', 'name': 'adatetime', 'type': 'date_time',
|
|
48
61
|
'value': QtCore.QDateTime(QtCore.QDate.currentDate(), QtCore.QTime.currentTime()),
|
|
49
62
|
'format': 'MM/dd/yyyy hh:mm', 'tip': 'displays this text as a tooltip'},
|
|
50
63
|
]},
|
|
51
|
-
{'title': 'An action', 'name': 'action', 'type': 'action'},
|
|
64
|
+
{'title': 'An action', 'name': 'action', 'type': 'action'},
|
|
65
|
+
# action whose displayed text corresponds to title
|
|
52
66
|
|
|
53
67
|
{'title': 'Lists:', 'name': 'lists', 'type': 'group', 'children': [
|
|
54
68
|
{'title': 'Standard list:', 'name': 'alist', 'type': 'list',
|
|
55
69
|
'limits': ['a value', 'another one'], 'value': 'a value'},
|
|
56
70
|
{'title': 'List with add:', 'name': 'anotherlist', 'type': 'list',
|
|
57
71
|
'limits': ['a value', 'another one'], 'value': 'a value',
|
|
58
|
-
'show_pb': True,
|
|
72
|
+
'show_pb': True,
|
|
73
|
+
'tip': 'when using the "show_pb" option, displays a plus '
|
|
74
|
+
'button to add elt to the list'},
|
|
59
75
|
{'title': 'List defined from a dict:', 'name': 'dict_list', 'type': 'list',
|
|
60
76
|
'limits': {'xaxis': 0, 'yaxis': [0, 1, 2]},
|
|
61
77
|
'value': 'yaxis',
|
|
@@ -64,9 +80,11 @@ class ParameterEx(ParameterManager):
|
|
|
64
80
|
},
|
|
65
81
|
]},
|
|
66
82
|
{'title': 'Browsing files:', 'name': 'browser', 'type': 'group', 'children': [
|
|
67
|
-
{'title': 'Look for a file:', 'name': 'afile', 'type': 'browsepath', 'value': '',
|
|
83
|
+
{'title': 'Look for a file:', 'name': 'afile', 'type': 'browsepath', 'value': '',
|
|
84
|
+
'filetype': True,
|
|
68
85
|
'tip': 'If filetype is True select a file otherwise a directory'},
|
|
69
|
-
{'title': 'Look for a dir:', 'name': 'adir', 'type': 'browsepath', 'value': '',
|
|
86
|
+
{'title': 'Look for a dir:', 'name': 'adir', 'type': 'browsepath', 'value': '',
|
|
87
|
+
'filetype': False,
|
|
70
88
|
'tip': 'If filetype is True select a file otherwise a directory'},
|
|
71
89
|
|
|
72
90
|
]},
|
|
@@ -79,19 +97,24 @@ class ParameterEx(ParameterManager):
|
|
|
79
97
|
'tip': 'If show_pb is True, user can add items to the list', 'show_pb': True,},
|
|
80
98
|
{'title': 'Removable items', 'name': 'itemsbisbis', 'type': 'itemselect',
|
|
81
99
|
'value': dict(all_items=['item1', 'item2', 'item3'], selected=['item2']),
|
|
82
|
-
'tip': 'If show_mb is True, user can remove selected items from the list',
|
|
100
|
+
'tip': 'If show_mb is True, user can remove selected items from the list',
|
|
101
|
+
'show_mb': True,},
|
|
83
102
|
{'title': 'Checkable items', 'name': 'itemscheckable', 'type': 'itemselect',
|
|
84
103
|
'value': dict(all_items=['item1', 'item2', 'item3'], selected=['item2']),
|
|
85
|
-
'tip': 'If checkbox is True, user can select item by checking/unchecking items.
|
|
104
|
+
'tip': 'If checkbox is True, user can select item by checking/unchecking items.'
|
|
105
|
+
' Remove items is still used with standard selections',
|
|
86
106
|
'show_pb': True, 'checkbox': True, 'show_mb': True,},
|
|
87
107
|
{'title': 'Dragable items', 'name': 'itemsdragablecheckable', 'type': 'itemselect',
|
|
88
108
|
'value': dict(all_items=['item1', 'item2', 'item3'], selected=['item2']),
|
|
89
|
-
'tip': 'If dragdrop is True, user can drag or drop items inside the list',
|
|
109
|
+
'tip': 'If dragdrop is True, user can drag or drop items inside the list',
|
|
110
|
+
'checkbox': True, 'dragdrop': True},
|
|
90
111
|
]},
|
|
91
112
|
{'title': 'Plain text:', 'name': 'texts', 'type': 'group', 'children': [
|
|
92
|
-
{'title': 'Standard str', 'name': 'atte', 'type': 'str',
|
|
113
|
+
{'title': 'Standard str', 'name': 'atte', 'type': 'str',
|
|
114
|
+
'value': 'this is a string you can edit'},
|
|
93
115
|
{'title': 'Plain text', 'name': 'text', 'type': 'text', 'value': 'this is some text'},
|
|
94
|
-
{'title': 'Plain text', 'name': 'textpb', 'type': 'text_pb',
|
|
116
|
+
{'title': 'Plain text', 'name': 'textpb', 'type': 'text_pb',
|
|
117
|
+
'value': 'this is some text',
|
|
95
118
|
'tip': 'If text_pb type is used, user can add text to the parameter'},
|
|
96
119
|
]},
|
|
97
120
|
|
|
@@ -99,9 +122,11 @@ class ParameterEx(ParameterManager):
|
|
|
99
122
|
{'title': 'Table widget', 'name': 'tablewidget', 'type': 'table', 'value':
|
|
100
123
|
OrderedDict(key1='data1', key2=24), 'header': ['keys', 'limits'], 'height': 100},
|
|
101
124
|
{'title': 'Table view', 'name': 'tabular_table', 'type': 'table_view',
|
|
102
|
-
'delegate':
|
|
103
|
-
'value':
|
|
104
|
-
|
|
125
|
+
'delegate': pymodaq_gui.utils.widgets.table.SpinBoxDelegate, 'menu': True,
|
|
126
|
+
'value': pymodaq_gui.utils.widgets.table.TableModel([[0.1, 0.2, 0.3]],
|
|
127
|
+
['value1', 'value2', 'value3']),
|
|
128
|
+
'tip': 'The advantage of the Table model lies in its modularity.\n '
|
|
129
|
+
'For concrete examples see the'
|
|
105
130
|
'TableModelTabular and the TableModelSequential custom models in the'
|
|
106
131
|
' pymodaq.utils.scanner module'},
|
|
107
132
|
]}, # The advantage of the Table model lies in its modularity for concrete examples see the
|
pymodaq/examples/tcp_client.py
CHANGED
|
@@ -15,7 +15,7 @@ You should see the TCP server printing the sinus in its 0D data viewer
|
|
|
15
15
|
import numpy as np
|
|
16
16
|
|
|
17
17
|
from pymodaq.utils.tcp_ip.tcp_server_client import TCPClientTemplate
|
|
18
|
-
from
|
|
18
|
+
from pymodaq_data.data import DataToExport, DataRaw
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class TCPClient(TCPClientTemplate):
|
pymodaq/extensions/__init__.py
CHANGED
|
@@ -9,7 +9,7 @@ from .pid.utils import get_models
|
|
|
9
9
|
|
|
10
10
|
from .console import QtConsole
|
|
11
11
|
from .daq_scan import DAQScan
|
|
12
|
-
from .daq_logger import DAQ_Logger
|
|
12
|
+
from .daq_logger.daq_logger import DAQ_Logger
|
|
13
13
|
from .pid.pid_controller import DAQ_PID
|
|
14
14
|
from .h5browser import H5Browser
|
|
15
15
|
|
|
@@ -6,24 +6,27 @@ from qtpy import QtWidgets, QtCore
|
|
|
6
6
|
import time
|
|
7
7
|
import numpy as np
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
from pymodaq.utils.data import DataToExport, DataToActuators, DataCalculated, DataActuator
|
|
11
|
-
from pymodaq.utils.
|
|
12
|
-
from
|
|
10
|
+
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
11
|
+
from pymodaq_utils import utils
|
|
12
|
+
from pymodaq_utils import config as configmod
|
|
13
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
14
|
+
|
|
15
|
+
from pymodaq_gui.plotting.data_viewers.viewer0D import Viewer0D
|
|
16
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewerDispatcher, ViewersEnum
|
|
17
|
+
from pymodaq_gui.utils import QLED
|
|
18
|
+
from pymodaq_gui import utils as gutils
|
|
19
|
+
from pymodaq_gui.parameter import utils as putils
|
|
20
|
+
from pymodaq_gui.h5modules.saving import H5Saver
|
|
21
|
+
|
|
22
|
+
from pymodaq_data.h5modules.data_saving import DataEnlargeableSaver
|
|
23
|
+
|
|
24
|
+
|
|
13
25
|
from pymodaq.extensions.bayesian.utils import (get_bayesian_models, BayesianModelGeneric,
|
|
14
26
|
BayesianAlgorithm, UtilityKind,
|
|
15
27
|
UtilityParameters, StopType, StoppingParameters)
|
|
16
|
-
from pymodaq.utils.gui_utils import QLED
|
|
17
|
-
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
18
|
-
from pymodaq.utils import gui_utils as gutils
|
|
19
|
-
from pymodaq.utils import daq_utils as utils
|
|
20
|
-
from pymodaq.utils.parameter import utils as putils
|
|
21
|
-
from pymodaq.utils.h5modules.saving import H5Saver
|
|
22
|
-
from pymodaq.utils.h5modules.data_saving import DataEnlargeableSaver
|
|
23
28
|
from pymodaq.post_treatment.load_and_plot import LoaderPlotter
|
|
24
29
|
from pymodaq.extensions.bayesian.utils import BayesianConfig
|
|
25
|
-
from pymodaq.utils import config as configmod
|
|
26
|
-
from pymodaq.utils.logger import set_logger, get_module_name
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
EXTENSION_NAME = 'BayesianOptimisation'
|
|
@@ -11,24 +11,24 @@ import importlib
|
|
|
11
11
|
import pkgutil
|
|
12
12
|
import inspect
|
|
13
13
|
import numpy as np
|
|
14
|
-
from qtpy import QtWidgets
|
|
15
|
-
import tempfile
|
|
16
14
|
from collections import namedtuple
|
|
17
15
|
|
|
18
16
|
from bayes_opt import BayesianOptimization
|
|
19
17
|
from bayes_opt import UtilityFunction
|
|
20
18
|
|
|
19
|
+
from pymodaq_utils.utils import find_dict_in_list_from_key_val, get_entrypoints
|
|
20
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
21
|
+
from pymodaq_utils.enums import BaseEnum
|
|
22
|
+
from pymodaq_utils.config import BaseConfig
|
|
21
23
|
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
+
from pymodaq_gui.parameter import Parameter
|
|
25
|
+
from pymodaq_gui.plotting.data_viewers.viewer import ViewersEnum
|
|
26
|
+
|
|
27
|
+
from pymodaq_data.data import (DataToExport, DataCalculated,
|
|
24
28
|
DataRaw, Axis)
|
|
29
|
+
|
|
30
|
+
from pymodaq.utils.data import DataActuator, DataToActuators
|
|
25
31
|
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
26
|
-
from pymodaq.utils.daq_utils import find_dict_in_list_from_key_val, get_entrypoints
|
|
27
|
-
from pymodaq.utils.logger import set_logger, get_module_name
|
|
28
|
-
from pymodaq.utils.plotting.data_viewers.viewer import ViewersEnum
|
|
29
|
-
from pymodaq.utils.enums import BaseEnum
|
|
30
|
-
from pymodaq.utils.parameter import Parameter
|
|
31
|
-
from pymodaq.utils.config import BaseConfig
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
if TYPE_CHECKING:
|
pymodaq/extensions/console.py
CHANGED
|
@@ -4,15 +4,17 @@ Created the 25/10/2022
|
|
|
4
4
|
|
|
5
5
|
@author: Sebastien Weber
|
|
6
6
|
"""
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
from qtconsole.rich_jupyter_widget import RichJupyterWidget
|
|
9
9
|
from qtconsole.inprocess import QtInProcessKernelManager
|
|
10
|
-
|
|
11
|
-
from
|
|
10
|
+
|
|
11
|
+
from pymodaq_utils import config as configmod
|
|
12
|
+
from pymodaq_utils.utils import get_version
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
config = configmod.Config()
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
BANNER = f'PyMoDAQ v{get_version("pymodaq")}\n' \
|
|
16
18
|
'Main objects available for interaction:\n'\
|
|
17
19
|
'* dashboard: Main Dashboard Object\n'\
|
|
18
20
|
'* mods: ModuleManager of the dashboard\'s Control Modules\n'\
|
|
@@ -53,22 +55,17 @@ class QtConsole(RichJupyterWidget):
|
|
|
53
55
|
self.kernel_manager.kernel.shell.push(variable_dict)
|
|
54
56
|
|
|
55
57
|
|
|
56
|
-
def main(
|
|
57
|
-
import
|
|
58
|
+
def main():
|
|
59
|
+
from pymodaq_gui.utils.utils import mkQApp
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
app = QtWidgets.QApplication(sys.argv)
|
|
61
|
-
if config('style', 'darkstyle'):
|
|
62
|
-
import qdarkstyle
|
|
63
|
-
app.setStyleSheet(qdarkstyle.load_stylesheet(qdarkstyle.DarkPalette))
|
|
61
|
+
app = mkQApp('Console')
|
|
64
62
|
|
|
65
63
|
prog = QtConsole(style_sheet=config('style', 'syntax_highlighting'),
|
|
66
64
|
syntax_style=config('style', 'syntax_highlighting'),
|
|
67
65
|
custom_banner=BANNER,
|
|
68
66
|
)
|
|
69
67
|
prog.show()
|
|
70
|
-
|
|
71
|
-
sys.exit(app.exec_())
|
|
68
|
+
app.exec()
|
|
72
69
|
return prog
|
|
73
70
|
|
|
74
71
|
|
|
@@ -11,40 +11,40 @@ from collections import OrderedDict
|
|
|
11
11
|
import datetime
|
|
12
12
|
from typing import TYPE_CHECKING, Union
|
|
13
13
|
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
15
|
+
from pymodaq_gui.utils.custom_app import CustomApp
|
|
16
|
+
from pymodaq_gui.utils.dock import Dock, DockArea
|
|
17
|
+
from pymodaq_utils.config import Config
|
|
18
|
+
from pymodaq_gui.parameter import ioxml
|
|
19
|
+
|
|
20
20
|
from qtpy import QtWidgets
|
|
21
21
|
from qtpy.QtCore import QObject, Slot, QThread, Signal, Qt
|
|
22
|
-
|
|
23
|
-
from
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
from pymodaq.
|
|
22
|
+
|
|
23
|
+
from pymodaq_gui.utils.widgets import QLED
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
from pymodaq.extensions.daq_logger.h5logging import H5Logger
|
|
27
27
|
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
28
|
-
from pymodaq.utils.data import
|
|
28
|
+
from pymodaq.utils.data import DataActuator, DataToExport
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
if TYPE_CHECKING:
|
|
32
32
|
from pymodaq.dashboard import DashBoard
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
|
|
36
35
|
config = Config()
|
|
37
36
|
logger = set_logger(get_module_name(__file__))
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
try:
|
|
41
40
|
import sqlalchemy
|
|
42
|
-
from pymodaq.
|
|
41
|
+
from pymodaq.extensions.daq_logger.db.db_logger import DataBaseLogger
|
|
43
42
|
is_sql = True
|
|
44
43
|
except Exception as e:
|
|
45
44
|
is_sql = False
|
|
46
|
-
logger.info('To enable logging to database install: sqalchemy and sqlalchemy_utils packages as
|
|
47
|
-
'backend for your specific database, for instance psycopg2 for
|
|
45
|
+
logger.info('To enable logging to database install: sqalchemy and sqlalchemy_utils packages as'
|
|
46
|
+
' well as the backend for your specific database, for instance psycopg2 for'
|
|
47
|
+
' PostGreSQL database')
|
|
48
48
|
|
|
49
49
|
LOG_TYPES = ['None', 'H5 File']
|
|
50
50
|
if is_sql:
|
|
@@ -204,17 +204,17 @@ class DAQ_Logger(CustomApp):
|
|
|
204
204
|
self.logger.settings.child('N_saved').setValue(0)
|
|
205
205
|
|
|
206
206
|
settings_str = b'<All_settings>'
|
|
207
|
-
settings_str +=
|
|
208
|
-
settings_str +=
|
|
207
|
+
settings_str += ioxml.parameter_to_xml_string(self.dashboard.settings)
|
|
208
|
+
settings_str += ioxml.parameter_to_xml_string(
|
|
209
209
|
self.dashboard.preset_manager.preset_params)
|
|
210
210
|
if self.dashboard.settings.child('loaded_files', 'overshoot_file').value() != '':
|
|
211
|
-
settings_str +=
|
|
211
|
+
settings_str += ioxml.parameter_to_xml_string(
|
|
212
212
|
self.dashboard.overshoot_manager.overshoot_params)
|
|
213
213
|
if self.dashboard.settings.child('loaded_files', 'roi_file').value() != '':
|
|
214
|
-
settings_str +=
|
|
214
|
+
settings_str += ioxml.parameter_to_xml_string(
|
|
215
215
|
self.dashboard.roi_saver.roi_presets)
|
|
216
|
-
settings_str +=
|
|
217
|
-
settings_str +=
|
|
216
|
+
settings_str += ioxml.parameter_to_xml_string(self.settings)
|
|
217
|
+
settings_str += ioxml.parameter_to_xml_string(self.logger.settings)
|
|
218
218
|
settings_str += b'</All_settings>'
|
|
219
219
|
|
|
220
220
|
if not self.logger.init_logger(settings_str):
|
|
@@ -241,12 +241,12 @@ class DAQ_Logger(CustomApp):
|
|
|
241
241
|
# create the detectors in the chosen logger
|
|
242
242
|
for mod in modules_log:
|
|
243
243
|
settings_str = b'<All_settings>'
|
|
244
|
-
settings_str +=
|
|
244
|
+
settings_str += ioxml.parameter_to_xml_string(mod.settings)
|
|
245
245
|
|
|
246
246
|
if mod.module_type == 'DAQ_Viewer':
|
|
247
247
|
for viewer in mod.ui.viewers:
|
|
248
248
|
if hasattr(viewer, 'roi_manager'):
|
|
249
|
-
settings_str +=
|
|
249
|
+
settings_str += ioxml.parameter_to_xml_string(
|
|
250
250
|
viewer.roi_manager.settings)
|
|
251
251
|
settings_str += b'</All_settings>'
|
|
252
252
|
if mod.module_type == 'DAQ_Viewer':
|
|
@@ -446,7 +446,7 @@ class DAQ_Logging(QObject):
|
|
|
446
446
|
logger.exception(str(e))
|
|
447
447
|
|
|
448
448
|
def format_actuators_data(self, data_act: DataActuator):
|
|
449
|
-
data =
|
|
449
|
+
data = DataToExport(name=data_act.name, data=[data_act])
|
|
450
450
|
self.do_save_continuous(data)
|
|
451
451
|
|
|
452
452
|
def connect_actuators(self, connect=True):
|
|
@@ -508,37 +508,17 @@ class DAQ_Logging(QObject):
|
|
|
508
508
|
|
|
509
509
|
|
|
510
510
|
def main():
|
|
511
|
-
from
|
|
512
|
-
from
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
area = DockArea()
|
|
523
|
-
win.setCentralWidget(area)
|
|
524
|
-
win.resize(1000, 500)
|
|
525
|
-
win.setWindowTitle('PyMoDAQ Dashboard')
|
|
526
|
-
|
|
527
|
-
# win.setVisible(False)
|
|
528
|
-
prog = DashBoard(area)
|
|
529
|
-
file = Path(get_set_preset_path()).joinpath(f"{config('presets', 'default_preset_for_logger')}.xml")
|
|
530
|
-
if file.exists():
|
|
531
|
-
prog.set_preset_mode(file)
|
|
532
|
-
prog.load_log_module()
|
|
533
|
-
else:
|
|
534
|
-
msgBox = QtWidgets.QMessageBox()
|
|
535
|
-
msgBox.setText(f"The default file specified in the configuration file does not exists!\n"
|
|
536
|
-
f"{file}\n"
|
|
537
|
-
f"Impossible to load the Logger Module")
|
|
538
|
-
msgBox.setStandardButtons(msgBox.Ok)
|
|
539
|
-
ret = msgBox.exec()
|
|
540
|
-
|
|
541
|
-
sys.exit(app.exec_())
|
|
511
|
+
from pymodaq_gui.utils.utils import mkQApp
|
|
512
|
+
from pymodaq.utils.gui_utils.loader_utils import load_dashboard_with_preset
|
|
513
|
+
|
|
514
|
+
app = mkQApp('DAQLogger')
|
|
515
|
+
preset_file_name = config('presets', f'default_preset_for_logger')
|
|
516
|
+
|
|
517
|
+
dashboard, extension, win = load_dashboard_with_preset(preset_file_name, 'DAQLogger')
|
|
518
|
+
|
|
519
|
+
app.exec()
|
|
520
|
+
|
|
521
|
+
return dashboard, extension, win
|
|
542
522
|
|
|
543
523
|
|
|
544
524
|
if __name__ == '__main__':
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
+
from contextlib import contextmanager
|
|
1
2
|
import logging
|
|
2
3
|
import datetime
|
|
3
4
|
from typing import List
|
|
4
5
|
|
|
5
|
-
from pymodaq.utils.logger import set_logger, get_module_name, get_module_name
|
|
6
|
-
from pymodaq.utils.config import Config
|
|
7
|
-
from pymodaq.utils.data import DataToExport
|
|
8
|
-
from qtpy import QtCore
|
|
9
|
-
from contextlib import contextmanager
|
|
10
|
-
|
|
11
|
-
from pymodaq.utils.db.db_logger.db_logger_models import Base, Data0D, Data1D, Data2D, LogInfo,\
|
|
12
|
-
Configuration, ControlModule
|
|
13
|
-
from pymodaq.utils import daq_utils as utils
|
|
14
|
-
from pymodaq.utils.gui_utils.utils import dashboard_submodules_params
|
|
15
|
-
from pymodaq.utils.messenger import messagebox, deprecation_msg
|
|
16
|
-
from pymodaq.utils.abstract.logger import AbstractLogger
|
|
17
|
-
from pymodaq.utils.parameter import ParameterTree, Parameter
|
|
18
|
-
from pymodaq.utils.managers.parameter_manager import ParameterManager
|
|
19
|
-
|
|
20
6
|
from sqlalchemy import create_engine
|
|
21
7
|
from sqlalchemy.orm import sessionmaker
|
|
22
8
|
from sqlalchemy_utils import database_exists, create_database
|
|
23
9
|
|
|
10
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
11
|
+
from pymodaq_utils.config import Config
|
|
12
|
+
|
|
13
|
+
from pymodaq_gui.h5modules.saving import dashboard_submodules_params
|
|
14
|
+
from pymodaq_gui.messenger import messagebox
|
|
15
|
+
from pymodaq_gui.managers.parameter_manager import ParameterManager
|
|
16
|
+
|
|
17
|
+
from pymodaq_data.data import DataToExport
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
from .db_logger_models import (Base, Data0D, Data1D, Data2D, LogInfo,
|
|
21
|
+
Configuration, ControlModule)
|
|
22
|
+
from ..abstract import AbstractLogger
|
|
23
|
+
|
|
24
|
+
|
|
24
25
|
logger = set_logger(get_module_name(__file__))
|
|
25
26
|
config = Config()
|
|
26
27
|
|
|
@@ -3,6 +3,8 @@ from sqlalchemy.ext.declarative import declarative_base
|
|
|
3
3
|
from sqlalchemy.orm import sessionmaker, relationship
|
|
4
4
|
from sqlalchemy import Column, Integer, String, Float, ForeignKey
|
|
5
5
|
from sqlalchemy.dialects.postgresql import ARRAY as Array
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
Base = declarative_base()
|
|
7
9
|
|
|
8
10
|
|
|
@@ -8,15 +8,14 @@ Created the 15/11/2022
|
|
|
8
8
|
import logging
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
11
|
+
from pymodaq_utils.logger import set_logger, get_module_name
|
|
12
|
+
from pymodaq_utils.config import Config
|
|
13
|
+
from pymodaq_gui.h5modules.saving import H5Saver
|
|
14
|
+
from pymodaq_data.data import DataToExport
|
|
15
15
|
|
|
16
|
-
from pymodaq.utils.
|
|
17
|
-
from pymodaq.utils import
|
|
18
|
-
from .
|
|
19
|
-
from pymodaq.utils.data import DataToExport
|
|
16
|
+
from pymodaq.utils.managers.modules_manager import ModulesManager
|
|
17
|
+
from pymodaq.utils.h5modules import module_saving
|
|
18
|
+
from .abstract import AbstractLogger
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
config = Config()
|