diff --git a/config/config.properties b/config/config.properties
index 565d3ec..dcc2cc6 100644
--- a/config/config.properties
+++ b/config/config.properties
@@ -1,48 +1,48 @@
-#Tue Nov 16 14:43:26 CET 2021
+#Wed Mar 16 09:54:44 CET 2022
+hostName=
+userManagement=false
+disableEmbeddedAttributes=false
+instanceName=SIS
autoSaveScanData=true
simulation=false
-dataScanSaveOutput=false
-userAuthenticator=
-dataScanSaveScript=false
-notifiedTasks=
-parallelInitialization=true
-dataTransferPath=
-saveConsoleSessionFiles=false
-hostName=
-disableEmbeddedAttributes=false
+dataServerPort=-1
serverPort=8080
+hideServerMessages=false
versionTrackingEnabled=true
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name}
serverEnabled=true
+logDaysToLive=7
depthDimension=0
+dataScanReleaseRecords=false
+dataScanPreserveTypes=true
+dataScanSaveOutput=false
logLevel=Info
+dataScanFlushRecords=false
+logPath={logs}/{date}_{time}
+filePermissionsLogs=Public
dataLayout=default
disableDataFileLogs=false
sessionHandling=Off
terminalEnabled=false
notificationLevel=Off
+filePermissionsScripts=Public
+userAuthenticator=
terminalPort=3579
-dataTransferUser=
-versionTrackingLogin={context}/svcusr-hlapp_robot
-noBytecodeFiles=false
-versionTrackingRemote=git@git.psi.ch\:pshell_config/x09la.git
-logDaysToLive=7
logLevelConsole=Off
filePermissionsConfig=Public
scanStreamerPort=-1
+dataScanSaveScript=false
+dataTransferUser=
dataScanSaveSetpoints=false
-versionTrackingManual=true
-dataTransferMode=Off
-userManagement=false
-instanceName=SIS
-dataServerPort=-1
-hideServerMessages=false
-dataScanReleaseRecords=false
-dataScanPreserveTypes=true
-dataScanFlushRecords=false
-logPath={logs}/{date}_{time}
-filePermissionsLogs=Public
-filePermissionsScripts=Public
+notifiedTasks=
filePermissionsData=Default
+parallelInitialization=true
+dataTransferPath=
+saveConsoleSessionFiles=false
+versionTrackingLogin={context}/svcusr-hlapp_robot
+noBytecodeFiles=false
+versionTrackingRemote=git@git.psi.ch\:pshell_config/x09la.git
+versionTrackingManual=true
dataProvider=h5
+dataTransferMode=Off
saveCommandStatistics=false
diff --git a/config/variables.properties b/config/variables.properties
index 43bf783..338e903 100644
--- a/config/variables.properties
+++ b/config/variables.properties
@@ -1,4 +1,4 @@
-#Wed Mar 02 15:34:58 CET 2022
-LastRunDate=220302
-DaySequentialNumber=6
-FileSequentialNumber=187
+#Tue Apr 12 13:18:32 CEST 2022
+LastRunDate=220412
+DaySequentialNumber=1
+FileSequentialNumber=278
diff --git a/devices/phi_master.properties b/devices/phi_master.properties
new file mode 100644
index 0000000..2f94bbc
--- /dev/null
+++ b/devices/phi_master.properties
@@ -0,0 +1,18 @@
+#Tue Apr 12 13:38:32 CEST 2022
+slave2Positions=null
+offset=0.0
+maxValue=NaN
+slave5Positions=null
+rotation=false
+precision=-1
+scale=1.0
+slave4Positions=null
+resolution=NaN
+mode=LINEAR
+minValue=NaN
+unit=null
+slave1Positions=null
+slave3Positions=null
+sign_bit=0
+masterPositions=null
+slave6Positions=null
diff --git a/extensions/Scienta.jar b/extensions/Scienta.jar
index bbdff86..6a5499f 100644
Binary files a/extensions/Scienta.jar and b/extensions/Scienta.jar differ
diff --git a/plugins/SIStem.form b/plugins/SIStem.form
index bccf2ea..af66748 100644
--- a/plugins/SIStem.form
+++ b/plugins/SIStem.form
@@ -160,12 +160,12 @@
-
+
-
+
+
+
-
-
@@ -179,7 +179,7 @@
-
+
@@ -208,15 +208,15 @@
-
-
-
+
+
+
-
+
@@ -246,7 +246,7 @@
-
+
@@ -321,15 +321,15 @@
-
-
-
+
+
+
-
+
@@ -359,7 +359,7 @@
-
+
@@ -427,7 +427,7 @@
-
+
@@ -440,7 +440,7 @@
-
+
@@ -460,6 +460,13 @@
+
+
+
+
+
+
+
@@ -474,10 +481,10 @@
-
-
-
-
+
+
+
+
@@ -506,7 +513,7 @@
-
+
@@ -575,45 +582,39 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
@@ -628,6 +629,11 @@
+
+
+
+
+
@@ -756,6 +762,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/SIStem.java b/plugins/SIStem.java
index 75971e2..bdfac5b 100644
--- a/plugins/SIStem.java
+++ b/plugins/SIStem.java
@@ -2,6 +2,7 @@
import ch.psi.pshell.core.Context;
import ch.psi.pshell.core.JsonSerializer;
import ch.psi.pshell.core.Nameable;
+import ch.psi.pshell.core.Plugin;
import ch.psi.pshell.device.Device;
import ch.psi.pshell.device.DeviceAdapter;
import ch.psi.pshell.device.DeviceListener;
@@ -28,6 +29,7 @@ import ch.psi.utils.Arr;
import ch.psi.utils.Convert;
import ch.psi.utils.IO;
import ch.psi.utils.State;
+import ch.psi.utils.Str;
import ch.psi.utils.swing.SwingUtils;
import java.awt.Color;
import java.awt.Component;
@@ -60,6 +62,8 @@ import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.DefaultTableModel;
@@ -83,6 +87,7 @@ public class SIStem extends PanelProcessor {
final JTextField[] scientaRangeFields;
String[] additionalPositioners ;
boolean intialized;
+ boolean startButtonPressed;
static{
QueueProcessor.DEFAULT_INFO_COLUMN = "Time";
@@ -188,7 +193,7 @@ public class SIStem extends PanelProcessor {
});
scientaPanels = new RegisterPanel[]{textLowEnergy,textCenterEnergy, textHighEnergy, textStepEnergy,
- textLowThetaY, textCenterThetaY, textHighThetaY, textStepThetaY, textCenterThetaX, textSlices, textChannels};
+ textLowThetaY, textCenterThetaY, textHighThetaY, textStepThetaY, textCenterThetaX, textSlices, textChannels, textExposureDev};
scientaRangeFields = new JTextField[]{textXChannelMax, textXChannelMin, textYChannelMax, textYChannelMin};
scientaCombos = new DiscretePositionerSelector[]{comboPass, comboAcquisition, comboEnergy, comboLens, comboDetMode};
deviceCombos = new JComboBox[]{comboPol, comboGrating};
@@ -201,6 +206,13 @@ public class SIStem extends PanelProcessor {
updateLens();
});
+ modelScanned.addTableModelListener(new TableModelListener() {
+ @Override
+ public void tableChanged(TableModelEvent e) {
+ updateTime();
+ }
+ });
+
clear();
//startTimer(1000, 1000);
}
@@ -385,6 +397,10 @@ public class SIStem extends PanelProcessor {
@Override
public void saveAs(String fileName) throws IOException {
currentFile = new File(fileName);
+ if (!intialized){
+ return;
+ }
+
Map preActions = new LinkedHashMap();
@@ -462,8 +478,28 @@ public class SIStem extends PanelProcessor {
updateControls();
}
+
+ //TODO: remove in next version (use getContext().getPlugin)
+ Plugin getPlugin(String name) {
+ for (Plugin p: getContext().getPlugins()) {
+ if (IO.getPrefix(getPluginName()).equals(name)){
+ return p;
+ }
+ }
+ return null;
+ }
+
@Override
- public void open(String fileName) throws IOException {
+ public void open(String fileName) throws IOException {
+ if (!intialized){
+ //Called from queue, set filename and load file in the panel
+ currentFile = (fileName != null) ? new File(fileName) : null;
+ Plugin p = getPlugin(SIStem.class.getSimpleName());
+ if (p!=null){
+ ((SIStem)p).open(fileName);
+ }
+ return;
+ }
clear();
try{
if (fileName != null) {
@@ -562,7 +598,7 @@ public class SIStem extends PanelProcessor {
@Override
public void clear() {
- currentFile = null;
+ currentFile = null;
deletePrivateMasterAxis();
for (JComboBox combo : deviceCombos) {
if (combo.getModel().getSize()>0){
@@ -643,28 +679,35 @@ public class SIStem extends PanelProcessor {
@Override
public void execute() throws Exception {
- checkValues();
- checkBeamline();
- save();
- if (currentFile == null) {
- return;
+ try{
+ if (intialized){
+ //Called from queue, don't update file contents
+ checkValues();
+ checkBeamline();
+ save();
+ }
+ if (currentFile == null) {
+ return;
+ }
+ Processor p = (getView()==null) ? null : getView().getRunningProcessor(true);
+ boolean showException = (getView()==null) ? startButtonPressed : getView().getPreferences().getScriptPopupDialog() != Preferences.ScriptPopupDialog.None;
+ HashMap args = new HashMap();
+ args.put("NAME", getScanName());
+ this.runAsync("templates/SIStem", args).handle((ret, ex) -> {
+ if (ex != null) {
+ if ((p==null)||!(p instanceof QueueProcessor)){
+ if (showException) {
+ if (!getContext().isAborted()) {
+ showException((Exception)ex);
+ }
+ }
+ }
+ }
+ return ret;
+ });
+ } finally{
+ startButtonPressed=false;
}
- Processor p = getView().getRunningProcessor(true);
- HashMap args = new HashMap();
- args.put("NAME", getScanName());
- this.runAsync("templates/SIStem", args).handle((ret, ex) -> {
- if (ex != null) {
- if ((p==null)||!(p instanceof QueueProcessor)){
- if (getView().getPreferences().getScriptPopupDialog() != Preferences.ScriptPopupDialog.None) {
- if (!getContext().isAborted()) {
- showException((Exception)ex);
- }
- }
- }
- }
- return ret;
- });
-
}
@Override
@@ -1011,8 +1054,10 @@ public class SIStem extends PanelProcessor {
public void onValueChanged(final Device device, final Object value, final Object former) {
try {
Double p = (Double) eval("scienta.getProgress()", true);
+ State state = (State) eval("scienta.getState()", true);
SwingUtilities.invokeLater(() -> {
progress.setValue((int) (p * 1000));
+ progress.setIndeterminate((p<=0) && (state==State.Busy));
});
} catch (Exception ex) {
@@ -1099,6 +1144,8 @@ public class SIStem extends PanelProcessor {
comboDetMode = new ch.psi.pshell.swing.DiscretePositionerSelector();
textChannels = new ch.psi.pshell.swing.RegisterPanel();
textSlices = new ch.psi.pshell.swing.RegisterPanel();
+ jLabel31 = new javax.swing.JLabel();
+ textExposureDev = new ch.psi.pshell.swing.RegisterPanel();
jPanel11 = new javax.swing.JPanel();
checkZigzag = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
@@ -1209,13 +1256,13 @@ public class SIStem extends PanelProcessor {
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelEnergyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(textLowEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
- .addComponent(textCenterEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
- .addComponent(textHighEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)))
+ .addComponent(textLowEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
+ .addComponent(textCenterEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
+ .addComponent(textHighEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelEnergyLayout.createSequentialGroup()
.addComponent(jLabel15)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textStepEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)))
+ .addComponent(textStepEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)))
.addContainerGap())
);
@@ -1240,7 +1287,7 @@ public class SIStem extends PanelProcessor {
.addGroup(panelEnergyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel15)
.addComponent(textStepEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(16, Short.MAX_VALUE))
+ .addContainerGap(38, Short.MAX_VALUE))
);
panelY.setBorder(javax.swing.BorderFactory.createTitledBorder("ThetaY "));
@@ -1279,13 +1326,13 @@ public class SIStem extends PanelProcessor {
.addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelYLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(textLowThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
- .addComponent(textCenterThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
- .addComponent(textHighThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)))
+ .addComponent(textLowThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
+ .addComponent(textCenterThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
+ .addComponent(textHighThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelYLayout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textStepThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)))
+ .addComponent(textStepThetaY, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)))
.addContainerGap())
);
@@ -1310,7 +1357,7 @@ public class SIStem extends PanelProcessor {
.addGroup(panelYLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel20)
.addComponent(textStepThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(16, Short.MAX_VALUE))
+ .addContainerGap(38, Short.MAX_VALUE))
);
panelX.setBorder(javax.swing.BorderFactory.createTitledBorder("ThetaX"));
@@ -1328,7 +1375,7 @@ public class SIStem extends PanelProcessor {
.addContainerGap()
.addComponent(jLabel26)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textCenterThetaX, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
+ .addComponent(textCenterThetaX, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
.addContainerGap())
);
panelXLayout.setVerticalGroup(
@@ -1338,9 +1385,11 @@ public class SIStem extends PanelProcessor {
.addGroup(panelXLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel26)
.addComponent(textCenterThetaX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(67, Short.MAX_VALUE))
+ .addContainerGap(89, Short.MAX_VALUE))
);
+ jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Parameters"));
+
jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel29.setText("Energy Mode:");
@@ -1374,10 +1423,10 @@ public class SIStem extends PanelProcessor {
.addComponent(jLabel30))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(comboLens, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
- .addComponent(comboEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
- .addComponent(comboAcquisition, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
- .addComponent(comboPass, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
+ .addComponent(comboLens, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
+ .addComponent(comboEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
+ .addComponent(comboAcquisition, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
+ .addComponent(comboPass, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))
.addContainerGap())
);
@@ -1413,11 +1462,11 @@ public class SIStem extends PanelProcessor {
.addContainerGap()
.addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(panelEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(panelEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(12, 12, 12)
- .addComponent(panelX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(panelX, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(panelY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(panelY, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
@@ -1429,7 +1478,7 @@ public class SIStem extends PanelProcessor {
.addComponent(panelX, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelEnergy, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(169, Short.MAX_VALUE))
+ .addContainerGap(147, Short.MAX_VALUE))
);
jPanel4Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jPanel10, panelEnergy, panelX, panelY});
@@ -1493,46 +1542,51 @@ public class SIStem extends PanelProcessor {
textSlices.setName("scienta.slices"); // NOI18N
+ jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ jLabel31.setText("Dwell Time (s):");
+
+ textExposureDev.setName("scienta.exposureDev"); // NOI18N
+
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
+ .addContainerGap(13, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel16)
- .addComponent(jLabel9))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel5Layout.createSequentialGroup()
- .addComponent(textXChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textXChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addComponent(comboDetMode, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addGroup(jPanel5Layout.createSequentialGroup()
- .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel31)
+ .addComponent(jLabel9)
+ .addComponent(jLabel27)
.addComponent(jLabel10)
.addComponent(jLabel25))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(textChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(textYChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(textYChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addComponent(textSlices, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addComponent(textSlices, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addComponent(textXChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(textXChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(comboDetMode, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
+ .addComponent(textExposureDev, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE))
.addGroup(jPanel5Layout.createSequentialGroup()
- .addComponent(jLabel27)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addComponent(butonPlot))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
- .addComponent(detectorPlot, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(butonPlot)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
+ .addComponent(detectorPlot, javax.swing.GroupLayout.DEFAULT_SIZE, 542, Short.MAX_VALUE)
.addContainerGap())
);
- jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel16, jLabel25, jLabel27, jLabel9});
+ jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel16, jLabel25, jLabel27, jLabel31, jLabel9});
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -1543,6 +1597,10 @@ public class SIStem extends PanelProcessor {
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel16)
.addComponent(comboDetMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(textExposureDev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel31))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel9)
@@ -2066,6 +2124,7 @@ public class SIStem extends PanelProcessor {
private void buttonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartActionPerformed
try {
+ startButtonPressed=true;
execute();
} catch (Exception ex) {
showException(ex);
@@ -2283,6 +2342,7 @@ public class SIStem extends PanelProcessor {
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel30;
+ private javax.swing.JLabel jLabel31;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
@@ -2318,6 +2378,7 @@ public class SIStem extends PanelProcessor {
private ch.psi.pshell.swing.RegisterPanel textCenterThetaY;
private ch.psi.pshell.swing.RegisterPanel textChannels;
private javax.swing.JTextArea textDiagnostics;
+ private ch.psi.pshell.swing.RegisterPanel textExposureDev;
private javax.swing.JTextField textFile;
private ch.psi.pshell.swing.RegisterPanel textHighEnergy;
private ch.psi.pshell.swing.RegisterPanel textHighThetaY;
diff --git a/script/queues/test.que b/script/queues/test.que
index 69ea4b2..7401fe7 100644
--- a/script/queues/test.que
+++ b/script/queues/test.que
@@ -1 +1 @@
-[ [ [ true, "scans/test/nick.json", "\"Time\":2.500", "Resume", "Failure" ], [ false, "scans/test/nick2d.json", "", "Resume", "Disabled" ], [ true, "scans/test/nick.json", "", "Resume", "Success" ], [ true, "scans/test/nick.json", "", "Resume", "Failure" ], [ true, "scans/test/nick.json", "\"Time\":2.500", "Resume", "Success" ], [ true, "scans/test/scan2.json", "", "Resume", "Failure" ], [ true, "scans/test/scan2.json", "\"Time\":5.000", "Resume", "Success" ], [ true, "scans/test/scan2.json", "\"Time\":5.000", "Resume", "Failure" ] ] ]
\ No newline at end of file
+[ [ [ true, "scans/test/test.json", "", "Resume", "Success", "5 x 01" ], [ true, "scans/test/test3.json", "", "Resume", "Success", "1 x 01" ], [ true, "scans/test/test2.json", "", "Resume", "Success", "3 x 02" ] ] ]
\ No newline at end of file
diff --git a/script/scans/test/nick.json b/script/scans/test/nick.json
index 3258503..87cb792 100644
--- a/script/scans/test/nick.json
+++ b/script/scans/test/nick.json
@@ -1,29 +1,29 @@
{
"PASSES" : 1,
- "STOP" : [ 1.0 ],
+ "STOP" : [ 5.0 ],
"DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
"PRE_ACTIONS" : {
- "scienta.passEnergyDev" : "10",
+ "scienta.passEnergyDev" : "5",
"scienta.acquisitionModeDev" : "Fixed",
"scienta.energyModeDev" : "Kinetic",
- "scienta.lensModeDev" : "A30L_01",
+ "scienta.lensModeDev" : "A30_01",
"scienta.detectorModeDev" : "ADC",
- "scienta.lowEnergy" : 33.0,
- "scienta.centerEnergy" : 34.5,
- "scienta.highEnergy" : 35.0,
- "scienta.energyStepSize" : 0.005,
+ "scienta.lowEnergy" : 20.3,
+ "scienta.centerEnergy" : 20.25,
+ "scienta.highEnergy" : 20.5,
+ "scienta.energyStepSize" : 0.001,
"scienta.centerThetaX" : 0.0,
"scienta.slices" : 601,
"scienta.channels" : 801
},
"COMPRESSION" : true,
- "SENSORS" : [ "scienta.dataMatrix", "current" ],
+ "SENSORS" : [ "scienta.dataMatrix" ],
"ZIGZAG" : false,
"SETTLING_TIME" : 0.0,
"MONITORS" : [ "current" ],
- "START" : [ 0.0 ],
- "RANGE" : [ 900, 100, 750, 150 ],
- "POSITIONERS" : [ "x" ],
- "STEPS" : [ 9 ],
+ "START" : [ -5.0 ],
+ "RANGE" : [ 900, 100, 800, 200 ],
+ "POSITIONERS" : [ "tilt" ],
+ "STEPS" : [ 10 ],
"SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "photon_energy", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_sample1", "temp_sample2", "temp_shield" ]
}
\ No newline at end of file
diff --git a/script/scans/test/test.json b/script/scans/test/test.json
index 5dfaee5..acc570f 100644
--- a/script/scans/test/test.json
+++ b/script/scans/test/test.json
@@ -1,22 +1,17 @@
{
"PASSES" : 1,
- "STOP" : [ ],
+ "STOP" : [ 1.0 ],
"DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
"PRE_ACTIONS" : {
- "scienta.passEnergyDev" : "50",
+ "scienta.passEnergyDev" : "10",
"scienta.acquisitionModeDev" : "Fixed",
"scienta.energyModeDev" : "Kinetic",
- "scienta.lensModeDev" : "DA7_08",
+ "scienta.lensModeDev" : "Transmission",
"scienta.detectorModeDev" : "ADC",
"scienta.lowEnergy" : 10.0,
- "scienta.centerEnergy" : 12.0,
- "scienta.highEnergy" : 15.0,
- "scienta.energyStepSize" : 0.005,
- "scienta.lowThetaY" : 2.0,
- "scienta.centerThetaY" : 4.0,
- "scienta.highThetaY" : 6.0,
- "scienta.thetaYStepSize" : 0.1,
- "scienta.centerThetaX" : 0.0,
+ "scienta.centerEnergy" : 19.5,
+ "scienta.highEnergy" : 150.0,
+ "scienta.energyStepSize" : 0.01,
"scienta.slices" : 601,
"scienta.channels" : 801
},
@@ -25,9 +20,9 @@
"ZIGZAG" : false,
"SETTLING_TIME" : 0.0,
"MONITORS" : [ "current" ],
- "START" : [ ],
+ "START" : [ 0.0 ],
"RANGE" : [ null, null, null, null ],
- "POSITIONERS" : [ ],
- "STEPS" : [ ],
+ "POSITIONERS" : [ "x" ],
+ "STEPS" : [ 4 ],
"SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "photon_energy", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_sample1", "temp_sample2", "temp_shield" ]
}
\ No newline at end of file
diff --git a/script/scans/test/test1.json b/script/scans/test/test1.json
index 3a3e694..46e6643 100644
--- a/script/scans/test/test1.json
+++ b/script/scans/test/test1.json
@@ -2,7 +2,20 @@
"PASSES" : 1,
"STOP" : [ 42.0 ],
"DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
- "PRE_ACTIONS" : { },
+ "PRE_ACTIONS" : {
+ "scienta.passEnergyDev" : "10",
+ "scienta.acquisitionModeDev" : "Fixed",
+ "scienta.energyModeDev" : "Kinetic",
+ "scienta.lensModeDev" : "Transmission",
+ "scienta.detectorModeDev" : "ADC",
+ "scienta.lowEnergy" : 10.0,
+ "scienta.centerEnergy" : 19.5,
+ "scienta.highEnergy" : 150.0,
+ "scienta.energyStepSize" : 0.01,
+ "scienta.slices" : 601,
+ "scienta.channels" : 801,
+ "scienta.exposureDev" : 1.0
+ },
"COMPRESSION" : true,
"SENSORS" : [ "scienta.dataMatrix" ],
"ZIGZAG" : false,
diff --git a/script/scans/test/test2.json b/script/scans/test/test2.json
new file mode 100644
index 0000000..d931a04
--- /dev/null
+++ b/script/scans/test/test2.json
@@ -0,0 +1,29 @@
+{
+ "PASSES" : 1,
+ "STOP" : [ 1.0 ],
+ "DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
+ "PRE_ACTIONS" : {
+ "scienta.passEnergyDev" : "10",
+ "scienta.acquisitionModeDev" : "Fixed",
+ "scienta.energyModeDev" : "Kinetic",
+ "scienta.lensModeDev" : "Transmission",
+ "scienta.detectorModeDev" : "ADC",
+ "scienta.lowEnergy" : 10.0,
+ "scienta.centerEnergy" : 19.5,
+ "scienta.highEnergy" : 11.0,
+ "scienta.energyStepSize" : 0.1,
+ "scienta.slices" : 601,
+ "scienta.channels" : 801,
+ "scienta.exposureDev" : 1.0
+ },
+ "COMPRESSION" : true,
+ "SENSORS" : [ "scienta.dataMatrix" ],
+ "ZIGZAG" : false,
+ "SETTLING_TIME" : 0.0,
+ "MONITORS" : [ "current" ],
+ "START" : [ 0.0 ],
+ "RANGE" : [ null, null, null, null ],
+ "POSITIONERS" : [ "x" ],
+ "STEPS" : [ 2 ],
+ "SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "photon_energy", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_sample1", "temp_sample2", "temp_shield" ]
+}
\ No newline at end of file
diff --git a/script/scans/test/test3.json b/script/scans/test/test3.json
new file mode 100644
index 0000000..c522422
--- /dev/null
+++ b/script/scans/test/test3.json
@@ -0,0 +1,29 @@
+{
+ "PASSES" : 1,
+ "STOP" : [ ],
+ "DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
+ "PRE_ACTIONS" : {
+ "scienta.passEnergyDev" : "10",
+ "scienta.acquisitionModeDev" : "Fixed",
+ "scienta.energyModeDev" : "Kinetic",
+ "scienta.lensModeDev" : "Transmission",
+ "scienta.detectorModeDev" : "ADC",
+ "scienta.lowEnergy" : 10.0,
+ "scienta.centerEnergy" : 19.5,
+ "scienta.highEnergy" : 150.0,
+ "scienta.energyStepSize" : 0.01,
+ "scienta.slices" : 601,
+ "scienta.channels" : 801,
+ "scienta.exposureDev" : 2.0
+ },
+ "COMPRESSION" : true,
+ "SENSORS" : [ "scienta.dataMatrix" ],
+ "ZIGZAG" : false,
+ "SETTLING_TIME" : 0.0,
+ "MONITORS" : [ "current" ],
+ "START" : [ ],
+ "RANGE" : [ null, null, null, null ],
+ "POSITIONERS" : [ ],
+ "STEPS" : [ ],
+ "SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "photon_energy", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_sample1", "temp_sample2", "temp_shield" ]
+}
\ No newline at end of file
diff --git a/script/scans/test/test_nick.json b/script/scans/test/test_nick.json
new file mode 100644
index 0000000..3f4084e
--- /dev/null
+++ b/script/scans/test/test_nick.json
@@ -0,0 +1,33 @@
+{
+ "PASSES" : 1,
+ "STOP" : [ ],
+ "DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
+ "PRE_ACTIONS" : {
+ "scienta.passEnergyDev" : "10",
+ "scienta.acquisitionModeDev" : "Fixed",
+ "scienta.energyModeDev" : "Kinetic",
+ "scienta.lensModeDev" : "DA30_01",
+ "scienta.detectorModeDev" : "ADC",
+ "scienta.lowEnergy" : 10.0,
+ "scienta.centerEnergy" : 19.5,
+ "scienta.highEnergy" : 150.0,
+ "scienta.energyStepSize" : 0.01,
+ "scienta.lowThetaY" : 2.0,
+ "scienta.centerThetaY" : 4.0,
+ "scienta.highThetaY" : 6.0,
+ "scienta.thetaYStepSize" : 0.1,
+ "scienta.centerThetaX" : 0.0,
+ "scienta.slices" : 601,
+ "scienta.channels" : 801
+ },
+ "COMPRESSION" : true,
+ "SENSORS" : [ "scienta.dataMatrix" ],
+ "ZIGZAG" : false,
+ "SETTLING_TIME" : 0.0,
+ "MONITORS" : [ "current" ],
+ "START" : [ ],
+ "RANGE" : [ 900, 100, 800, 200 ],
+ "POSITIONERS" : [ ],
+ "STEPS" : [ ],
+ "SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "photon_energy", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_sample1", "temp_sample2", "temp_shield" ]
+}
\ No newline at end of file
diff --git a/script/scans/test/test_nick_2.json b/script/scans/test/test_nick_2.json
new file mode 100644
index 0000000..0116e71
--- /dev/null
+++ b/script/scans/test/test_nick_2.json
@@ -0,0 +1,32 @@
+{
+ "PASSES" : 1,
+ "STOP" : [ 10.0 ],
+ "DIAGS" : [ "phi", "theta", "tilt", "x", "y", "z" ],
+ "PRE_ACTIONS" : {
+ "scienta.passEnergyDev" : "10",
+ "scienta.acquisitionModeDev" : "Fixed",
+ "scienta.energyModeDev" : "Kinetic",
+ "scienta.lensModeDev" : "A30_01",
+ "scienta.detectorModeDev" : "ADC",
+ "scienta.lowEnergy" : 10.0,
+ "scienta.centerEnergy" : 20.0,
+ "scienta.highEnergy" : 150.0,
+ "scienta.energyStepSize" : 0.01,
+ "scienta.centerThetaX" : 0.0,
+ "scienta.slices" : 601,
+ "scienta.channels" : 801,
+ "scienta.exposureDev" : 0.2,
+ "x" : 0.1,
+ "y" : -0.2
+ },
+ "COMPRESSION" : true,
+ "SENSORS" : [ "scienta.dataMatrix" ],
+ "ZIGZAG" : false,
+ "SETTLING_TIME" : 0.0,
+ "MONITORS" : [ "current", "photon_energy", "temp_sample1", "temp_sample2" ],
+ "START" : [ -10.0 ],
+ "RANGE" : [ null, null, null, null ],
+ "POSITIONERS" : [ "tilt" ],
+ "STEPS" : [ 41 ],
+ "SNAPS" : [ "acmi", "cff", "energy", "exit_slit", "fe_horiz_width", "fe_vert_width", "helium_valve", "master", "pgm_cff", "tcmp", "temp_boot1", "temp_boot2", "temp_cryopump", "temp_cryostat", "temp_headmech", "temp_shield" ]
+}
\ No newline at end of file
diff --git a/script/templates/SIStem.py b/script/templates/SIStem.py
index 55a50d1..356b1d2 100644
--- a/script/templates/SIStem.py
+++ b/script/templates/SIStem.py
@@ -91,10 +91,11 @@ def after_read(rec, scan):
except:
log(sys.exc_info()[1])
try:
- if len(positioners)==0:
+ if len(positioners)==0:
ret= tscan (sensors, 1,0, passes=passes, \
before_read=before_read, after_read=after_read, \
- snaps=SNAPS, diags=DIAGS, monitors=MONITORS)
+ snaps=SNAPS, diags=DIAGS, monitors=MONITORS, keep=True)
+ save_dataset("/image", ret[scienta.dataMatrix][0], type = 'i', features={"compression":True})
else:
ret= ascan (positioners, sensors, start, end, steps, \
latency= latency, relative=False, passes=passes, zigzag=zigzag, \
@@ -103,3 +104,4 @@ try:
finally:
scienta.zeroSupplies()
+print ret