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

fix null pointer error in scape mode #264

Merged
merged 1 commit into from
Apr 17, 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
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
Loading