Skip to content

Commit

Permalink
Merge pull request #264 from bls337/main
Browse files Browse the repository at this point in the history
fix null pointer error in scape mode
  • Loading branch information
bls337 authored Apr 17, 2024
2 parents f383fc7 + d5ec653 commit ecbac20
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ecbac20

Please sign in to comment.