Skip to content

Conversation

AdvancedImagingUTSW
Copy link
Collaborator

Add a new popup that allows us to adjust stage parameters from within the microscope software, rather than having to close it, modify the configuration file, and then restart it.

Populating the stage limits controller. Currently the menu and the popup are opposite of each other. Also the updated values aren't reflected in the configuration.yaml file.
Updated MenuController and StageLimitsController to ensure stage limits state is consistently reflected in both the main menu and the stage limits popup. Added logic to update the popup's checkbox when toggling limits from the menu, and improved event handling for enabling/disabling limits from the popup.
Renamed StageLimitsController and StageLimitsPopup to AdvancedStageParametersController and AdvancedStageParametersPopup, respectively. Updated all references and improved UI to include microscope selection and enhanced layout. Added logging and refactored controller logic for better maintainability.
Introduces detection of NI galvo (analog) stage in configuration and exposes it in the advanced stage parameters popup. Adds per-axis flip flags and offset controls to the advanced stage parameters UI, updates controller logic to handle these new parameters, and improves code clarity and typing. Also updates menu and main warning message for conciseness.
Refactors the advanced stage parameters popup and its controller to improve microscope switching, configuration management, and widget handling. Removes NI Galvo stage logic from the popup, centralizes configuration updates, adds dynamic widget reconfiguration, and streamlines the saving and updating of stage parameters. Also adds debug print statements and improves code organization for maintainability.
Improves synchronization between UI and configuration for advanced stage parameters, ensuring changes are saved and reflected immediately. Adds update_configuration method, refactors saving and updating logic, and enhances widget trace setup. Also updates popup UI for better clarity and usability.
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new "Advanced Stage Parameters" popup window that allows users to adjust stage parameters (limits, offsets, and flip flags) directly from within the microscope software interface, eliminating the need to close the application, manually edit configuration files, and restart.

Key changes include:

  • Implementation of a comprehensive stage parameters popup with real-time configuration updates
  • Addition of stage limits control integration with the existing menu system
  • Code formatting improvements and cleanup across multiple files

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
stages_advanced_popup.py New popup view class for displaying and editing stage parameters including limits, offsets, and flip flags
stages_advanced.py New controller class handling stage parameter updates, configuration saving, and microscope switching
menus.py Integration of the new popup into the stage control menu and synchronization with existing stage limits functionality
__init__.py Registration of the new controller in the sub-controllers module
configuration_controller.py Enhanced configuration management with update methods and analog stage detection
channels_tab.py Code formatting improvements for better readability
stages.py Minor formatting and whitespace cleanup
main.py Simplified warning message for non-Windows platforms
config.py Code formatting improvements and cleanup

Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 29.41176% with 192 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.87%. Comparing base (dde12ca) to head (18616f3).
⚠️ Report is 26 commits behind head on develop.

Files with missing lines Patch % Lines
src/navigate/view/popups/stages_advanced_popup.py 12.50% 70 Missing ⚠️
...gate/controller/sub_controllers/stages_advanced.py 23.17% 63 Missing ⚠️
src/navigate/tools/file_functions.py 7.40% 25 Missing ⚠️
src/navigate/controller/sub_controllers/menus.py 14.28% 12 Missing ⚠️
...rc/navigate/controller/configuration_controller.py 76.59% 11 Missing ⚠️
.../navigate/view/main_window_content/channels_tab.py 46.15% 7 Missing ⚠️
src/navigate/config/config.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1116      +/-   ##
===========================================
- Coverage    54.24%   53.87%   -0.37%     
===========================================
  Files          186      190       +4     
  Lines        21420    21681     +261     
===========================================
+ Hits         11619    11681      +62     
- Misses        9801    10000     +199     
Flag Coverage Δ
unittests 53.87% <29.41%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

AdvancedImagingUTSW and others added 3 commits July 25, 2025 10:58
Introduces support for stage offsets in the configuration controller and advanced stage parameters popup. Updates type hints and refactors related methods to handle offsets, ensuring the view and controller can display and update stage offset values alongside limits and flip flags.
@AdvancedImagingUTSW AdvancedImagingUTSW merged commit 84b7969 into develop Jul 30, 2025
1 check passed
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