Skip to content

Commit

Permalink
Merge pull request #273 from bls337/main
Browse files Browse the repository at this point in the history
move PositionList validation to setup
  • Loading branch information
bls337 authored Apr 25, 2024
2 parents 5953d15 + e360e89 commit c212c99
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ public AcquisitionEngineSCAPE(final LightSheetManagerModel model) {

@Override
boolean setup() {

// make sure that there are positions in the PositionList
if (acqSettings_.isUsingMultiplePositions()) {
final int numPositions = studio_.positions().getPositionList().getNumberOfPositions();
if (numPositions == 0) {
studio_.logs().showError(("XY positions expected but the position list is empty"));
return false;
}
}

return true;
}

Expand Down Expand Up @@ -394,7 +404,7 @@ public AcquisitionEvent run(AcquisitionEvent event) {
// TODO: Cameras are now ready to receive triggers, so we can send (software) trigger
// to the tiger to tell it to start outputting TTLs

if (isUsingPLC && controllerInstance != null) { // if not in demo mode
if (isUsingPLC) { // if not in demo mode
// TODO: is this the best place to set state to idle?
ASIScanner scanner = model_.devices().getDevice("IllumSlice");
// need to set to IDLE to re-arm for each z-stack
Expand Down Expand Up @@ -454,9 +464,6 @@ public void close() {

// Loop 1: XY positions
PositionList pl = MMStudio.getInstance().positions().getPositionList();
if (acqSettings_.isUsingMultiplePositions() && (pl.getNumberOfPositions() == 0)) {
throw new RuntimeException("XY positions expected but position list is empty");
}

String[] cameraNames;
if (demoMode) {
Expand Down

0 comments on commit c212c99

Please sign in to comment.