Skip to content

Commit

Permalink
Merge pull request #201 from bls337/main
Browse files Browse the repository at this point in the history
slicesPerVolume should be slicesPerView
  • Loading branch information
bls337 authored Oct 13, 2023
2 parents 127faaa + 2bd2984 commit 28b42fc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Builder {
*/
Builder delayBeforeView(final double viewDelayMs);

Builder slicesPerVolume(final int n);
Builder slicesPerView(final int n);

Builder sliceStepSize(final double um);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public VolumeSettings.Builder delayBeforeView(final double viewDelayMs) {
}

@Override
public VolumeSettings.Builder slicesPerVolume(final int n) {
public VolumeSettings.Builder slicesPerView(final int n) {
slicesPerView_ = n;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void createEventHandlers() {

spnNumSlices_.registerListener(e -> {
model_.acquisitions().settingsBuilder().volumeSettingsBuilder()
.slicesPerVolume(spnNumSlices_.getInt());
.slicesPerView(spnNumSlices_.getInt());
});

spnSliceStepSize_.registerListener(e -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void computeGrid() {
// TODO: update GUI with values, aliases for asb and vsb?
final double speedFactor = GeometryUtils.DISPIM.getStageGeometricSpeedFactor(true);
model_.acquisitions().settingsBuilder().volumeSettingsBuilder().sliceStepSize(Math.abs(deltaX_)/speedFactor);
model_.acquisitions().settingsBuilder().volumeSettingsBuilder().slicesPerVolume(numX);
model_.acquisitions().settingsBuilder().volumeSettingsBuilder().slicesPerView(numX);
// move to X center if we aren't generating a position list with it
if (!useY_ && !useZ_) {
xyStage.setXYPosition(centerX, xyStage.getXYPosition().y); // TODO: make convenience method?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.micromanager.data.internal.DefaultSummaryMetadata;
import org.micromanager.data.internal.ndtiff.NDTiffAdapter;
import org.micromanager.internal.MMStudio;
import org.micromanager.lightsheetmanager.api.data.AcquisitionMode;
import org.micromanager.lightsheetmanager.api.data.CameraMode;
import org.micromanager.lightsheetmanager.api.data.GeometryType;
import org.micromanager.lightsheetmanager.api.data.MultiChannelMode;
Expand Down Expand Up @@ -653,16 +652,32 @@ private boolean doHardwareCalculations(PLogicSCAPE plc) {
&& (timepointIntervalMs < timepointDuration*1.2)) {
//acqSettings_.setHardwareTimesPoints(false);
asb_.useHardwareTimePoints(false);
// TODO: WARNING
// TODO: uncomment when working
// studio_.logs().showError("Time point interval may not be sufficient "
// + "depending on actual time required to change positions. "
// + "Proceed at your own risk.");
}
}

// TODO: make sure position updater is turned off!
// if (acqSettings_.isUsingHardwareTimePoints()) {
// final int numTimePoints = acqSettings_.numTimePoints();
// final int numChannels = acqSettings_.numChannels();
// final int slicePerView = acqSettings_.volumeSettings().slicesPerView();
// // in hardwareTimepoints case we trigger controller once for all timepoints => need to
// // adjust number of frames we expect back from the camera during MM's SequenceAcquisition
// if (acqSettings_.cameraMode() == CameraMode.OVERLAP) {
// // For overlap mode we are send one extra trigger per channel per side for volume-switching (both PLogic and not)
// // This holds for all multichannel modes, just the order in which the extra trigger comes varies
// // Very last trigger won't ever return a frame so subtract 1.
// final int hardwareSlicesPerView = (slicePerView + 1) * numChannels * numTimePoints;
// asb_.volumeSettingsBuilder().slicesPerView(hardwareSlicesPerView - 1);
// } else {
// asb_.volumeSettingsBuilder().slicesPerView(slicePerView * numTimePoints);
// }
// }

// FIXME: what is happening here? getting timing error
double sliceDuration = asb_.timingSettingsBuilder().sliceDuration();
if (exposureTime + cameraReadoutTime > sliceDuration) {
//System.out.println(sliceDuration);
// should only possible to mess this up using advanced timing settings
// or if there are errors in our own calculations
studio_.logs().showError("Exposure time of " + exposureTime +
Expand Down

0 comments on commit 28b42fc

Please sign in to comment.