Repository navigation
Get the Shaper (geometry, calibration) from the Shaper actuator - #61
Merged
Merged
Conversation
…r plugins Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
…tead of a mixin Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
…tils contract, configuration as fallback Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
Collaborator
Author
|
the idea is to remove entirely the need of the shaper configuration. Only a default fallback (for all shapers) should be done |
…e Shaper actuator, with one default shaper as fallback Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
Collaborator
Author
|
in fact the best woul dbe to have the settings from the real instrument if any, else fallback but in that case one should be able to update them => I guess this is possible by tweaking the preferences then? |
…tor is initialized, update the fields; default shaper editable in the configuration Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The BeamShaping extension builds its
Shaperfrom theShapercontrol module (aDAQ_Move), using the contract ofpymodaq_plugins_utils.hardware.shaper(pymodaq_plugins_utils 5.3.4, PyMoDAQ/pymodaq_plugins_utils#16): two read-only settings groups,shaper_geometry(pixels, pixel sizes) andshaper_properties(name, modulator type,has_internal_calibration,use_internal_calibration).extensions/spatial_beam_shaping.py: theshaperproperty returnsShaper.from_module(actuator)once the plugin is initialized, else the default shaper.use_internal_calibrationis read live from the actuator.update_from_shaper()re-reads it and rebuilds the fields (input and target sizes, pixel sizes, masks); it is called indo_things_after_experiment_set, when the actuator emitsinit_signal(the plugin may be initialized after the experiment is set) and when the configuration changes.utilities/shaper.py:ShaperandModulatorTypecome from pymodaq_plugins_utils (re-exported). The per-SLM configuration is removed: the[SLM]section of the config template,slm/slm.py(unused) and the config lookups inutilities/sizing.py, the loaders and the mock plugin. A single[default_shaper]section (1920 x 1080 pixels of 8 µm, phase, no internal calibration) is the fallback for all shapers, editable by the user;get_shaper()returns the shaper last told by the actuator (set_shaper), sosizingand the algorithms follow it. An old[SLM]section left in a user's config file is ignored.DAQ_Move_MockShaperfills both groups with the default shaper.pymodaq_plugins_utils>=5.3.4.Tests
tests/test_shaper_interface.py(not initialized / initialized actuator, user choice of the internal calibration, no actuator / no groups, default shaper from the configuration, sizes follow the shaper, mock) andtest_custom_apps.py(extension rebuilds its fields for the shaper told by the actuator). Theinit_signalconnection to a realDAQ_Moveis not tested. Not tested with a real SLM.🤖 Generated with Claude Code
https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS