Sprint Dez/2020
This commit is contained in:
@@ -54,11 +54,18 @@ FillingPattern=ch.psi.pshell.epics.ChannelDoubleArray|ACORF-FILL:UnsortComp|Read
|
||||
#MCPArray2=ch.psi.pshell.epics.ChannelIntegerArray|X11MA-ES4:PHC-CTRWF2|Read||true
|
||||
#NrCounters=ch.psi.pshell.epics.ChannelInteger|X11MA-ES4:NCTR|Read||true
|
||||
energy_rbk=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:rbkenergy|Read||true
|
||||
energy_done=ch.psi.pshell.epics.ChannelDouble|X11MA-PHS:ALL-DONE|Read||true
|
||||
#energy_done=ch.psi.pshell.epics.ChannelDouble|X11MA-PHS:ALL-DONE|Read||true
|
||||
keithley_1a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC1|Read||true
|
||||
keithley_2a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC2|Read||true
|
||||
keithley_3a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC3|Read||true
|
||||
otf_start=ch.psi.pshell.epics.ChannelInteger|X11MA-OTF:GO|||true
|
||||
eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-SD1|||true
|
||||
eiger_bit_depth_rbv=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:BitDepth_RBV|Read||true
|
||||
eiger_mode_rbv=ch.psi.pshell.epics.ChannelString|X11MA-ES1-SD1:cam1:ImageMode_RBV|Read||true
|
||||
eiger_exposure_rbv=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:AcquireTime_RBV 2|Read||true
|
||||
eiger_status=ch.psi.pshell.epics.ChannelString|X11MA-ES1-SD1:cam1:Acquire|||true
|
||||
eiger_bit_depth=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:BitDepth|||true
|
||||
eiger_mode=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:ImageMode|||true
|
||||
eiger_exposure=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:AcquireTime 2|||true
|
||||
image=ch.psi.pshell.imaging.CameraSource|eiger|||true
|
||||
axis=ch.psi.pshell.imaging.MjpegSource|http://axis-x11ma.psi.ch/axis-cgi/mjpg/video.cgi?id=176 true||-200|false
|
||||
|
||||
@@ -5,6 +5,7 @@ EnergyScan_TBT.java=enabled
|
||||
DelayScan.java=enabled
|
||||
EnergyScan.java=enabled
|
||||
DataAcquisition.java=enabled
|
||||
Eiger.java=enabled
|
||||
Beamline.java=enabled
|
||||
Settings.java=enabled
|
||||
Test.java=disabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Thu Dec 17 10:02:51 CET 2020
|
||||
#Fri Dec 18 11:36:05 CET 2020
|
||||
HARMONIC_ID_1=1
|
||||
RSYNC_USER=
|
||||
OUTLIERS_THRESHOLD=1000000000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Wed Dec 16 18:09:54 CET 2020
|
||||
#Fri Dec 18 09:55:11 CET 2020
|
||||
spatialCalOffsetY=NaN
|
||||
spatialCalOffsetX=NaN
|
||||
colormapLogarithmic=false
|
||||
|
||||
@@ -54,15 +54,6 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelNorm" max="32767" attributes="0"/>
|
||||
<Component id="panelNorm1" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonTriggerDetector" linkSize="14" alignment="1" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
<Component id="buttonShowDetectorPanel" linkSize="14" alignment="1" pref="201" max="32767" attributes="0"/>
|
||||
<Component id="buttonMeasurements" linkSize="14" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="panelNorm2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -78,13 +69,7 @@
|
||||
<Component id="panelNorm2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelNorm1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="32767" attributes="0"/>
|
||||
<Component id="buttonMeasurements" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="buttonShowDetectorPanel" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonTriggerDetector" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="123" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -192,7 +177,7 @@
|
||||
<Component id="jLabel31" linkSize="17" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerOutliersThreshold" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="330" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -269,30 +254,6 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="buttonTriggerDetector">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Trigger Detector"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonTriggerDetectorActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonShowDetectorPanel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Show Detector Panel"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonShowDetectorPanelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JToggleButton" name="buttonMeasurements">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Image Measurements"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMeasurementsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="panelNorm2">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
|
||||
@@ -431,9 +431,6 @@ public class DataAcquisition extends Panel {
|
||||
jLabel31 = new javax.swing.JLabel();
|
||||
textClearOutliersMask = new javax.swing.JButton();
|
||||
spinnerOutliersThreshold = new javax.swing.JSpinner();
|
||||
buttonTriggerDetector = new javax.swing.JButton();
|
||||
buttonShowDetectorPanel = new javax.swing.JButton();
|
||||
buttonMeasurements = new javax.swing.JToggleButton();
|
||||
panelNorm2 = new javax.swing.JPanel();
|
||||
radioAvDetector = new javax.swing.JRadioButton();
|
||||
radioAvPshell = new javax.swing.JRadioButton();
|
||||
@@ -641,7 +638,7 @@ public class DataAcquisition extends Panel {
|
||||
.addComponent(jLabel31)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerOutliersThreshold, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addGap(0, 330, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@@ -663,27 +660,6 @@ public class DataAcquisition extends Panel {
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
buttonTriggerDetector.setText("Trigger Detector");
|
||||
buttonTriggerDetector.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonTriggerDetectorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonShowDetectorPanel.setText("Show Detector Panel");
|
||||
buttonShowDetectorPanel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonShowDetectorPanelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonMeasurements.setText("Image Measurements");
|
||||
buttonMeasurements.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonMeasurementsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
panelNorm2.setBorder(javax.swing.BorderFactory.createTitledBorder("Averaging"));
|
||||
|
||||
buttonGroup1.add(radioAvDetector);
|
||||
@@ -733,19 +709,9 @@ public class DataAcquisition extends Panel {
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelNorm, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelNorm1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonTriggerDetector, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
|
||||
.addComponent(buttonMeasurements, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(panelNorm2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonMeasurements, buttonShowDetectorPanel, buttonTriggerDetector});
|
||||
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
@@ -755,13 +721,7 @@ public class DataAcquisition extends Panel {
|
||||
.addComponent(panelNorm2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(panelNorm1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonMeasurements)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonTriggerDetector)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(123, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jTabbedPane1.addTab("Detector", jPanel1);
|
||||
@@ -1583,14 +1543,6 @@ public class DataAcquisition extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_buttonSpecAbortActionPerformed
|
||||
|
||||
private void buttonTriggerDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonTriggerDetectorActionPerformed
|
||||
try {
|
||||
this.evalAsync("trigger_eiger()");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonTriggerDetectorActionPerformed
|
||||
|
||||
private void buttonAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAddActionPerformed
|
||||
try {
|
||||
modelRegions.addRow(new Object[]{Double.NaN, Double.NaN, Double.NaN});
|
||||
@@ -1635,14 +1587,6 @@ public class DataAcquisition extends Panel {
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_textNormKeyTyped
|
||||
|
||||
private void buttonShowDetectorPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonShowDetectorPanelActionPerformed
|
||||
try {
|
||||
this.showDevicePanel("eiger");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonShowDetectorPanelActionPerformed
|
||||
|
||||
private void buttonShowNormActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonShowNormActionPerformed
|
||||
try {
|
||||
this.enableNorm(buttonShowNorm.isSelected());
|
||||
@@ -1694,14 +1638,6 @@ public class DataAcquisition extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_spinnerOutliersThresholdStateChanged
|
||||
|
||||
private void buttonMeasurementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMeasurementsActionPerformed
|
||||
try {
|
||||
evalAsync(buttonMeasurements.isSelected() ? "start_measurements()" : "stop_measurements()");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonMeasurementsActionPerformed
|
||||
|
||||
private void buttonOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOpenActionPerformed
|
||||
try {
|
||||
JFileChooser chooser = new JFileChooser(ABSORTION_SPECTRUM_PATH);
|
||||
@@ -1817,7 +1753,6 @@ public class DataAcquisition extends Panel {
|
||||
private javax.swing.ButtonGroup buttonGroup1;
|
||||
private javax.swing.JButton buttonImgAbort;
|
||||
private javax.swing.JButton buttonImgStart;
|
||||
private javax.swing.JToggleButton buttonMeasurements;
|
||||
private javax.swing.JButton buttonOpen;
|
||||
private javax.swing.JButton buttonRemove;
|
||||
private javax.swing.JButton buttonRoiAdd;
|
||||
@@ -1827,11 +1762,9 @@ public class DataAcquisition extends Panel {
|
||||
private javax.swing.JButton buttonRoiSave;
|
||||
private javax.swing.JButton buttonSave;
|
||||
private javax.swing.JButton buttonSetNorm;
|
||||
private javax.swing.JButton buttonShowDetectorPanel;
|
||||
private javax.swing.JToggleButton buttonShowNorm;
|
||||
private javax.swing.JButton buttonSpecAbort;
|
||||
private javax.swing.JButton buttonSpecStart;
|
||||
private javax.swing.JButton buttonTriggerDetector;
|
||||
private javax.swing.JCheckBox checkImgAutosave;
|
||||
private javax.swing.JCheckBox checkSpecSaveImages;
|
||||
private javax.swing.JCheckBox checkSpecSaveSpectrum;
|
||||
|
||||
221
plugins/Eiger.form
Normal file
221
plugins/Eiger.form
Normal file
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel3" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="comboMode" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel1" linkSize="1" min="-2" pref="106" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="buttonShowDetectorPanel" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="comboDepth" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel2" linkSize="1" min="-2" pref="106" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="spinnerExpusure" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel3" linkSize="1" min="-2" pref="106" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="checkMeasurements" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="deviceValuePanel4" linkSize="1" alignment="1" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="buttonStopDetector" linkSize="1" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="buttonTriggerDetector" linkSize="1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="renderer" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboMode" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel1" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonShowDetectorPanel" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonTriggerDetector" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel1" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboDepth" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel2" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonStopDetector" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel3" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerExpusure" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel3" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkMeasurements" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="deviceValuePanel4" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="renderer" pref="343" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="ch.psi.pshell.imaging.Renderer" name="renderer">
|
||||
<Properties>
|
||||
<Property name="deviceName" type="java.lang.String" value="image"/>
|
||||
<Property name="mode" type="ch.psi.pshell.imaging.RendererMode" editor="org.netbeans.modules.form.editors.EnumEditor">
|
||||
<Value id="Fit"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Bit Depth:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboDepth">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="5">
|
||||
<StringItem index="0" value="4"/>
|
||||
<StringItem index="1" value="8"/>
|
||||
<StringItem index="2" value="16"/>
|
||||
<StringItem index="3" value="32"/>
|
||||
<StringItem index="4" value="Unknown"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboDepthActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonTriggerDetector">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Start"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonTriggerDetectorActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Mode:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboMode">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="3">
|
||||
<StringItem index="0" value="Single"/>
|
||||
<StringItem index="1" value="Multiple"/>
|
||||
<StringItem index="2" value="Continuous"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboModeActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Exposure:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerExpusure">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="300.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerExpusureStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel1">
|
||||
<Properties>
|
||||
<Property name="deviceName" type="java.lang.String" value="eiger_mode_rbv"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel2">
|
||||
<Properties>
|
||||
<Property name="deviceName" type="java.lang.String" value="eiger_bit_depth_rbv"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel3">
|
||||
<Properties>
|
||||
<Property name="deviceName" type="java.lang.String" value="eiger_exposure_rbv"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonStopDetector">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Stop"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStopDetectorActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel4">
|
||||
<Properties>
|
||||
<Property name="deviceName" type="java.lang.String" value="eiger_status"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonShowDetectorPanel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Control Panel"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonShowDetectorPanelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkMeasurements">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Measurements"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkMeasurementsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
335
plugins/Eiger.java
Normal file
335
plugins/Eiger.java
Normal file
@@ -0,0 +1,335 @@
|
||||
import ch.psi.pshell.epics.ChannelDouble;
|
||||
import ch.psi.pshell.epics.ChannelInteger;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class Eiger extends Panel {
|
||||
boolean updatingControls=true;
|
||||
ChannelInteger bitDepth;
|
||||
ChannelInteger mode;
|
||||
ChannelDouble exposure;
|
||||
|
||||
public Eiger() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
void initializeDevices() throws IOException, InterruptedException{
|
||||
}
|
||||
|
||||
//Overridable callbacks
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
try {
|
||||
this.stopTimer();
|
||||
renderer.clearOverlays();
|
||||
bitDepth = ((ChannelInteger)getDevice("eiger_bit_depth"));
|
||||
mode = ((ChannelInteger) getDevice("eiger_mode"));
|
||||
exposure = ((ChannelDouble) getDevice("eiger_exposure"));
|
||||
startTimer(1000,10);
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateChange(State state, State former) {
|
||||
if (former==State.Initializing){
|
||||
if (checkMeasurements.isSelected()){
|
||||
checkMeasurementsActionPerformed(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecutedFile(String fileName, Object result) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimer() {
|
||||
updatingControls=true;
|
||||
//initializeDevices();
|
||||
try{
|
||||
try{
|
||||
String value = String.valueOf(bitDepth.take());
|
||||
comboDepth.setSelectedItem(value);
|
||||
} catch (Exception ex){
|
||||
comboDepth.setSelectedIndex(comboDepth.getItemCount()-1); //Set "Unknown"
|
||||
}
|
||||
try{
|
||||
comboMode.setSelectedIndex(mode.take());
|
||||
} catch (Exception ex){
|
||||
}
|
||||
try{
|
||||
spinnerExpusure.setValue(exposure.take());
|
||||
} catch (Exception ex){
|
||||
}
|
||||
comboDepth.setEnabled(bitDepth.isInitialized());
|
||||
comboMode.setEnabled(mode.isInitialized());
|
||||
spinnerExpusure.setEnabled(exposure.isInitialized());
|
||||
|
||||
} finally{
|
||||
updatingControls=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Callback to perform update - in event thread
|
||||
@Override
|
||||
protected void doUpdate() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
renderer = new ch.psi.pshell.imaging.Renderer();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
comboDepth = new javax.swing.JComboBox<>();
|
||||
buttonTriggerDetector = new javax.swing.JButton();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
comboMode = new javax.swing.JComboBox<>();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
spinnerExpusure = new javax.swing.JSpinner();
|
||||
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();
|
||||
|
||||
renderer.setDeviceName("image");
|
||||
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Fit);
|
||||
|
||||
jLabel1.setText("Bit Depth:");
|
||||
|
||||
comboDepth.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "4", "8", "16", "32", "Unknown" }));
|
||||
comboDepth.setEnabled(false);
|
||||
comboDepth.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
comboDepthActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonTriggerDetector.setText("Start");
|
||||
buttonTriggerDetector.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonTriggerDetectorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel2.setText("Mode:");
|
||||
|
||||
comboMode.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Single", "Multiple", "Continuous" }));
|
||||
comboMode.setEnabled(false);
|
||||
comboMode.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
comboModeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel3.setText("Exposure:");
|
||||
|
||||
spinnerExpusure.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 300.0d, 1.0d));
|
||||
spinnerExpusure.setEnabled(false);
|
||||
spinnerExpusure.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
spinnerExpusureStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
deviceValuePanel1.setDeviceName("eiger_mode_rbv");
|
||||
|
||||
deviceValuePanel2.setDeviceName("eiger_bit_depth_rbv");
|
||||
|
||||
deviceValuePanel3.setDeviceName("eiger_exposure_rbv");
|
||||
|
||||
buttonStopDetector.setText("Stop");
|
||||
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");
|
||||
buttonShowDetectorPanel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonShowDetectorPanelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
checkMeasurements.setText("Measurements");
|
||||
checkMeasurements.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
checkMeasurementsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonShowDetectorPanel))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(spinnerExpusure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(checkMeasurements)))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addComponent(buttonStopDetector, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonTriggerDetector, javax.swing.GroupLayout.Alignment.TRAILING)))
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(4, 4, 4))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonStopDetector, buttonTriggerDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExpusure});
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonShowDetectorPanel, checkMeasurements});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonShowDetectorPanel)
|
||||
.addComponent(buttonTriggerDetector))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(comboDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonStopDetector))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(spinnerExpusure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(checkMeasurements)
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {buttonShowDetectorPanel, buttonStopDetector, buttonTriggerDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExpusure});
|
||||
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void comboDepthActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboDepthActionPerformed
|
||||
try{
|
||||
if (!updatingControls){
|
||||
if (comboDepth.getSelectedIndex()!=comboDepth.getItemCount()-1) {
|
||||
Integer value = Integer.valueOf((String)comboDepth.getSelectedItem());
|
||||
bitDepth.write(value);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex){
|
||||
|
||||
}
|
||||
}//GEN-LAST:event_comboDepthActionPerformed
|
||||
|
||||
private void buttonTriggerDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonTriggerDetectorActionPerformed
|
||||
try {
|
||||
evalAsync("eiger.start()");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonTriggerDetectorActionPerformed
|
||||
|
||||
private void comboModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboModeActionPerformed
|
||||
try{
|
||||
if (!updatingControls){
|
||||
Integer value = comboMode.getSelectedIndex();
|
||||
mode.write(value);
|
||||
}
|
||||
} catch (Exception ex){
|
||||
}
|
||||
}//GEN-LAST:event_comboModeActionPerformed
|
||||
|
||||
private void spinnerExpusureStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerExpusureStateChanged
|
||||
try{
|
||||
if (!updatingControls){
|
||||
exposure.write((Double)spinnerExpusure.getValue());
|
||||
}
|
||||
} catch (Exception ex){
|
||||
|
||||
}
|
||||
}//GEN-LAST:event_spinnerExpusureStateChanged
|
||||
|
||||
private void buttonStopDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStopDetectorActionPerformed
|
||||
try {
|
||||
evalAsync("eiger.stop()");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonStopDetectorActionPerformed
|
||||
|
||||
private void buttonShowDetectorPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonShowDetectorPanelActionPerformed
|
||||
try {
|
||||
showDevicePanel("eiger");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonShowDetectorPanelActionPerformed
|
||||
|
||||
private void checkMeasurementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkMeasurementsActionPerformed
|
||||
try {
|
||||
if (checkMeasurements.isSelected()){
|
||||
setGlobalVar("PLUGIN_RENDERER", renderer);
|
||||
evalAsync("start_measurements(renderer=PLUGIN_RENDERER)");
|
||||
} else {
|
||||
evalAsync("stop_measurements()");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_checkMeasurementsActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonShowDetectorPanel;
|
||||
private javax.swing.JButton buttonStopDetector;
|
||||
private javax.swing.JButton buttonTriggerDetector;
|
||||
private javax.swing.JCheckBox checkMeasurements;
|
||||
private javax.swing.JComboBox<String> comboDepth;
|
||||
private javax.swing.JComboBox<String> comboMode;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel1;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel2;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel3;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel4;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private ch.psi.pshell.imaging.Renderer renderer;
|
||||
private javax.swing.JSpinner spinnerExpusure;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -12,6 +12,22 @@ CONTINOUS_MODE_MIN_TIME = 4000
|
||||
# ROI Integration
|
||||
###############################################################################
|
||||
|
||||
|
||||
def start_eiger_ioc():
|
||||
cmd= "cd /sls/X11MA/data/X11MA/SW/Eiger/;launch"
|
||||
return run("sshutils", {"USR": "gac-x11ma", "PWD": "", "HOST": "x11ma-softioc","PORT": 22, "CMD": cmd})
|
||||
|
||||
|
||||
def stop_eiger_ioc():
|
||||
try:
|
||||
caputq("X11MA-ES1-SD1:SYSRESET", 1);
|
||||
print "IOC stopped"
|
||||
except:
|
||||
print "IOC not running"
|
||||
cmd= "proc=$(ps aux | grep 'Eiger Receiver' | awk -F ' ' '{print $2}' | xargs); kill $proc"
|
||||
return run("sshutils", {"USR": "gac-x11ma", "PWD": "", "HOST": "x11ma-softioc","PORT": 22, "CMD": cmd})
|
||||
|
||||
|
||||
def integrate_roi(source, x,y, w, h):
|
||||
if source.data is None:
|
||||
source.update()
|
||||
@@ -346,6 +362,8 @@ def get_outliers_mask(data_type='f'):
|
||||
eiger.setDataType(DataType.Float32)
|
||||
eiger.getDataArray().monitored=True
|
||||
|
||||
|
||||
|
||||
if False:
|
||||
integrate_roi(image, 10, 5, 20, 10)
|
||||
|
||||
@@ -366,5 +384,4 @@ if False:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,13 @@ try:
|
||||
if not eiger.isInitialized():
|
||||
eiger.initialize()
|
||||
run("devices/eiger")
|
||||
|
||||
eiger_channels = eiger_bit_depth_rbv, eiger_mode_rbv, \
|
||||
eiger_exposure_rbv,eiger_status,eiger_bit_depth,eiger_mode, \
|
||||
eiger_exposure
|
||||
for ch in eiger_channels:
|
||||
ch.initialize()
|
||||
log("Eiger initialized", False)
|
||||
stop_task("tasks/CheckEiger")
|
||||
stop_task("tasks/CheckEiger")
|
||||
except:
|
||||
log("Error initializing Eiger: " + str(sys.exc_info()[1]), False)
|
||||
|
||||
Reference in New Issue
Block a user