pymodaq_plugins_beam_shaping 5.2.0__tar.gz → 5.3.0__tar.gz
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.
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/PKG-INFO +10 -8
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/README.rst +4 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/pyproject.toml +6 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithm_app.py +55 -27
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_move_plugins/daq_move_FocalLength.py +4 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_move_plugins/daq_move_MockAutoFocus.py +4 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_move_plugins/daq_move_MockShaper.py +4 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_move_plugins/daq_move_Zernike.py +4 -4
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/extensions/spatial_beam_shaping.py +19 -19
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/field_loader_app.py +52 -33
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/calibrating.py +6 -13
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/corrections.py +1 -1
- pymodaq_plugins_beam_shaping-5.3.0/src/pymodaq_plugins_beam_shaping/utilities/regions.py +87 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/zernike.py +1 -1
- pymodaq_plugins_beam_shaping-5.3.0/tests/conftest.py +22 -0
- pymodaq_plugins_beam_shaping-5.3.0/tests/test_custom_apps.py +80 -0
- pymodaq_plugins_beam_shaping-5.3.0/tests/test_regions.py +107 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/.gitattributes +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/.github/workflows/compatibility.yml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/.github/workflows/python-publish.yml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/.github/workflows/tests.yml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/.gitignore +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/AGENTS.md +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/CLAUDE.md +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/LICENSE +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/MANIFEST.in +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/Makefile +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/make.bat +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/requirements.txt +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/scripts/data_browse.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/calibration.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/corrections.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/field_loader.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/layout.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/main_app.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/measurement_amplitude.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/schema.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_images/setup_field_loader.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/add_circle.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/deblur.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/equalizer.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/file_open.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/grid_off.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/grid_on.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/ink_eraser.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/ink_eraser_off.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/input.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/save.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/icons/target.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_static/logo.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_templates/apidoc/module.rst_t +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_templates/apidoc/package.rst_t +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/_templates/apidoc/toc.rst_t +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/acknowledgments.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/bibtex.bib +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/conf.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/index.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/installation.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/introduction.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/quick_start.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/references.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/theory.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/troubleshooting.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/tutorials.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/algorithms.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/calibration.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/corrections.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/data_management.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/fields.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/index.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/docs/src/user_guide/interface.rst +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/hatch_build.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/icon.ico +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/readthedocs.yml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algo_base.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algo_config.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/checker_board.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/diffractive.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/direct.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/minimizer.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/optim.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/projections.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/algorithms/torch_base.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/factory.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/ini_phase.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/ini_phases/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/ini_phases/quadratic_phase.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/ini_phases/random_phase.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/loss.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/stopping.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/stoppings/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/stoppings/stoppings_base.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/algorithms/utils.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_move_plugins/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_viewer_plugins/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_viewer_plugins/plugins_2D/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_viewer_plugins/plugins_2D/daq_2Dviewer_MockAutoFocus.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/daq_viewer_plugins/plugins_2D/daq_2Dviewer_MockShaperCamera.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/extensions/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/factory.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/field.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/loaders/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/loaders/dashboard_loader.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/loaders/from_functions_loader.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/loaders/image_loader.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/loaders/save_field_loader.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/field/utils.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/hardware/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/hardware/autofocus.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/hardware/mock_shaper_camera.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/models/OptimizerModelAutoFocus.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/models/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/models/datamixer_autofocus.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/Cemes - Logo - Sigle - Blanc.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/Papillon_flower_BW_resized.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/Pymodaq.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/cheshirecat_rect.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/config_template.toml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/darumas_BW_resized.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/dollars.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/dollars.svg +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/face.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/holography.xml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/holography_calibration.xml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/mock_holo.xml +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/one_piece.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/osama.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/resources/zernike.png +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/scanners/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/scanners/calibration.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/scripts/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/scripts/calibrate_slm.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/setup/factory.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/setup/setup.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/slm/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/slm/slm.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/__init__.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/data.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/h5saving.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/masking.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/shaper.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utilities/sizing.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/src/pymodaq_plugins_beam_shaping/utils.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/algorithm_entry_points_test.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/element_test.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/field_test.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/pytensor_fft.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/pytorch_fft.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/pytorch_test_v1.ipynb +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tests/test_plugin_package_structure.py +0 -0
- {pymodaq_plugins_beam_shaping-5.2.0 → pymodaq_plugins_beam_shaping-5.3.0}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pymodaq_plugins_beam_shaping
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.3.0
|
|
4
4
|
Summary: PyMoDAQ's extension plugin to run optical shaping from various shapers (focusing on amplitude and phase shaping) and the image propagation
|
|
5
5
|
Project-URL: Homepage, https://pymodaq.cnrs.fr
|
|
6
6
|
Project-URL: Documentation , https://pymodaq.cnrs.fr
|
|
@@ -42,11 +42,13 @@ Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
|
|
|
42
42
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
43
43
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
44
44
|
Classifier: Topic :: Software Development :: User Interfaces
|
|
45
|
-
Requires-Python: >=3.
|
|
45
|
+
Requires-Python: >=3.10
|
|
46
46
|
Requires-Dist: opencv-python
|
|
47
47
|
Requires-Dist: pyfftw
|
|
48
|
-
Requires-Dist: pymodaq-
|
|
49
|
-
Requires-Dist: pymodaq
|
|
48
|
+
Requires-Dist: pymodaq-data<5.4,>=5.3.0
|
|
49
|
+
Requires-Dist: pymodaq-gui<5.4,>=5.3.0
|
|
50
|
+
Requires-Dist: pymodaq-utils<5.4,>=5.3.1
|
|
51
|
+
Requires-Dist: pymodaq<5.4,>=5.3.2
|
|
50
52
|
Requires-Dist: scikit-image
|
|
51
53
|
Requires-Dist: zernpy
|
|
52
54
|
Provides-Extra: pytorch
|
|
@@ -58,16 +60,16 @@ pymodaq_plugins_optical_2D_shaping
|
|
|
58
60
|
|
|
59
61
|
.. the following must be adapted to your developped package, links to pypi, github description...
|
|
60
62
|
|
|
61
|
-
.. image:: https://img.shields.io/pypi/v/
|
|
62
|
-
:target: https://pypi.org/project/
|
|
63
|
+
.. image:: https://img.shields.io/pypi/v/pymodaq_plugins_beam_shaping.svg
|
|
64
|
+
:target: https://pypi.org/project/pymodaq_plugins_beam_shaping/
|
|
63
65
|
:alt: Latest Version
|
|
64
66
|
|
|
65
67
|
.. image:: https://readthedocs.org/projects/pymodaq/badge/?version=latest
|
|
66
68
|
:target: https://pymodaq.readthedocs.io/en/stable/?badge=latest
|
|
67
69
|
:alt: Documentation Status
|
|
68
70
|
|
|
69
|
-
.. image:: https://github.com/PyMoDAQ/
|
|
70
|
-
:target: https://github.com/PyMoDAQ/
|
|
71
|
+
.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_beam_shaping/workflows/Upload%20Python%20Package/badge.svg
|
|
72
|
+
:target: https://github.com/PyMoDAQ/pymodaq_plugins_beam_shaping
|
|
71
73
|
:alt: Publication Status
|
|
72
74
|
|
|
73
75
|
PyMoDAQ's extension plugin to run optical shaping amplitude and/or phase algorithms and propagation algorithms
|
|
@@ -3,16 +3,16 @@ pymodaq_plugins_optical_2D_shaping
|
|
|
3
3
|
|
|
4
4
|
.. the following must be adapted to your developped package, links to pypi, github description...
|
|
5
5
|
|
|
6
|
-
.. image:: https://img.shields.io/pypi/v/
|
|
7
|
-
:target: https://pypi.org/project/
|
|
6
|
+
.. image:: https://img.shields.io/pypi/v/pymodaq_plugins_beam_shaping.svg
|
|
7
|
+
:target: https://pypi.org/project/pymodaq_plugins_beam_shaping/
|
|
8
8
|
:alt: Latest Version
|
|
9
9
|
|
|
10
10
|
.. image:: https://readthedocs.org/projects/pymodaq/badge/?version=latest
|
|
11
11
|
:target: https://pymodaq.readthedocs.io/en/stable/?badge=latest
|
|
12
12
|
:alt: Documentation Status
|
|
13
13
|
|
|
14
|
-
.. image:: https://github.com/PyMoDAQ/
|
|
15
|
-
:target: https://github.com/PyMoDAQ/
|
|
14
|
+
.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_beam_shaping/workflows/Upload%20Python%20Package/badge.svg
|
|
15
|
+
:target: https://github.com/PyMoDAQ/pymodaq_plugins_beam_shaping
|
|
16
16
|
:alt: Publication Status
|
|
17
17
|
|
|
18
18
|
PyMoDAQ's extension plugin to run optical shaping amplitude and/or phase algorithms and propagation algorithms
|
|
@@ -12,11 +12,13 @@ package-url = 'https://github.com/IumiShaping/pymodaq_plugins_optical_2D_shaping
|
|
|
12
12
|
name = "pymodaq_plugins_beam_shaping"
|
|
13
13
|
description = "PyMoDAQ's extension plugin to run optical shaping from various shapers (focusing on amplitude and phase shaping) and the image propagation"
|
|
14
14
|
dependencies = [
|
|
15
|
-
"pymodaq
|
|
15
|
+
"pymodaq>=5.3.2,<5.4",
|
|
16
|
+
"pymodaq_utils>=5.3.1,<5.4",
|
|
17
|
+
"pymodaq_gui>=5.3.0,<5.4",
|
|
18
|
+
"pymodaq_data>=5.3.0,<5.4",
|
|
16
19
|
'pyfftw',
|
|
17
20
|
'scikit-image',
|
|
18
21
|
'opencv-python',
|
|
19
|
-
'pymodaq_gui>5.0.11',
|
|
20
22
|
'zernpy',
|
|
21
23
|
]
|
|
22
24
|
|
|
@@ -34,7 +36,7 @@ maintainers = [
|
|
|
34
36
|
dynamic = ["version", "urls", "entry-points"]
|
|
35
37
|
readme = "README.rst"
|
|
36
38
|
license = { file="LICENSE" }
|
|
37
|
-
requires-python = ">=3.
|
|
39
|
+
requires-python = ">=3.10"
|
|
38
40
|
|
|
39
41
|
classifiers = [
|
|
40
42
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -64,7 +66,7 @@ pytorch = [
|
|
|
64
66
|
requires = [
|
|
65
67
|
"hatchling>=1.9.0",
|
|
66
68
|
"hatch-vcs", "toml",
|
|
67
|
-
"pymodaq_utils>=
|
|
69
|
+
"pymodaq_utils>=5.3.6",
|
|
68
70
|
]
|
|
69
71
|
build-backend = "hatchling.build"
|
|
70
72
|
|
|
@@ -39,7 +39,7 @@ from pymodaq_plugins_beam_shaping import config as plugin_config
|
|
|
39
39
|
from pymodaq_plugins_beam_shaping.algorithms.algo_config import AlgoConfig
|
|
40
40
|
from pymodaq_plugins_beam_shaping.utilities.h5saving import ShapingSaver
|
|
41
41
|
|
|
42
|
-
from pymodaq_plugins_beam_shaping.utilities import sizing
|
|
42
|
+
from pymodaq_plugins_beam_shaping.utilities import sizing, regions
|
|
43
43
|
|
|
44
44
|
algo_factory = AlgorithmFactory()
|
|
45
45
|
phase_factory = PhaseFactory()
|
|
@@ -96,16 +96,14 @@ class AlgoApp(CustomApp):
|
|
|
96
96
|
{'title': 'Apply Mask', 'name': 'apply_mask', 'type': 'bool', 'value': False},
|
|
97
97
|
{'title': 'Mask Type', 'name': 'mask_type', 'type': 'list', 'value': str(MaskType.SQUARE),
|
|
98
98
|
'limits': MaskType.names()},
|
|
99
|
-
{'title': 'Slices', 'name': 'slices', 'type': 'str',
|
|
100
|
-
'value': '(slice(277, 1770, None), slice(252, 1795, None))'},
|
|
99
|
+
{'title': 'Slices (um):', 'name': 'slices', 'type': 'str', 'value': ''},
|
|
101
100
|
]},
|
|
102
101
|
{'title': 'Intermediate Masking', 'name': str(ApplyMaskTo.INTERMEDIATE), 'type': 'group',
|
|
103
102
|
'visible': False, 'children': [
|
|
104
103
|
{'title': 'Apply Mask', 'name': 'apply_mask', 'type': 'bool', 'value': False},
|
|
105
104
|
{'title': 'Mask Type', 'name': 'mask_type', 'type': 'list', 'value': str(MaskType.ELLIPTICAL),
|
|
106
105
|
'limits': MaskType.names()},
|
|
107
|
-
{'title': 'Slices', 'name': 'slices', 'type': 'str',
|
|
108
|
-
'value': '(slice(162, 882, None), slice(545, 1825, None))'},
|
|
106
|
+
{'title': 'Slices (um):', 'name': 'slices', 'type': 'str', 'value': ''},
|
|
109
107
|
]}
|
|
110
108
|
]
|
|
111
109
|
|
|
@@ -145,10 +143,18 @@ class AlgoApp(CustomApp):
|
|
|
145
143
|
'visible': self.settings['stopping', 'stopping_type'] == stop,
|
|
146
144
|
'children': stopping_factory.get_stop_class(stop).params})
|
|
147
145
|
|
|
148
|
-
self.
|
|
146
|
+
self._module_and_data_saver: ShapingSaver = None
|
|
149
147
|
self._h5saver: H5Saver = None
|
|
150
148
|
|
|
151
149
|
|
|
150
|
+
@property
|
|
151
|
+
def module_and_data_saver(self) -> ShapingSaver:
|
|
152
|
+
return self._module_and_data_saver
|
|
153
|
+
|
|
154
|
+
@module_and_data_saver.setter
|
|
155
|
+
def module_and_data_saver(self, saver: ShapingSaver):
|
|
156
|
+
self._module_and_data_saver = saver
|
|
157
|
+
|
|
152
158
|
@property
|
|
153
159
|
def h5saver(self) -> H5Saver:
|
|
154
160
|
if self._h5saver is None:
|
|
@@ -268,6 +274,7 @@ class AlgoApp(CustomApp):
|
|
|
268
274
|
self._algorithm.set_target_field(field)
|
|
269
275
|
|
|
270
276
|
self._target_field = field
|
|
277
|
+
self.check_slices()
|
|
271
278
|
|
|
272
279
|
def set_input_field(self, field: Field):
|
|
273
280
|
|
|
@@ -328,7 +335,7 @@ class AlgoApp(CustomApp):
|
|
|
328
335
|
|
|
329
336
|
self.config_saver_loader.base_path = [self._algorithm.ALGO_NAME]
|
|
330
337
|
self.set_settings_values()
|
|
331
|
-
self.
|
|
338
|
+
self.check_slices()
|
|
332
339
|
|
|
333
340
|
self.algo_changed.emit(self._algorithm)
|
|
334
341
|
|
|
@@ -357,7 +364,7 @@ class AlgoApp(CustomApp):
|
|
|
357
364
|
if self.is_action_checked('ini_algo'):
|
|
358
365
|
self.get_action('algorithms').widget.setEnabled(False)
|
|
359
366
|
#self.set_action_enabled('ini_algo', False)
|
|
360
|
-
|
|
367
|
+
self.set_algorithm()
|
|
361
368
|
|
|
362
369
|
self.runner_thread = QtCore.QThread()
|
|
363
370
|
runner = AlgoRunner(self._algorithm)
|
|
@@ -402,7 +409,7 @@ class AlgoApp(CustomApp):
|
|
|
402
409
|
self.settings_widget = QtWidgets.QWidget()
|
|
403
410
|
self.settings_widget.setLayout(QtWidgets.QVBoxLayout())
|
|
404
411
|
self.settings_widget.layout().setContentsMargins(0, 0, 0, 0)
|
|
405
|
-
splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical)
|
|
412
|
+
splitter = QtWidgets.QSplitter(QtCore.Qt.Orientation.Vertical)
|
|
406
413
|
self.settings_widget.layout().addWidget(splitter)
|
|
407
414
|
splitter.addWidget(self.settings_tree)
|
|
408
415
|
|
|
@@ -521,14 +528,27 @@ class AlgoApp(CustomApp):
|
|
|
521
528
|
def apply_mask(self, apply_to: ApplyMaskTo) -> bool:
|
|
522
529
|
return self.settings[str(apply_to), 'apply_mask']
|
|
523
530
|
|
|
531
|
+
def get_plane_pixel_sizes(self, apply_to: ApplyMaskTo) -> Union[None, tuple]:
|
|
532
|
+
""" Pixel sizes of the plane the mask applies to, None if not (yet) defined"""
|
|
533
|
+
try:
|
|
534
|
+
if str(apply_to) == str(ApplyMaskTo.INTERMEDIATE):
|
|
535
|
+
return self._algorithm.intermediate_pixel_sizes
|
|
536
|
+
return self._target_field.pixels_sizes
|
|
537
|
+
except (AttributeError, ValueError, TypeError):
|
|
538
|
+
return None
|
|
539
|
+
|
|
540
|
+
def get_mask_region(self, apply_to: ApplyMaskTo) -> Union[None, tuple[slice, slice]]:
|
|
541
|
+
""" Get the mask region as slices in real units (um), None if not defined"""
|
|
542
|
+
return regions.parse_slices(self.settings[str(apply_to), 'slices'])
|
|
543
|
+
|
|
524
544
|
def get_mask_as_slices(self, apply_to: ApplyMaskTo) -> Union[None, tuple[slice, slice]]:
|
|
545
|
+
""" Get the mask region as slices of indexes to be used on the arrays of the corresponding plane"""
|
|
525
546
|
if self.apply_mask(apply_to):
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
return slices
|
|
547
|
+
region = self.get_mask_region(apply_to)
|
|
548
|
+
pixel_sizes = self.get_plane_pixel_sizes(apply_to)
|
|
549
|
+
if region is None or pixel_sizes is None:
|
|
550
|
+
return None
|
|
551
|
+
return regions.slices_to_indexes(region, pixel_sizes, sizing.get_effective_needed_field_size())
|
|
532
552
|
else:
|
|
533
553
|
return None
|
|
534
554
|
|
|
@@ -536,23 +556,31 @@ class AlgoApp(CustomApp):
|
|
|
536
556
|
return MaskType[self.settings[str(apply_to), 'mask_type']]
|
|
537
557
|
|
|
538
558
|
def update_intermediate_slices(self, slices: tuple[slice, slice]):
|
|
539
|
-
self.
|
|
559
|
+
self.update_slices(ApplyMaskTo.INTERMEDIATE, slices)
|
|
540
560
|
|
|
541
561
|
def update_target_slices(self, slices: tuple[slice, slice]):
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
562
|
+
self.update_slices(ApplyMaskTo.TARGET, slices)
|
|
563
|
+
|
|
564
|
+
def update_slices(self, apply_to: ApplyMaskTo, slices: tuple[slice, slice]):
|
|
565
|
+
""" Set the mask region (slices in m) constrained to the effective area of the plane"""
|
|
566
|
+
pixel_sizes = self.get_plane_pixel_sizes(apply_to)
|
|
567
|
+
if pixel_sizes is not None:
|
|
568
|
+
slices = regions.constrain_slices(slices, pixel_sizes)
|
|
569
|
+
self.settings.child(str(apply_to), 'slices').setValue(regions.slices_to_str(slices))
|
|
570
|
+
|
|
571
|
+
def check_slices(self):
|
|
572
|
+
""" Set the default region (2/3 of the effective area, centered) if the current one is not valid"""
|
|
573
|
+
for apply_to in (ApplyMaskTo.TARGET, ApplyMaskTo.INTERMEDIATE):
|
|
574
|
+
pixel_sizes = self.get_plane_pixel_sizes(apply_to)
|
|
575
|
+
if pixel_sizes is None:
|
|
576
|
+
continue
|
|
577
|
+
region = self.get_mask_region(apply_to)
|
|
578
|
+
if region is None or not regions.are_slices_in_area(region, pixel_sizes):
|
|
579
|
+
self.update_slices(apply_to, regions.default_slices(pixel_sizes))
|
|
552
580
|
|
|
553
581
|
def value_changed(self, param: Parameter):
|
|
554
582
|
for applied in ApplyMaskTo.values():
|
|
555
|
-
if applied in putils.get_param_path(param):
|
|
583
|
+
if applied in putils.get_param_path(param) and self._algorithm is not None:
|
|
556
584
|
self._algorithm.update_mask = True
|
|
557
585
|
if param.name() == 'ini_phase_factory':
|
|
558
586
|
for param_child in self.settings.child('ini_phase_group', 'phase_params').children():
|
|
@@ -26,10 +26,10 @@ class DAQ_Move_FocalLength(DAQ_Move_base):
|
|
|
26
26
|
is_multiaxes = False
|
|
27
27
|
_axis_names: Union[List[str], Dict[str, int]] = ['Focal']
|
|
28
28
|
_controller_units: Union[str, List[str]] = 'cm'
|
|
29
|
-
|
|
29
|
+
_epsilons: Union[float, List[float]] = 0.1
|
|
30
30
|
data_actuator_type = DataActuatorType.DataActuator
|
|
31
31
|
|
|
32
|
-
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=
|
|
32
|
+
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilons)
|
|
33
33
|
|
|
34
34
|
def ini_attributes(self):
|
|
35
35
|
self.controller: 'Correction' = None
|
|
@@ -84,8 +84,8 @@ class DAQ_Move_FocalLength(DAQ_Move_base):
|
|
|
84
84
|
----------
|
|
85
85
|
value: (float) value of the relative target positioning
|
|
86
86
|
"""
|
|
87
|
-
value = self.check_bound(self.
|
|
88
|
-
self.target_value = value + self.
|
|
87
|
+
value = self.check_bound(self.current_value + value) - self.current_value
|
|
88
|
+
self.target_value = value + self.current_value
|
|
89
89
|
value = self.set_position_relative_with_scaling(value)
|
|
90
90
|
|
|
91
91
|
self.move_abs(self.target_value)
|
|
@@ -25,10 +25,10 @@ class DAQ_Move_MockAutoFocus(DAQ_Move_base):
|
|
|
25
25
|
is_multiaxes = False
|
|
26
26
|
_axis_names: Union[List[str], Dict[str, int]] = ['Focus']
|
|
27
27
|
_controller_units: Union[str, List[str]] = ''
|
|
28
|
-
|
|
28
|
+
_epsilons: Union[float, List[float]] = 0.1
|
|
29
29
|
data_actuator_type = DataActuatorType.DataActuator
|
|
30
30
|
|
|
31
|
-
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=
|
|
31
|
+
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilons)
|
|
32
32
|
|
|
33
33
|
def ini_attributes(self):
|
|
34
34
|
self.controller: Optional[Autofocus] = None
|
|
@@ -86,8 +86,8 @@ class DAQ_Move_MockAutoFocus(DAQ_Move_base):
|
|
|
86
86
|
----------
|
|
87
87
|
value: (float) value of the relative target positioning
|
|
88
88
|
"""
|
|
89
|
-
value = self.check_bound(self.
|
|
90
|
-
self.target_value = value + self.
|
|
89
|
+
value = self.check_bound(self.current_value + value) - self.current_value
|
|
90
|
+
self.target_value = value + self.current_value
|
|
91
91
|
value = self.set_position_relative_with_scaling(value)
|
|
92
92
|
|
|
93
93
|
self.move_abs(self.target_value)
|
|
@@ -29,10 +29,10 @@ class DAQ_Move_MockShaper(DAQ_Move_base):
|
|
|
29
29
|
is_multiaxes = False
|
|
30
30
|
_axis_names: Union[List[str], Dict[str, int]] = ['']
|
|
31
31
|
_controller_units: Union[str, List[str]] = ''
|
|
32
|
-
|
|
32
|
+
_epsilons: Union[float, List[float]] = 0.1
|
|
33
33
|
data_actuator_type = DataActuatorType.DataActuator
|
|
34
34
|
|
|
35
|
-
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=
|
|
35
|
+
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilons)
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def ini_attributes(self):
|
|
@@ -116,8 +116,8 @@ class DAQ_Move_MockShaper(DAQ_Move_base):
|
|
|
116
116
|
----------
|
|
117
117
|
value: (float) value of the relative target positioning
|
|
118
118
|
"""
|
|
119
|
-
value = self.check_bound(self.
|
|
120
|
-
self.target_value = value + self.
|
|
119
|
+
value = self.check_bound(self.current_value + value) - self.current_value
|
|
120
|
+
self.target_value = value + self.current_value
|
|
121
121
|
value = self.set_position_relative_with_scaling(value)
|
|
122
122
|
|
|
123
123
|
self.move_abs(self.target_value)
|
|
@@ -33,10 +33,10 @@ class DAQ_Move_Zernike(DAQ_Move_base):
|
|
|
33
33
|
for m in range(-n, n+2, 2):
|
|
34
34
|
_axis_names.append(f'{n}{m}')
|
|
35
35
|
_controller_units: Union[str, List[str]] = ''
|
|
36
|
-
|
|
36
|
+
_epsilons: Union[float, List[float]] = 0.1
|
|
37
37
|
data_actuator_type = DataActuatorType.DataActuator
|
|
38
38
|
|
|
39
|
-
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=
|
|
39
|
+
params = [] + comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilons)
|
|
40
40
|
|
|
41
41
|
def ini_attributes(self):
|
|
42
42
|
self.controller: 'Correction' = None
|
|
@@ -94,8 +94,8 @@ class DAQ_Move_Zernike(DAQ_Move_base):
|
|
|
94
94
|
----------
|
|
95
95
|
value: (float) value of the relative target positioning
|
|
96
96
|
"""
|
|
97
|
-
value = self.check_bound(self.
|
|
98
|
-
self.target_value = value + self.
|
|
97
|
+
value = self.check_bound(self.current_value + value) - self.current_value
|
|
98
|
+
self.target_value = value + self.current_value
|
|
99
99
|
value = self.set_position_relative_with_scaling(value)
|
|
100
100
|
|
|
101
101
|
self.move_abs(self.target_value)
|
|
@@ -19,7 +19,7 @@ from pymodaq_gui import utils as gutils
|
|
|
19
19
|
from pymodaq_gui.utils.layout import save_layout_state, load_layout_state
|
|
20
20
|
from pymodaq_gui.parameter.ioxml import xml_string_to_parameter
|
|
21
21
|
|
|
22
|
-
from pymodaq.
|
|
22
|
+
from pymodaq.utils.custom_ext import CustomExt
|
|
23
23
|
from pymodaq.utils.gui_utils.loader_utils import create_extension
|
|
24
24
|
from pymodaq.utils.data import DataToExport, DataCalculated, DataDim
|
|
25
25
|
|
|
@@ -30,6 +30,7 @@ from pymodaq_plugins_beam_shaping.utilities.corrections import Correction
|
|
|
30
30
|
from pymodaq_plugins_beam_shaping.algorithms import AlgorithmFactory, AlgoBase
|
|
31
31
|
from pymodaq_plugins_beam_shaping.utilities import sizing
|
|
32
32
|
from pymodaq_plugins_beam_shaping.algorithms.utils import ApplyMaskTo, LensSetup
|
|
33
|
+
from pymodaq_plugins_beam_shaping.utilities import regions
|
|
33
34
|
from pymodaq_plugins_beam_shaping.utilities.calibrating import BeamShapingCalibration, Calibration
|
|
34
35
|
from pymodaq_plugins_beam_shaping.utilities.data import DataShaper
|
|
35
36
|
from pymodaq_plugins_beam_shaping.utilities.shaper import Shaper, ModulatorType, get_shaper
|
|
@@ -474,6 +475,7 @@ class BeamShaping(CustomExt):
|
|
|
474
475
|
|
|
475
476
|
def update_ui_from_algo(self, algo: AlgoBase):
|
|
476
477
|
self.set_action_visible('show_intermediate', algo.SETUP_TYPE == LensSetup.FourF)
|
|
478
|
+
self.show_set_target_roi_select()
|
|
477
479
|
|
|
478
480
|
def plot_target(self, field: Field):
|
|
479
481
|
self.target_viewers.show_data(DataToExport('Target', data=[
|
|
@@ -509,15 +511,16 @@ class BeamShaping(CustomExt):
|
|
|
509
511
|
self._algorithm.modulator_field_signal.connect(self.update_modulator_field)
|
|
510
512
|
self._input_field_loader.field_signal.connect(self._algorithm.set_input_field)
|
|
511
513
|
self._target_field_loader.field_signal.connect(self._algorithm.set_target_field)
|
|
514
|
+
self._target_field_loader.field_signal.connect(lambda field: self.show_set_target_roi_select())
|
|
512
515
|
|
|
513
516
|
self.set_menu(self._algorithm.menu) #adds this to the menu dict (automatically added in the sharedUI)
|
|
514
517
|
|
|
515
518
|
self.intermediate_viewer.roi_select_signal.connect(
|
|
516
|
-
lambda roi: self._algorithm.update_intermediate_slices(roi.to_slices()))
|
|
519
|
+
lambda roi: self._algorithm.update_intermediate_slices(regions.from_axis_units(roi.to_slices(as_integer=False))))
|
|
517
520
|
self.show_set_target_roi_select()
|
|
518
521
|
|
|
519
522
|
for viewer in (self._target_field_loader.amp_viewer, self._target_field_loader.phase_viewer):
|
|
520
|
-
viewer.roi_select_signal.connect(lambda roi: self._algorithm.update_target_slices(roi.to_slices()))
|
|
523
|
+
viewer.roi_select_signal.connect(lambda roi: self._algorithm.update_target_slices(regions.from_axis_units(roi.to_slices(as_integer=False))))
|
|
521
524
|
|
|
522
525
|
if layout_path.joinpath('shaping.dock').is_file():
|
|
523
526
|
try:
|
|
@@ -529,13 +532,15 @@ class BeamShaping(CustomExt):
|
|
|
529
532
|
|
|
530
533
|
|
|
531
534
|
def show_set_target_roi_select(self):
|
|
532
|
-
slices = self._algorithm.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
self._target_field_loader.amp_viewer.view
|
|
537
|
-
|
|
538
|
-
|
|
535
|
+
slices = self._algorithm.get_mask_region(ApplyMaskTo.TARGET)
|
|
536
|
+
if slices is None:
|
|
537
|
+
return
|
|
538
|
+
slices = regions.to_axis_units(slices) # the ROI is in the units of the axes
|
|
539
|
+
view = self._target_field_loader.amp_viewer.view
|
|
540
|
+
view.set_action_checked('ROIselect', True)
|
|
541
|
+
view.show_ROI_select() # position and size are not taken into account by the viewer, set below
|
|
542
|
+
view.ROIselect.setPos((slices[1].start, slices[0].start))
|
|
543
|
+
view.ROIselect.setSize((slices[1].stop - slices[1].start, slices[0].stop - slices[0].start))
|
|
539
544
|
|
|
540
545
|
def connect_things(self):
|
|
541
546
|
logger.debug('connecting things')
|
|
@@ -662,24 +667,19 @@ class BeamShaping(CustomExt):
|
|
|
662
667
|
QtWidgets.QApplication.processEvents() # allows the dashboard modules to close properly
|
|
663
668
|
return True
|
|
664
669
|
|
|
665
|
-
if not hasattr(CustomExt, '_quit_fun'): # pymodaq < 5.3 only calls quit_fun, pymodaq >= 5.3 calls _quit_fun
|
|
666
|
-
def quit_fun(self):
|
|
667
|
-
self._quit_fun()
|
|
668
|
-
super().quit_fun()
|
|
669
|
-
|
|
670
670
|
|
|
671
671
|
def main():
|
|
672
672
|
import sys
|
|
673
673
|
from pymodaq_gui.qt_utils import mkQApp
|
|
674
|
-
from pymodaq.dashboard import
|
|
674
|
+
from pymodaq.dashboard import load_dashboard_with_arguments
|
|
675
675
|
from pymodaq.utils.gui_utils.loader_utils import create_extension
|
|
676
|
+
|
|
676
677
|
app = mkQApp('BeamShaping')
|
|
677
678
|
|
|
678
|
-
win, dashboard =
|
|
679
|
+
win, dashboard, _ = load_dashboard_with_arguments(show_dashboard=False, load_extension=False)
|
|
679
680
|
win.mainwindow.setVisible(False)
|
|
680
681
|
|
|
681
|
-
win_ext,
|
|
682
|
-
win_ext.show()
|
|
682
|
+
win_ext, ext = create_extension(dashboard, BeamShaping, show_extension=True)
|
|
683
683
|
|
|
684
684
|
sys.exit(app.exec())
|
|
685
685
|
|
|
@@ -4,6 +4,9 @@ import numpy as np
|
|
|
4
4
|
from qtpy import QtWidgets, QtCore
|
|
5
5
|
from skimage.transform import rescale, resize
|
|
6
6
|
from scipy.ndimage import gaussian_filter
|
|
7
|
+
|
|
8
|
+
from pymodaq_gui.utils.shared_ui import SharedUI
|
|
9
|
+
from pymodaq_gui.utils.widgets.window import make_window
|
|
7
10
|
from pyqtgraph import ROI as pgROI
|
|
8
11
|
|
|
9
12
|
from pymodaq_utils.config import GlobalConfig
|
|
@@ -23,6 +26,7 @@ from pymodaq_gui.utils.file_io import select_file
|
|
|
23
26
|
from pymodaq_gui.parameter.ioxml import parameter_to_xml_string
|
|
24
27
|
from pymodaq_plugins_beam_shaping import config as plugin_config
|
|
25
28
|
from pymodaq_plugins_beam_shaping.field import Field, Q_, LoaderFactory, FieldLoader
|
|
29
|
+
from pymodaq_plugins_beam_shaping.utilities import regions
|
|
26
30
|
from pymodaq_plugins_beam_shaping.utilities.masking import MaskType
|
|
27
31
|
|
|
28
32
|
from pymodaq_plugins_beam_shaping.utilities.sizing import (get_effective_needed_field_size,
|
|
@@ -93,8 +97,7 @@ class FieldLoaderApp(CustomApp):
|
|
|
93
97
|
{'title': 'Masking', 'name': 'masking', 'type': 'group', 'children': [
|
|
94
98
|
{'title': 'Mask Type', 'name': 'mask_type', 'type': 'list', 'value': str(MaskType.SQUARE),
|
|
95
99
|
'limits': MaskType.names()},
|
|
96
|
-
{'title': 'Slices', 'name': 'slices', 'type': 'str',
|
|
97
|
-
'value': '(slice(338, 757, None), slice(665, 1770, None))'},
|
|
100
|
+
{'title': 'Slices (um):', 'name': 'slices', 'type': 'str', 'value': ''},
|
|
98
101
|
{'title': 'Boundary', 'name': 'boundary', 'type': 'group', 'children': [
|
|
99
102
|
{'title': 'Apply', 'name': 'apply_boundary', 'type': 'bool', 'value': False},
|
|
100
103
|
{'title': 'Sharpness', 'name': 'sharpness', 'type': 'int', 'value': 3, }
|
|
@@ -147,21 +150,36 @@ class FieldLoaderApp(CustomApp):
|
|
|
147
150
|
self.settings.child('needed_size', 'pixel_width').setValue(pixel_sizes[1].m_as('um'))
|
|
148
151
|
self.load_field()
|
|
149
152
|
|
|
150
|
-
def
|
|
153
|
+
def get_pixel_sizes(self) -> tuple[Q_, Q_]:
|
|
154
|
+
return (Q_(self.settings['needed_size', 'pixel_height'], 'um'),
|
|
155
|
+
Q_(self.settings['needed_size', 'pixel_width'], 'um'))
|
|
156
|
+
|
|
157
|
+
def get_mask_region(self) -> Union[None, tuple[slice, slice]]:
|
|
158
|
+
""" Get the mask region as slices in real units (um), None if not defined"""
|
|
159
|
+
return regions.parse_slices(self.settings['utils', 'masking', 'slices'])
|
|
151
160
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
def get_mask_as_slices(self) -> Union[None, tuple[slice, slice]]:
|
|
162
|
+
""" Get the mask region as slices of indexes to be used on the array of the field"""
|
|
163
|
+
region = self.get_mask_region()
|
|
164
|
+
if region is None:
|
|
165
|
+
return None
|
|
166
|
+
shape = (self.settings['needed_size', 'height'], self.settings['needed_size', 'width'])
|
|
167
|
+
return regions.slices_to_indexes(region, self.get_pixel_sizes(), shape)
|
|
168
|
+
|
|
169
|
+
def check_mask_region(self):
|
|
170
|
+
""" Set the default region (2/3 of the effective area, centered) if the current one is not valid"""
|
|
171
|
+
region = self.get_mask_region()
|
|
172
|
+
if region is None or not regions.are_slices_in_area(region, self.get_pixel_sizes()):
|
|
173
|
+
self.settings.child('utils', 'masking', 'slices').setValue(
|
|
174
|
+
regions.slices_to_str(regions.default_slices(self.get_pixel_sizes())))
|
|
158
175
|
|
|
159
176
|
def get_mask_type(self) -> MaskType:
|
|
160
177
|
return MaskType[self.settings['utils', 'masking', 'mask_type']]
|
|
161
178
|
|
|
162
179
|
def update_mask_slices(self):
|
|
163
180
|
if self.mask is not None:
|
|
164
|
-
self.settings.child('utils', 'masking', 'slices').setValue(
|
|
181
|
+
self.settings.child('utils', 'masking', 'slices').setValue(
|
|
182
|
+
regions.slices_to_str(regions.from_axis_units(self.mask.to_info().to_slices(as_integer=False))))
|
|
165
183
|
|
|
166
184
|
def value_changed(self, param: Parameter):
|
|
167
185
|
if param.name() == 'loader':
|
|
@@ -192,13 +210,18 @@ class FieldLoaderApp(CustomApp):
|
|
|
192
210
|
viewer = self.phase_viewer
|
|
193
211
|
if param.value():
|
|
194
212
|
viewer.roi_manager.add_roi_programmatically('RectROI')
|
|
195
|
-
|
|
213
|
+
roi_meta = viewer.roi_manager.get_roi_from_index(0) # ROIMeta, the ROI itself is in its roi attribute
|
|
214
|
+
self.mask = roi_meta.roi
|
|
215
|
+
self.check_mask_region()
|
|
216
|
+
region = regions.to_axis_units(self.get_mask_region()) # the ROI is in the units of the axes
|
|
217
|
+
self.mask.setPos((region[1].start, region[0].start))
|
|
218
|
+
self.mask.setSize((region[1].stop - region[1].start, region[0].stop - region[0].start))
|
|
196
219
|
self.mask.sigRegionChangeFinished.connect(self.update_mask_slices)
|
|
197
220
|
self.update_mask_slices()
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
self.mask.sigRegionChangeFinished.disconnect()
|
|
221
|
+
elif self.mask is not None:
|
|
222
|
+
self.mask.sigRegionChangeFinished.disconnect(self.update_mask_slices)
|
|
201
223
|
self.mask = None
|
|
224
|
+
viewer.roi_manager.remove_roi_programmatically(0)
|
|
202
225
|
|
|
203
226
|
elif param.name() == 'save':
|
|
204
227
|
if param.value():
|
|
@@ -258,7 +281,9 @@ class FieldLoaderApp(CustomApp):
|
|
|
258
281
|
|
|
259
282
|
slices = (slice(max(0, center[0] - size[0] // 2), min(shape[0], center[0] + size[0] // 2)),
|
|
260
283
|
slice(max(0, center[1] - size[1] // 2), min(shape[1], center[1] + size[1] // 2)))
|
|
261
|
-
|
|
284
|
+
pixel_sizes = regions.pixel_sizes_in_um(self.get_pixel_sizes())
|
|
285
|
+
self.settings.child('utils', 'masking', 'slices').setValue(regions.slices_to_str(
|
|
286
|
+
tuple(slice(_slice.start * pxl, _slice.stop * pxl) for _slice, pxl in zip(slices, pixel_sizes))))
|
|
262
287
|
self.settings.child('utils', 'masking', 'apply_mask').setValue(apply)
|
|
263
288
|
|
|
264
289
|
def updated_slm(self, slm_default_name: str):
|
|
@@ -379,7 +404,7 @@ class FieldLoaderApp(CustomApp):
|
|
|
379
404
|
self.normalise(self.field, NormaliseTo[self.settings['utils', 'normalisation']])
|
|
380
405
|
|
|
381
406
|
if self.settings['utils', 'masking', 'apply_mask']:
|
|
382
|
-
|
|
407
|
+
self.check_mask_region()
|
|
383
408
|
mask = self.get_mask_array()
|
|
384
409
|
self.field.amplitude = self.field.amplitude * mask
|
|
385
410
|
self.field.phase = self.field.phase * mask
|
|
@@ -468,12 +493,12 @@ class FieldLoaderApp(CustomApp):
|
|
|
468
493
|
**self.loader_kwargs
|
|
469
494
|
)
|
|
470
495
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
496
|
+
layout = self._loader_settings_widget.layout()
|
|
497
|
+
while layout.count():
|
|
498
|
+
widget = layout.takeAt(0).widget()
|
|
499
|
+
if widget is not None:
|
|
500
|
+
widget.setParent(None)
|
|
501
|
+
widget.deleteLater()
|
|
477
502
|
|
|
478
503
|
self._loader_settings_widget.layout().addWidget(self._field_loader.settings_tree)
|
|
479
504
|
self._field_loader.register_listener(self)
|
|
@@ -481,7 +506,7 @@ class FieldLoaderApp(CustomApp):
|
|
|
481
506
|
except ValueError as e:
|
|
482
507
|
pass
|
|
483
508
|
|
|
484
|
-
def
|
|
509
|
+
def setup_docks_and_widgets(self):
|
|
485
510
|
self.docks['target'] = Dock('Target')
|
|
486
511
|
self._main_widget = QtWidgets.QWidget()
|
|
487
512
|
self._main_widget.setLayout(QtWidgets.QHBoxLayout())
|
|
@@ -493,7 +518,6 @@ class FieldLoaderApp(CustomApp):
|
|
|
493
518
|
|
|
494
519
|
amp_widget = QtWidgets.QWidget()
|
|
495
520
|
self.amp_viewer = Viewer2D(amp_widget)
|
|
496
|
-
self.amp_viewer.view.get_action('legend').trigger()
|
|
497
521
|
self.slm_size_roi_amp = pgROI(pos=(0, 0), size=(20, 20), movable=False, rotatable=False, resizable=False,
|
|
498
522
|
pen=(0, 255, 0))
|
|
499
523
|
self.amp_viewer.view.plotitem.addItem(self.slm_size_roi_amp)
|
|
@@ -501,7 +525,6 @@ class FieldLoaderApp(CustomApp):
|
|
|
501
525
|
|
|
502
526
|
phase_widget = QtWidgets.QWidget()
|
|
503
527
|
self.phase_viewer = Viewer2D(phase_widget)
|
|
504
|
-
self.phase_viewer.view.get_action('legend').trigger()
|
|
505
528
|
self.slm_size_roi_phase = pgROI(pos=(0, 0), size=(20, 20), movable=False, rotatable=False, resizable=False,
|
|
506
529
|
pen=(0, 255, 0))
|
|
507
530
|
self.phase_viewer.view.plotitem.addItem(self.slm_size_roi_phase)
|
|
@@ -544,16 +567,12 @@ def main():
|
|
|
544
567
|
from pymodaq_gui.qt_utils import mkQApp
|
|
545
568
|
|
|
546
569
|
app = mkQApp('Optical Shaping')
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
area = DockArea()
|
|
550
|
-
win.setCentralWidget(area)
|
|
551
|
-
win.resize(1000, 500)
|
|
552
|
-
win.setWindowTitle('PyMoDAQ Dashboard')
|
|
553
|
-
win.show()
|
|
554
|
-
|
|
570
|
+
win, area = make_window(title='FieldLoaderApp')
|
|
571
|
+
shared_ui = SharedUI(win)
|
|
555
572
|
optical_app = FieldLoaderApp(area)
|
|
556
573
|
|
|
574
|
+
shared_ui.affect_application(optical_app)
|
|
575
|
+
|
|
557
576
|
app.exec()
|
|
558
577
|
|
|
559
578
|
|