Spring 12.20

This commit is contained in:
gac-x11ma
2020-12-10 11:45:36 +01:00
parent b0718601c2
commit 1b9ae6a3e2
7 changed files with 183 additions and 121 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#Wed Dec 09 13:19:23 CET 2020
#Thu Dec 10 10:39:59 CET 2020
HARMONIC_ID_1=1
RSYNC_USER=
OUTLIERS_THRESHOLD=1000000000
+4 -4
View File
@@ -1,4 +1,4 @@
#Wed Dec 09 15:05:53 CET 2020
LastRunDate=201209
FileSequentialNumber=4799
DaySequentialNumber=25
#Thu Dec 10 11:40:14 CET 2020
LastRunDate=201210
FileSequentialNumber=4808
DaySequentialNumber=5
+36 -36
View File
@@ -486,17 +486,17 @@
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jLabel32" min="-2" max="-2" attributes="0"/>
<Component id="labelEnergya" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="jLabel28" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel22" alignment="0" max="32767" attributes="0"/>
<Component id="labelModeID2a" alignment="0" max="32767" attributes="0"/>
<Component id="labelModeID1a" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deviceValuePanel11" linkSize="18" alignment="0" pref="0" max="32767" attributes="0"/>
<Component id="deviceValuePanel12" linkSize="18" pref="0" max="32767" attributes="0"/>
<Component id="deviceValuePanel2" linkSize="18" alignment="0" min="-2" pref="92" max="-2" attributes="0"/>
<Component id="dvpModeID1a" linkSize="18" alignment="0" pref="0" max="32767" attributes="0"/>
<Component id="dvpModeID2a" linkSize="18" pref="0" max="32767" attributes="0"/>
<Component id="dvpEnergya" linkSize="18" alignment="0" min="-2" pref="92" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
@@ -514,18 +514,18 @@
<Component id="panelImgControls" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel22" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel11" linkSize="19" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="labelModeID1a" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpModeID1a" linkSize="19" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel28" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel12" linkSize="19" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="labelModeID2a" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpModeID2a" linkSize="19" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel32" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel2" linkSize="19" alignment="2" min="-2" pref="17" max="-2" attributes="0"/>
<Component id="labelEnergya" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpEnergya" linkSize="19" alignment="2" min="-2" pref="17" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
@@ -915,34 +915,34 @@
</Container>
</SubComponents>
</Container>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel12">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpModeID2a">
<Properties>
<Property name="deviceName" type="java.lang.String" value="id2_pol"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel32">
<Component class="javax.swing.JLabel" name="labelEnergya">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Energy:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel28">
<Component class="javax.swing.JLabel" name="labelModeID2a">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Mode ID2:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel2">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpEnergya">
<Properties>
<Property name="deviceName" type="java.lang.String" value="energy"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel11">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpModeID1a">
<Properties>
<Property name="deviceName" type="java.lang.String" value="id1_pol"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel22">
<Component class="javax.swing.JLabel" name="labelModeID1a">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Mode ID1:"/>
@@ -979,17 +979,17 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jLabel35" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="labelEnergyb" alignment="1" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="1" groupAlignment="1" max="-2" attributes="0">
<Component id="jLabel34" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel33" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="labelModeID2b" alignment="0" max="32767" attributes="0"/>
<Component id="labelModeID1b" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="deviceValuePanel14" linkSize="20" alignment="0" pref="0" max="32767" attributes="0"/>
<Component id="deviceValuePanel3" linkSize="20" alignment="0" pref="92" max="32767" attributes="0"/>
<Component id="deviceValuePanel13" linkSize="20" pref="0" max="32767" attributes="0"/>
<Component id="dvpModeID2b" linkSize="20" alignment="0" pref="0" max="32767" attributes="0"/>
<Component id="dvpEnergyb" linkSize="20" alignment="0" pref="92" max="32767" attributes="0"/>
<Component id="dvpModeID1b" linkSize="20" pref="0" max="32767" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
@@ -1002,18 +1002,18 @@
<Component id="panelSpectrum" max="32767" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel33" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel13" linkSize="21" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="labelModeID1b" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpModeID1b" linkSize="21" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel34" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel14" linkSize="21" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="labelModeID2b" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpModeID2b" linkSize="21" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel35" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel3" linkSize="21" alignment="2" min="-2" pref="17" max="-2" attributes="0"/>
<Component id="labelEnergyb" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dvpEnergyb" linkSize="21" alignment="2" min="-2" pref="17" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="18" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
@@ -1288,35 +1288,35 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSpecAbortActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel33">
<Component class="javax.swing.JLabel" name="labelModeID1b">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Mode ID1:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel13">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpModeID1b">
<Properties>
<Property name="deviceName" type="java.lang.String" value="id1_pol"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel14">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpModeID2b">
<Properties>
<Property name="deviceName" type="java.lang.String" value="id2_pol"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel34">
<Component class="javax.swing.JLabel" name="labelModeID2b">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Mode ID2:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel35">
<Component class="javax.swing.JLabel" name="labelEnergyb">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Energy:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel3">
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpEnergyb">
<Properties>
<Property name="deviceName" type="java.lang.String" value="energy"/>
</Properties>
+86 -74
View File
@@ -173,12 +173,13 @@ public class Eiger extends Panel {
if (editable) {
comboSwitch.setEnabled(comboImgMethod.getSelectedItem() == ImgMethod.Two_Pol.toString());
labelImgEng1.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
labelImgEng2.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
spinnerImgEng1.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
spinnerImgEng2.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
}
labelImgEng1.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
labelImgEng2.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
spinnerImgEng1.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
spinnerImgEng2.setVisible(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
panelSecondImage.setVisible(comboImgMethod.getSelectedItem() != ImgMethod.Take_Image.toString());
buttonImgStart.setEnabled(getState() == State.Ready);
@@ -199,6 +200,17 @@ public class Eiger extends Panel {
comboSwitch.setSelectedIndex(1);
}
}
boolean id1 = !id.equals("ID2");
boolean id2 = !id.equals("ID1");
dvpModeID1a.setVisible(id1);
labelModeID1a.setVisible(id1);
dvpModeID1b.setVisible(id1);
labelModeID1b.setVisible(id1);
dvpModeID2a.setVisible(id2);
labelModeID2a.setVisible(id2);
dvpModeID2b.setVisible(id2);
labelModeID2b.setVisible(id2);
} catch (Exception ex) {
getLogger().log(Level.WARNING, null, ex);
}
@@ -428,12 +440,12 @@ public class Eiger extends Panel {
comboSwitch = new javax.swing.JComboBox<>();
spinnerImgMeasurements = new javax.swing.JSpinner();
comboImgMethod = new javax.swing.JComboBox<>();
deviceValuePanel12 = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel32 = new javax.swing.JLabel();
jLabel28 = new javax.swing.JLabel();
deviceValuePanel2 = new ch.psi.pshell.swing.DeviceValuePanel();
deviceValuePanel11 = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel22 = new javax.swing.JLabel();
dvpModeID2a = new ch.psi.pshell.swing.DeviceValuePanel();
labelEnergya = new javax.swing.JLabel();
labelModeID2a = new javax.swing.JLabel();
dvpEnergya = new ch.psi.pshell.swing.DeviceValuePanel();
dvpModeID1a = new ch.psi.pshell.swing.DeviceValuePanel();
labelModeID1a = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
panelSpectrum = new javax.swing.JPanel();
jLabel23 = new javax.swing.JLabel();
@@ -456,12 +468,12 @@ public class Eiger extends Panel {
buttonClear = new javax.swing.JButton();
buttonSpecStart = new javax.swing.JButton();
buttonSpecAbort = new javax.swing.JButton();
jLabel33 = new javax.swing.JLabel();
deviceValuePanel13 = new ch.psi.pshell.swing.DeviceValuePanel();
deviceValuePanel14 = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel34 = new javax.swing.JLabel();
jLabel35 = new javax.swing.JLabel();
deviceValuePanel3 = new ch.psi.pshell.swing.DeviceValuePanel();
labelModeID1b = new javax.swing.JLabel();
dvpModeID1b = new ch.psi.pshell.swing.DeviceValuePanel();
dvpModeID2b = new ch.psi.pshell.swing.DeviceValuePanel();
labelModeID2b = new javax.swing.JLabel();
labelEnergyb = new javax.swing.JLabel();
dvpEnergyb = new ch.psi.pshell.swing.DeviceValuePanel();
panelNorm.setBorder(javax.swing.BorderFactory.createTitledBorder("Normalization"));
@@ -995,20 +1007,20 @@ public class Eiger extends Panel {
panelImgControlsLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jPanel5, panelFirstImage, panelSecondImage});
deviceValuePanel12.setDeviceName("id2_pol");
dvpModeID2a.setDeviceName("id2_pol");
jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel32.setText("Energy:");
labelEnergya.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelEnergya.setText("Energy:");
jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel28.setText("Mode ID2:");
labelModeID2a.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelModeID2a.setText("Mode ID2:");
deviceValuePanel2.setDeviceName("energy");
dvpEnergya.setDeviceName("energy");
deviceValuePanel11.setDeviceName("id1_pol");
dvpModeID1a.setDeviceName("id1_pol");
jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel22.setText("Mode ID1:");
labelModeID1a.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelModeID1a.setText("Mode ID1:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
@@ -1028,22 +1040,22 @@ public class Eiger extends Panel {
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel32)
.addComponent(labelEnergya)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel28, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addComponent(labelModeID2a, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelModeID1a, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deviceValuePanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(deviceValuePanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(dvpModeID1a, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(dvpModeID2a, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(dvpEnergya, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE)))))
.addContainerGap())
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonImgAbort, buttonImgStart});
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deviceValuePanel11, deviceValuePanel12, deviceValuePanel2});
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dvpEnergya, dvpModeID1a, dvpModeID2a});
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -1052,16 +1064,16 @@ public class Eiger extends Panel {
.addComponent(panelImgControls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel22)
.addComponent(deviceValuePanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelModeID1a)
.addComponent(dvpModeID1a, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel28)
.addComponent(deviceValuePanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelModeID2a)
.addComponent(dvpModeID2a, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel32)
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelEnergya)
.addComponent(dvpEnergya, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonImgStart)
@@ -1069,7 +1081,7 @@ public class Eiger extends Panel {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {deviceValuePanel11, deviceValuePanel12, deviceValuePanel2});
jPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {dvpEnergya, dvpModeID1a, dvpModeID2a});
jTabbedPane1.addTab("2-Images", jPanel2);
@@ -1264,20 +1276,20 @@ public class Eiger extends Panel {
}
});
jLabel33.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel33.setText("Mode ID1:");
labelModeID1b.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelModeID1b.setText("Mode ID1:");
deviceValuePanel13.setDeviceName("id1_pol");
dvpModeID1b.setDeviceName("id1_pol");
deviceValuePanel14.setDeviceName("id2_pol");
dvpModeID2b.setDeviceName("id2_pol");
jLabel34.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel34.setText("Mode ID2:");
labelModeID2b.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelModeID2b.setText("Mode ID2:");
jLabel35.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel35.setText("Energy:");
labelEnergyb.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
labelEnergyb.setText("Energy:");
deviceValuePanel3.setDeviceName("energy");
dvpEnergyb.setDeviceName("energy");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
@@ -1297,21 +1309,21 @@ public class Eiger extends Panel {
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel35)
.addComponent(labelEnergyb)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel34, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel33, javax.swing.GroupLayout.Alignment.LEADING)))
.addComponent(labelModeID2b, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelModeID1b, javax.swing.GroupLayout.Alignment.LEADING)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(deviceValuePanel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
.addComponent(deviceValuePanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addComponent(dvpModeID2b, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(dvpEnergyb, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
.addComponent(dvpModeID1b, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonSpecAbort, buttonSpecStart});
jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deviceValuePanel13, deviceValuePanel14, deviceValuePanel3});
jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dvpEnergyb, dvpModeID1b, dvpModeID2b});
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -1320,16 +1332,16 @@ public class Eiger extends Panel {
.addComponent(panelSpectrum, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel33)
.addComponent(deviceValuePanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelModeID1b)
.addComponent(dvpModeID1b, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel34)
.addComponent(deviceValuePanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelModeID2b)
.addComponent(dvpModeID2b, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel35)
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(labelEnergyb)
.addComponent(dvpEnergyb, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonSpecStart)
@@ -1337,7 +1349,7 @@ public class Eiger extends Panel {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {deviceValuePanel13, deviceValuePanel14, deviceValuePanel3});
jPanel3Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {dvpEnergyb, dvpModeID1b, dvpModeID2b});
jTabbedPane1.addTab("Absorption Spectrum", jPanel3);
@@ -1638,30 +1650,24 @@ public class Eiger extends Panel {
private javax.swing.JCheckBox checkSpecWithI0;
private javax.swing.JComboBox<String> comboImgMethod;
private javax.swing.JComboBox<String> comboSwitch;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel11;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel12;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel13;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel14;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel2;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel3;
private ch.psi.pshell.swing.DeviceValuePanel dvpEnergya;
private ch.psi.pshell.swing.DeviceValuePanel dvpEnergyb;
private ch.psi.pshell.swing.DeviceValuePanel dvpModeID1a;
private ch.psi.pshell.swing.DeviceValuePanel dvpModeID1b;
private ch.psi.pshell.swing.DeviceValuePanel dvpModeID2a;
private ch.psi.pshell.swing.DeviceValuePanel dvpModeID2b;
private javax.swing.Box.Filler filler1;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel22;
private javax.swing.JLabel jLabel23;
private javax.swing.JLabel jLabel24;
private javax.swing.JLabel jLabel25;
private javax.swing.JLabel jLabel26;
private javax.swing.JLabel jLabel28;
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel30;
private javax.swing.JLabel jLabel31;
private javax.swing.JLabel jLabel32;
private javax.swing.JLabel jLabel33;
private javax.swing.JLabel jLabel34;
private javax.swing.JLabel jLabel35;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
@@ -1672,8 +1678,14 @@ public class Eiger extends Panel {
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JLabel labelEnergya;
private javax.swing.JLabel labelEnergyb;
private javax.swing.JLabel labelImgEng1;
private javax.swing.JLabel labelImgEng2;
private javax.swing.JLabel labelModeID1a;
private javax.swing.JLabel labelModeID1b;
private javax.swing.JLabel labelModeID2a;
private javax.swing.JLabel labelModeID2b;
private javax.swing.JLabel labelSwitching;
private javax.swing.JPanel panelFirstImage;
private javax.swing.JPanel panelImgControls;
+28
View File
@@ -40,6 +40,12 @@ class LEEM2000(TcpDevice):
self.getLogger().info("Received invalid value for %s: %s" % (name, ret))
return None
def set_value(self, name, value, timeout = 1000, retries = 1):
cmd = "set " + name + "=" + str(value)
ret = self.send_receive(cmd, timeout, retries)
if ret != '0':
raise Exception("Error writing %s to %s: %s" % (str(value), name, ret))
def get_mnemonic(self, index, timeout = 1000, retries = 1):
cmd = "mne " + str(index)
return self.send_receive(cmd, timeout, retries)
@@ -101,8 +107,30 @@ class LEEM2000(TcpDevice):
def get_high_voltage(self):
return self.high_voltage.get(False)
def get_child(self, var, name=None):
if name is None:
name=var
ret = LEEM2000Child(name, var, self)
ret.initialize()
return ret
class LEEM2000Child(RegisterBase):
def __init__(self,name, var, microscope):
RegisterBase.__init__(self,name)
self.var = var
self.microscope = microscope
def doRead(self):
return self.microscope.get_value(self.var)
def doWrite(self, val):
self.microscope.set_value(self.var, val)
add_device (LEEM2000("microscope"), True)
microscope.setPolling(5000)
+27 -5
View File
@@ -1,6 +1,6 @@
from collections import OrderedDict
diag_channels = { \
diag_channels_names = { \
#"photon energy": "X11MA-PGM:rbkenergy", \
#"grating number": "X11MA-PGM:grating", \
#"cff value": "X11MA-PGM:rbkcff", \
@@ -44,9 +44,27 @@ diag_channels = { \
"Pt100 resistance": "X11MA-ES1-SW:Pt100-R", \
}
eiger_diag_channels = { \
eiger_diag_channels_names = { \
"high voltage": "X11MA-ES1-SD1:cam1:HighVoltage_RBV", \
}
diag_channels = {}
eiger_diag_channels = {}
for k in diag_channels_names.keys():
try:
diag_channels[k]=Channel(diag_channels_names[k],'s', monitored=True)
except:
msg = "Error creating diagnostic channel: " + str(k)
log(msg, False)
print msg
for k in eiger_diag_channels_names.keys():
try:
eiger_diag_channels[k]=Channel(eiger_diag_channels_names[k],'s', monitored=True)
except:
msg = "Error creating diagnostic channel: " + str(k)
log(msg, False)
print msg
diag_devices = {
@@ -80,16 +98,20 @@ def get_microscope_diags():
return ret
def get_diags():
ret = {}
for k,v in diag_devices.items():
try:
ret[k]=str(v.read())
if type(v) is Channel:
ret[k]=str(v.get())
else:
ret[k]=str(v.value)
except:
ret[k]="Error: " + str(sys.exc_info()[1])
for k,v in diag_channels.items():
try:
ret[k]=caget(v,'s')
ret[k]=v.get() #caget(v,'s') #v.get()
except:
ret[k]="Error: " + str(sys.exc_info()[1])
if eiger.initialized:
@@ -99,7 +121,7 @@ def get_diags():
ret[k]="Error: " + str(sys.exc_info()[1])
for k,v in eiger_diag_channels.items():
try:
ret[k]=caget(v,'s')
ret[k]=v.get() #caget(v,'s')
except:
ret[k]="Error: " + str(sys.exc_info()[1])
+1 -1
View File
@@ -17,7 +17,7 @@ if get_exec_pars().source == CommandSource.ui:
DRY_RUN = get_dry_run()
SHOW_IMAGES = True
SAVE_DIAGS = False
SAVE_DIAGS = True
ID = get_setting("ID")