Closedown
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
#Mon Mar 09 18:14:54 CET 2020
|
||||
FileSequentialNumber=3188
|
||||
#Tue Mar 10 11:07:20 CET 2020
|
||||
FileSequentialNumber=3201
|
||||
|
||||
@@ -85,14 +85,6 @@
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="spinnerLatency" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioStepSize" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@@ -121,6 +113,15 @@
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioStepSize" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkFlyScan" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -178,6 +179,8 @@
|
||||
<Component id="spinnerLatency" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="checkFlyScan" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -333,6 +336,11 @@
|
||||
<Property name="text" type="java.lang.String" value="Steps:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkFlyScan">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Fly Scan"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSensors">
|
||||
|
||||
@@ -115,7 +115,8 @@ public class ManipulatorScan extends Panel {
|
||||
}
|
||||
args.put("LATENCY", (Double) spinnerLatency.getValue());
|
||||
args.put("RELATIVE", radioRelative.isSelected());
|
||||
args.put("ENDSCAN", checkEndScan.isSelected());
|
||||
args.put("ENDSCAN", checkEndScan.isSelected());
|
||||
args.put("FLY_SCAN", checkFlyScan.isSelected());
|
||||
|
||||
runAsync("ManipulatorScan", args);
|
||||
|
||||
@@ -182,6 +183,7 @@ public class ManipulatorScan extends Panel {
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
checkFlyScan = new javax.swing.JCheckBox();
|
||||
panelSensors = new javax.swing.JPanel();
|
||||
checkImage = new javax.swing.JCheckBox();
|
||||
checkImageIntegration = new javax.swing.JCheckBox();
|
||||
@@ -281,6 +283,8 @@ public class ManipulatorScan extends Panel {
|
||||
|
||||
jLabel8.setText("Steps:");
|
||||
|
||||
checkFlyScan.setText("Fly Scan");
|
||||
|
||||
javax.swing.GroupLayout panelPositionerLayout = new javax.swing.GroupLayout(panelPositioner);
|
||||
panelPositioner.setLayout(panelPositionerLayout);
|
||||
panelPositionerLayout.setHorizontalGroup(
|
||||
@@ -301,12 +305,6 @@ public class ManipulatorScan extends Panel {
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioStepSize)
|
||||
.addComponent(radioAbsolute)
|
||||
.addComponent(radioRelative))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -327,7 +325,14 @@ public class ManipulatorScan extends Panel {
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(txtSize)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioStepSize)
|
||||
.addComponent(radioAbsolute)
|
||||
.addComponent(radioRelative)
|
||||
.addComponent(checkFlyScan))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@@ -376,7 +381,9 @@ public class ManipulatorScan extends Panel {
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(checkFlyScan)
|
||||
.addGap(26, 26, 26))
|
||||
);
|
||||
|
||||
panelSensors.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensors"));
|
||||
@@ -538,12 +545,11 @@ public class ManipulatorScan extends Panel {
|
||||
.addGroup(jPanel3Layout.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))
|
||||
.addGap(1, 1, 1)))
|
||||
.addGap(1, 1, 1))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addComponent(checkEndScan)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(checkEndScan)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dvpAcqTime, textTotalTime});
|
||||
@@ -670,6 +676,7 @@ public class ManipulatorScan extends Panel {
|
||||
private javax.swing.JCheckBox checkCur3;
|
||||
private javax.swing.JCheckBox checkCurrent;
|
||||
private javax.swing.JCheckBox checkEndScan;
|
||||
private javax.swing.JCheckBox checkFlyScan;
|
||||
private javax.swing.JCheckBox checkImage;
|
||||
private javax.swing.JCheckBox checkImageIntegration;
|
||||
private javax.swing.JCheckBox checkSpectrum;
|
||||
|
||||
@@ -7,6 +7,7 @@ RANGE (tuple (min, max))
|
||||
STEPS (int or tuple)
|
||||
LATENCY (double)
|
||||
RELATIVE (BOOLEAN)
|
||||
FLY_SCAN (BOOLEAN)
|
||||
"""
|
||||
|
||||
#set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
|
||||
@@ -15,7 +16,26 @@ set_adc_averaging()
|
||||
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
||||
|
||||
try:
|
||||
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
if FLY_SCAN:
|
||||
# time per scienta acquisition in seconds
|
||||
time1 = time.time()
|
||||
trig_scienta()
|
||||
time2 = time.time()
|
||||
scienta_time = (time2 - time1)
|
||||
print "scienta time: ", scienta_time
|
||||
|
||||
if isinstance(STEPS,int):
|
||||
raise Exception ("Fly Scan must define step size, and not number of steps")
|
||||
STEP = STEPS
|
||||
SPEED = STEP / scienta_time
|
||||
fly_time = (RANGE[1] - RANGE[0]) / SPEED
|
||||
STEPS = int(fly_time / scienta_time) + 1
|
||||
|
||||
print "speed: ", SPEED
|
||||
print "scan time: ", fly_time
|
||||
cscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, fly_time, RELATIVE, before_read=before_readout, after_read = after_readout, check_positions = False)
|
||||
else:
|
||||
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
finally:
|
||||
if ENDSCAN:
|
||||
after_scan()
|
||||
|
||||
@@ -54,11 +54,14 @@ def get_binding_energy(e):
|
||||
ephot = Scienta.highEnergy.take(100)
|
||||
return ephot - e - workfunc
|
||||
|
||||
def get_binding_range():
|
||||
return get_binding_energy(Scienta.highEnergy.take(100)), get_binding_energy(Scienta.lowEnergy.take(100))
|
||||
def get_binding_range(p=None):
|
||||
if p is None:
|
||||
return get_binding_energy(Scienta.highEnergy.take(100)), get_binding_energy(Scienta.lowEnergy.take(100))
|
||||
else:
|
||||
ke_range=p.getAxis(p.AxisId.X).getDisplayRange()
|
||||
return get_binding_energy(ke_range.max), get_binding_energy(ke_range.min)
|
||||
|
||||
|
||||
eb2, eb1 = get_binding_range()
|
||||
eb2, eb1 = get_binding_range(p)
|
||||
be_axis.setRange(eb2, eb1)
|
||||
|
||||
|
||||
@@ -69,7 +72,7 @@ def plot_cur_spectrum():
|
||||
x = Scienta.spectrumX
|
||||
spectrum_series.setData(x, y)
|
||||
|
||||
eb2, eb1 = get_binding_range()
|
||||
eb2, eb1 = get_binding_range(plots[0])
|
||||
if (be_axis.min != eb2) or (be_axis.max != eb1):
|
||||
plots[0].resetZoom()
|
||||
be_axis.setRange(eb2, eb1)
|
||||
|
||||
Reference in New Issue
Block a user