Repository navigation
Add the shaper contract (SLM/DMD plugins) in hardware/shaper.py - #16
Merged
Merged
Conversation
…trol module 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
Common interface of the instrument plugins driving a shaper (SLM, DMD...), so that an application (the BeamShaping extension) gets what it needs from the plugin instead of from a configuration file.
shaper_params(): two read-only settings groups to add to the parameters of the plugin:shaper_geometry(width,height,pixel_size_x,pixel_size_yin µm) andshaper_properties(name,modulator_type,has_internal_calibration, user choiceuse_internal_calibration). Both carry aversion.fill_shaper_settings(settings, ...): to call inini_stage.Shaperdataclass (+ModulatorType) andShaper.from_module(module): reads the groups from the settings of aDAQ_Movecontrol module (the plugin lives in another thread, the module's settings mirror it).Noneif the plugin has no such groups, is not initialized, or follows another version of the contract (logged).SHAPER_VERSION.Used by PyMoDAQ/pymodaq_plugins_beam_shaping#61, PyMoDAQ/pymodaq_plugins_holoeye#10 and PyMoDAQ/pymodaq_plugins_slmsuite#5 (their CI needs a release of utils with this module).
Tests
tests/test_shaper.py.Generated by Claude Code