diff --git a/plugins/TestingPanel.form b/plugins/TestingPanel.form
index 8eee62f..dedd2e3 100644
--- a/plugins/TestingPanel.form
+++ b/plugins/TestingPanel.form
@@ -41,6 +41,7 @@
+
@@ -76,6 +77,8 @@
+
+
@@ -163,5 +166,13 @@
+
+
+
+
+
+
+
+
diff --git a/plugins/TestingPanel.java b/plugins/TestingPanel.java
index 3ce6f1c..c3b7790 100644
--- a/plugins/TestingPanel.java
+++ b/plugins/TestingPanel.java
@@ -90,6 +90,7 @@ public class TestingPanel extends Panel {
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jCheckBox1 = new javax.swing.JCheckBox();
+ jButton4 = new javax.swing.JButton();
buttonExecute.setText("Execute test11");
buttonExecute.addActionListener(new java.awt.event.ActionListener() {
@@ -143,6 +144,13 @@ public class TestingPanel extends Panel {
}
});
+ jButton4.setText("Test LS");
+ jButton4.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton4ActionPerformed(evt);
+ }
+ });
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -168,7 +176,8 @@ public class TestingPanel extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton3)
- .addComponent(jCheckBox1)))
+ .addComponent(jCheckBox1)
+ .addComponent(jButton4)))
.addGroup(layout.createSequentialGroup()
.addGap(277, 277, 277)
.addComponent(jButton2)))
@@ -192,7 +201,9 @@ public class TestingPanel extends Panel {
.addGap(46, 46, 46)
.addComponent(jCheckBox1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jButton3)))
+ .addComponent(jButton3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jButton4)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -309,6 +320,25 @@ public class TestingPanel extends Panel {
// TODO add your handling code here:
}//GEN-LAST:event_jCheckBox1ActionPerformed
+ private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
+ // TODO add your handling code here:
+ try {
+ boolean var1 = jCheckBox1.isSelected();
+ int var2 = 2;// (Integer)spinner.getValue();
+
+ HashMap args = new HashMap();
+ args.put("relative", var1);
+ args.put("steps", var2);
+ run("motor-slide", args);
+
+
+ //evalAsync("run('args', locals = {'relative':" + (var1 ? "True" :"False") + ", 'steps':" + var2 + "})");
+
+ } catch (Exception ex) {
+ SwingUtils.showException(this, ex);
+ } // TODO add your handling code here:
+ }//GEN-LAST:event_jButton4ActionPerformed
+
// Variables declaration - do not modify//GEN-BEGIN:variables
@@ -318,6 +348,7 @@ public class TestingPanel extends Panel {
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
+ private javax.swing.JButton jButton4;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JPanel panel;
private javax.swing.JPanel panelPlot;
diff --git a/script/power-supply.py b/script/power-supply.py
index 52299e4..558e91a 100644
--- a/script/power-supply.py
+++ b/script/power-supply.py
@@ -60,16 +60,6 @@ SetVA.close()
ActualVA.close()
ActualIA.close()
-readable = scan.readables[0]
-positions = scan.writables
-
-threshold = (min(readable) + max(readable))/2
-min_peak_distance = 5.0
-
-peaks = estimate_peak_indexes(readable, positions, threshold, min_peak_distance)
-print "Peak indexes: " + str(peaks)
-print "Peak x: " + str(map(lambda x:positions[x], peaks))
-print "Peak y: " + str(map(lambda x:readable[x], peaks))
scan.end()