Shift calculation tests

This commit is contained in:
gac-x11ma
2021-06-30 16:15:12 +02:00
parent fee5f5ffba
commit 163c0ff09b
83 changed files with 4434 additions and 318 deletions

View File

@@ -92,7 +92,6 @@ public class Eiger extends Panel {
renderer = new ch.psi.pshell.imaging.Renderer();
jLabel1 = new javax.swing.JLabel();
comboDepth = new javax.swing.JComboBox<>();
buttonStartDetector = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
comboMode = new javax.swing.JComboBox<>();
jLabel3 = new javax.swing.JLabel();
@@ -100,7 +99,6 @@ public class Eiger extends Panel {
deviceValuePanel1 = new ch.psi.pshell.swing.DeviceValuePanel();
deviceValuePanel2 = new ch.psi.pshell.swing.DeviceValuePanel();
deviceValuePanel3 = new ch.psi.pshell.swing.DeviceValuePanel();
buttonStopDetector = new javax.swing.JButton();
deviceValuePanel4 = new ch.psi.pshell.swing.DeviceValuePanel();
buttonShowDetectorPanel = new javax.swing.JButton();
checkMeasurements = new javax.swing.JCheckBox();
@@ -120,7 +118,7 @@ public class Eiger extends Panel {
jLabel1.setText("Bit Depth:");
comboDepth.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "4", "8", "16", "32" }));
comboDepth.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "8", "16", "32" }));
comboDepth.setEnabled(false);
comboDepth.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -128,13 +126,6 @@ public class Eiger extends Panel {
}
});
buttonStartDetector.setText("Start EIGER");
buttonStartDetector.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonStartDetectorActionPerformed(evt);
}
});
jLabel2.setText("Mode:");
comboMode.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Single", "Continuous" }));
@@ -161,13 +152,6 @@ public class Eiger extends Panel {
deviceValuePanel3.setDeviceName("eiger_exposure_rbv");
buttonStopDetector.setText("Stop EIGER");
buttonStopDetector.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonStopDetectorActionPerformed(evt);
}
});
deviceValuePanel4.setDeviceName("eiger_status");
buttonShowDetectorPanel.setText("Control Panel");
@@ -258,9 +242,7 @@ public class Eiger extends Panel {
.addGap(224, 224, 224)
.addComponent(buttonDone, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonStopDetector, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(spinnerExposure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -282,10 +264,8 @@ public class Eiger extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonAquire, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonStartDetector)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(118, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -301,7 +281,7 @@ public class Eiger extends Panel {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonStartDetector, buttonStopDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, spinnerExposure});
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, spinnerExposure});
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -313,8 +293,7 @@ public class Eiger extends Panel {
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonAquire, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonStartDetector)))
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER, false)
.addComponent(jLabel1)
@@ -322,8 +301,7 @@ public class Eiger extends Panel {
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonDone, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonStopDetector)))
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel3)
@@ -353,7 +331,7 @@ public class Eiger extends Panel {
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE))))
);
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {buttonStartDetector, buttonStopDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExposure});
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExposure});
}// </editor-fold>//GEN-END:initComponents
@@ -365,8 +343,6 @@ public class Eiger extends Panel {
buttonDoneActionPerformed(null);
eiger.waitState(State.Ready, 10000); //Timeout of 10s
}
//((ch.psi.pshell.device.Camera) getDevice("eiger")).stop();
//TimeUnit.SECONDS.sleep(1);
if (comboDepth.getSelectedIndex()!=comboDepth.getItemCount()) {
Integer value = Integer.valueOf((String)comboDepth.getSelectedItem());
bitDepth.write(value);
@@ -377,19 +353,6 @@ public class Eiger extends Panel {
}
}//GEN-LAST:event_comboDepthActionPerformed
private void buttonStartDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartDetectorActionPerformed
try {
evalAsync("start_eiger_ioc()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonStartDetectorActionPerformed
private void comboModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboModeActionPerformed
try{
if (!updatingControls){
@@ -398,8 +361,6 @@ public class Eiger extends Panel {
buttonDoneActionPerformed(null);
eiger.waitState(State.Ready, 10000); //Timeout of 10s
}
//((ch.psi.pshell.device.Camera) getDevice("eiger")).stop();
//TimeUnit.SECONDS.sleep(1);
Integer value = comboMode.getSelectedIndex();
if (value==1){
value++;
@@ -428,19 +389,6 @@ public class Eiger extends Panel {
}
}//GEN-LAST:event_spinnerExposureStateChanged
private void buttonStopDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStopDetectorActionPerformed
try {
evalAsync("stop_eiger_ioc()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonStopDetectorActionPerformed
private void buttonShowDetectorPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonShowDetectorPanelActionPerformed
try {
showDevicePanel("eiger");
@@ -553,8 +501,6 @@ public class Eiger extends Panel {
private javax.swing.JButton buttonDone;
private javax.swing.JButton buttonOpenVG10;
private javax.swing.JButton buttonShowDetectorPanel;
private javax.swing.JButton buttonStartDetector;
private javax.swing.JButton buttonStopDetector;
private javax.swing.JCheckBox checkMeasurements;
private javax.swing.JComboBox<String> comboDepth;
private javax.swing.JComboBox<String> comboMode;