Skip to content

Add the shaper contract (SLM/DMD plugins) in hardware/shaper.py - #16

Merged
seb5g merged 1 commit into
5.3.xfrom
feature/shaper-contract
Oct 29, 2026
Merged

seb5g merged 1 commit into
5.3.xfrom
feature/shaper-contract

Conversation

@seb5g

@seb5g seb5g commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

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_y in µm) and shaper_properties (name, modulator_type, has_internal_calibration, user choice use_internal_calibration). Both carry a version.
  • fill_shaper_settings(settings, ...): to call in ini_stage.
  • Shaper dataclass (+ ModulatorType) and Shaper.from_module(module): reads the groups from the settings of a DAQ_Move control module (the plugin lives in another thread, the module's settings mirror it). None if the plugin has no such groups, is not initialized, or follows another version of the contract (logged).
  • Evolution rule (module docstring): only add optional children, never rename or remove one, a breaking change increments 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

…trol module

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
@seb5g
seb5g marked this pull request as ready for review October 29, 2026 14:13
@seb5g
seb5g merged commit 942378a into 5.3.x Oct 29, 2026
6 of 7 checks passed
@seb5g
seb5g deleted the feature/shaper-contract branch October 29, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants