Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -12,7 +12,7 @@ public class LightSheetManagerPlugin implements MenuPlugin, SciJavaPlugin {
public static final String copyright = "Applied Scientific Instrumentation (ASI), 2022-2026";
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.5.2";
public static final String version = "0.5.3";

private Studio studio_;
private LightSheetManager model_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public boolean prepareControllerForAcquisitionSide(
// for stage scanning we define the piezo position to be the home position (normally 0)
// this is basically required for interleaved mode (otherwise piezo would be moving every slice)
// and by convention we'll do it for all stage scanning
piezoCenter = piezo_.getHomePosition();
piezoCenter = piezo_.getHomePosition() * 1000.0; // convert to mm
} else {
// TODO: add centerAtCurrentZ to acqSettings
final boolean centerAtCurrentZ = false;
Expand All @@ -465,13 +465,17 @@ public boolean prepareControllerForAcquisitionSide(
// we modify it if we are taking "extra slice" for synchronous/overlap
int numSlicesHW = settings.volumeSettings().slicesPerView();

// tweak the parameters if we are using synchronous/overlap mode
// object is to get exact same piezo/scanner positions in first
// N frames (piezo/scanner will move to N+1st position but no image taken)
// tweak the piezo parameters if we are using synchronous/overlap mode
// object is to get exact same piezo/scanner positions in first N frames (piezo/scanner will move to N+1st position but no image taken)
// amplitude is (N-1)*stepSize and artificially make N*stepSize instead => multiply amplitude by (N)/(N-1)
// offset shifts by half a step
final CameraMode cameraMode = settings.cameraMode();
if (cameraMode == CameraMode.OVERLAP) {
piezoAmplitude *= numSlicesHW / (numSlicesHW - 1.0);
piezoCenter += piezoAmplitude / (2 * numSlicesHW);
if (settings.volumeSettings().slicesPerView() > 1) {
piezoAmplitude *= numSlicesHW / (numSlicesHW - 1.0);
}
// was piezoCenter += piezoAmplitude/(2*numSlicesHW) which isn't quite the same but close enough that nobody probably noticed
piezoCenter += settings.volumeSettings().sliceStepSize() / 2;
numSlicesHW += 1;
}

Expand Down
Loading