Skip to content

Commit

Permalink
Merge pull request #202 from bls337/main
Browse files Browse the repository at this point in the history
add warning for software channel switching in hardware timepoints
  • Loading branch information
bls337 authored Oct 17, 2023
2 parents 28b42fc + da69bfb commit 7dfa859
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ public DefaultTimingSettings.Builder getTimingFromPeriodAndLightExposure(Default
sliceDuration = getSliceDuration(delayBeforeScan, scanDuration, scansPerSlice, delayBeforeLaser, laserDuration, delayBeforeCamera, cameraDuration);
if (sliceDuration < (cameraExposure + cameraReadoutTime)) {
delayBeforeCamera += 0.25f;
delayBeforeLaser += 0.25;
delayBeforeLaser += 0.25f;
delayBeforeScan += 0.25f;
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,12 +638,14 @@ private boolean doHardwareCalculations(PLogicSCAPE plc) {
// experimentally need ~0.5 sec to set up acquisition, this gives a bit of cushion
// cannot do this in getCurrentAcquisitionSettings because of mutually recursive
// call with computeActualVolumeDuration()
boolean isUsingHardwareTimePoints = false; // TODO: asb_ not built yet
if (acqSettings_.isUsingTimePoints()
&& acqSettings_.numTimePoints() > 1
&& timepointIntervalMs < (timepointDuration + 750)
&& !acqSettings_.isUsingStageScanning()) {
// acqSettings_.useHardwareTimesPoints(true);
asb_.useHardwareTimePoints(true);
isUsingHardwareTimePoints = true;
}

if (acqSettings_.isUsingMultiplePositions()) {
Expand Down Expand Up @@ -688,6 +690,15 @@ private boolean doHardwareCalculations(PLogicSCAPE plc) {
return false; // early exit
}

// must use PLogic for channels when using hardware time points
if (isUsingHardwareTimePoints) {
if (acqSettings_.isUsingChannels() && acqSettings_.channelMode() == MultiChannelMode.VOLUME) {
studio_.logs().showError("Cannot use hardware time points (small time point interval) " +
"with software channels (need to use PLogic channel switching).");
return false;
}
}

double extraChannelOffset = 0.0;
plc.prepareControllerForAcquisitionSCAPE(acqSettings_, extraChannelOffset);
return true;
Expand Down Expand Up @@ -807,7 +818,7 @@ public DefaultTimingSettings.Builder getTimingFromPeriodAndLightExposure(Default
sliceDuration = getSliceDuration(delayBeforeScan, scanDuration, scansPerSlice, delayBeforeLaser, laserDuration, delayBeforeCamera, cameraDuration);
if (sliceDuration < (cameraExposure + cameraReadoutTime)) {
delayBeforeCamera += 0.25f;
delayBeforeLaser += 0.25;
delayBeforeLaser += 0.25f;
delayBeforeScan += 0.25f;
}
break;
Expand Down

0 comments on commit 7dfa859

Please sign in to comment.