Closedown

This commit is contained in:
gobbo_a
2017-04-13 11:05:05 +02:00
parent a73161fa38
commit 4fcf1fa022
10 changed files with 185 additions and 117 deletions
+8 -8
View File
@@ -1,7 +1,7 @@
#Thu Apr 13 08:26:37 CEST 2017
#Thu Apr 13 10:44:59 CEST 2017
colormap=Flame
colormapAutomatic=true
colormapMax=1500.0
colormapAutomatic=false
colormapMax=3000.0
colormapMin=0.0
flipHorizontally=false
flipVertically=false
@@ -17,13 +17,13 @@ roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=270.0
rotation=0.0
rotationCrop=false
scale=1.0
serverURL=localhost\:10000
spatialCalOffsetX=-1057.0
spatialCalOffsetY=-1420.0
spatialCalScaleX=-8.51063829787234
spatialCalScaleY=-8.559201141226819
spatialCalOffsetX=-1057.4895329398094
spatialCalOffsetY=-1420.5549062527236
spatialCalScaleX=-8.510638153514359
spatialCalScaleY=-8.235817137431614
spatialCalUnits=mm
transpose=false
+4 -4
View File
@@ -1,8 +1,8 @@
#Wed Jun 22 15:13:23 CEST 2016
#Thu Apr 13 10:29:45 CEST 2017
maxValue=0.0
minValue=0.0
offset=0.0
precision=0
resolution=0.001
precision=3
resolution=1.0
scale=1.0
unit=DEG
unit=deg
+1 -1
View File
@@ -24,7 +24,7 @@
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonAbort" linkSize="1" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jPanel1" pref="179" max="32767" attributes="0"/>
<Component id="jPanel1" max="32767" attributes="0"/>
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
+2 -1
View File
@@ -347,7 +347,8 @@ public class SchottkyScan extends Panel {
private void buttonSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetActionPerformed
try {
String cmd = "caput('SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE', -" + spinnerPhaseRef.getValue() + ")";
double phaseOffset = -((Double)spinnerPhaseRef.getValue());
String cmd = "caput('SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE', " + phaseOffset + ")";
cmd += "; " + "caput('SINEG01-RSYS:CMD-LOAD-CALIB-BEAM', 1)";
evalAsync(cmd).handle((ret, ex) -> {
if (ex != null){
+62 -50
View File
@@ -17,7 +17,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel1" linkSize="1" min="-2" max="-2" attributes="0"/>
@@ -70,7 +70,9 @@
</Group>
</Group>
</Group>
<EmptySpace pref="23" max="32767" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="plot" pref="451" max="32767" attributes="0"/>
<EmptySpace min="11" pref="11" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -78,58 +80,63 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="comboWireScan" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="comboSelection" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerEnd" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="comboWireScan" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="comboSelection" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerEnd" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="spinnerStart" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerVel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerCycles" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textBpm1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textBpm2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
<Component id="comboBpm3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="95" max="32767" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel10" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="panelStatus" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonAbort" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonScan" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonMoveStart" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="spinnerStart" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerVel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerCycles" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textBpm1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="plot" pref="364" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textBpm2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
<Component id="comboBpm3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="41" max="32767" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel10" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="panelStatus" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonAbort" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonScan" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonMoveStart" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="48" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -271,5 +278,10 @@
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelStatus">
</Component>
<Component class="ch.psi.pshell.plot.LinePlotJFree" name="plot">
<Properties>
<Property name="title" type="java.lang.String" value=""/>
</Properties>
</Component>
</SubComponents>
</Form>
+104 -47
View File
@@ -4,6 +4,12 @@
import ch.psi.pshell.device.Device;
import ch.psi.pshell.epics.Epics;
import ch.psi.pshell.plot.LinePlotSeries;
import ch.psi.pshell.plot.Plot;
import ch.psi.pshell.scan.Scan;
import ch.psi.pshell.scan.ScanListener;
import ch.psi.pshell.scan.ScanRecord;
import ch.psi.pshell.ui.App;
import ch.psi.pshell.ui.Panel;
import ch.psi.pshell.ui.Plugin;
import ch.psi.utils.State;
@@ -15,15 +21,23 @@ import javax.swing.DefaultComboBoxModel;
*
*/
public class WireScan extends Panel {
final String[] seriesNames = new String[]{"bpm1_x", "bpm1_y", "bpm1_q", "bpm2_x", "bpm2_y", "bpm2_q"};
LinePlotSeries[] series = new LinePlotSeries[seriesNames.length];
public WireScan() {
initComponents();
initComponents();
for (int i=0; i< seriesNames.length; i++){
plot.addSeries(new LinePlotSeries(seriesNames[i]));
}
plot.getAxis(Plot.AxisId.X).setLabel("");
plot.getAxis(Plot.AxisId.Y).setLabel("Position");
plot.setLegendVisible(true);
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
try {
try {
DefaultComboBoxModel model = new DefaultComboBoxModel();
eval("run('Devices/Elements')", true);
List<String> ret = (List<String>) ((Plugin)this).eval("get_wire_scans()", true);
@@ -46,7 +60,10 @@ public class WireScan extends Panel {
for (String scan: ret){
model.addElement(scan);
}
comboBpm3.setModel(model);
comboBpm3.setModel(model);
if (App.hasArgument("ws")){
comboWireScan.setSelectedItem(App.getArgumentValue("ws"));
}
} catch (Exception ex) {
showException(ex);
@@ -71,7 +88,37 @@ public class WireScan extends Panel {
protected void doUpdate() {
}
//Plot management
ScanListener scanListener = new ScanListener() {
@Override
public void onScanStarted(Scan scan, String plotTitle) {
if ("WireScan".equals(getContext().getExecutionPars().getName())) {
for (LinePlotSeries s : series){
s.clear();
}
}
}
@Override
public void onNewRecord(Scan scan, ScanRecord record) {
System.out.println( (Double) record.getValues()[1]);
if ("WireScan".equals(getContext().getExecutionPars().getName())) {
double position = (Double) record.getValues()[1];
for (int i=0; i< series.length; i++){
plot.addSeries(new LinePlotSeries(seriesNames[i]));
series[i].appendData(position,(Double) record.getValues()[4 + i]);
}
}
}
@Override
public void onScanEnded(Scan scan, Exception ex) {
getContext().removeScanListener(this);
}
};
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
@@ -99,6 +146,7 @@ public class WireScan extends Panel {
spinnerVel = new javax.swing.JSpinner();
spinnerCycles = new javax.swing.JSpinner();
panelStatus = new ch.psi.pshell.swing.DeviceValuePanel();
plot = new ch.psi.pshell.plot.LinePlotJFree();
comboWireScan.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -175,6 +223,8 @@ public class WireScan extends Panel {
spinnerCycles.setModel(new javax.swing.SpinnerNumberModel(1, 1, 100, 1));
plot.setTitle("");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -222,7 +272,9 @@ public class WireScan extends Panel {
.addGap(8, 8, 8)
.addComponent(spinnerCycles))))
.addComponent(panelStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap(23, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, 451, Short.MAX_VALUE)
.addGap(11, 11, 11))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel10, jLabel2, jLabel3, jLabel4, jLabel5, jLabel6, jLabel7, jLabel8, jLabel9});
@@ -231,48 +283,51 @@ public class WireScan extends Panel {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboWireScan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboSelection, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(spinnerEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(spinnerStart, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(jLabel9)
.addComponent(spinnerVel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerCycles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(textBpm1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(textBpm2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(comboBpm3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel10)
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonAbort)
.addComponent(buttonScan)
.addComponent(buttonMoveStart))
.addContainerGap(48, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboWireScan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboSelection, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(spinnerEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(spinnerStart, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(jLabel9)
.addComponent(spinnerVel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerCycles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(textBpm1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(textBpm2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(comboBpm3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel10)
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonAbort)
.addComponent(buttonScan)
.addComponent(buttonMoveStart)))
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE))
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
@@ -315,7 +370,8 @@ public class WireScan extends Panel {
parameters.add(spinnerEnd.getValue());
parameters.add(spinnerCycles.getValue());
parameters.add(spinnerVel.getValue());
parameters.add(comboBpm3.getSelectedItem().toString().isEmpty() ? null: comboBpm3.getSelectedItem().toString());
parameters.add(comboBpm3.getSelectedItem().toString().isEmpty() ? null: comboBpm3.getSelectedItem().toString());
getContext().addScanListener(scanListener);
try {
runAsync("Diagnostics/WireScan", parameters).handle((ret, ex) -> {
if (ex != null) {
@@ -326,7 +382,7 @@ public class WireScan extends Panel {
});
} catch (Exception ex) {
showException(ex);
}
}
}//GEN-LAST:event_buttonScanActionPerformed
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
@@ -363,6 +419,7 @@ public class WireScan extends Panel {
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private ch.psi.pshell.swing.DeviceValuePanel panelStatus;
private ch.psi.pshell.plot.LinePlotJFree plot;
private javax.swing.JSpinner spinnerCycles;
private javax.swing.JSpinner spinnerEnd;
private javax.swing.JSpinner spinnerStart;
+1 -1
View File
@@ -129,7 +129,7 @@ class WireScanner(WireScanInfo):
caputq(self.prefix + ":SCAN_WIRE", 1)
def doClose(self):
WireScanState.doClose(self)
WireScanInfo.doClose(self)
self.motor.close()
self.motor_bs_readback.close()
self.wire_velocity.close()
+1 -1
View File
@@ -3,7 +3,7 @@ is_panel = get_exec_pars().source != CommandSource.ui #Must be checked before c
run("Devices/Elements")
run("Devices/WireScanner")
BPM_SENSORS = {"x":"X1", "y":"Y1", "q":"Q1"}
BPM_SENSORS = {} #{"x":"X1", "y":"Y1", "q":"Q1"}
#Paramter parsing
if is_panel:
+1
View File
@@ -25,6 +25,7 @@ phase.config.maxValue = 180.0
phase.config.resolution = 0.25
phase.initialize()
#kill_camtool()
check_camtool()
camtool.start("SINBD01-DSCR010")
wait_camtool_message()
+1 -4
View File
@@ -18,7 +18,7 @@ phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS
phase.config.minValue =-180.0
phase.config.maxValue = 180.0
phase.config.precision = 3
phase.config.resolution = 0.1
phase.config.resolution = 1.0
phase.config.save()
phase.initialize()
#st = Stream("ICTstream", dispatcher)
@@ -30,9 +30,7 @@ phase0 = phase.read()
print phase0
add_device(phase, True)
"""
try:
qb = create_averager(q, nb, 0.100)
r = lscan(phase, (qb), start, stop, step, latency=lat)
@@ -52,4 +50,3 @@ index_max = y.index(max(y))
phase_ref = x[index_max] - 80
set_return(phase_ref)
"""