This commit is contained in:
root
2019-08-08 10:10:28 +02:00
parent 1f4edcbc88
commit 7f88d445af
37 changed files with 6480 additions and 501 deletions
+75 -46
View File
@@ -253,39 +253,40 @@ public class ScreenPanel4 extends Panel {
return (double[]) Convert.toDouble(server.getValue(name));
}
Double getServerDouble(String name, StreamValue cache) {
return (Double) Convert.toDouble(cache.__getitem__(name));
}
double[] getServerDoubleArray(String name, StreamValue cache) {
return (double[]) Convert.toDouble(cache.__getitem__(name));
}
class ImageData {
class ImageData {
ImageData() {
if (server != null) {
cache = server.getStream().take();
String prefix = goodRegion ? "gr_" : "";
x_fit_mean = getServerDouble(prefix + "x_fit_mean", cache);
y_fit_mean = getServerDouble(prefix + "y_fit_mean", cache);
x_fit_standard_deviation = getServerDouble(prefix + "x_fit_standard_deviation", cache);
y_fit_standard_deviation = getServerDouble(prefix + "y_fit_standard_deviation", cache);
x_fit_gauss_function = getServerDoubleArray(prefix + "x_fit_gauss_function", cache);
y_fit_gauss_function = getServerDoubleArray(prefix + "y_fit_gauss_function", cache);
x_profile = getServerDoubleArray("x_profile", cache);
y_profile = getServerDoubleArray("y_profile", cache);
x_center_of_mass = getServerDouble("x_center_of_mass", cache);
y_center_of_mass = getServerDouble("y_center_of_mass", cache);
x_rms = getServerDouble("x_rms", cache);
y_rms = getServerDouble("y_rms", cache);
x_fit_mean = getDouble(prefix + "x_fit_mean");
y_fit_mean = getDouble(prefix + "y_fit_mean");
x_fit_standard_deviation = getDouble(prefix + "x_fit_standard_deviation");
y_fit_standard_deviation = getDouble(prefix + "y_fit_standard_deviation");
x_fit_gauss_function = getDoubleArray(prefix + "x_fit_gauss_function");
y_fit_gauss_function = getDoubleArray(prefix + "y_fit_gauss_function");
x_profile = getDoubleArray("x_profile");
y_profile = getDoubleArray("y_profile");
x_center_of_mass = getDouble("x_center_of_mass");
y_center_of_mass = getDouble("y_center_of_mass");
x_rms = getDouble("x_rms");
y_rms = getDouble("y_rms");
if (goodRegion) {
double[] gX2 = new double[x_profile.length];
Arrays.fill(gX2, Double.NaN);
try {
double x = getServerDoubleArray("gr_x_axis", cache)[0];
double[] axis = getDoubleArray("x_axis");
gr_x_axis = getDoubleArray("gr_x_axis");
double x = gr_x_axis[0];
gr_size_x = x_fit_gauss_function.length;
//If gr axis values are not identical, calculate the index...
gr_pos_x = (int) ((renderer.getCalibration() != null) ? renderer.getCalibration().convertToImageX(x) : x);
//But prefer checking the value to avoid raounding errors
for (int i=0;i<axis.length; i++){
if (almostEqual(axis[i], x, 10e-6)){
gr_pos_x = i;
}
}
System.arraycopy(x_fit_gauss_function, 0, gX2, gr_pos_x, gr_size_x);
} catch (Exception ex) {
}
@@ -293,20 +294,29 @@ public class ScreenPanel4 extends Panel {
double[] gY2 = new double[y_profile.length];
Arrays.fill(gY2, Double.NaN);
try {
double y = getServerDoubleArray("gr_y_axis", cache)[0];
double[] axis = getDoubleArray("y_axis");
gr_y_axis = getDoubleArray("gr_y_axis");
double y = gr_y_axis[0];
gr_size_y = y_fit_gauss_function.length;
//If gr axis values are not identical, calculate the index...
gr_pos_y = (int) ((renderer.getCalibration() != null) ? renderer.getCalibration().convertToImageY(y) : y);
System.arraycopy(y_fit_gauss_function, 0, gY2, gr_pos_y, y_fit_gauss_function.length);
//But prefer checking the value to avoid raounding errors
for (int i=0;i<axis.length; i++){
if (almostEqual(axis[i], y, 10e-6)){
gr_pos_y = i;
}
}
System.arraycopy(y_fit_gauss_function, 0, gY2, gr_pos_y, gr_size_y);
} catch (Exception ex) {
}
y_fit_gauss_function = gY2;
if (slicing) {
try {
int slices = getServerDouble("slice_amount").intValue();
int slices = getDouble("slice_amount").intValue();
sliceCenters = new PointDouble[slices];
for (int i = 0; i < slices; i++) {
double x = getServerDouble("slice_" + i + "_center_x");
double y = getServerDouble("slice_" + i + "_center_y");
double x = getDouble("slice_" + i + "_center_x");
double y = getDouble("slice_" + i + "_center_y");
sliceCenters[i] = new PointDouble(x, y);
}
} catch (Exception ex) {
@@ -327,14 +337,36 @@ public class ScreenPanel4 extends Panel {
public double[] x_fit_gauss_function;
public double[] y_profile;
public double[] y_fit_gauss_function;
public double[] gr_x_axis;
public double[] gr_y_axis;
public int gr_size_x;
public int gr_pos_x;
public int gr_size_y;
public int gr_pos_y;
public PointDouble[] sliceCenters;
public StreamValue cache;
Double getDouble(String name) {
try{
return (Double) Convert.toDouble(cache.__getitem__(name));
} catch (Exception ex){
return null;
}
}
double[] getDoubleArray(String name) {
try{
return (double[]) Convert.toDouble(cache.__getitem__(name));
} catch (Exception ex){
return null;
}
}
}
public static boolean almostEqual(double a, double b, double eps){
return Math.abs(a-b)<eps;
}
class Frame extends ImageData {
Frame(Data data) {
@@ -1680,10 +1712,10 @@ public class ScreenPanel4 extends Panel {
int height = data.getHeight();
int width = data.getWidth();
int profileSize = renderer.getProfileSize();
ImageData id = null;
if ((useServerStats) && (server != null)) {
try {
ImageData id = getFrame(data);
id = getFrame(data);
if (id == null) {
return null;
}
@@ -1763,7 +1795,7 @@ public class ScreenPanel4 extends Panel {
xp[i] = (int) (((pY[i] - minProfile) / rangeProfile) * profileSize);
}
if (goodRegion && id.gr_size_x > 0) {
if (goodRegion && id.gr_size_y > 0) {
xg = Arrays.copyOfRange(xg, id.gr_pos_y, id.gr_pos_y + id.gr_size_y);
yg = Arrays.copyOfRange(yg, id.gr_pos_y, id.gr_pos_y + id.gr_size_y);
}
@@ -1920,18 +1952,14 @@ public class ScreenPanel4 extends Panel {
textPosition = new Point(textPosition.x, textPosition.y + 34);
fOv = new Overlay[]{hgaussian, vgaussian, cross, textFit};
if (goodRegion) {
try {
double[] x = getServerDoubleArray("gr_x_axis");
double[] y = getServerDoubleArray("gr_y_axis");
double x1 = x[0];
double x2 = x[x.length - 1];
double y1 = y[0];
double y2 = y[y.length - 1];
if (goodRegion && (id != null)) {
try {
double[] x = id.gr_x_axis;
double[] y = id.gr_y_axis;
Overlays.Rect goodRegionOv = new Overlays.Rect(new Pen(penFit.getColor(), 0, Pen.LineStyle.dotted));
goodRegionOv.setCalibration(renderer.getCalibration());
goodRegionOv.setAbsolutePosition(new PointDouble(x1, y1));
goodRegionOv.setAbsoluteSize(new DimensionDouble(x2 - x1, y2 - y1));
goodRegionOv.setPosition(new Point(id.gr_pos_x, id.gr_pos_y));
goodRegionOv.setSize(new Dimension(id.gr_x_axis.length, id.gr_y_axis.length));
fOv = Arr.append(fOv, goodRegionOv);
if (slicing) {
@@ -2046,6 +2074,7 @@ public class ScreenPanel4 extends Panel {
Overlay[] getUserOverlays(Data data) {
ArrayList<Overlay> ret = new ArrayList<>();
if (server != null) {
ImageData id = getFrame(data);
for (UserOverlay uo : userOverlayConfig) {
try {
Overlay ov = uo.obj;
@@ -2053,8 +2082,8 @@ public class ScreenPanel4 extends Panel {
ov.setCalibration(renderer.getCalibration());
boolean valid = false;
if (ov instanceof Overlays.Polyline) {
double[] x = (uo.channels[0].equals("null")) ? null : getServerDoubleArray(uo.channels[0]);
double[] y = (uo.channels[1].equals("null")) ? null : getServerDoubleArray(uo.channels[1]);
double[] x = (uo.channels[0].equals("null")) ? null : id.getDoubleArray(uo.channels[0]);
double[] y = (uo.channels[1].equals("null")) ? null : id.getDoubleArray(uo.channels[1]);
if ((x != null) || (y != null)) {
if (x == null) {
x = (renderer.getCalibration() == null) ? Arr.indexesDouble(y.length) : renderer.getCalibration().getAxisX(y.length);
@@ -2066,14 +2095,14 @@ public class ScreenPanel4 extends Panel {
valid = true;
}
} else {
Double x = getServerDouble(uo.channels[0]);
Double y = getServerDouble(uo.channels[1]);
Double x = id.getDouble(uo.channels[0]);
Double y = id.getDouble(uo.channels[1]);
if ((x != null) && (y != null)) {
PointDouble position = new PointDouble(x, y);
ov.setAbsolutePosition(position);
if (!(ov instanceof Overlays.Crosshairs)) {
Double x2 = getServerDouble(uo.channels[2]);
Double y2 = getServerDouble(uo.channels[3]);
Double x2 = id.getDouble(uo.channels[2]);
Double y2 = id.getDouble(uo.channels[3]);
if ((x != null) && (y != null)) {
DimensionDouble size = new DimensionDouble(x2 - position.x, y2 - position.y);
ov.setAbsoluteSize(size);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+69 -21
View File
@@ -50,7 +50,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
@@ -110,12 +110,8 @@
<Component id="buttonAbort" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="98" pref="98" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="98" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="panelStatus" min="-2" pref="324" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="comboBlm3" alignment="0" max="32767" attributes="0"/>
@@ -132,22 +128,29 @@
<Component id="comboBpm2" alignment="0" max="32767" attributes="0"/>
<Component id="comboBpm1" max="32767" attributes="0"/>
<Component id="comboBpm3" alignment="0" max="32767" attributes="0"/>
<Component id="comboScanType" max="32767" attributes="0"/>
<Component id="comboWireScanner" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelPosition" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Component id="labelPosX" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Component id="labelPosY" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="panelRepRate" linkSize="4" min="-2" pref="92" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelPosition" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Component id="labelPosX" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Component id="labelPosY" linkSize="4" alignment="0" min="-2" pref="90" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="panelRepRate" linkSize="4" min="-2" pref="92" max="-2" attributes="0"/>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="ledHomed" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="ledHomed" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="checkFilterBeamOk" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="buttonHoming" max="32767" attributes="0"/>
<Component id="buttonScannerPanel" linkSize="3" alignment="0" max="32767" attributes="0"/>
@@ -165,10 +168,18 @@
</Group>
</Group>
</Group>
<Component id="panelStatus" min="-2" pref="324" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Component id="comboScanType" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jLabel22" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="comboAdaptive" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -184,6 +195,8 @@
<Group type="103" groupAlignment="3" attributes="0">
<Component id="comboScanType" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboAdaptive" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel22" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
@@ -250,11 +263,20 @@
<Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonRaw3" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel11" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="panelPosition" linkSize="5" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonScannerPanel" alignment="2" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="2" attributes="0">
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel11" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonScannerPanel" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="2" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="checkFilterBeamOk" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="32767" attributes="0"/>
<Component id="panelPosition" linkSize="5" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
@@ -682,6 +704,32 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboAdaptive">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="3">
<StringItem index="0" value="Off"/>
<StringItem index="1" value="Gain"/>
<StringItem index="2" value="Gain+Range"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboAdaptiveActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel22">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Adaptive:"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="checkFilterBeamOk">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Filter Beam Ok"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
+63 -20
View File
@@ -162,7 +162,8 @@ public class WireScan extends Panel {
checkSaveRaw.setEnabled(state==State.Ready);
buttonAbort.setEnabled(state==State.Busy);
comboScanType.setEnabled(validWireScan);
for (JComboBox cb : bpmCombos){
comboAdaptive.setEnabled(validWireScan);
for (JComboBox cb :bpmCombos){
cb.setEnabled(validWireScan && !isBackground());
}
for (JComboBox cb : blmCombos){
@@ -397,6 +398,9 @@ public class WireScan extends Panel {
labelVelX = new javax.swing.JLabel();
jLabel24 = new javax.swing.JLabel();
labelVelY = new javax.swing.JLabel();
comboAdaptive = new javax.swing.JComboBox();
jLabel22 = new javax.swing.JLabel();
checkFilterBeamOk = new javax.swing.JCheckBox();
plot.setTitle("");
@@ -611,6 +615,19 @@ public class WireScan extends Panel {
labelVelY.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
labelVelY.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
comboAdaptive.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Off", "Gain", "Gain+Range" }));
comboAdaptive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboAdaptiveActionPerformed(evt);
}
});
jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel22.setText("Adaptive:");
checkFilterBeamOk.setSelected(true);
checkFilterBeamOk.setText("Filter Beam Ok");
javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
panelLeft.setLayout(panelLeftLayout);
panelLeftLayout.setHorizontalGroup(
@@ -671,9 +688,6 @@ public class WireScan extends Panel {
.addGroup(panelLeftLayout.createSequentialGroup()
.addGap(98, 98, 98)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(panelLeftLayout.createSequentialGroup()
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(comboBlm3, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -687,20 +701,24 @@ public class WireScan extends Panel {
.addComponent(comboBpm2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(comboBpm1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(comboBpm3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(comboScanType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(comboWireScanner, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLeftLayout.createSequentialGroup()
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelPosition, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labelPosX, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labelPosY, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(panelRepRate, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, Short.MAX_VALUE)
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ledHomed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelPosition, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labelPosX, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labelPosY, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(panelRepRate, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, Short.MAX_VALUE)
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ledHomed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, Short.MAX_VALUE))
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(checkFilterBeamOk)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(buttonHoming, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonScannerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -712,7 +730,14 @@ public class WireScan extends Panel {
.addComponent(jLabel24)
.addGroup(panelLeftLayout.createSequentialGroup()
.addGap(98, 98, 98)
.addComponent(labelVelY, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
.addComponent(labelVelY, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(comboScanType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel22)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(comboAdaptive, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addGap(0, 0, 0))
);
@@ -738,7 +763,9 @@ public class WireScan extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboScanType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addComponent(jLabel2)
.addComponent(comboAdaptive, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel22))
.addGap(18, 18, 18)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
@@ -792,11 +819,17 @@ public class WireScan extends Panel {
.addComponent(comboBlm3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16)
.addComponent(buttonRaw3))
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel11)
.addComponent(panelPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonScannerPanel))
.addGroup(panelLeftLayout.createSequentialGroup()
.addGap(26, 26, 26)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel11)
.addComponent(buttonScannerPanel)))
.addGroup(panelLeftLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(checkFilterBeamOk)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel13)
@@ -1057,6 +1090,9 @@ ChannelDouble channelEndY;
parameters.add(plot);
parameters.add(checkSaveRaw.isSelected());
parameters.add(spinnerBunch.getValue());
parameters.add(comboAdaptive.getSelectedIndex());
parameters.add(checkFilterBeamOk.isSelected());
runAsync("Diagnostics/WireScan", parameters).handle((ret, ex) -> {
if (ex != null) {
@@ -1192,6 +1228,10 @@ ChannelDouble channelEndY;
updateRawButtons();
}//GEN-LAST:event_comboBlm2ActionPerformed
private void comboAdaptiveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboAdaptiveActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_comboAdaptiveActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.JButton buttonCalibration;
@@ -1204,7 +1244,9 @@ ChannelDouble channelEndY;
private javax.swing.JButton buttonRaw3;
private javax.swing.JButton buttonScan;
private javax.swing.JButton buttonScannerPanel;
private javax.swing.JCheckBox checkFilterBeamOk;
private javax.swing.JCheckBox checkSaveRaw;
private javax.swing.JComboBox comboAdaptive;
private javax.swing.JComboBox comboBlm1;
private javax.swing.JComboBox comboBlm2;
private javax.swing.JComboBox comboBlm3;
@@ -1226,6 +1268,7 @@ ChannelDouble channelEndY;
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 jLabel3;
+61 -12
View File
@@ -59,15 +59,23 @@
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel8" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel7" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel6" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel2" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel20" linkSize="1" alignment="0" pref="86" max="32767" attributes="0"/>
<Component id="jLabel9" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel10" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel11" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="buttonSetRange" linkSize="2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonSetGain" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="jLabel3" alignment="0" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel8" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel7" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel6" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel2" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel20" linkSize="1" alignment="0" pref="86" max="32767" attributes="0"/>
<Component id="jLabel9" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel10" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="jLabel11" linkSize="1" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
@@ -79,6 +87,7 @@
<Component id="spinnerSaturation" alignment="0" max="32767" attributes="0"/>
<Component id="spinnerRangeFactor" alignment="0" max="32767" attributes="0"/>
<Component id="spinnerInitialGain" alignment="0" max="32767" attributes="0"/>
<Component id="textBlm" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
@@ -98,7 +107,12 @@
<Component id="comboWire" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="70" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textBlm" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="spinnerRangeStart" alignment="2" min="-2" max="-2" attributes="0"/>
@@ -113,7 +127,12 @@
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerInitialGain" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="70" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonSetRange" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonSetGain" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerScanPoints" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -128,7 +147,7 @@
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerRangeFactor" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="78" max="32767" attributes="0"/>
<EmptySpace pref="76" 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"/>
@@ -172,6 +191,9 @@
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboWireScanner">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboWireScannerActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel20">
<Properties>
@@ -259,6 +281,33 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="buttonSetRange">
<Properties>
<Property name="text" type="java.lang.String" value="Set Range"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSetRangeActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonSetGain">
<Properties>
<Property name="text" type="java.lang.String" value="Set Gain"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSetGainActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="BLM:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="textBlm">
<Properties>
<Property name="editable" type="boolean" value="false"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
+113 -14
View File
@@ -88,6 +88,10 @@ public class WireScanCalibration extends Panel {
spinnerRangeFactor = new javax.swing.JSpinner();
jLabel11 = new javax.swing.JLabel();
spinnerInitialGain = new javax.swing.JSpinner();
buttonSetRange = new javax.swing.JButton();
buttonSetGain = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
textBlm = new javax.swing.JTextField();
plot.setTitle("");
@@ -106,6 +110,12 @@ public class WireScanCalibration extends Panel {
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel2.setText("Wire:");
comboWireScanner.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboWireScannerActionPerformed(evt);
}
});
jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel20.setText("Wire Scanner:");
@@ -143,6 +153,25 @@ public class WireScanCalibration extends Panel {
spinnerInitialGain.setModel(new javax.swing.SpinnerNumberModel(0.6d, 0.5d, 1.1d, 0.1d));
buttonSetRange.setText("Set Range");
buttonSetRange.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonSetRangeActionPerformed(evt);
}
});
buttonSetGain.setText("Set Gain");
buttonSetGain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonSetGainActionPerformed(evt);
}
});
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel3.setText("BLM:");
textBlm.setEditable(false);
javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
panelLeft.setLayout(panelLeftLayout);
panelLeftLayout.setHorizontalGroup(
@@ -156,15 +185,21 @@ public class WireScanCalibration extends Panel {
.addComponent(buttonAbort)
.addContainerGap())
.addGroup(panelLeftLayout.createSequentialGroup()
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(buttonSetRange)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonSetGain))
.addGroup(panelLeftLayout.createSequentialGroup()
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(comboWireScanner, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -174,12 +209,13 @@ public class WireScanCalibration extends Panel {
.addComponent(spinnerScanPoints)
.addComponent(spinnerSaturation)
.addComponent(spinnerRangeFactor)
.addComponent(spinnerInitialGain)))))
.addComponent(spinnerInitialGain)
.addComponent(textBlm)))))
);
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel11, jLabel2, jLabel20, jLabel6, jLabel7, jLabel8, jLabel9});
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonAbort, buttonScan});
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonAbort, buttonScan, buttonSetGain, buttonSetRange});
panelLeftLayout.setVerticalGroup(
panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -192,7 +228,11 @@ public class WireScanCalibration extends Panel {
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(comboWire, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addGap(70, 70, 70)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(textBlm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(47, 47, 47)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel6)
.addComponent(spinnerRangeStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
@@ -204,7 +244,11 @@ public class WireScanCalibration extends Panel {
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(spinnerInitialGain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(70, 70, 70)
.addGap(18, 18, 18)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonSetRange)
.addComponent(buttonSetGain))
.addGap(27, 27, 27)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(spinnerScanPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
@@ -216,7 +260,7 @@ public class WireScanCalibration extends Panel {
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(spinnerRangeFactor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE)
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonAbort)
.addComponent(buttonScan))
@@ -282,17 +326,71 @@ public class WireScanCalibration extends Panel {
}
}//GEN-LAST:event_buttonAbortActionPerformed
private void buttonSetRangeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetRangeActionPerformed
try {
String ws_blm = comboWireScanner.getSelectedItem().toString();
String ws_wire = comboWire.getSelectedItem().toString();
Object start = spinnerRangeStart.getValue();
Object end = spinnerRangeEnd.getValue();
switch (ws_wire){
case "X1": ws_wire = "W1X"; break;
case "Y1": ws_wire = "W1Y"; break;
case "X2": ws_wire = "W2X"; break;
case "Y2": ws_wire = "W2Y"; break;
}
//caput((ws_prefix + ":" + sel[wire] +"_START_SP"), start)
//caput((ws_prefix + ":" + sel[wire] +"_END_SP"), end)
String cmd = "caput('" + ws_blm + ":" + ws_wire + "_START_SP', " + start + ")";
System.out.println(cmd);
//eval(cmd, true);
cmd = "caput('" + ws_blm + ":" + ws_wire + "_END_SP', " + end + ")";
System.out.println(cmd);
//eval(cmd, true);
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonSetRangeActionPerformed
private void buttonSetGainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetGainActionPerformed
try {
String ws_blm = textBlm.getText();
if (!(ws_blm==null) && (!ws_blm.isEmpty())){
String ws_wire = comboWire.getSelectedItem().toString();
Object val = spinnerInitialGain.getValue();
String cmd = "set_setting('" + ws_blm + "GainWs" + ws_wire + "', " + val + ")";
eval(cmd, true);
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonSetGainActionPerformed
private void comboWireScannerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboWireScannerActionPerformed
try {
String ws_prefix = comboWireScanner.getSelectedItem().toString();
String cmd = "get_wire_scanners_blms('" + ws_prefix + "')";
List blms=(List) eval(cmd, true);
textBlm.setText(blms.get(0).toString());
} catch (Exception ex) {
textBlm.setText("");
}
}//GEN-LAST:event_comboWireScannerActionPerformed
//String caqtdm = "caqtdm -noMsg -stylefile sfop.qss -attach";
String caqtdm = "caqtdm -noMsg -stylefile sfop.qss";
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.JButton buttonScan;
private javax.swing.JButton buttonSetGain;
private javax.swing.JButton buttonSetRange;
private javax.swing.JComboBox comboWire;
private javax.swing.JComboBox comboWireScanner;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
@@ -305,5 +403,6 @@ public class WireScanCalibration extends Panel {
private javax.swing.JSpinner spinnerRangeStart;
private javax.swing.JSpinner spinnerSaturation;
private javax.swing.JSpinner spinnerScanPoints;
private javax.swing.JTextField textBlm;
// End of variables declaration//GEN-END:variables
}