Skip to content

Camera cooling settings#1171

Merged
AdvancedImagingUTSW merged 6 commits intoTheDeanLab:developfrom
annie-xd-wang:camera-cooling-settings
Jan 29, 2026
Merged

Camera cooling settings#1171
AdvancedImagingUTSW merged 6 commits intoTheDeanLab:developfrom
annie-xd-wang:camera-cooling-settings

Conversation

@annie-xd-wang
Copy link
Collaborator

This PR adds automatic camera temperature refreshing for 10 seconds after camera cooling is enabled. Users can also manually refresh the temperature by clicking the Refresh button afterward.

When the same physical camera is shared across multiple microscopes, switching microscopes will preserve the cooling settings and display the current state correctly.

@AdvancedImagingUTSW
Copy link
Collaborator

@TrungNguyenDuc - I assume your system inspired this PR. Could you please confirm that it is functioning as you hoped?

Copy link
Contributor

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 adds automatic camera temperature monitoring for 10 seconds after camera cooling is enabled, with a manual refresh button available afterward. When multiple microscopes share the same physical camera, switching between them preserves and displays the correct cooling state.

Changes:

  • Modified command routing to support microscope-specific camera cooling commands
  • Added threaded temperature refresh mechanism that runs for 10 seconds after cooling is enabled
  • Implemented camera state synchronization across microscopes sharing the same physical camera
  • Enhanced synthetic camera to simulate realistic temperature changes during cooling

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
src/navigate/model/model.py Routes camera cooling commands to specific microscope instances instead of active microscope
src/navigate/model/microscope.py Implements temperature refresh thread with event-based control and new command handlers
src/navigate/model/devices/camera/synthetic.py Adds temperature simulation that decreases when cooling is enabled
src/navigate/model/devices/camera/hamamatsu.py Retrieves and stores initial cooling state from hardware during initialization
src/navigate/controller/sub_controllers/camera_settings.py Manages UI state for cooling controls and synchronizes cooling state across microscopes
src/navigate/controller/controller.py Updates command routing to handle new camera cooling commands
src/navigate/controller/configuration_controller.py Adds method to determine if microscopes use the same physical camera

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AdvancedImagingUTSW
Copy link
Collaborator

@annie-xd-wang - A few of the copilot recommendations seem decent. Maybe we should adopt a few of these?

@TrungNguyenDuc
Copy link
Contributor

TrungNguyenDuc commented Jan 29, 2026 via email

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 9.47368% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.49%. Comparing base (439879f) to head (b499a10).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/navigate/model/microscope.py 8.88% 41 Missing ⚠️
...gate/controller/sub_controllers/camera_settings.py 0.00% 19 Missing ⚠️
...rc/navigate/controller/configuration_controller.py 5.55% 17 Missing ⚠️
src/navigate/model/devices/camera/synthetic.py 37.50% 5 Missing ⚠️
src/navigate/model/devices/camera/hamamatsu.py 0.00% 2 Missing ⚠️
src/navigate/model/model.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1171      +/-   ##
===========================================
- Coverage    52.66%   52.49%   -0.17%     
===========================================
  Files          197      197              
  Lines        23885    23968      +83     
===========================================
+ Hits         12580    12583       +3     
- Misses       11305    11385      +80     
Flag Coverage Δ
unittests 52.49% <9.47%> (-0.17%) ⬇️

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 AdvancedImagingUTSW merged commit f320adb into TheDeanLab:develop Jan 29, 2026
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.

3 participants