diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java index d87257f..db18900 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java @@ -230,6 +230,7 @@ public boolean prepareControllerForAcquisition( xyStage_.setScanPattern(isStageScan2Sided ? ASIXYStage.ScanPattern.SERPENTINE : ASIXYStage.ScanPattern.RASTER); + xyStage_.setScanSettlingTime(acqSettings_.volumeSettings().delayBeforeView()); if (xyStage_.getAxisPolarityX() != ASIXYStage.AxisPolarity.NORMAL) { studio_.logs().showError( @@ -351,7 +352,7 @@ public boolean prepareStageScanForAcquisition(final double x, final double y, De xyStage_.setSlowAxisStop(y / 1000); zSpeedZero_ = true; // will turn false if we are doing planar correction - return false; + return true; // return preparePlanarCorrectionForAcquisition(); TODO: add planar correction later } diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java index e3c3bc9..301436b 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java @@ -40,6 +40,7 @@ import java.io.IOException; import java.util.ArrayList; + public class AcquisitionEngineSCAPE extends AcquisitionEngine { private double origSpeedX_; @@ -149,29 +150,33 @@ boolean run() { } // --- testing code below --- -// String plcName = "Scanner:AB:33"; -// StrVector propertyNames; -// try { -// propertyNames = core_.getDevicePropertyNames(plcName); -// } catch (Exception e) { -// propertyNames = null; -// } -// -// Gson gsonObj = new Gson(); -// HashMap deviceProps = new HashMap<>(); -// for (String propName : propertyNames) { -// String propValue; +// StrVector deviceNames = core_.getLoadedDevices(); +// for (String deviceName : deviceNames) { +// System.out.println("deviceName: " + deviceName); +// StrVector propertyNames; // try { -// propValue = core_.getProperty(plcName, propName); +// propertyNames = core_.getDevicePropertyNames(deviceName); // } catch (Exception e) { -// propValue = ""; -// System.out.println("failed!"); +// propertyNames = null; // } -// deviceProps.put(propName, propValue); -// //System.out.println(propName); +// +// Gson gsonObj = new Gson(); +// HashMap deviceProps = new HashMap<>(); +// for (String propName : propertyNames) { +// String propValue; +// try { +// propValue = core_.getProperty(deviceName, propName); +// } catch (Exception e) { +// propValue = ""; +// System.out.println("failed!"); +// } +// deviceProps.put(propName, propValue); +// //System.out.println(propName); +// } +// +// String jsonStr = gsonObj.toJson(deviceProps); +// System.out.println(jsonStr); // } -// String jsonStr = gsonObj.toJson(deviceProps); -// System.out.println(jsonStr); setAcquisitionSettings(asb_.build()); diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIXYStage.java b/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIXYStage.java index 47da0a2..f5fe38e 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIXYStage.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/devices/vendor/ASIXYStage.java @@ -158,6 +158,14 @@ public ScanState getScanState() { return ScanState.fromString(getProperty(Properties.SCAN_STATE)); } + public void setScanSettlingTime(final double milliseconds) { + setPropertyFloat(Properties.SCAN_SETTLING_TIME, milliseconds); + } + + public double getScanSettlingTime() { + return getPropertyFloat(Properties.SCAN_SETTLING_TIME); + } + public static class Properties { public static final String AXIS_POLARITY_X = "AxisPolarityX"; public static final String AXIS_POLARITY_Y = "AxisPolarityY"; @@ -173,6 +181,7 @@ public static class Properties { public static final String SCAN_NUM_LINES = "ScanNumLines"; public static final String SCAN_PATTERN = "ScanPattern"; public static final String SCAN_STATE = "ScanState"; + public static final String SCAN_SETTLING_TIME = "ScanSettlingTime(ms)"; public static final String SCAN_FAST_AXIS_START_POSITION = "ScanFastAxisStartPosition(mm)"; public static final String SCAN_FAST_AXIS_STOP_POSITION = "ScanFastAxisStopPosition(mm)";