feat: live view click-to-move fix and Ctrl+Scroll Z navigation#532
Open
feat: live view click-to-move fix and Ctrl+Scroll Z navigation#532
Conversation
Centralize displayed-image pixel size in Microscope.get_image_pixel_size_um() and use it from move_from_click_image. Issue X non-blocking then Y blocking so both finish before returning. Add an info-level log line that names every factor (lens, binned_um, binning, pixel_size_um, mm delta) for diagnosing distance regressions live. Add Ctrl+Scroll → 1 µm Z step and Ctrl+Shift+Scroll → 20 µm Z step on the ImageDisplayWindow live view. Plain scroll continues to zoom. Z scroll is gated on the click-to-move checkbox (which toggleAcquisitionStart already forces off during acquisition) and the stage-busy flag, and clamped to SOFTWARE_POS_LIMIT.Z bounds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Microscope.get_image_pixel_size_um()helper and use it frommove_from_click_image. X is now issued non-blocking immediately followed by a blocking Y so both axes finish before the call returns. Adds an info-level log line that names every factor (lens, binned_um, binning, pixel_size_um, mm delta) so the next distance regression can be diagnosed from a single click.ImageDisplayWindowlive view via a Qt event filter. Plain scroll continues to zoom (event is not consumed). Z scroll is gated on the click-to-move checkbox (whichtoggleAcquisitionStartalready forces off during acquisition) and the stage-busy flag, and clamped toSOFTWARE_POS_LIMIT.Zbounds.LIVE_VIEW_Z_STEP_UM = 1andLIVE_VIEW_Z_STEP_FAST_UM = 20in_def.py.Out of scope: the napari live view widget. True simultaneous XY motion (firmware has no combined-move command).
Test plan
Microscope.get_image_pixel_size_um()(returns product, returnsNonewhen either factor is missing).ImageDisplayWindow.eventFilter(Ctrl/Ctrl+Shift wheel emits ±1 / ±20 µm; zero notch consumed without emit; plain scroll passes through unchanged).tests/control/core/test_zarr_writer.pythat are present onmaster).click_to_move:info log if distance is still off so we can identify the wrong factor).🤖 Generated with Claude Code