From d5ec6536ac1c554080661fc24362ad1caf710341 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 17 Apr 2024 13:48:38 -0700 Subject: [PATCH] fix null pointer error in scape mode --- .../lightsheetmanager/model/PLogicSCAPE.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java index b769dac..a262242 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/PLogicSCAPE.java @@ -613,16 +613,16 @@ public boolean prepareControllerForAcquisitionSide( } // FIXME: more light sheet setup - final double slope1 = settings.sliceCalibration(1).sliceSlope(); - final double slope2 = settings.sliceCalibration(2).sliceSlope(); - double sliceRate = (view == 1) ? slope1 : slope2; + //final double slope1 = settings.sliceCalibration(1).sliceSlope(); + //final double slope2 = settings.sliceCalibration(2).sliceSlope(); + double sliceRate = settings.sliceCalibration(1).sliceSlope();//(view == 1) ? slope1 : slope2; if (NumberUtils.doublesEqual(sliceRate, 0.0)) { studio_.logs().showError("Calibration slope for view " + view + " cannot be zero. Re-do calibration on Setup tab."); return false; } - final double offset1 = settings.sliceCalibration(1).sliceOffset() + channelOffset; - final double offset2 = settings.sliceCalibration(2).sliceOffset() + channelOffset; - double sliceOffset = (view == 1) ? offset1 : offset2; + //final double offset1 = settings.sliceCalibration(1).sliceOffset() + channelOffset; + //final double offset2 = settings.sliceCalibration(2).sliceOffset() + channelOffset; + double sliceOffset = settings.sliceCalibration(1).sliceOffset() + channelOffset; //(view == 1) ? offset1 : offset2; double sliceAmplitude = piezoAmplitude / sliceRate; double sliceCenter = (piezoCenter - sliceOffset) / sliceRate;