Set pixel size when equal to 1
This should cause the explorer test to fail - which I will fix in https://github.com/tlambert03/napari-micromanager/pull/134 opened separately because this is relatively simple. Also this fix is needed to get the updated explorer tests to behave properly.
based on #132 to get working tests. Only commit here is: https://github.com/tlambert03/napari-micromanager/commit/1994be80b850ca4d8a150e278e058a2a230af516
There actually may be more here to get right than I thought - I don't fully understand this pixel size stuff.
But this is no longer causing #134 to fail because I fixed the core instancing over there
@ianhi
To make the update_pixel_size method in the core working properly I think we need to:
- modify
_camera_widget.py: from:self.px_size_spinbox.setMinimum(1.0)to :self.px_size_spinbox.setMinimum(0.0) self.px_size_spinbox.setValue(0.0) - update
test_objective_device_and_px_size:def test_objective_device_and_px_size(main_window: MainWindow): mmc = main_window._mmc main_window.obj_wdg.objective_comboBox.setCurrentText("10X") assert main_window.obj_wdg.objective_comboBox.currentText() == "10X" assert mmc.getCurrentPixelSizeConfig() == "Res10x" assert mmc.getPixelSizeUm() == 1.0 assert main_window.cam_wdg.px_size_spinbox.value() == 0.0 main_window.obj_wdg.objective_comboBox.setCurrentText("20X") assert mmc.getCurrentPixelSizeConfig() == "Res20x" assert main_window.cam_wdg.px_size_spinbox.value() == 0.0 main_window.cam_wdg.px_size_spinbox.setValue(6.5) assert mmc.getCurrentPixelSizeConfig() == "px_size_Nikon 20X Plan Fluor ELWD" assert mmc.getPixelSizeUm() == 0.325 main_window.cam_wdg.px_size_spinbox.setValue(0) assert mmc.getPixelSizeUm() == 0.325 mmc.deleteConfigGroup("Objective") main_window._refresh_objective_options() assert main_window.obj_wdg.objective_comboBox.currentText() == "Nikon 20X Plan Fluor ELWD" main_window.obj_wdg.objective_comboBox.setCurrentText("Nikon 10X S Fluor") assert mmc.getCurrentPixelSizeConfig() == "Res10x" assert mmc.getPixelSizeUm() == 1.0
@fdrgsp @ianhi ... can you guys let me know if the thing this PR was addressing is still a problem?
let me know if this is still relevant. I'm sorry it sat so long and can help to get it in, but need an update on the need
ping @ianhi ... would love to clean up these remaining three PRs. so let me know if they're still "todo" worthy, review-worthy, or can be cosed
I think this one is no longer necessary happily. will check the others