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
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from pymodaq.utils.config import Config
|
|
4
|
-
from qtpy import QtWidgets
|
|
5
|
-
|
|
6
|
-
config = Config()
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def select_file_filter(start_path=config('data_saving', 'h5file', 'save_path'), save=True, ext=None, filter=None,
|
|
10
|
-
force_save_extension=False):
|
|
11
|
-
"""Opens a selection file popup for loading or saving a file
|
|
12
|
-
|
|
13
|
-
Parameters
|
|
14
|
-
----------
|
|
15
|
-
start_path: str or Path
|
|
16
|
-
The strating point in the file/folder system to open the popup from
|
|
17
|
-
save: bool
|
|
18
|
-
if True, ask you to enter a filename (with or without extension)
|
|
19
|
-
ext: str
|
|
20
|
-
the extension string, e.g. xml, h5, png ...
|
|
21
|
-
filter: list of string
|
|
22
|
-
list of possible extensions, mostly valid for loading
|
|
23
|
-
force_save_extension: bool
|
|
24
|
-
if True force the extension of the saved file to be set to ext
|
|
25
|
-
|
|
26
|
-
Returns
|
|
27
|
-
-------
|
|
28
|
-
Path: the Path object of the file to save or load
|
|
29
|
-
str: the selected filter
|
|
30
|
-
"""
|
|
31
|
-
if ext is None:
|
|
32
|
-
ext = '.h5'
|
|
33
|
-
|
|
34
|
-
if filter is None:
|
|
35
|
-
if not save:
|
|
36
|
-
if not isinstance(ext, list):
|
|
37
|
-
ext = [ext]
|
|
38
|
-
filter = "Data files ("
|
|
39
|
-
for ext_tmp in ext:
|
|
40
|
-
filter += '*.' + ext_tmp + " "
|
|
41
|
-
filter += ")"
|
|
42
|
-
|
|
43
|
-
if start_path is not None:
|
|
44
|
-
if not isinstance(start_path, str):
|
|
45
|
-
start_path = str(start_path)
|
|
46
|
-
if save:
|
|
47
|
-
fname, selected_filter = QtWidgets.QFileDialog.getSaveFileName(None, 'Enter a file name', start_path,
|
|
48
|
-
filter)
|
|
49
|
-
else:
|
|
50
|
-
fname, selected_filter = QtWidgets.QFileDialog.getOpenFileName(None, 'Select a file name', start_path, filter)
|
|
51
|
-
|
|
52
|
-
if fname != '': # execute if the user didn't cancel the file selection
|
|
53
|
-
fname = Path(fname)
|
|
54
|
-
if save and force_save_extension:
|
|
55
|
-
parent = fname.parent
|
|
56
|
-
filename = fname.stem
|
|
57
|
-
fname = parent.joinpath(filename + "." + ext) # forcing the right extension on the filename
|
|
58
|
-
return fname, selected_filter
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def select_file(start_path=config('data_saving', 'h5file', 'save_path'), save=True, ext=None, filter=None,
|
|
62
|
-
force_save_extension=False):
|
|
63
|
-
"""Opens a selection file popup for loading or saving a file
|
|
64
|
-
|
|
65
|
-
Parameters
|
|
66
|
-
----------
|
|
67
|
-
start_path: str or Path
|
|
68
|
-
The strating point in the file/folder system to open the popup from
|
|
69
|
-
save: bool
|
|
70
|
-
if True, ask you to enter a filename (with or without extension)
|
|
71
|
-
ext: str
|
|
72
|
-
the extension string, e.g. xml, h5, png ...
|
|
73
|
-
filter: string
|
|
74
|
-
list of possible extensions, if you need several you can separate them by ;;
|
|
75
|
-
for example: "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
|
|
76
|
-
force_save_extension: bool
|
|
77
|
-
if True force the extension of the saved file to be set to ext
|
|
78
|
-
|
|
79
|
-
Returns
|
|
80
|
-
-------
|
|
81
|
-
Path: the Path object of the file to save or load
|
|
82
|
-
"""
|
|
83
|
-
fname, selected_filter = select_file_filter(start_path, save, ext, filter,
|
|
84
|
-
force_save_extension)
|
|
85
|
-
return fname # fname is a Path object
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if __name__ == '__main__':
|
|
89
|
-
import sys
|
|
90
|
-
app = QtWidgets.QApplication(sys.argv)
|
|
91
|
-
file = select_file(save=True, filter="Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)")
|
|
92
|
-
print(file)
|
|
93
|
-
sys.exit(app.exec_())
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import pickle
|
|
2
|
-
|
|
3
|
-
from pymodaq.utils import config as config_mod
|
|
4
|
-
from pymodaq.utils.gui_utils.file_io import select_file
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def load_layout_state(dockarea, file=None):
|
|
8
|
-
"""
|
|
9
|
-
Load and restore a dockarea layout state from the select_file obtained pathname file.
|
|
10
|
-
"""
|
|
11
|
-
if file is None:
|
|
12
|
-
file = select_file(start_path=config_mod.get_set_layout_path(), save=False, ext='dock')
|
|
13
|
-
if file is not None:
|
|
14
|
-
with open(str(file), 'rb') as f:
|
|
15
|
-
dockstate = pickle.load(f)
|
|
16
|
-
dockarea.restoreState(dockstate)
|
|
17
|
-
file = file.name
|
|
18
|
-
return file
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def save_layout_state(dockarea, file=None):
|
|
22
|
-
"""
|
|
23
|
-
Save the current layout state in the select_file obtained pathname file.
|
|
24
|
-
Once done dump the pickle.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
dockstate = dockarea.saveState()
|
|
28
|
-
if 'float' in dockstate:
|
|
29
|
-
dockstate['float'] = []
|
|
30
|
-
if file is None:
|
|
31
|
-
file = select_file(start_path=config_mod.get_set_layout_path(), save=True, ext='dock')
|
|
32
|
-
if file is not None:
|
|
33
|
-
with open(str(file), 'wb') as f:
|
|
34
|
-
pickle.dump(dockstate, f, pickle.HIGHEST_PROTOCOL)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
from qtpy.QtCore import QObject
|
|
2
|
-
from qtpy import QtWidgets
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class ListPicker(QObject):
|
|
6
|
-
|
|
7
|
-
def __init__(self, list_str):
|
|
8
|
-
super(ListPicker, self).__init__()
|
|
9
|
-
self.list = list_str
|
|
10
|
-
|
|
11
|
-
def pick_dialog(self):
|
|
12
|
-
self.dialog = QtWidgets.QDialog()
|
|
13
|
-
self.dialog.setMinimumWidth(500)
|
|
14
|
-
vlayout = QtWidgets.QVBoxLayout()
|
|
15
|
-
|
|
16
|
-
self.list_widget = QtWidgets.QListWidget()
|
|
17
|
-
self.list_widget.addItems(self.list)
|
|
18
|
-
|
|
19
|
-
vlayout.addWidget(self.list_widget, 10)
|
|
20
|
-
self.dialog.setLayout(vlayout)
|
|
21
|
-
|
|
22
|
-
buttonBox = QtWidgets.QDialogButtonBox()
|
|
23
|
-
buttonBox.addButton('Apply', buttonBox.AcceptRole)
|
|
24
|
-
buttonBox.accepted.connect(self.dialog.accept)
|
|
25
|
-
buttonBox.addButton('Cancel', buttonBox.RejectRole)
|
|
26
|
-
buttonBox.rejected.connect(self.dialog.reject)
|
|
27
|
-
|
|
28
|
-
vlayout.addWidget(buttonBox)
|
|
29
|
-
self.dialog.setWindowTitle('Select an entry in the list')
|
|
30
|
-
|
|
31
|
-
res = self.dialog.show()
|
|
32
|
-
|
|
33
|
-
pass
|
|
34
|
-
if res == self.dialog.Accepted:
|
|
35
|
-
# save managers parameters in a xml file
|
|
36
|
-
return [self.list_widget.currentIndex(), self.list_widget.currentItem().text()]
|
|
37
|
-
else:
|
|
38
|
-
return [-1, ""]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
"""
|
|
3
|
-
Created the 29/07/2022
|
|
4
|
-
|
|
5
|
-
@author: Sebastien Weber
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from qtpy import QtWidgets, QtCore, QtGui
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class LabelWithFont(QtWidgets.QLabel):
|
|
12
|
-
|
|
13
|
-
def __init__(self, text: str = '', *args, font_name=None, font_size=None, isbold=False, isitalic=False, **kwargs):
|
|
14
|
-
super().__init__(text, *args, **kwargs)
|
|
15
|
-
|
|
16
|
-
font = QtGui.QFont()
|
|
17
|
-
if font_name is not None:
|
|
18
|
-
font.setFamily(font_name)
|
|
19
|
-
if font_size is not None:
|
|
20
|
-
font.setPointSize(font_size)
|
|
21
|
-
|
|
22
|
-
font.setBold(isbold)
|
|
23
|
-
font.setItalic(isitalic)
|
|
24
|
-
self.setFont(font)
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
|
|
5
|
-
from qtpy import QtWidgets
|
|
6
|
-
from qtpy.QtCore import QObject
|
|
7
|
-
from pymodaq.utils.plotting.data_viewers.viewer0D import Viewer0D
|
|
8
|
-
from pymodaq.utils.data import DataRaw
|
|
9
|
-
import sys
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class LCD(QObject):
|
|
13
|
-
|
|
14
|
-
def __init__(self, parent, **kwargs):
|
|
15
|
-
super().__init__()
|
|
16
|
-
self.Nvals = None
|
|
17
|
-
self.labels = None
|
|
18
|
-
self.parent = parent
|
|
19
|
-
self.viewer0D = None
|
|
20
|
-
self.digits = 3
|
|
21
|
-
self.setupui(**kwargs)
|
|
22
|
-
|
|
23
|
-
def setvalues(self, values: List[np.ndarray]):
|
|
24
|
-
"""
|
|
25
|
-
display values on lcds
|
|
26
|
-
Parameters
|
|
27
|
-
----------
|
|
28
|
-
values: list of 0D ndarray
|
|
29
|
-
|
|
30
|
-
Returns
|
|
31
|
-
-------
|
|
32
|
-
|
|
33
|
-
"""
|
|
34
|
-
while len(values) < self.Nvals:
|
|
35
|
-
values.append(np.array([0.]))
|
|
36
|
-
if len(values) > self.Nvals:
|
|
37
|
-
values = values[:self.Nvals]
|
|
38
|
-
vals = []
|
|
39
|
-
for ind, val in enumerate(values):
|
|
40
|
-
self.lcds[ind].display(val[0])
|
|
41
|
-
vals.append(val)
|
|
42
|
-
self.viewer0D.show_data(DataRaw(name='LCD', data=values))
|
|
43
|
-
|
|
44
|
-
def setupui(self, **kwargs):
|
|
45
|
-
if 'digits' in kwargs:
|
|
46
|
-
self.digits = kwargs['digits']
|
|
47
|
-
if 'Nvals' in kwargs:
|
|
48
|
-
self.Nvals = kwargs['Nvals']
|
|
49
|
-
else:
|
|
50
|
-
self.Nvals = 1
|
|
51
|
-
if 'labels' in kwargs:
|
|
52
|
-
self.labels = kwargs['labels']
|
|
53
|
-
else:
|
|
54
|
-
self.labels = ['CH{:d}'.format(ind) for ind in range(self.Nvals)]
|
|
55
|
-
|
|
56
|
-
while len(self.labels) < self.Nvals:
|
|
57
|
-
self.labels.append('')
|
|
58
|
-
|
|
59
|
-
vlayout = QtWidgets.QVBoxLayout()
|
|
60
|
-
hsplitter = QtWidgets.QSplitter()
|
|
61
|
-
vlayout.addWidget(hsplitter)
|
|
62
|
-
self.parent.setLayout(vlayout)
|
|
63
|
-
form = QtWidgets.QWidget()
|
|
64
|
-
self.viewer0D = Viewer0D(form)
|
|
65
|
-
self.viewer0D.labels = self.labels
|
|
66
|
-
|
|
67
|
-
vlayout = QtWidgets.QVBoxLayout()
|
|
68
|
-
|
|
69
|
-
lcd_layouts = []
|
|
70
|
-
labels = []
|
|
71
|
-
self.lcds = []
|
|
72
|
-
|
|
73
|
-
for ind in range(self.Nvals):
|
|
74
|
-
lcd_layouts.append(QtWidgets.QVBoxLayout())
|
|
75
|
-
labels.append(QtWidgets.QLabel(self.labels[ind]))
|
|
76
|
-
labels[-1].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
|
|
77
|
-
self.lcds.append(QtWidgets.QLCDNumber())
|
|
78
|
-
self.lcds[-1].setDigitCount(self.digits)
|
|
79
|
-
lcd_layouts[-1].addWidget(labels[-1])
|
|
80
|
-
lcd_layouts[-1].addWidget(self.lcds[-1])
|
|
81
|
-
vlayout.addLayout(lcd_layouts[-1])
|
|
82
|
-
|
|
83
|
-
if ind != self.Nvals - 1:
|
|
84
|
-
hFrame = QtWidgets.QFrame()
|
|
85
|
-
hFrame.setFrameShape(QtWidgets.QFrame.HLine)
|
|
86
|
-
vlayout.addWidget(hFrame)
|
|
87
|
-
|
|
88
|
-
lcd_widget = QtWidgets.QWidget()
|
|
89
|
-
lcd_widget.setLayout(vlayout)
|
|
90
|
-
hsplitter.addWidget(lcd_widget)
|
|
91
|
-
hsplitter.addWidget(form)
|
|
92
|
-
self.parent.resize(800, 500)
|
|
93
|
-
hsplitter.setSizes([400, 300])
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if __name__ == '__main__':
|
|
97
|
-
from pymodaq.utils.math_utils import gauss1D
|
|
98
|
-
import numpy as np
|
|
99
|
-
|
|
100
|
-
x = np.linspace(0, 200, 201)
|
|
101
|
-
y1 = gauss1D(x, 75, 25)
|
|
102
|
-
y2 = gauss1D(x, 120, 50, 2)
|
|
103
|
-
app = QtWidgets.QApplication(sys.argv)
|
|
104
|
-
Form = QtWidgets.QWidget()
|
|
105
|
-
|
|
106
|
-
prog = LCD(Form, Nvals=2)
|
|
107
|
-
Form.show()
|
|
108
|
-
for ind, data in enumerate(y1):
|
|
109
|
-
prog.setvalues([data])
|
|
110
|
-
QtWidgets.QApplication.processEvents()
|
|
111
|
-
sys.exit(app.exec_())
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from qtpy import QtWidgets, QtCore, QtGui
|
|
4
|
-
from qtpy.QtWidgets import QWidget
|
|
5
|
-
from pymodaq.utils.gui_utils.widgets.spinbox import SpinBox
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
EDIT_PUSH_TYPES = ['abs', 'rel']
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class PushButtonIcon(QtWidgets.QPushButton):
|
|
12
|
-
def __init__(self, icon_name: str, text: str, checkable=False, tip="", menu=None):
|
|
13
|
-
super().__init__(text)
|
|
14
|
-
self._menu = menu
|
|
15
|
-
if icon_name != '':
|
|
16
|
-
icon = QtGui.QIcon()
|
|
17
|
-
if Path(icon_name).is_file():
|
|
18
|
-
icon.addPixmap(QtGui.QPixmap(icon_name), QtGui.QIcon.Normal,
|
|
19
|
-
QtGui.QIcon.Off)
|
|
20
|
-
else:
|
|
21
|
-
icon.addPixmap(QtGui.QPixmap(f":/icons/Icon_Library/{icon_name}.png"), QtGui.QIcon.Normal,
|
|
22
|
-
QtGui.QIcon.Off)
|
|
23
|
-
self.setIcon(icon)
|
|
24
|
-
self.setCheckable(checkable)
|
|
25
|
-
self.setToolTip(tip)
|
|
26
|
-
|
|
27
|
-
def contextMenuEvent(self, event):
|
|
28
|
-
if self._menu is not None:
|
|
29
|
-
self._menu.exec(event.globalPos())
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class EditPushInfo:
|
|
33
|
-
def __init__(self, type:str, value: float):
|
|
34
|
-
if type not in EDIT_PUSH_TYPES:
|
|
35
|
-
raise ValueError(f'Possible types are {EDIT_PUSH_TYPES}')
|
|
36
|
-
self.type = type
|
|
37
|
-
self.value = value
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class EditPush(QtWidgets.QWidget):
|
|
41
|
-
clicked = QtCore.Signal(EditPushInfo)
|
|
42
|
-
|
|
43
|
-
def __init__(self, icon_name: str, ini_value=0.1, text=''):
|
|
44
|
-
super().__init__()
|
|
45
|
-
self._edit_push_type = 'abs'
|
|
46
|
-
self.setLayout(QtWidgets.QHBoxLayout())
|
|
47
|
-
self._edit = SpinBox(value=ini_value, dec=True, step=0.1, minStep=0.001)
|
|
48
|
-
self._edit.setMinimumHeight(20)
|
|
49
|
-
self._edit.setMaximumWidth(60)
|
|
50
|
-
self._edit.setMinimumWidth(60)
|
|
51
|
-
self.layout().addWidget(self._edit)
|
|
52
|
-
self.set_pushs(icon_name, text)
|
|
53
|
-
|
|
54
|
-
def set_pushs(self, icon_name, text):
|
|
55
|
-
self._push = PushButtonIcon(icon_name, text)
|
|
56
|
-
self._push.setMaximumWidth(40)
|
|
57
|
-
self._push.clicked.connect(lambda: self.emit_clicked())
|
|
58
|
-
self.layout().addWidget(self._push)
|
|
59
|
-
|
|
60
|
-
def emit_clicked(self, coeff=1):
|
|
61
|
-
"""will emit a signal containing a float value calculated from the product of the coeff and the internal
|
|
62
|
-
spinbox value.
|
|
63
|
-
|
|
64
|
-
See Also
|
|
65
|
-
--------
|
|
66
|
-
EditPushRel
|
|
67
|
-
"""
|
|
68
|
-
self.clicked.emit(EditPushInfo(type=self._edit_push_type, value=coeff * self._edit.value()))
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class EditPushRel(EditPush):
|
|
72
|
-
|
|
73
|
-
def __init__(self, icon_name: str, text='', ini_value=0.15):
|
|
74
|
-
super().__init__(icon_name, text=text, ini_value=ini_value)
|
|
75
|
-
self._edit_push_type = 'rel'
|
|
76
|
-
|
|
77
|
-
def set_pushs(self, icon_name, text):
|
|
78
|
-
vlayout = QtWidgets.QVBoxLayout()
|
|
79
|
-
self.layout().addLayout(vlayout)
|
|
80
|
-
|
|
81
|
-
self._push_plus = PushButtonIcon(icon_name, f'+{text}')
|
|
82
|
-
self._push_plus.setMaximumWidth(40)
|
|
83
|
-
self._push_minus = PushButtonIcon(icon_name, f'-{text}')
|
|
84
|
-
self._push_minus.setMaximumWidth(40)
|
|
85
|
-
|
|
86
|
-
vlayout.addWidget(self._push_plus)
|
|
87
|
-
vlayout.addWidget(self._push_minus)
|
|
88
|
-
|
|
89
|
-
self._push_plus.clicked.connect(lambda: self.emit_clicked(1))
|
|
90
|
-
self._push_minus.clicked.connect(lambda: self.emit_clicked(-1))
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class ActionMenu(QtWidgets.QAction):
|
|
94
|
-
def __init__(self, *args, menu=None, **kwargs):
|
|
95
|
-
super().__init__(*args, **kwargs)
|
|
96
|
-
self._menu = menu
|
|
97
|
-
|
|
98
|
-
def contextMenuEvent(self, event):
|
|
99
|
-
if self._menu is not None:
|
|
100
|
-
self._menu.exec(event.globalPos())
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def main(init_qt=True):
|
|
104
|
-
import sys
|
|
105
|
-
|
|
106
|
-
if init_qt: # used for the test suite
|
|
107
|
-
app = QtWidgets.QApplication(sys.argv)
|
|
108
|
-
|
|
109
|
-
widget = QtWidgets.QWidget()
|
|
110
|
-
widget.setLayout(QtWidgets.QVBoxLayout())
|
|
111
|
-
toolbar = QtWidgets.QToolBar()
|
|
112
|
-
widget.layout().addWidget(toolbar)
|
|
113
|
-
|
|
114
|
-
action = QtWidgets.QAction('blabla')
|
|
115
|
-
toolbar.addAction(action)
|
|
116
|
-
|
|
117
|
-
menu1 = QtWidgets.QMenu()
|
|
118
|
-
menu1.addAction('Add new task')
|
|
119
|
-
menu1.addAction('Edit current row')
|
|
120
|
-
menu1.addAction('Remove selected rows')
|
|
121
|
-
menu1.addSeparator()
|
|
122
|
-
menu1.addAction('Affect Responsable')
|
|
123
|
-
menu2 = QtWidgets.QMenu()
|
|
124
|
-
menu2.addAction('Affect volunteers')
|
|
125
|
-
menu2.addAction('Remove volunteers')
|
|
126
|
-
menu2.addSeparator()
|
|
127
|
-
menu2.addAction('Show localisation')
|
|
128
|
-
|
|
129
|
-
icon = QtGui.QIcon()
|
|
130
|
-
icon.addPixmap(QtGui.QPixmap(f":/icons/Icon_Library/{'run2'}.png"), QtGui.QIcon.Normal,
|
|
131
|
-
QtGui.QIcon.Off)
|
|
132
|
-
action2 = ActionMenu(icon, 'grab', menu=menu1)
|
|
133
|
-
|
|
134
|
-
toolbar.addAction(action2)
|
|
135
|
-
grab_pb = PushButtonIcon('run2', text='', checkable=True, menu=menu2)
|
|
136
|
-
grab_pb.setFlat(True)
|
|
137
|
-
toolbar.addWidget(grab_pb)
|
|
138
|
-
|
|
139
|
-
otherpb = PushButtonIcon('run2', 'grab me')
|
|
140
|
-
widget.layout().addWidget(otherpb)
|
|
141
|
-
|
|
142
|
-
widget.show()
|
|
143
|
-
if init_qt:
|
|
144
|
-
sys.exit(app.exec_())
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if __name__ == '__main__':
|
|
148
|
-
main()
|
|
149
|
-
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import numpy as np
|
|
3
|
-
from qtpy import QtCore, QtGui, QtWidgets
|
|
4
|
-
from qtpy.QtWidgets import QLabel
|
|
5
|
-
from qtpy.QtCore import QObject, Signal
|
|
6
|
-
from pymodaq.utils.gui_utils.utils import clickable
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class QLED(QLabel):
|
|
10
|
-
value_changed = Signal(bool)
|
|
11
|
-
|
|
12
|
-
def __init__(self, parent=None, scale=1, readonly=True):
|
|
13
|
-
QLabel.__init__(self, parent)
|
|
14
|
-
# self.setText("")
|
|
15
|
-
self.red_icon = QtGui.QPixmap(":/icons/Icon_Library/red_light.png")
|
|
16
|
-
self.green_icon = QtGui.QPixmap(":/icons/Icon_Library/greenLight2.png")
|
|
17
|
-
self.setPixmap(self.red_icon)
|
|
18
|
-
self.state = False
|
|
19
|
-
self.clickable = not readonly
|
|
20
|
-
# set the possibility to click and control the state of the LED otherwise it behaves as an indicator
|
|
21
|
-
clickable(self).connect(
|
|
22
|
-
self.LED_Clicked)
|
|
23
|
-
# clickable is a function importing a filter class to deal with mouse down event as a signal see GUI_utils
|
|
24
|
-
self.setText("empty")
|
|
25
|
-
self.setMaximumWidth(self.height())
|
|
26
|
-
if scale != 1:
|
|
27
|
-
self.scale(scale)
|
|
28
|
-
self.set_as_false()
|
|
29
|
-
|
|
30
|
-
def scale(self, scale):
|
|
31
|
-
self.green_icon = self.green_icon.scaled(scale * self.green_icon.width(),
|
|
32
|
-
scale * self.green_icon.height())
|
|
33
|
-
self.red_icon = self.red_icon.scaled(scale * self.red_icon.width(),
|
|
34
|
-
scale * self.red_icon.height())
|
|
35
|
-
|
|
36
|
-
def get_state(self):
|
|
37
|
-
return self.state
|
|
38
|
-
|
|
39
|
-
def set_as(self, state=True):
|
|
40
|
-
|
|
41
|
-
if state:
|
|
42
|
-
self.set_as_true()
|
|
43
|
-
else:
|
|
44
|
-
self.set_as_false()
|
|
45
|
-
if state != self.state:
|
|
46
|
-
self.value_changed.emit(state)
|
|
47
|
-
|
|
48
|
-
def set_as_true(self):
|
|
49
|
-
self.state = True
|
|
50
|
-
self.setPixmap(self.green_icon)
|
|
51
|
-
|
|
52
|
-
def set_as_false(self):
|
|
53
|
-
self.state = False
|
|
54
|
-
self.setPixmap(self.red_icon)
|
|
55
|
-
|
|
56
|
-
def LED_Clicked(self):
|
|
57
|
-
if self.clickable:
|
|
58
|
-
if self.state:
|
|
59
|
-
self.set_as_false()
|
|
60
|
-
else:
|
|
61
|
-
self.set_as_true()
|
|
62
|
-
self.value_changed.emit(not self.state)
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from qtpy import QtWidgets, QtGui
|
|
2
|
-
from pyqtgraph.widgets.SpinBox import SpinBox
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class SpinBox(SpinBox):
|
|
6
|
-
"""
|
|
7
|
-
In case I want to add pyqtgraph spinbox functionalities
|
|
8
|
-
"""
|
|
9
|
-
def __init__(self, *args, font_size=None, min_height=20, **kwargs):
|
|
10
|
-
super().__init__(*args, **kwargs)
|
|
11
|
-
|
|
12
|
-
if font_size is not None:
|
|
13
|
-
font = QtGui.QFont()
|
|
14
|
-
font.setPointSize(font_size)
|
|
15
|
-
self.setFont(font)
|
|
16
|
-
self.setMinimumHeight(min_height)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class QSpinBox_ro(SpinBox):
|
|
20
|
-
def __init__(self, *args, readonly=True, **kwargs):
|
|
21
|
-
super().__init__(*args, **kwargs)
|
|
22
|
-
self.setMaximum(100000)
|
|
23
|
-
self.setReadOnly(readonly)
|
|
24
|
-
self.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
|