diff --git a/config/config.properties b/config/config.properties
index ad2f378..b26c8a3 100644
--- a/config/config.properties
+++ b/config/config.properties
@@ -1,4 +1,4 @@
-#Mon Nov 04 17:04:36 CET 2019
+#Thu Jan 09 10:48:13 CET 2020
imageSourcesFile={config}/imaging.properties
autoSaveScanData=true
simulation=false
@@ -7,6 +7,7 @@ logDaysToLive=30
userAuthenticator=
logLevelConsole=Off
scanStreamerPort=-1
+parallelInitialization=false
scanStreamingPort=-1
devicePoolFile={config}/devices.properties
versionTrackingManual=true
@@ -31,7 +32,7 @@ terminalEnabled=false
notificationLevel=null
terminalPort=3579
tasksFile={config}/tasks.properties
-createSessionFiles=false
+createSessionFiles=true
versionTrackingLogin={context}/svcusr-hlapp_robot
versionTrackingRemote=git@git.psi.ch\:pshell_config/x11ma.git
dataProvider=ch.psi.fda.ProviderFDA
diff --git a/config/devices.properties b/config/devices.properties
index 2126a84..e2ca2f6 100644
--- a/config/devices.properties
+++ b/config/devices.properties
@@ -7,11 +7,11 @@ pol_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
energy=ch.psi.pshell.epics.ChannelDouble|X11PHS-E:GO.A|||
id_error=ch.psi.pshell.epics.ChannelInteger|X11MA-ID2-PLC:ERROR|||true
beam_status=ch.psi.pshell.epics.DiscretePositioner|ACOAU-ACCU:OP-MODE|Read||true
-#edata=ch.psi.pshell.epics.ChannelDoubleArray|EDATA 3|Read||
-#count=ch.psi.pshell.epics.ChannelInteger|COUNT|Read||true
-#data=ch.psi.pshell.epics.ChannelDoubleArray|DATA 3|Read||
-#fdata=ch.psi.pshell.epics.ChannelDoubleArray|FDATA 3|Read||
-#idata=ch.psi.pshell.epics.ChannelDoubleArray|IDATA 3|Read||
+edata=ch.psi.pshell.epics.ChannelDoubleArray|EDATA 3|Read||
+count=ch.psi.pshell.epics.ChannelInteger|COUNT|Read||true
+data=ch.psi.pshell.epics.ChannelDoubleArray|DATA 3|Read||
+fdata=ch.psi.pshell.epics.ChannelDoubleArray|FDATA 3|Read||
+idata=ch.psi.pshell.epics.ChannelDoubleArray|IDATA 3|Read||
Keithley_3_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI12:READOUT|Read||true
Keithley_2_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI11:READOUT|Read||true
Keithley_1_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI10:READOUT|Read||true
@@ -43,6 +43,6 @@ 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-ES3-SD1|||true
+otf_start=ch.psi.pshell.epics.ChannelInteger|X11MA-OTF:GO|||true
+eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-SD1|||true
image=ch.psi.pshell.imaging.CameraSource|eiger|||true
diff --git a/config/variables.properties b/config/variables.properties
index f64d467..2f3aeac 100644
--- a/config/variables.properties
+++ b/config/variables.properties
@@ -1,2 +1,2 @@
-#Thu Oct 31 11:14:59 CET 2019
-FileSequentialNumber=10
+#Thu Jan 09 10:48:32 CET 2020
+FileSequentialNumber=33
diff --git a/devices/float.tif.properties b/devices/float.tif.properties
new file mode 100644
index 0000000..896e19c
--- /dev/null
+++ b/devices/float.tif.properties
@@ -0,0 +1,20 @@
+#Thu Jan 09 10:55:58 CET 2020
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/int.tif.properties b/devices/int.tif.properties
new file mode 100644
index 0000000..52cc7dd
--- /dev/null
+++ b/devices/int.tif.properties
@@ -0,0 +1,20 @@
+#Thu Jan 09 11:09:31 CET 2020
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/m.properties b/devices/m.properties
new file mode 100644
index 0000000..0c5e855
--- /dev/null
+++ b/devices/m.properties
@@ -0,0 +1,18 @@
+#Thu Jan 09 09:43:03 CET 2020
+precision=2
+scale=1.0
+estbilizationDelay=0
+resolution=NaN
+minValue=-10.0
+defaultSpeed=1.0
+sign_bit=0
+monitorByPosition=false
+minSpeed=0.001
+offset=0.0
+maxValue=10.0
+rotation=false
+maxSpeed=10.0
+homingType=None
+startRetries=1
+unit=null
+hasEnable=false
diff --git a/plugins/Eiger.form b/plugins/Eiger.form
new file mode 100644
index 0000000..8a82844
--- /dev/null
+++ b/plugins/Eiger.form
@@ -0,0 +1,1284 @@
+
+
+
diff --git a/plugins/Eiger.java b/plugins/Eiger.java
new file mode 100644
index 0000000..ac9850d
--- /dev/null
+++ b/plugins/Eiger.java
@@ -0,0 +1,1382 @@
+
+import ch.psi.pshell.core.Context;
+import ch.psi.pshell.imaging.Overlay;
+import ch.psi.pshell.imaging.Overlays.Rect;
+import ch.psi.pshell.imaging.Pen;
+import ch.psi.pshell.imaging.Renderer;
+import ch.psi.pshell.imaging.RendererListener;
+import ch.psi.pshell.ui.Panel;
+import ch.psi.utils.Arr;
+import ch.psi.utils.State;
+import ch.psi.utils.swing.SwingUtils;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JSpinner;
+import javax.swing.JToggleButton;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.DefaultTableModel ;
+
+/**
+ *
+ */
+public class Eiger extends Panel {
+
+ public enum ID {
+ ID1,
+ ID2,
+ ID1_ID2
+ }
+
+ public enum Switching {
+ Normal,
+ Tune_Detune,
+ Chopper
+ }
+
+ public enum Polarization {
+ Circ_Plus,
+ Circ_Minus,
+ Lin_Hor,
+ Lin_Ver
+ }
+
+ public enum ImgMethod {
+ Two_Pol,
+ Two_Energies,
+ Take_Image
+ }
+
+ static String DEFAULT_PATH = "{data}/{year}_{month}/{date}_{seq}%03d";
+
+ final Component[] parameterControls;
+ final ArrayList rois = new ArrayList<>();
+
+ public Eiger() {
+ initComponents();
+ ((JSpinner.ListEditor) spinnerHar1.getEditor()).getTextField().setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ ((JSpinner.ListEditor) spinnerHar2.getEditor()).getTextField().setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ SwingUtils.setEnumCombo(comboID, ID.class, true);
+ SwingUtils.setEnumCombo(comboSwitch, Switching.class, true);
+ SwingUtils.setEnumCombo(comboPol1, Polarization.class, true);
+ SwingUtils.setEnumCombo(comboPol2, Polarization.class, true);
+ SwingUtils.setEnumCombo(comboImgPol1, Polarization.class, true);
+ SwingUtils.setEnumCombo(comboImgPol2, Polarization.class, true);
+ SwingUtils.setEnumCombo(comboImgMethod, ImgMethod.class, true);
+
+ Component[] parameterControls = new Component[0];
+ for (JPanel panel : new JPanel[]{panelBeamline, panelImgControls, panelSpectrum}) {
+ for (Class cls : new Class[]{JComboBox.class, JSpinner.class, JToggleButton.class}) {
+ parameterControls = Arr.append(parameterControls, SwingUtils.getComponentsByType(panel, cls));
+ }
+ }
+ parameterControls = Arr.append(parameterControls, SwingUtils.getComponentsByType(panelRoi, JButton.class));
+ this.parameterControls = parameterControls;
+ setPersistedComponents(parameterControls);
+
+ rendererRoi.addListener(new RendererListener() {
+ public void onMoveFinished(Renderer renderer, Overlay overlay) {
+ if (rois.contains(overlay)) {
+ updateRoiList();
+ }
+ }
+
+ @Override
+ public void onDeleted(Renderer renderer, Overlay overlay) {
+ if (rois.contains(overlay)) {
+ rois.remove(overlay);
+ updateRoiList();
+ }
+ }
+ });
+
+ DefaultTableModel model = (DefaultTableModel) tableRoi.getModel();
+ model.addTableModelListener(new TableModelListener() {
+ boolean processingUpdate;
+
+ @Override
+ public void tableChanged(TableModelEvent e) {
+ int row = e.getFirstRow();
+ if ((tableRoi.isEditing()) && (e.getType() == TableModelEvent.UPDATE) && !processingUpdate) {
+ processingUpdate = true;
+ try {
+ rois.get(row).update(new Point((Integer) model.getValueAt(row, 1), (Integer) model.getValueAt(row, 2)),
+ new Dimension((Integer) model.getValueAt(row, 3), (Integer) model.getValueAt(row, 4)));
+ rendererRoi.refresh();
+ } catch (Exception ex) {
+ showException(ex);
+ } finally {
+ processingUpdate = false;
+ }
+
+ }
+ }
+ });
+ }
+
+ //Overridable callbacks
+ @Override
+ public void onInitialize(int runCount) {
+ }
+
+ @Override
+ public void onStateChange(State state, State former) {
+ textDataPath.setText(getContext().getConfig().dataPath);
+ spinnerSeq.setValue(getContext().getFileSequentialNumber());
+ updateControls();
+ }
+
+ @Override
+ public void onExecutedFile(String fileName, Object result) {
+ }
+
+ //Callback to perform update - in event thread
+ @Override
+ protected void doUpdate() {
+ }
+
+ void updateControls() {
+ boolean editable = getState().isInitialized() && !getState().isProcessing();
+ textDataPath.setEnabled(editable);
+ spinnerSeq.setEnabled(editable);
+ buttonDefaultPath.setEnabled(editable && !textDataPath.getText().equals(DEFAULT_PATH));
+ buttonSetPath.setEnabled(editable && !textDataPath.getText().equals(getContext().getConfig().dataPath));
+ buttonUndoPath.setEnabled(editable && !textDataPath.getText().equals(getContext().getConfig().dataPath));
+ buttonSetSeq.setEnabled(editable && !spinnerSeq.getValue().equals(getContext().getFileSequentialNumber()));
+ buttonUndoSeq.setEnabled(editable && !spinnerSeq.getValue().equals(getContext().getFileSequentialNumber()));
+
+ for (Component c : parameterControls) {
+ c.setEnabled(editable);
+ }
+
+ if (editable) {
+ comboImgPol1.setEnabled(comboImgMethod.getSelectedItem() == ImgMethod.Two_Pol.toString());
+ comboImgPol2.setEnabled(comboImgMethod.getSelectedItem() == ImgMethod.Two_Pol.toString());
+ spinnerImgEng1.setEnabled(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
+ spinnerImgEng2.setEnabled(comboImgMethod.getSelectedItem() == ImgMethod.Two_Energies.toString());
+ }
+
+ buttonImgStart.setEnabled(getState() == State.Ready);
+ buttonImgAbort.setEnabled(getState().isProcessing());
+ }
+
+ void updateRoiList() {
+ DefaultTableModel model = (DefaultTableModel) tableRoi.getModel();
+ model.setRowCount(rois.size());
+ for (int i = 0; i < rois.size(); i++) {
+ model.setValueAt("ROI" + (i + 1), i, 0);
+ model.setValueAt(rois.get(i).getPosition().x, i, 1);
+ model.setValueAt(rois.get(i).getPosition().y, i, 2);
+ model.setValueAt(rois.get(i).getWidth(), i, 3);
+ model.setValueAt(rois.get(i).getHeight(), i, 4);
+ }
+ }
+
+ void addRoi() {
+ final Rect selection = new Rect(rendererRoi.getPenMovingOverlay());
+ rendererRoi.addListener(new RendererListener() {
+ @Override
+ public void onSelectionFinished(Renderer renderer, Overlay overlay) {
+ try {
+ if (overlay.getLength() > 0) {
+ Rect roi = (Rect) overlay.copy();
+ roi.setPen(new Pen(rendererRoi.getPenSelectedOverlay().getColor()));
+ roi.setSelectable(true);
+ roi.setMovable(true);
+ roi.setSolid(true);
+ renderer.addOverlay(roi);
+ rois.add(roi);
+ updateRoiList();
+ }
+ } catch (Exception ex) {
+ } finally {
+ renderer.removeListener(this);
+ }
+ }
+
+ @Override
+ public void onSelectionAborted(Renderer renderer, Overlay overlay) {
+ renderer.removeListener(this);
+ }
+ });
+ //selection.setFixed(true);
+ selection.setPassive(false);
+ rendererRoi.startSelection(selection);
+ }
+
+ void removeRoi() {
+ for (Rect rect : rois) {
+ if (rendererRoi.getSelectedOverlay() == rect) {
+ rendererRoi.removeOverlay(rect);
+ rois.remove(rect);
+ updateRoiList();
+ break;
+ }
+ }
+ rendererRoi.abortSelection();
+ }
+
+ void setBeamlineArgs(HashMap args) {
+ args.put("ID", comboID.getSelectedItem());
+ args.put("SWITCHING", comboSwitch.getSelectedItem());
+ args.put("POL_ID_1", comboPol1.getSelectedItem());
+ args.put("ALPHA_ID_1", spinnerAlp1.getValue());
+ args.put("HARMONIC_ID_1", spinnerHar1.getValue());
+ args.put("OFFSET_ID_1", spinnerOff1.getValue());
+ args.put("POL_ID_2", comboPol2.getSelectedItem());
+ args.put("ALPHA_ID_2", spinnerAlp2.getValue());
+ args.put("HARMONIC_ID_2", spinnerHar2.getValue());
+ args.put("OFFSET_ID_2", spinnerOff2.getValue());
+
+ Map> roi = new HashMap<>();
+ for (int i=0; i {
+ if ((t != null) && (!getContext().isAborted())) {
+ showException((Exception) t);
+ }
+ return t;
+ });
+ }
+
+ void runAbsSpectrum() throws Context.ContextStateException {
+ HashMap args = new HashMap();
+ args.put("SAVE_SPECTRUM", checkSpecSaveSpectrum.isSelected());
+ args.put("SAVE_IMAGES", checkSpecSaveImages.isSelected());
+ args.put("WITH_I0", checkSpecWithI0.isSelected());
+ args.put("SWITCH_POL", checkSpecSwitchPol.isSelected());
+ args.put("EXPOSURE", spinnerSpecExp.getValue());
+ args.put("AVERAGE", spinnerSpecAvg.getValue());
+ args.put("NUMBER_SCANS", spinnerSpecScans.getValue());
+ setBeamlineArgs(args);
+
+ runAsync("templates/EigerAbsSpec", args).handle((ret, t) -> {
+ if ((t != null) && (!getContext().isAborted())) {
+ showException((Exception) t);
+ }
+ return t;
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jTabbedPane1 = new javax.swing.JTabbedPane();
+ jPanel1 = new javax.swing.JPanel();
+ panelDataFile = new javax.swing.JPanel();
+ buttonSetSeq = new javax.swing.JButton();
+ buttonUndoSeq = new javax.swing.JButton();
+ buttonDefaultPath = new javax.swing.JButton();
+ buttonSetPath = new javax.swing.JButton();
+ buttonUndoPath = new javax.swing.JButton();
+ jLabel2 = new javax.swing.JLabel();
+ spinnerSeq = new javax.swing.JSpinner();
+ textDataPath = new javax.swing.JTextField();
+ jLabel1 = new javax.swing.JLabel();
+ panelBeamline = new javax.swing.JPanel();
+ jLabel3 = new javax.swing.JLabel();
+ labelSwitching = new javax.swing.JLabel();
+ comboID = new javax.swing.JComboBox();
+ comboSwitch = new javax.swing.JComboBox();
+ jPanel7 = new javax.swing.JPanel();
+ jLabel5 = new javax.swing.JLabel();
+ comboPol1 = new javax.swing.JComboBox();
+ jLabel6 = new javax.swing.JLabel();
+ spinnerAlp1 = new javax.swing.JSpinner();
+ jLabel7 = new javax.swing.JLabel();
+ spinnerHar1 = new javax.swing.JSpinner();
+ jLabel8 = new javax.swing.JLabel();
+ spinnerOff1 = new javax.swing.JSpinner();
+ jPanel9 = new javax.swing.JPanel();
+ jLabel13 = new javax.swing.JLabel();
+ comboPol2 = new javax.swing.JComboBox();
+ jLabel14 = new javax.swing.JLabel();
+ spinnerAlp2 = new javax.swing.JSpinner();
+ jLabel15 = new javax.swing.JLabel();
+ spinnerHar2 = new javax.swing.JSpinner();
+ jLabel16 = new javax.swing.JLabel();
+ spinnerOff2 = new javax.swing.JSpinner();
+ panelRoi = new javax.swing.JPanel();
+ rendererRoi = new ch.psi.pshell.imaging.Renderer();
+ jLabel26 = new javax.swing.JLabel();
+ buttonRoiAdd = new javax.swing.JButton();
+ buttonRoiRemove = new javax.swing.JButton();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ tableRoi = new javax.swing.JTable();
+ buttonTriggerDetector = new javax.swing.JButton();
+ jPanel2 = new javax.swing.JPanel();
+ buttonImgStart = new javax.swing.JButton();
+ buttonImgAbort = new javax.swing.JButton();
+ panelImgControls = new javax.swing.JPanel();
+ jPanel8 = new javax.swing.JPanel();
+ jLabel4 = new javax.swing.JLabel();
+ spinnerImgExp1 = new javax.swing.JSpinner();
+ jLabel9 = new javax.swing.JLabel();
+ spinnerImgAvg1 = new javax.swing.JSpinner();
+ jLabel10 = new javax.swing.JLabel();
+ comboImgPol1 = new javax.swing.JComboBox();
+ jLabel11 = new javax.swing.JLabel();
+ spinnerImgEng1 = new javax.swing.JSpinner();
+ jPanel10 = new javax.swing.JPanel();
+ jLabel12 = new javax.swing.JLabel();
+ spinnerImgExp2 = new javax.swing.JSpinner();
+ jLabel17 = new javax.swing.JLabel();
+ spinnerImgAvg2 = new javax.swing.JSpinner();
+ jLabel18 = new javax.swing.JLabel();
+ comboImgPol2 = new javax.swing.JComboBox();
+ jLabel19 = new javax.swing.JLabel();
+ spinnerImgEng2 = new javax.swing.JSpinner();
+ jLabel21 = new javax.swing.JLabel();
+ spinnerImgMeasurements = new javax.swing.JSpinner();
+ comboImgMethod = new javax.swing.JComboBox();
+ jLabel20 = new javax.swing.JLabel();
+ checImgAsSeq = new javax.swing.JCheckBox();
+ checkImgAutosave = new javax.swing.JCheckBox();
+ jLabel22 = new javax.swing.JLabel();
+ spinnerImgContrast = new javax.swing.JSpinner();
+ jPanel3 = new javax.swing.JPanel();
+ panelSpectrum = new javax.swing.JPanel();
+ jLabel23 = new javax.swing.JLabel();
+ jLabel24 = new javax.swing.JLabel();
+ checkSpecSaveImages = new javax.swing.JCheckBox();
+ spinnerSpecAvg = new javax.swing.JSpinner();
+ checkSpecSwitchPol = new javax.swing.JCheckBox();
+ spinnerSpecScans = new javax.swing.JSpinner();
+ jLabel25 = new javax.swing.JLabel();
+ spinnerSpecExp = new javax.swing.JSpinner();
+ checkSpecWithI0 = new javax.swing.JCheckBox();
+ checkSpecSaveSpectrum = new javax.swing.JCheckBox();
+ buttonSpecStart = new javax.swing.JButton();
+ buttonSpecAbort = new javax.swing.JButton();
+
+ panelDataFile.setBorder(javax.swing.BorderFactory.createTitledBorder("Data File"));
+
+ buttonSetSeq.setText("Save");
+ buttonSetSeq.setEnabled(false);
+ buttonSetSeq.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonSetSeqActionPerformed(evt);
+ }
+ });
+
+ buttonUndoSeq.setText("Undo");
+ buttonUndoSeq.setEnabled(false);
+ buttonUndoSeq.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonUndoSeqActionPerformed(evt);
+ }
+ });
+
+ buttonDefaultPath.setText("Default");
+ buttonDefaultPath.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonDefaultPathActionPerformed(evt);
+ }
+ });
+
+ buttonSetPath.setText("Save");
+ buttonSetPath.setEnabled(false);
+ buttonSetPath.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonSetPathActionPerformed(evt);
+ }
+ });
+
+ buttonUndoPath.setText("Undo");
+ buttonUndoPath.setEnabled(false);
+ buttonUndoPath.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonUndoPathActionPerformed(evt);
+ }
+ });
+
+ jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel2.setText("Sequential:");
+
+ spinnerSeq.setModel(new javax.swing.SpinnerNumberModel(0, 0, 99999, 1));
+ spinnerSeq.addChangeListener(new javax.swing.event.ChangeListener() {
+ public void stateChanged(javax.swing.event.ChangeEvent evt) {
+ spinnerSeqStateChanged(evt);
+ }
+ });
+
+ textDataPath.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyReleased(java.awt.event.KeyEvent evt) {
+ textDataPathKeyReleased(evt);
+ }
+ public void keyTyped(java.awt.event.KeyEvent evt) {
+ textDataPathKeyTyped(evt);
+ }
+ });
+
+ jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel1.setText("Name Pattern:");
+
+ javax.swing.GroupLayout panelDataFileLayout = new javax.swing.GroupLayout(panelDataFile);
+ panelDataFile.setLayout(panelDataFileLayout);
+ panelDataFileLayout.setHorizontalGroup(
+ panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelDataFileLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelDataFileLayout.createSequentialGroup()
+ .addComponent(jLabel2)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(spinnerSeq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(buttonSetSeq)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(buttonUndoSeq))
+ .addGroup(panelDataFileLayout.createSequentialGroup()
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(textDataPath, javax.swing.GroupLayout.PREFERRED_SIZE, 362, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addGroup(panelDataFileLayout.createSequentialGroup()
+ .addComponent(buttonSetPath)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(buttonUndoPath))
+ .addComponent(buttonDefaultPath))
+ .addContainerGap())
+ );
+
+ panelDataFileLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonDefaultPath, buttonSetPath, buttonUndoPath});
+
+ panelDataFileLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2});
+
+ panelDataFileLayout.setVerticalGroup(
+ panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelDataFileLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(textDataPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(buttonSetPath)
+ .addComponent(buttonUndoPath))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelDataFileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel2)
+ .addComponent(spinnerSeq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(buttonSetSeq)
+ .addComponent(buttonUndoSeq)
+ .addComponent(buttonDefaultPath))
+ .addContainerGap())
+ );
+
+ panelBeamline.setBorder(javax.swing.BorderFactory.createTitledBorder("Beamline"));
+
+ jLabel3.setText("ID:");
+
+ labelSwitching.setText("Switching:");
+
+ comboID.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ comboSwitch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("ID1"));
+
+ jLabel5.setText("Polarization:");
+
+ comboPol1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ jLabel6.setText("Alpha:");
+
+ spinnerAlp1.setModel(new javax.swing.SpinnerNumberModel(0.0d, -360.0d, 360.0d, 1.0d));
+
+ jLabel7.setText("Harmonic:");
+
+ spinnerHar1.setModel(new javax.swing.SpinnerListModel(new String[] {"1", "3"}));
+
+ jLabel8.setText("Offset:");
+
+ spinnerOff1.setModel(new javax.swing.SpinnerNumberModel(0.0d, -10.0d, 10.0d, 1.0d));
+
+ javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
+ jPanel7.setLayout(jPanel7Layout);
+ jPanel7Layout.setHorizontalGroup(
+ jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(spinnerOff1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerHar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerAlp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboPol1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel7Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboPol1, spinnerAlp1, spinnerHar1, spinnerOff1});
+
+ jPanel7Layout.setVerticalGroup(
+ jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel5)
+ .addComponent(comboPol1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel6)
+ .addComponent(spinnerAlp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel7)
+ .addComponent(spinnerHar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel8)
+ .addComponent(spinnerOff1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("ID2"));
+
+ jLabel13.setText("Polarization:");
+
+ comboPol2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ jLabel14.setText("Alpha:");
+
+ spinnerAlp2.setModel(new javax.swing.SpinnerNumberModel(0.0d, -360.0d, 360.0d, 1.0d));
+
+ jLabel15.setText("Harmonic:");
+
+ spinnerHar2.setModel(new javax.swing.SpinnerListModel(new String[] {"1", "3"}));
+
+ jLabel16.setText("Offset:");
+
+ spinnerOff2.setModel(new javax.swing.SpinnerNumberModel(0.0d, -10.0d, 10.0d, 1.0d));
+
+ javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
+ jPanel9.setLayout(jPanel9Layout);
+ jPanel9Layout.setHorizontalGroup(
+ jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel9Layout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(spinnerOff2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerHar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerAlp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboPol2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel9Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboPol2, spinnerAlp2, spinnerHar2, spinnerOff2});
+
+ jPanel9Layout.setVerticalGroup(
+ jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel9Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel13)
+ .addComponent(comboPol2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel14)
+ .addComponent(spinnerAlp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel15)
+ .addComponent(spinnerHar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel16)
+ .addComponent(spinnerOff2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout panelBeamlineLayout = new javax.swing.GroupLayout(panelBeamline);
+ panelBeamline.setLayout(panelBeamlineLayout);
+ panelBeamlineLayout.setHorizontalGroup(
+ panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelBeamlineLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(labelSwitching)
+ .addComponent(jLabel3))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(comboID, 0, 121, Short.MAX_VALUE)
+ .addComponent(comboSwitch, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGap(18, 18, Short.MAX_VALUE)
+ .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGap(18, 18, 18)
+ .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+
+ panelBeamlineLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboID, comboSwitch});
+
+ panelBeamlineLayout.setVerticalGroup(
+ panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelBeamlineLayout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(panelBeamlineLayout.createSequentialGroup()
+ .addGap(30, 30, 30)
+ .addGroup(panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(comboID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel3))
+ .addGap(18, 18, 18)
+ .addGroup(panelBeamlineLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(labelSwitching)
+ .addComponent(comboSwitch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+ jPanel1.setLayout(jPanel1Layout);
+ jPanel1Layout.setHorizontalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(panelDataFile, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(panelBeamline, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ jPanel1Layout.setVerticalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(panelDataFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(panelBeamline, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jTabbedPane1.addTab("Config", jPanel1);
+
+ rendererRoi.setDeviceName("image");
+ rendererRoi.setMode(ch.psi.pshell.imaging.RendererMode.Stretch);
+ rendererRoi.setShowStatus(false);
+
+ jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel26.setText("ROIs:");
+
+ buttonRoiAdd.setText("Add");
+ buttonRoiAdd.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonRoiAddActionPerformed(evt);
+ }
+ });
+
+ buttonRoiRemove.setText("Remove");
+ buttonRoiRemove.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonRoiRemoveActionPerformed(evt);
+ }
+ });
+
+ tableRoi.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+
+ },
+ new String [] {
+ "Name", "X", "Y", "W", "H"
+ }
+ ) {
+ Class[] types = new Class [] {
+ java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class
+ };
+ boolean[] canEdit = new boolean [] {
+ false, true, true, true, true
+ };
+
+ public Class getColumnClass(int columnIndex) {
+ return types [columnIndex];
+ }
+
+ public boolean isCellEditable(int rowIndex, int columnIndex) {
+ return canEdit [columnIndex];
+ }
+ });
+ tableRoi.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+ jScrollPane1.setViewportView(tableRoi);
+
+ buttonTriggerDetector.setText("Trigger Detector");
+ buttonTriggerDetector.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonTriggerDetectorActionPerformed(evt);
+ }
+ });
+
+ javax.swing.GroupLayout panelRoiLayout = new javax.swing.GroupLayout(panelRoi);
+ panelRoi.setLayout(panelRoiLayout);
+ panelRoiLayout.setHorizontalGroup(
+ panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelRoiLayout.createSequentialGroup()
+ .addGap(17, 17, 17)
+ .addComponent(rendererRoi, javax.swing.GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE)
+ .addGap(18, 18, 18)
+ .addGroup(panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(jLabel26)
+ .addComponent(buttonRoiAdd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(buttonRoiRemove, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
+ .addComponent(buttonTriggerDetector, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ panelRoiLayout.setVerticalGroup(
+ panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelRoiLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelRoiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(rendererRoi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(panelRoiLayout.createSequentialGroup()
+ .addComponent(buttonRoiAdd)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(buttonRoiRemove)
+ .addGap(18, 18, 18)
+ .addComponent(jLabel26)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
+ .addGap(18, 18, 18)
+ .addComponent(buttonTriggerDetector)))
+ .addContainerGap())
+ );
+
+ jTabbedPane1.addTab("ROIs", panelRoi);
+
+ buttonImgStart.setText("Start");
+ buttonImgStart.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonImgStartActionPerformed(evt);
+ }
+ });
+
+ buttonImgAbort.setText("Abort");
+ buttonImgAbort.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonImgAbortActionPerformed(evt);
+ }
+ });
+
+ jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("First Image"));
+
+ jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel4.setText("Exposure(s):");
+
+ spinnerImgExp1.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 3600.0d, 1.0d));
+
+ jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel9.setText("Average:");
+
+ spinnerImgAvg1.setModel(new javax.swing.SpinnerNumberModel(1, 1, 1000, 1));
+
+ jLabel10.setText("Polarization:");
+
+ comboImgPol1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel11.setText("Energy:");
+
+ spinnerImgEng1.setModel(new javax.swing.SpinnerNumberModel(1000.0d, 90.0d, 2000.0d, 1.0d));
+
+ javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
+ jPanel8.setLayout(jPanel8Layout);
+ jPanel8Layout.setHorizontalGroup(
+ jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(spinnerImgExp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerImgAvg1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboImgPol1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerImgEng1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel8Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboImgPol1, spinnerImgAvg1, spinnerImgEng1, spinnerImgExp1});
+
+ jPanel8Layout.setVerticalGroup(
+ jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel4)
+ .addComponent(spinnerImgExp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel9)
+ .addComponent(spinnerImgAvg1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel11)
+ .addComponent(spinnerImgEng1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel10)
+ .addComponent(comboImgPol1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Second Image"));
+
+ jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel12.setText("Exposure(s):");
+
+ spinnerImgExp2.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 3600.0d, 1.0d));
+
+ jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel17.setText("Average:");
+
+ spinnerImgAvg2.setModel(new javax.swing.SpinnerNumberModel(1, 1, 1000, 1));
+
+ jLabel18.setText("Polarization:");
+
+ comboImgPol2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+ jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel19.setText("Energy:");
+
+ spinnerImgEng2.setModel(new javax.swing.SpinnerNumberModel(1000.0d, 90.0d, 2000.0d, 1.0d));
+
+ javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
+ jPanel10.setLayout(jPanel10Layout);
+ jPanel10Layout.setHorizontalGroup(
+ jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel10Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(spinnerImgExp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerImgAvg2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboImgPol2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerImgEng2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel10Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboImgPol2, spinnerImgAvg2, spinnerImgEng2, spinnerImgExp2});
+
+ jPanel10Layout.setVerticalGroup(
+ jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel10Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel12)
+ .addComponent(spinnerImgExp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel17)
+ .addComponent(spinnerImgAvg2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel19)
+ .addComponent(spinnerImgEng2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel18)
+ .addComponent(comboImgPol2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel21.setText("Method:");
+
+ spinnerImgMeasurements.setModel(new javax.swing.SpinnerNumberModel(1, 1, 10000, 1));
+
+ comboImgMethod.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+ comboImgMethod.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ comboImgMethodActionPerformed(evt);
+ }
+ });
+
+ jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel20.setText("Measurements:");
+
+ checImgAsSeq.setText("As Sequence");
+
+ checkImgAutosave.setSelected(true);
+ checkImgAutosave.setText("Autosave");
+
+ jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel22.setText("Contrast:");
+
+ spinnerImgContrast.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, 1000.0d, 1.0d));
+
+ javax.swing.GroupLayout panelImgControlsLayout = new javax.swing.GroupLayout(panelImgControls);
+ panelImgControls.setLayout(panelImgControlsLayout);
+ panelImgControlsLayout.setHorizontalGroup(
+ panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelImgControlsLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel21)
+ .addComponent(jLabel20)
+ .addComponent(jLabel22))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(spinnerImgMeasurements, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboImgMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(checkImgAutosave)
+ .addComponent(checImgAsSeq)
+ .addComponent(spinnerImgContrast, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(18, 18, Short.MAX_VALUE)
+ .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGap(18, 18, Short.MAX_VALUE)
+ .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+
+ panelImgControlsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {checImgAsSeq, checkImgAutosave, comboImgMethod, spinnerImgContrast, spinnerImgMeasurements});
+
+ panelImgControlsLayout.setVerticalGroup(
+ panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelImgControlsLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(panelImgControlsLayout.createSequentialGroup()
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(comboImgMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel21))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel20)
+ .addComponent(spinnerImgMeasurements, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelImgControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel22)
+ .addComponent(spinnerImgContrast, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(checkImgAutosave)
+ .addGap(11, 11, 11)
+ .addComponent(checImgAsSeq)))
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
+ jPanel2.setLayout(jPanel2Layout);
+ jPanel2Layout.setHorizontalGroup(
+ jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel2Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel2Layout.createSequentialGroup()
+ .addGap(0, 0, Short.MAX_VALUE)
+ .addComponent(buttonImgStart)
+ .addGap(76, 76, 76)
+ .addComponent(buttonImgAbort)
+ .addGap(0, 0, Short.MAX_VALUE))
+ .addComponent(panelImgControls, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+
+ jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonImgAbort, buttonImgStart});
+
+ jPanel2Layout.setVerticalGroup(
+ jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel2Layout.createSequentialGroup()
+ .addGap(18, 18, 18)
+ .addComponent(panelImgControls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
+ .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(buttonImgStart)
+ .addComponent(buttonImgAbort))
+ .addContainerGap())
+ );
+
+ jTabbedPane1.addTab("2-Images", jPanel2);
+
+ jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel23.setText("Exposure(s):");
+
+ jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel24.setText("Average:");
+
+ checkSpecSaveImages.setText("Save images");
+
+ spinnerSpecAvg.setModel(new javax.swing.SpinnerNumberModel(1, 1, 1000, 1));
+
+ checkSpecSwitchPol.setText("Switch pol after scan");
+
+ spinnerSpecScans.setModel(new javax.swing.SpinnerNumberModel(1, 1, 10000, 1));
+
+ jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel25.setText("Scans:");
+
+ spinnerSpecExp.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 3600.0d, 1.0d));
+
+ checkSpecWithI0.setSelected(true);
+ checkSpecWithI0.setText("With I0");
+
+ checkSpecSaveSpectrum.setSelected(true);
+ checkSpecSaveSpectrum.setText("Save spectrum");
+
+ javax.swing.GroupLayout panelSpectrumLayout = new javax.swing.GroupLayout(panelSpectrum);
+ panelSpectrum.setLayout(panelSpectrumLayout);
+ panelSpectrumLayout.setHorizontalGroup(
+ panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelSpectrumLayout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel24)
+ .addComponent(jLabel23)
+ .addComponent(jLabel25))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(checkSpecWithI0)
+ .addComponent(checkSpecSaveImages)
+ .addComponent(checkSpecSwitchPol)
+ .addComponent(checkSpecSaveSpectrum)
+ .addComponent(spinnerSpecScans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerSpecExp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(spinnerSpecAvg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ panelSpectrumLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerSpecAvg, spinnerSpecExp, spinnerSpecScans});
+
+ panelSpectrumLayout.setVerticalGroup(
+ panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelSpectrumLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(checkSpecSaveSpectrum)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(checkSpecSaveImages)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(checkSpecWithI0)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel23)
+ .addComponent(spinnerSpecExp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addGroup(panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel24)
+ .addComponent(spinnerSpecAvg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addGroup(panelSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel25)
+ .addComponent(spinnerSpecScans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(checkSpecSwitchPol)
+ .addContainerGap())
+ );
+
+ buttonSpecStart.setText("Start");
+ buttonSpecStart.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonSpecStartActionPerformed(evt);
+ }
+ });
+
+ buttonSpecAbort.setText("Abort");
+ buttonSpecAbort.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonSpecAbortActionPerformed(evt);
+ }
+ });
+
+ javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
+ jPanel3.setLayout(jPanel3Layout);
+ jPanel3Layout.setHorizontalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel3Layout.createSequentialGroup()
+ .addGap(211, 211, 211)
+ .addComponent(panelSpectrum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(215, Short.MAX_VALUE))
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(buttonSpecStart)
+ .addGap(76, 76, 76)
+ .addComponent(buttonSpecAbort)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonSpecAbort, buttonSpecStart});
+
+ jPanel3Layout.setVerticalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel3Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(panelSpectrum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)
+ .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(buttonSpecStart)
+ .addComponent(buttonSpecAbort))
+ .addContainerGap())
+ );
+
+ jTabbedPane1.addTab("Absorption Spectrum", jPanel3);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 691, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jTabbedPane1)
+ .addGap(0, 0, 0))
+ );
+ }// //GEN-END:initComponents
+
+ private void buttonSetPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetPathActionPerformed
+ try {
+ getContext().getConfig().dataPath = textDataPath.getText();
+ getContext().getConfig().save();
+ updateControls();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonSetPathActionPerformed
+
+ private void buttonUndoPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonUndoPathActionPerformed
+ try {
+ textDataPath.setText(getContext().getConfig().dataPath);
+ updateControls();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonUndoPathActionPerformed
+
+ private void buttonSetSeqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetSeqActionPerformed
+ try {
+ getContext().setFileSequentialNumber(((Number) spinnerSeq.getValue()).intValue());
+ updateControls();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonSetSeqActionPerformed
+
+ private void buttonUndoSeqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonUndoSeqActionPerformed
+ try {
+ spinnerSeq.setValue(getContext().getFileSequentialNumber());
+ updateControls();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonUndoSeqActionPerformed
+
+ private void textDataPathKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textDataPathKeyTyped
+
+ }//GEN-LAST:event_textDataPathKeyTyped
+
+ private void spinnerSeqStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerSeqStateChanged
+ updateControls();
+ }//GEN-LAST:event_spinnerSeqStateChanged
+
+ private void buttonDefaultPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDefaultPathActionPerformed
+ textDataPath.setText(DEFAULT_PATH);
+ updateControls();
+ }//GEN-LAST:event_buttonDefaultPathActionPerformed
+
+ private void textDataPathKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textDataPathKeyReleased
+ updateControls();
+ }//GEN-LAST:event_textDataPathKeyReleased
+
+ private void buttonImgStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImgStartActionPerformed
+ try {
+ run2Images();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonImgStartActionPerformed
+
+ private void comboImgMethodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboImgMethodActionPerformed
+ updateControls();
+ }//GEN-LAST:event_comboImgMethodActionPerformed
+
+ private void buttonSpecStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSpecStartActionPerformed
+ try {
+ runAbsSpectrum();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonSpecStartActionPerformed
+
+ private void buttonImgAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImgAbortActionPerformed
+ try {
+ getContext().abort();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonImgAbortActionPerformed
+
+ private void buttonRoiRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRoiRemoveActionPerformed
+ try {
+ removeRoi();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonRoiRemoveActionPerformed
+
+ private void buttonRoiAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRoiAddActionPerformed
+ try {
+ addRoi();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//GEN-LAST:event_buttonRoiAddActionPerformed
+
+ private void buttonSpecAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSpecAbortActionPerformed
+ try {
+ getContext().abort();
+ } catch (Exception ex) {
+ showException(ex);
+ }
+ }//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
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton buttonDefaultPath;
+ private javax.swing.JButton buttonImgAbort;
+ private javax.swing.JButton buttonImgStart;
+ private javax.swing.JButton buttonRoiAdd;
+ private javax.swing.JButton buttonRoiRemove;
+ private javax.swing.JButton buttonSetPath;
+ private javax.swing.JButton buttonSetSeq;
+ private javax.swing.JButton buttonSpecAbort;
+ private javax.swing.JButton buttonSpecStart;
+ private javax.swing.JButton buttonTriggerDetector;
+ private javax.swing.JButton buttonUndoPath;
+ private javax.swing.JButton buttonUndoSeq;
+ private javax.swing.JCheckBox checImgAsSeq;
+ private javax.swing.JCheckBox checkImgAutosave;
+ private javax.swing.JCheckBox checkSpecSaveImages;
+ private javax.swing.JCheckBox checkSpecSaveSpectrum;
+ private javax.swing.JCheckBox checkSpecSwitchPol;
+ private javax.swing.JCheckBox checkSpecWithI0;
+ private javax.swing.JComboBox comboID;
+ private javax.swing.JComboBox comboImgMethod;
+ private javax.swing.JComboBox comboImgPol1;
+ private javax.swing.JComboBox comboImgPol2;
+ private javax.swing.JComboBox comboPol1;
+ private javax.swing.JComboBox comboPol2;
+ private javax.swing.JComboBox comboSwitch;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel10;
+ private javax.swing.JLabel jLabel11;
+ private javax.swing.JLabel jLabel12;
+ private javax.swing.JLabel jLabel13;
+ private javax.swing.JLabel jLabel14;
+ private javax.swing.JLabel jLabel15;
+ private javax.swing.JLabel jLabel16;
+ private javax.swing.JLabel jLabel17;
+ private javax.swing.JLabel jLabel18;
+ private javax.swing.JLabel jLabel19;
+ private javax.swing.JLabel jLabel2;
+ 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 jLabel3;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JLabel jLabel6;
+ private javax.swing.JLabel jLabel7;
+ private javax.swing.JLabel jLabel8;
+ private javax.swing.JLabel jLabel9;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel10;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JPanel jPanel3;
+ private javax.swing.JPanel jPanel7;
+ private javax.swing.JPanel jPanel8;
+ private javax.swing.JPanel jPanel9;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTabbedPane jTabbedPane1;
+ private javax.swing.JLabel labelSwitching;
+ private javax.swing.JPanel panelBeamline;
+ private javax.swing.JPanel panelDataFile;
+ private javax.swing.JPanel panelImgControls;
+ private javax.swing.JPanel panelRoi;
+ private javax.swing.JPanel panelSpectrum;
+ private ch.psi.pshell.imaging.Renderer rendererRoi;
+ private javax.swing.JSpinner spinnerAlp1;
+ private javax.swing.JSpinner spinnerAlp2;
+ private javax.swing.JSpinner spinnerHar1;
+ private javax.swing.JSpinner spinnerHar2;
+ private javax.swing.JSpinner spinnerImgAvg1;
+ private javax.swing.JSpinner spinnerImgAvg2;
+ private javax.swing.JSpinner spinnerImgContrast;
+ private javax.swing.JSpinner spinnerImgEng1;
+ private javax.swing.JSpinner spinnerImgEng2;
+ private javax.swing.JSpinner spinnerImgExp1;
+ private javax.swing.JSpinner spinnerImgExp2;
+ private javax.swing.JSpinner spinnerImgMeasurements;
+ private javax.swing.JSpinner spinnerOff1;
+ private javax.swing.JSpinner spinnerOff2;
+ private javax.swing.JSpinner spinnerSeq;
+ private javax.swing.JSpinner spinnerSpecAvg;
+ private javax.swing.JSpinner spinnerSpecExp;
+ private javax.swing.JSpinner spinnerSpecScans;
+ private javax.swing.JTable tableRoi;
+ private javax.swing.JTextField textDataPath;
+ // End of variables declaration//GEN-END:variables
+}
diff --git a/script/devices/eiger.py b/script/devices/eiger.py
index 80f2166..c898aca 100644
--- a/script/devices/eiger.py
+++ b/script/devices/eiger.py
@@ -1,76 +1,95 @@
-from ijutils import *
-from ch.psi.pshell.imaging.Overlays import *
-from ch.psi.pshell.imaging.Utils import *
-import ch.psi.pshell.imaging.Pen as Pen
-import java.awt.Rectangle as Rectangle
-import ch.psi.pshell.imaging.Data as Data
-
+from ijutils import *
+from ch.psi.pshell.imaging.Overlays import *
+from ch.psi.pshell.imaging.Utils import *
+import ch.psi.pshell.imaging.Pen as Pen
+import java.awt.Rectangle as Rectangle
+import ch.psi.pshell.imaging.Data as Data
+
+
+###############################################################################
+# ROI Integration
+###############################################################################
+
+def integrate_roi(source, x,y, w, h):
+ if source.data is None:
+ source.update()
+ roi = source.data.getRoi(Rectangle(x,y, w, h))
+ return roi.integrate(False)
+
+
+
+class RoiIntensity(ReadonlyRegisterBase):
+ def __init__(self, name, source, x,y, w, h):
+ ReadonlyRegisterBase.__init__(self, name)
+ self.source=source
+ self.roi = x,y, w, h
+
+ def doRead(self):
+ x,y, w, h = self.roi
+ return integrate_roi(self.source, x,y, w, h)
+
+def create_roi_devices(roi_list, add = True):
+ rois = []
+ for r in roi_list:
+ roi = RoiIntensity(r, image, roi_list[r][0], roi_list[r][1], roi_list[r][2], roi_list[r][3])
+ if add:
+ add_device(roi, True)
+ rois.append(roi)
+ return rois
+
+###############################################################################
+# Frame integration
+###############################################################################
+
+def get_image(source, roi=None, wait_next=False):
+ if wait_next:
+ source.waitNext(-1)
+ ret = load_image(Utils.grayscale(source.output, Rectangle(roi[0], roi[1], roi[2], roi[3]) if (roi is not None) else None))
+ return ret
+
+def grab_frames(source, samples, roi=None, wait_next=False, sleep=0):
+ frames = []
+ for i in range(samples):
+ if sleep>0:
+ time.sleep(sleep)
+ aux = get_image(source, roi, wait_next)
+ frames.append(aux)
+ return frames
+
+def average_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
+ return average_ips(grab_frames(source, samples, roi, wait_next, sleep), as_float)
+
+def integrate_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
+ return integrate_ips(grab_frames(sotscanurce, samples, roi, wait_next, sleep), as_float)
+
+
+if False:
+ integrate_roi(image, 10, 5, 20, 10)
+
+ add_device(RoiIntensity("Region1", image, 10, 5, 20, 10), True)
+ add_device(RoiIntensity("Region2", image, 10, 5, 40, 20), True)
+
+
+ import ch.psi.pshell.data.ProviderCSV as ProviderCSV
+ ProviderCSV.setDefaultItemSeparator(" ")
+ tscan((Region1, Region2), 10, 0.1, layout="table", provider = "csv")
+
+ ret = grab_frames(image, 10, sleep=0.1)
+ av = average_ips(ret, None, True)
+ data = get_ip_array(av)
+ plot(data)
+ save_image(av, "{images}/float.tif","tiff")
+
+ av = average_ips(ret, None, False)
+ save_image(av, "{images}/int.tif","tiff")
###############################################################################
-# ROI Integration
+# Triggering
###############################################################################
-
-def integrate_roi(source, x,y, w, h):
- if source.data is None:
- source.update()
- roi = source.data.getRoi(Rectangle(x,y, w, h))
- return roi.integrate(False)
-
-
-
-class RoiIntensity(ReadonlyRegisterBase):
- def __init__(self, name, source, x,y, w, h):
- ReadonlyRegisterBase.__init__(self, name)
- self.source=source
- self.roi = x,y, w, h
-
- def doRead(self):
- x,y, w, h = self.roi
- return integrate_roi(self.source, x,y, w, h)
-
-###############################################################################
-# Frame integration
-###############################################################################
-
-def get_image(source, roi=None, wait_next=False):
- if wait_next:
- source.waitNext(-1)
- ret = load_image(Utils.grayscale(source.output, Rectangle(roi[0], roi[1], roi[2], roi[3]) if (roi is not None) else None))
- return ret
+
+def trigger_eiger(wait=False):
+ eiger.start()
+ if wait:
+ eiger.waitNewImage(20000)
-def grab_frames(source, samples, roi=None, wait_next=False, sleep=0):
- frames = []
- for i in range(samples):
- if sleep>0:
- time.sleep(sleep)
- aux = get_image(source, roi, wait_next)
- frames.append(aux)
- return frames
-
-def average_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
- return average_ips(grab_frames(source, samples, roi, wait_next, sleep), as_float)
-
-def integrate_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
- return integrate_ips(grab_frames(source, samples, roi, wait_next, sleep), as_float)
-
-
-
-print integrate_roi(image, 10, 5, 20, 10)
-
-add_device(RoiIntensity("Region1", image, 10, 5, 20, 10), True)
-add_device(RoiIntensity("Region2", image, 10, 5, 40, 20), True)
-
-
-import ch.psi.pshell.data.ProviderCSV as ProviderCSV
-ProviderCSV.setDefaultItemSeparator(" ")
-tscan((Region1, Region2), 10, 0.1, layout="table", provider = "csv")
-
-ret = grab_frames(image, 10, sleep=0.1)
-av = average_ips(ret, None, True)
-data = get_ip_array(av)
-plot(data)
-save_image(av, "{images}/float.tif","tiff")
-
-av = average_ips(ret, None, False)
-save_image(av, "{images}/int.tif","tiff")
-
+
diff --git a/script/local.py b/script/local.py
index bc8a9f0..e5a66d2 100644
--- a/script/local.py
+++ b/script/local.py
@@ -231,3 +231,10 @@ def otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None,
run("templates/EnergyScan", {"E1":start, "E2":end, "TIME":time, "DELAY":float(delay), "MODE":mode, "OFFSET":(offset), "FOLDER":folder, "FILE":name, "ALPHA":float(alpha) if alpha is not None else None})
+###################################################################################################
+#Devices
+###################################################################################################
+
+run("devices/eiger")
+
+
diff --git a/script/templates/Eiger2Img.py b/script/templates/Eiger2Img.py
new file mode 100644
index 0000000..b3c3a3f
--- /dev/null
+++ b/script/templates/Eiger2Img.py
@@ -0,0 +1,29 @@
+#If running from editor
+if get_exec_pars().source == CommandSource.ui:
+ ID = "ID1"
+ SWITCHING = "Normal"
+ POL_ID_1 = "Circ_Plus"
+ ALPHA_ID_1 = 0.0
+ HARMONIC_ID_1 = 1
+ OFFSET_ID_1 = 0.0
+ POL_ID_2 = "Circ_Minus"
+ ALPHA_ID_2 = 0.0
+ HARMONIC_ID_2 = 1
+ OFFSET_ID_2 = 0.0
+ ROI = {"ROI1": [50,50,200, 100]}
+
+ METHOD = "Two_Pol"
+ MEASUREMENTS = 1
+ CONTRAST = 0
+ AUTO_SAVE = True
+ AS_SEQUENCE = False
+ EXPOSURE_1 = 1.0
+ AVERAGE_1 = 1.0
+ ENERGY_1 = 1000.0
+ POLARIZATION_1 = "Circ_Plus"
+ EXPOSURE_2 = 1.0
+ AVERAGE_2 = 1.0
+ ENERGY_2= 1000.0
+ POLARIZATION_2 = "Circ_Minus"
+
+tscan((keithley_1a,keithley_2a,keithley_3a), 10, 0.1)
\ No newline at end of file
diff --git a/script/templates/EigerAbsSpec.py b/script/templates/EigerAbsSpec.py
new file mode 100644
index 0000000..6aad47a
--- /dev/null
+++ b/script/templates/EigerAbsSpec.py
@@ -0,0 +1,25 @@
+#If running from editor
+if get_exec_pars().source == CommandSource.ui:
+ ID = "ID1"
+ SWITCHING = "Normal"
+ POL_ID_1 = "Circ_Plus"
+ ALPHA_ID_1 = 0.0
+ HARMONIC_ID_1 = 1
+ OFFSET_ID_1 = 0.0
+ POL_ID_2 = "Circ_Minus"
+ ALPHA_ID_2 = 0.0
+ HARMONIC_ID_2 = 1
+ OFFSET_ID_2 = 0.0
+ ROI = {"Region1": [10,5,20, 10], "Region2": [20,15,20, 10]}
+
+ SAVE_SPECTRUM = True
+ SAVE_IMAGES = False
+ WITH_I0 = True
+ SWITCH_POL = False
+ EXPOSURE = 1.0
+ AVERAGE = 1
+ NUMBER_SCANS =1
+
+
+rois = create_roi_devices(ROI)
+tscan(rois + [machine_cur, energy_rbk], 10, 1.1)