Repository navigation
Commit e34fab3
Add channel-aware defocus reference status (#1225)
* Add channel-aware defocus plan
* Implement channel-aware defocus calibration
* Add visible defocus reference status
Display the active defocus reference in the main Channel Settings table so users can see whether the zero-defocus plane is set and which channel/focus position established it.
Update the autofocus popup channel selector to use CH labels while preserving channel_n keys internally, and publish captured autofocus references to the main GUI.
Publish runtime zero-defocus reference updates from microscope channel preparation and clear the reference when manual focus moves invalidate it.
Tests cover autofocus channel label conversion, main-GUI defocus reference updates, and model reference publication/clearing.
* Fix autofocus test execute mock leakage
Scope the mocked parent_controller.execute with patch.object in the autofocus calibration test so the package-scoped dummy_controller restores its real execute method after the assertion.
This fixes the Windows CI order failure where camera view move_stage tests ran after the autofocus test and saw an empty command list because DummyController.execute had been replaced by a MagicMock.
Confirmed the failure locally with the autofocus/camera-view ordering reproducer before the fix, then verified the reproducer and the affected controller test files pass in the navigate conda environment.
* Prepare autofocus channel in feature init
Move target-channel preparation out of Autofocus.run() and into the signal init hook so standalone autofocus and live-mode injected autofocus share the same channel-selection behavior.
This addresses the PR review concern that live autofocus injection preserves target channel args but bypasses Autofocus.run(), which previously meant prepare_channel() was never called for the injected feature instance.
Tests now verify that run() only orchestrates standalone autofocus loading while pre_func_signal() prepares either the requested channel or the next selected channel fallback.
* Restore defocus reference after autofocus completion
Autofocus stage moves publish a transient defocus_reference=None event through the model, which can clear the main Channel Settings label during Regular and Populate Defocus runs.
Capture Reference already republished the saved reference after completion. Extend that restoration to other autofocus completions whenever an autofocus calibration reference exists, so the main GUI label does not remain at Not Set after Populate Defocus or Regular autofocus.
Adds regression coverage for Populate Defocus and Regular autofocus completion preserving the saved defocus reference event.
* add "Auto Defocus" option and warning info if selected channel is not activated
* fix tests
* fix(defocus): handle pre-existing values correctly
* update doc
* fix tests
* Update test_channels_tab.py
* docs: design PR 1225 GUI refresh
* docs: refresh defocus GUI screenshots
* docs: explain channel defocus calibration
* docs: complete PR 1225 GUI plan
---------
Co-authored-by: Annie Wang <annie.xd.wang@gmail.com>1 parent 8fc54c3 commit e34fab3
28 files changed
Lines changed: 2110 additions & 80 deletions
File tree
- docs
- source
- 01_getting_started
- 02_user_guide/03_user_interface_walkthrough
- images
- superpowers
- plans
- specs
- test
- config
- controller/sub_controllers
- model
- features
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
232 | 243 | | |
233 | 244 | | |
234 | 245 | | |
| |||
1590 | 1601 | | |
1591 | 1602 | | |
1592 | 1603 | | |
1593 | | - | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1594 | 1614 | | |
1595 | | - | |
1596 | | - | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
1597 | 1620 | | |
1598 | 1621 | | |
1599 | 1622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
| |||
Loading
Loading
Loading
0 commit comments