Closedown
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jButton3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jCheckBox1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
@@ -76,6 +77,8 @@
|
||||
<Component id="jCheckBox1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -163,5 +166,13 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Test LS"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user