You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that in order to be fully safe that logic needs to check the focus device direction with core.getFocusDirection.
From the docs:
Returns +1 if increasing position brings objective closer to sample, -1 if increasing position moves objective away from sample, or 0 if unknown. (Make sure to check for zero!)
Yep sounds good. Note that pymmcore-plus/napari-micromanager#119 didn't add that, it's been there the whole time, just refactored there to maintain the existing behavior.
I agree that for a safety mechanism it makes too many assumptions... and as noted in the refactor, it also needs a preference (since moving anything should probably be opt in in some way)
ianhi
transferred this issue from pymmcore-plus/napari-micromanager
Sep 22, 2023
pymmcore-plus/napari-micromanager#119 added some logic to move the Z position on switching an objective
pymmcore-widgets/src/pymmcore_widgets/_objective_widget.py
Lines 104 to 112 in 2eed0a7
I think that in order to be fully safe that logic needs to check the focus device direction with
core.getFocusDirection
.From the docs:
https://micro-manager.org/apidoc/MMCore/latest/class_c_m_m_core.html#ace092b60e0d8138c7c68cf6baebfc8af
If it's 0 then I think we can pop up a dialog asking what to do. For -1 I think the move it query the stage limits and then move to the max position.
(I have no sense of if any devices have -1 for this, but I'd hate to be person who found out that my device does :) )
The text was updated successfully, but these errors were encountered: