Skip to content

Commit

Permalink
Fixed problem never sequencing when adding
Browse files Browse the repository at this point in the history
other oneDDrives in postionlist.  Also adds some Javadoc
(more is needed).
  • Loading branch information
Nico Stuurman committed Apr 11, 2024
1 parent f867b2f commit 37675a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/org/micromanager/acqj/internal/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,10 @@ private static boolean isSequencable(List<AcquisitionEvent> previousEvents,
// arbitrary z stages
// TODO implement sequences along arbitrary other stage decives
for (String stageDevice : previousEvent.getStageDeviceNames() ) {
return false;
if (!nextEvent.getStageSingleAxisStagePosition(stageDevice)
.equals(previousEvent.getStageSingleAxisStagePosition(stageDevice))) {
return false;
}
}

//xy stage
Expand Down
15 changes: 14 additions & 1 deletion src/main/java/org/micromanager/acqj/main/AcquisitionEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum SpecialFlag {
private Double timeout_ms_ = null;

private String configGroup_, configPreset_ = null;
private Double exposure_ = null; //leave null to keep exposaure unchanged
private Double exposure_ = null; //leave null to keep exposure unchanged

private Long miniumumStartTime_ms_ = null; //For pausing between time points

Expand Down Expand Up @@ -532,12 +532,25 @@ public void setStageCoordinate(String deviceName, double v) {
setStageCoordinate(deviceName, v, null);
}

/**
* Sets the (desired) position for the requested single axis stage.
*
* @param deviceName Name (as it is known to Micro-Manager) of the stage
* @param v Desired position in microns
* @param axisName Optional name of this axis. Can be null (I am not sure what this is used for).
*/
public void setStageCoordinate(String deviceName, double v, String axisName) {
stageCoordinates_.put(deviceName, v);
stageDeviceNamesToAxisNames_.put(deviceName, axisName == null ? deviceName : axisName);
}


/**
* returns the position of this stage in this event.
*
* @param deviceName Name (as it is known to Micro-Manager) of the stage
* @return Position of this stage in microns, or null if the stage is not found in this event
*/
public Double getStageSingleAxisStagePosition(String deviceName) {
if (deviceName == null) {
return null;
Expand Down

0 comments on commit 37675a5

Please sign in to comment.