Skip to content

Shaper: keep the user's choice of internal calibration - #18

Closed
seb5g wants to merge 1 commit into
5.3.xfrom
fix/shaper-keep-user-calibration-choice
Closed

seb5g wants to merge 1 commit into
5.3.xfrom
fix/shaper-keep-user-calibration-choice

Conversation

@seb5g

@seb5g seb5g commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

fill_shaper_settings (called in ini_stage) reset use_internal_calibration to has_internal_calibration at each initialization, so the choice of the user (restored from the preset) was overwritten every time the experiment file was loaded.

Now the value is set to has_internal_calibration only the first time, or when has_internal_calibration changed since the settings were saved (another controller). Otherwise the restored choice is kept. It is never True without an internal calibration.

Tests added for both cases (tests/test_shaper.py, 10 passed). Not tested with a real preset reload in the Dashboard.


Generated by Claude Code

…tialized again

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS

seb5g commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Closing: this PR kept the value restored from the loaded state, but the settings of the shaper are meant to be refreshed at each (re)initialization of the actuator. The choice of using the internal calibration is now a preference of BeamShaping, imposed to the actuator by the extension (PyMoDAQ/pymodaq_plugins_beam_shaping#63), so fill_shaper_settings can keep setting it to has_internal_calibration.


Generated by Claude Code

@seb5g seb5g closed this Oct 30, 2026
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