diff --git a/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java b/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java index ce43e78..0cb88d9 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java +++ b/src/main/java/org/micromanager/lightsheetmanager/LightSheetManagerPlugin.java @@ -14,7 +14,7 @@ public class LightSheetManagerPlugin implements MenuPlugin, SciJavaPlugin { public static final String copyright = "Applied Scientific Instrumentation (ASI), 2022-2024"; public static final String description = "A plugin to control various types of light sheet microscopes."; public static final String menuName = "Light Sheet Manager"; - public static final String version = "0.4.0"; + public static final String version = "0.4.1"; private Studio studio_; private LightSheetManagerFrame frame_; diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicDISPIM.java b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicDISPIM.java index bfa7aaf..24ac444 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicDISPIM.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicDISPIM.java @@ -413,11 +413,10 @@ public boolean prepareStageScanForAcquisition(final double x, final double y, De double xStartUm; double xStopUm; if (scanFromCurrent) { + xStartUm = x; if (scanNegative) { - xStartUm = x; xStopUm = x - scanDistance_; } else { - xStartUm = x; xStopUm = x + scanDistance_; } } else { diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java index 2bd55cb..98c1143 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java @@ -235,6 +235,12 @@ public boolean prepareControllerForAcquisition( return false; } + // cache how far we scan each pass for later use + final double speedFactor = GeometryUtils.getStageGeometricSpeedFactor( + settings.scanSettings().scanAngleFirstView(),true); + actualStepSizeUm_ = settings.volumeSettings().sliceStepSize() * (actualMotorSpeed / requestedMotorSpeed); + scanDistance_ = settings.volumeSettings().slicesPerView() * actualStepSizeUm_ * speedFactor; + if (!settings.isUsingMultiplePositions()) { // use current position as center position for stage scanning // multi-position situation is handled in position-switching code instead