Closedown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Tue Aug 30 14:09:40 CEST 2016
|
||||
#Tue Sep 06 10:39:20 CEST 2016
|
||||
colormap=Grayscale
|
||||
colormapAutomatic=true
|
||||
colormapMax=4169.819
|
||||
|
||||
+12
-1
@@ -1,4 +1,4 @@
|
||||
#Mon Nov 02 17:56:22 CET 2015
|
||||
#Tue Sep 06 10:00:18 CEST 2016
|
||||
colormap=Temperature
|
||||
colormapAutomatic=true
|
||||
colormapMax=255.0
|
||||
@@ -13,5 +13,16 @@ pollingBackground=false
|
||||
pollingInterval=0
|
||||
rescaleFactor=1.0
|
||||
rescaleOffset=0.0
|
||||
roiHeight=-1
|
||||
roiWidth=-1
|
||||
roiX=0
|
||||
roiY=0
|
||||
rotation=0.0
|
||||
rotationCrop=false
|
||||
scale=1.0
|
||||
spatialCalOffsetX=NaN
|
||||
spatialCalOffsetY=NaN
|
||||
spatialCalScaleX=NaN
|
||||
spatialCalScaleY=NaN
|
||||
spatialCalUnits=mm
|
||||
transpose=false
|
||||
|
||||
+12
-1
@@ -1,4 +1,4 @@
|
||||
#Mon Nov 02 17:56:22 CET 2015
|
||||
#Tue Sep 06 10:00:18 CEST 2016
|
||||
colormap=Grayscale
|
||||
colormapAutomatic=true
|
||||
colormapMax=255.0
|
||||
@@ -13,5 +13,16 @@ pollingBackground=false
|
||||
pollingInterval=0
|
||||
rescaleFactor=1.0
|
||||
rescaleOffset=0.0
|
||||
roiHeight=-1
|
||||
roiWidth=-1
|
||||
roiX=0
|
||||
roiY=0
|
||||
rotation=0.0
|
||||
rotationCrop=false
|
||||
scale=1.0
|
||||
spatialCalOffsetX=NaN
|
||||
spatialCalOffsetY=NaN
|
||||
spatialCalScaleX=NaN
|
||||
spatialCalScaleY=NaN
|
||||
spatialCalUnits=mm
|
||||
transpose=false
|
||||
|
||||
@@ -87,6 +87,18 @@
|
||||
<Component id="buttonScientaSetup" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="checkEndScan" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkSaveImage" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="labelAcqTime" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="labelTotalTime" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="textTotalTime" linkSize="5" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="dvpAcqTime" linkSize="5" alignment="1" min="-2" pref="76" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -120,12 +132,22 @@
|
||||
<Component id="jLabel17" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="valueIterations" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel11" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboPass" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="32" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="labelAcqTime" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="dvpAcqTime" linkSize="6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="textTotalTime" linkSize="6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="labelTotalTime" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="32" max="32767" attributes="0"/>
|
||||
<Component id="checkEndScan" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkSaveImage" min="-2" max="-2" attributes="0"/>
|
||||
@@ -253,6 +275,30 @@
|
||||
<Property name="text" type="java.lang.String" value="Save Scienta image"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="textTotalTime">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="dvpAcqTime">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelAcqTime">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Acquisition time(s):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelTotalTime">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Total time:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
@@ -281,7 +327,7 @@
|
||||
<Component id="buttonInitialScan" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="buttonDetailedScan" linkSize="1" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="66" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
||||
<Component id="buttonSkip" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
|
||||
+84
-28
@@ -18,6 +18,7 @@ import ch.psi.pshell.swing.ValueSelection;
|
||||
import java.awt.Component;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -82,6 +83,8 @@ public class XPSSpectrum extends Panel {
|
||||
scienta = (Scienta) getDevice("Scienta");
|
||||
scienta.getTotalChannels().addListener(progressListener);
|
||||
scienta.getCurrentChannel().addListener(progressListener);
|
||||
dvpAcqTime.setDevice(scienta.getAcquisitionTime());
|
||||
startTimer(500,100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,7 +93,7 @@ public class XPSSpectrum extends Panel {
|
||||
if (!state.isProcessing()){
|
||||
buttonSkip.setVisible(false);
|
||||
if (running){
|
||||
stopTimer();
|
||||
//stopTimer();
|
||||
running = false;
|
||||
getView().getStatusBar().setProgress(-1);
|
||||
}
|
||||
@@ -168,33 +171,48 @@ public class XPSSpectrum extends Panel {
|
||||
@Override
|
||||
protected void onTimer() {
|
||||
try{
|
||||
Object index = XPSSpectrum.this.eval(CURRERNT_RANGE_VAR, true);
|
||||
if ((index!=null) && (index instanceof Integer) && ((Integer)index >= 0)){
|
||||
int scanIndex = (Integer)index;
|
||||
if (scanIndex!=currentScanIndex){
|
||||
buttonSkip.setEnabled(true);
|
||||
}
|
||||
currentScanIndex = scanIndex;
|
||||
if (running){
|
||||
Object index = XPSSpectrum.this.eval(CURRERNT_RANGE_VAR, true);
|
||||
if ((index!=null) && (index instanceof Integer) && ((Integer)index >= 0)){
|
||||
int scanIndex = (Integer)index;
|
||||
if (scanIndex!=currentScanIndex){
|
||||
buttonSkip.setEnabled(true);
|
||||
}
|
||||
currentScanIndex = scanIndex;
|
||||
|
||||
int current_iteration = (Integer) XPSSpectrum.this.eval(CURRERNT_ITERATION_VAR, true);
|
||||
int iterations = (Integer)scanRanges[currentScanIndex].getVars()[2];
|
||||
int current_iteration = (Integer) XPSSpectrum.this.eval(CURRERNT_ITERATION_VAR, true);
|
||||
int iterations = (Integer)scanRanges[currentScanIndex].getVars()[2];
|
||||
|
||||
buttonSkip.setVisible((iterations>1) && (current_iteration < (iterations-1)));
|
||||
buttonSkip.setVisible((iterations>1) && (current_iteration < (iterations-1)));
|
||||
|
||||
if (detailedScan){
|
||||
RangeSelection range = rangeSelectionPanel.getRangesOrdered()[scanIndex];
|
||||
for (int row = 0; row< rangeSelectionPanel.getTable().getRowCount(); row++){
|
||||
if (range.equals((Double)rangeSelectionPanel.getTable().getValueAt(row, 0), (Double)rangeSelectionPanel.getTable().getValueAt(row, 2))){
|
||||
rangeSelectionPanel.getTable().setRowSelectionInterval(row, row);
|
||||
break;
|
||||
}
|
||||
if (row == (rangeSelectionPanel.getTable().getRowCount()-1)){
|
||||
rangeSelectionPanel.getTable().clearSelection();
|
||||
}
|
||||
}
|
||||
if (detailedScan){
|
||||
RangeSelection range = rangeSelectionPanel.getRangesOrdered()[scanIndex];
|
||||
for (int row = 0; row< rangeSelectionPanel.getTable().getRowCount(); row++){
|
||||
if (range.equals((Double)rangeSelectionPanel.getTable().getValueAt(row, 0), (Double)rangeSelectionPanel.getTable().getValueAt(row, 2))){
|
||||
rangeSelectionPanel.getTable().setRowSelectionInterval(row, row);
|
||||
break;
|
||||
}
|
||||
if (row == (rangeSelectionPanel.getTable().getRowCount()-1)){
|
||||
rangeSelectionPanel.getTable().clearSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rangeSelectionPanel.getTable().clearSelection();
|
||||
}
|
||||
} else {
|
||||
rangeSelectionPanel.getTable().clearSelection();
|
||||
int steps = 0;
|
||||
RangeSelection[] r = rangeSelectionPanel.getRanges();
|
||||
if ((buttonDetailedScan.isEnabled()) && (r.length>0)){
|
||||
for (int i=0;i<r.length;i++){
|
||||
int iterations = (Integer)scanRanges[i].getVars()[2];
|
||||
steps += iterations;
|
||||
}
|
||||
} else {
|
||||
steps = Math.max(1, (int)valueIterations.getValue());
|
||||
}
|
||||
int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps);
|
||||
textTotalTime.setText(LocalTime.ofSecondOfDay(seconds).toString());
|
||||
}
|
||||
} catch (Exception ex){
|
||||
getLogger().log(Level.FINE, null, ex);
|
||||
@@ -209,7 +227,7 @@ public class XPSSpectrum extends Panel {
|
||||
args.put("ENDSCAN", checkEndScan.isSelected());
|
||||
currentScanIndex = -1;
|
||||
runAsync("XPSSpectrum", args);
|
||||
startTimer(500,10);
|
||||
//startTimer(500,10);
|
||||
running = true;
|
||||
}
|
||||
|
||||
@@ -234,6 +252,10 @@ public class XPSSpectrum extends Panel {
|
||||
buttonScientaSetup = new javax.swing.JButton();
|
||||
checkEndScan = new javax.swing.JCheckBox();
|
||||
checkSaveImage = new javax.swing.JCheckBox();
|
||||
textTotalTime = new javax.swing.JLabel();
|
||||
dvpAcqTime = new ch.psi.pshell.swing.DeviceValuePanel();
|
||||
labelAcqTime = new javax.swing.JLabel();
|
||||
labelTotalTime = new javax.swing.JLabel();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
btLoad = new javax.swing.JButton();
|
||||
btSave = new javax.swing.JButton();
|
||||
@@ -316,6 +338,15 @@ public class XPSSpectrum extends Panel {
|
||||
|
||||
checkSaveImage.setText("Save Scienta image");
|
||||
|
||||
textTotalTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
textTotalTime.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
|
||||
|
||||
labelAcqTime.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
labelAcqTime.setText("Acquisition time(s):");
|
||||
|
||||
labelTotalTime.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
labelTotalTime.setText("Total time:");
|
||||
|
||||
javax.swing.GroupLayout panelArgumentsLayout = new javax.swing.GroupLayout(panelArguments);
|
||||
panelArguments.setLayout(panelArgumentsLayout);
|
||||
panelArgumentsLayout.setHorizontalGroup(
|
||||
@@ -349,7 +380,16 @@ public class XPSSpectrum extends Panel {
|
||||
.addComponent(valueIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(buttonScientaSetup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(checkEndScan)
|
||||
.addComponent(checkSaveImage))
|
||||
.addComponent(checkSaveImage)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelArgumentsLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(labelAcqTime)
|
||||
.addComponent(labelTotalTime))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(textTotalTime, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(dvpAcqTime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@@ -357,6 +397,8 @@ public class XPSSpectrum extends Panel {
|
||||
|
||||
panelArgumentsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel11, jLabel17, jLabel2, jLabel8, jLabel9});
|
||||
|
||||
panelArgumentsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dvpAcqTime, textTotalTime});
|
||||
|
||||
panelArgumentsLayout.setVerticalGroup(
|
||||
panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelArgumentsLayout.createSequentialGroup()
|
||||
@@ -380,11 +422,19 @@ public class XPSSpectrum extends Panel {
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel17)
|
||||
.addComponent(valueIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel11)
|
||||
.addComponent(comboPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(labelAcqTime)
|
||||
.addComponent(dvpAcqTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelArgumentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(textTotalTime)
|
||||
.addComponent(labelTotalTime))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
|
||||
.addComponent(checkEndScan)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkSaveImage)
|
||||
@@ -393,6 +443,8 @@ public class XPSSpectrum extends Panel {
|
||||
.addGap(26, 26, 26))
|
||||
);
|
||||
|
||||
panelArgumentsLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {dvpAcqTime, textTotalTime});
|
||||
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Control"));
|
||||
|
||||
btLoad.setText("Load");
|
||||
@@ -456,7 +508,7 @@ public class XPSSpectrum extends Panel {
|
||||
.addComponent(buttonInitialScan)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonDetailedScan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 66, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
|
||||
.addComponent(buttonSkip)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonAbort))
|
||||
@@ -630,6 +682,7 @@ public class XPSSpectrum extends Panel {
|
||||
private javax.swing.JCheckBox checkEndScan;
|
||||
private javax.swing.JCheckBox checkSaveImage;
|
||||
private javax.swing.JComboBox comboPass;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel dvpAcqTime;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel17;
|
||||
@@ -637,8 +690,11 @@ public class XPSSpectrum extends Panel {
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JLabel jLabel9;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JLabel labelAcqTime;
|
||||
private javax.swing.JLabel labelTotalTime;
|
||||
private javax.swing.JPanel panelArguments;
|
||||
private ch.psi.pshell.swing.RangeSelectionPanel rangeSelectionPanel;
|
||||
private javax.swing.JLabel textTotalTime;
|
||||
private ch.psi.pshell.swing.ValueSelection valueHigh;
|
||||
private ch.psi.pshell.swing.ValueSelection valueIterations;
|
||||
private ch.psi.pshell.swing.ValueSelection valueLow;
|
||||
|
||||
@@ -14,6 +14,8 @@ if Scienta.acquisitionMode != Scienta.AcquisitionMode.Swept:
|
||||
ret=[]
|
||||
|
||||
|
||||
set_context(open = True)
|
||||
|
||||
#Global arguments
|
||||
Scienta.passEnergy = pass_energy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user