Skip to content
Merged
Show file tree
Hide file tree
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 @@ -147,9 +147,9 @@ interface Builder<T extends Builder<T>> {
T self();

/**
* Creates an immutable instance of DefaultAcquisitionSettings
* Creates an immutable instance of AcquisitionSettings
*
* @return Immutable version of DefaultAcquisitionSettings
* @return Immutable version of AcquisitionSettings
*/
AcquisitionSettings build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ private void createUserInterface() {
add(pnlButtons, "");

pack(); // fit window size to layout
setIconImage(Icons.MICROSCOPE.getImage());
}

private void createEventHandlers() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class AutofocusTab extends Panel implements ListeningPanel {
private ComboBox<AutofocusType> cmbScoringMethod_;
private Button btnRunAutofocus_;

// autofocus options during setup
// autofocus options during acquisition
private CheckBox cbxAutofocusEveryPass_;
private CheckBox cbxAutofocusBeforeAcq_;
private ComboBox<String> cmbAutofocusChannel_; // TODO: impl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private Rectangle customROI() {
// Computes the ROI based on a scaling factor.
private Rectangle computeCenterRectangle(final Rectangle rect, final int scale) {
if (scale < 1) {
model_.studio().logs().showError("scale must be > 1; could not compute ROI!");
model_.studio().logs().showError("scale must be >= 1; could not compute ROI!");
return rect;
}
if (rect.x != 0 || rect.y != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ private void createUserInterface() {
cmbCameraMode_ = new ComboBox<>(modes,
model_.acquisitions().settings().cameraMode(), 140, 20);

// validate that the logical device name exists
final String[] cameraNames = model_.devices().imagingCameraNames();
cbxCameras_ = new ArrayList<>(cameraNames.length);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ public String[] getChannelGroups() {
if (model_.studio().core().getAvailableConfigs(group).size() > 1) {
groups.add(group);
}
// StrVector st = model_.studio().core().getAvailableConfigGroups();
// for (String s : st)
// System.out.println(s);
}
return groups.toArray(String[]::new);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void createUserInterface() {

btnAddChannel_.setToolTipText("Add a new channel to the table.");
btnRemoveChannel_.setToolTipText("Remove the currently selected channel from the table.");
btnRefresh_.setToolTipText("Refresh the channel panel with the latest configuration groups settings.");
btnRefresh_.setToolTipText("Refresh the channel panel with the latest configuration group settings.");

final String[] groupLabels = table_.getChannelGroups();
cmbChannelGroup_ = new ComboBox<>(groupLabels,
Expand Down Expand Up @@ -115,8 +115,6 @@ private void createEventHandlers() {
final ChannelSpec[] channels = table_.getData().getChannels();
model_.acquisitions().settingsBuilder().channelBuilder().data(channels);
model_.acquisitions().updateDurationLabels();
//System.out.println("add channel");
//table_.getData().printChannelData();
});

// remove channel
Expand All @@ -127,7 +125,6 @@ private void createEventHandlers() {
final ChannelSpec[] channels = table_.getData().getChannels();
model_.acquisitions().settingsBuilder().channelBuilder().data(channels);
model_.acquisitions().updateDurationLabels();
//System.out.println("remove row index: " + row);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import java.awt.geom.Point2D;
import java.util.Objects;

// TODO: add tooltips for the buttons!

public class ControlPanel extends Panel implements Subscriber {

public enum Axis {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void createUserInterface() {
txtImagingPosition_.setToolTipText(
"Type an imaging piezo position in μm and press Enter to move there.");
//btnImagingCenterSet_.setToolTipText("Set \"Imaging Center\" value to \"Imaging Piezo\" position. ");
btnSliceZero_.setToolTipText("Move \"Slice Position\" position to 0 degrees.");
btnSliceZero_.setToolTipText("Move \"Slice Position\" to 0 degrees.");
btnImagingZero_.setToolTipText("Move \"Imaging Piezo\" position to 0 μm.");
//btnTestAcq_.setToolTipText("Run a test acquisition.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* A SCAPE panel
* This is only ever build in SCAPE mode...
* This is only ever built in SCAPE mode...
*/
public class SingleAxisPanel extends Panel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import javax.swing.JFrame;

/**
* Utilities for
* Utilities for checking, closing and listening to {@link JFrame} windows.
*/
public final class WindowUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,7 @@ public void setup() {
createCameraDevice(propertyName, deviceName,
CameraLibrary.fromString(deviceLibrary));
}
//deviceMap_.put(propertyName, "");
}
//System.out.println("----------------");

// we don't need this array anymore
//devicesAdded_.clear();

studio_.logs().logMessage("DeviceManager: [End Setup]");
}
Expand Down Expand Up @@ -242,19 +237,6 @@ private void createCameraDevice(final String propertyName, final String deviceNa
}
}

private void createShutterDevice() {

}

private void createXYStageDevice() {

}

// Note: clients should use var when we support Java 11
// public DeviceBase getDevice(final String deviceName) {
// return deviceMap_.get(deviceName);
// }

// TODO: consider using Optional to improve the API
/**
* Returns the device given by {@code deviceName} as type {@code T},
Expand Down Expand Up @@ -457,7 +439,7 @@ public String[] getLoadedDevices() {
/**
* Returns true if the hardware configuration has the LightSheetManager device adapter. The user can
* change the device name of the adapter, but not the device library so that's what we detect. Also,
* the name of the device adapter is cached for later usage. This also set the error text on the model
* the name of the device adapter is cached for later usage. This also sets the error text on the model
* when an error is encountered, this is used in the error user interface.
*
* @return true if the hardware configuration has the device adapter
Expand All @@ -474,7 +456,7 @@ public boolean hasDeviceAdapter() {
if (count > 1) {
model_.setupErrorMessage("You have multiple instances of the LightSheetManager " +
"device adapter in your hardware configuration.");
break; // exit loop because this a failure condition
break; // exit loop because this is a failure condition
}
}
} catch (Exception e) {
Expand Down Expand Up @@ -537,7 +519,7 @@ public boolean hasStageScanning() {

/**
* Creates a configuration group named "System" that includes all device properties
* the Light Sheet Manager device adapter.
* of the Light Sheet Manager device adapter.
*/
public void createConfigGroup() {
final String groupName = "System";
Expand Down Expand Up @@ -583,7 +565,7 @@ public void createConfigGroup() {
* Returns a list of new properties added to the configuration group.
*
* @param groupName the group name to check
* @param configName the configuration group to check
* @param configName the configuration preset to check
* @return an ArrayList of new properties
*/
private ArrayList<String> updateConfig(final String groupName, final String configName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,36 +306,6 @@ boolean run() {
}
}


// --- testing code below ---
// StrVector deviceNames = core_.getLoadedDevices();
// for (String deviceName : deviceNames) {
// System.out.println("deviceName: " + deviceName);
// StrVector propertyNames;
// try {
// propertyNames = core_.getDevicePropertyNames(deviceName);
// } catch (Exception e) {
// propertyNames = null;
// }
//
// Gson gsonObj = new Gson();
// HashMap<String, String> deviceProps = new HashMap<>();
// for (String propName : propertyNames) {
// String propValue;
// try {
// propValue = core_.getProperty(deviceName, propName);
// } catch (Exception e) {
// propValue = "";
// System.out.println("failed!");
// }
// deviceProps.put(propName, propValue);
// //System.out.println(propName);
// }
//
// String jsonStr = gsonObj.toJson(deviceProps);
// System.out.println(jsonStr);
// }

updateSettings();

// The run snapshot: everything below reads this, never acqSettings_, so an edit made while
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ public AcquisitionEvent next() {
* describes, against the core's current XY and focus devices.
*
* @param positionList the list of positions to iterate over
* @return
* @return a function that makes one event per position from the event it is given
*/
public static Function<AcquisitionEvent, Iterator<AcquisitionEvent>> positions(
PositionList positionList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,4 @@ public double getChannelOffset(final String channelName) {
}
return 0.0;
}

public void printChannelData() {
System.out.println("[ChannelTableData]");
for (ChannelSpec channel : channels_) {
System.out.println(channel);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private int parsePropertyInt(final String propertyName, final int defaultValue)
return Integer.parseInt(getProperty(propertyName));
} catch (NumberFormatException e) {
studio_.logs().logError("Error parsing " + propertyName
+ " from the device adapter, use default value " + defaultValue);
+ " from the device adapter, using default value " + defaultValue);
return defaultValue;
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public Map<String, DeviceType> deviceTypeMap() {
* <p>
* A "Position Device" is a StageDevice, XYStageDevice, or GalvoDevice.
*
* @return an array of internal devices names for all position devices
* @return an array of internal device names for all position devices
*/
public String[] positionDevices() {
return deviceMap().entrySet().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected void applyTriggerMode(CameraMode cameraMode) {
setProperty(Properties.OVERLAP, Values.OFF);

// Note: the following applies to single view mode, the issue is not present in dual view mode:
// only shutter speeds < 4 work with the 200 Mhz slow scan mode, shutter speeds >= 5 will miss 1 image
// only shutter speeds < 4 work with the 200 MHz slow scan mode, shutter speeds >= 5 will miss 1 image

double maxLineScanSpeed = 104166.6667;
if (isSlowReadout()) {
Expand Down Expand Up @@ -192,7 +192,7 @@ public double getResetTime(CameraMode cameraMode) {
return cameraReadoutTime + (numRowsOverhead * rowReadoutTime);
}

// Note: at some point the Andor Zyla 4.2 camera changed it's PixelReadoutRate property value
// Note: at some point the Andor Zyla 4.2 camera changed its PixelReadoutRate property value
// for the slow scan speed to start with "200 MHz" instead of "216 MHz".
private boolean isSlowReadout() {
if (isZyla55()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import java.awt.Rectangle;

/**
* Support for the DemoCamera in DHub.
* Support for the DemoCamera device adapter.
* <p>Note: this is for demo configurations.
* <p>Device Adapter: DHub
* <p>Camera Support: DemoCamera
* <p>Device Adapter: DemoCamera
* <p>Camera Support: DCam
*/
public class DemoCamera extends CameraBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ protected void applyTriggerMode(final CameraMode cameraMode) {
try {
lowerLimit = core_.getPropertyLowerLimit(deviceName_, Properties.INTERNAL_LINE_INTERVAL);
} catch (Exception ignore) {
// ignore => will set the HAMAMATSU_LINE_INTERVAL property
// ignore => will set the INTERNAL_LINE_INTERVAL property
// to the rowTime without considering the lower limit
}
setProperty(Properties.INTERNAL_LINE_INTERVAL, String.valueOf((Math.max(rowTime, lowerLimit))));
//props_.setPropValue(devKey, Properties.Keys.HAMAMATSU_LINE_INTERVAL, Math.max(rowTime, lowerLimit));
break;
case EDGE:
setProperty(Properties.TRIGGER_ACTIVE, Values.EDGE);
Expand Down Expand Up @@ -193,7 +192,7 @@ public double getResetTime(final CameraMode cameraMode) {
final double resetTimeMs = camReadoutTime + (numRowsOverhead * rowReadoutTime);
studio_.logs().logDebugMessage("camera reset time computed as "
+ resetTimeMs + " for camera " + deviceName_);
return resetTimeMs; // assume 10ms readout if not otherwise possible to calculate
return resetTimeMs;
}
}

Expand Down
Loading