Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache scanDistance_ #268

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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_;
Original file line number Diff line number Diff line change
@@ -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 {
Original file line number Diff line number Diff line change
@@ -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
Loading