Repository navigation
Input compensation as a modular option in the AlgoApp settings - #103
Merged
Merged
Conversation
A factory of compensations like the initial phases (NoCompensation, DivideByInput), a settings group shown for the algorithms that use it (INPUT_COMPENSATION), used by the binary holograms and the checkerboard. The unreachable region is outlined as soon as the compensation is chosen, before any run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
…for every modulator type The phase sent to the modulator is not the modulator phase anymore once the input phase is kept in the modulator field (issue #98). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
…orithm (None: not used) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
…thm saved and loaded Loading a setting called value_changed, which saved all the settings: the ones not loaded yet were replaced by their current values (only the first setting of the tree came back after a restart, and values leaked from an algorithm to another). Also the OL2014 name has no slash anymore (it is a section of the config file). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
…ear error) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN83BLrbGKe3ynHHvZQm
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
algorithms/compensation.py(base class,CompensationFactory) andalgorithms/compensations/(NoCompensation,DivideByInputwithMin input level, default 0.2).Input Compensationgroup of the AlgoApp settings, shown only for the algorithms that setINPUT_COMPENSATION = True(an opt-in class attribute) and useself.compensate_target(...): the binary holograms (Parallel Lee, Superpixel with block averaging) and the checkerboardOL2014.compensate_input/min_input_levelare removed from the binary hologram settings (old saved values are simply ignored, no migration).AlgoBase.preview_unreachable,BeamShaping.update_unreachable_preview): input and target loaders and target views, then also modulator and output views after a run; never the intermediate plane.set_compensation(app, name, params).OL2014is now compensated by default (DivideByInput);NoCompensationgives the previous result.Test plan
tests/test_compensation.py(array level), algorithm level (test_algo_helpers.py: checkerboard flatter with the compensation, preview equals the region of a run, Superpixel blocks), AlgoApp group and signal (test_custom_apps.py), real extension preview (test_region_outline.py).test_algo_app_saves_what_is_sent_to_the_shapercases deselected locally for time before; the wholetest_custom_apps.pypasses).Generated by Claude Code