Closedown

This commit is contained in:
voulot_d
2017-01-31 10:42:04 +01:00
parent 7bb50d44ba
commit efea13a197
6 changed files with 451 additions and 34 deletions

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[589, 455]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@@ -16,13 +21,262 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="449" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jPanel1" max="32767" attributes="0"/>
<Component id="jPanel2" max="32767" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="plot" pref="391" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="137" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="plot" min="-2" pref="292" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="151" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Scan Parameters"/>
</Border>
</Property>
</Properties>
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Scan Parameters"/>
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
</AccessibilityProperties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="latencyLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerLatency" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="stopLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerStop" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="startLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerStart" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="samplesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerSamples" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="stepLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerStep" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerStart" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="startLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerStop" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stepLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerSamples" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="samplesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerLatency" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="latencyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="startLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Start:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="stopLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Stop:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerStep">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="stepLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Step:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerStart">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="samplesLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Nb Samples:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerSamples">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="latencyLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Latency:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerLatency">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerStop">
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel2">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Beam Parameters"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="energyLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerEnergy" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="dispersionLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="spinnerDispersion" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerDispersion" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="dispersionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerEnergy" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="energyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JSpinner" name="spinnerDispersion">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="energyLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Energy:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerEnergy">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[53, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="dispersionLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Dispersion:"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="ch.psi.pshell.plot.LinePlotJFree" name="plot">
<Properties>
<Property name="title" type="java.lang.String" value=""/>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@@ -39,18 +39,193 @@ public class GunScan extends Panel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
startLabel = new javax.swing.JLabel();
stopLabel = new javax.swing.JLabel();
spinnerStep = new javax.swing.JSpinner();
stepLabel = new javax.swing.JLabel();
spinnerStart = new javax.swing.JSpinner();
samplesLabel = new javax.swing.JLabel();
spinnerSamples = new javax.swing.JSpinner();
latencyLabel = new javax.swing.JLabel();
spinnerLatency = new javax.swing.JSpinner();
spinnerStop = new javax.swing.JSpinner();
jPanel2 = new javax.swing.JPanel();
spinnerDispersion = new javax.swing.JSpinner();
energyLabel = new javax.swing.JLabel();
spinnerEnergy = new javax.swing.JSpinner();
dispersionLabel = new javax.swing.JLabel();
plot = new ch.psi.pshell.plot.LinePlotJFree();
setPreferredSize(new java.awt.Dimension(589, 455));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Parameters"));
startLabel.setText("Start:");
stopLabel.setText("Stop:");
spinnerStep.setPreferredSize(new java.awt.Dimension(53, 20));
stepLabel.setText("Step:");
spinnerStart.setPreferredSize(new java.awt.Dimension(53, 20));
samplesLabel.setText("Nb Samples:");
spinnerSamples.setPreferredSize(new java.awt.Dimension(53, 20));
latencyLabel.setText("Latency:");
spinnerLatency.setPreferredSize(new java.awt.Dimension(53, 20));
spinnerStop.setMinimumSize(new java.awt.Dimension(53, 20));
spinnerStop.setPreferredSize(new java.awt.Dimension(53, 20));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(latencyLabel)
.addGap(2, 2, 2)
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(stopLabel)
.addGap(2, 2, 2)
.addComponent(spinnerStop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(startLabel)
.addGap(2, 2, 2)
.addComponent(spinnerStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(samplesLabel)
.addGap(2, 2, 2)
.addComponent(spinnerSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(stepLabel)
.addGap(2, 2, 2)
.addComponent(spinnerStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(startLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerStop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(stopLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(stepLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(samplesLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(latencyLabel))
.addContainerGap())
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Beam Parameters"));
spinnerDispersion.setPreferredSize(new java.awt.Dimension(53, 20));
energyLabel.setText("Energy:");
spinnerEnergy.setPreferredSize(new java.awt.Dimension(53, 20));
dispersionLabel.setText("Dispersion:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(energyLabel)
.addGap(2, 2, 2)
.addComponent(spinnerEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(dispersionLabel)
.addGap(2, 2, 2)
.addComponent(spinnerDispersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(20, 20, 20))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerDispersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(dispersionLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(energyLabel))
.addContainerGap())
);
plot.setTitle("");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 449, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, 391, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 137, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(plot, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(151, Short.MAX_VALUE))
);
jPanel1.getAccessibleContext().setAccessibleName("Scan Parameters");
jPanel1.getAccessibleContext().setAccessibleDescription("");
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel dispersionLabel;
private javax.swing.JLabel energyLabel;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JLabel latencyLabel;
private ch.psi.pshell.plot.LinePlotJFree plot;
private javax.swing.JLabel samplesLabel;
private javax.swing.JSpinner spinnerDispersion;
private javax.swing.JSpinner spinnerEnergy;
private javax.swing.JSpinner spinnerLatency;
private javax.swing.JSpinner spinnerSamples;
private javax.swing.JSpinner spinnerStart;
private javax.swing.JSpinner spinnerStep;
private javax.swing.JSpinner spinnerStop;
private javax.swing.JLabel startLabel;
private javax.swing.JLabel stepLabel;
private javax.swing.JLabel stopLabel;
// End of variables declaration//GEN-END:variables
}

View File

@@ -247,7 +247,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerPhaseRef" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jButton1" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="buttonSet" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -262,7 +262,7 @@
<Component id="spinnerPhaseRef" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<Component id="buttonSet" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="79" max="32767" attributes="0"/>
</Group>
</Group>
@@ -285,12 +285,12 @@
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerPhaseRefStateChanged"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jButton1">
<Component class="javax.swing.JButton" name="buttonSet">
<Properties>
<Property name="text" type="java.lang.String" value="Set"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSetActionPerformed"/>
</Events>
</Component>
</SubComponents>

View File

@@ -28,27 +28,25 @@ public class ShottkyScan extends Panel {
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
buttonAbort.setEnabled(state.isProcessing());
buttonStart.setEnabled(state == State.Ready);
buttonSet.setEnabled(buttonStart.isEnabled());
spinnerStart.setEnabled(buttonStart.isEnabled());
spinnerStop.setEnabled(buttonStart.isEnabled());
spinnerStep.setEnabled(buttonStart.isEnabled());
spinnerSamples.setEnabled(buttonStart.isEnabled());
spinnerLatency.setEnabled(buttonStart.isEnabled());
spinnerPhaseRef.setEnabled(buttonStart.isEnabled());
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
//Callback to perform update - in event thread
@Override
protected void doUpdate() {
@@ -64,10 +62,8 @@ public class ShottkyScan extends Panel {
public void onStop() {
getContext().removeScanListener(scanListener);
super.onStop();
}
ScanListener scanListener = new ScanListener() {
@Override
public void onScanStarted(Scan scan, String plotTitle) {
@@ -75,21 +71,17 @@ public class ShottkyScan extends Panel {
series.clear();
}
}
@Override
public void onNewRecord(Scan scan, ScanRecord record) {
if ("ShottkyScan".equals(getContext().getExecutionPars().getName())){
series.appendData((Double)record.getPositions()[0], ((Number)record.getValues()[0]).doubleValue());
}
}
@Override
public void onScanEnded(Scan scan, Exception ex) {
}
};
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
@@ -111,7 +103,7 @@ public class ShottkyScan extends Panel {
jPanel2 = new javax.swing.JPanel();
jLabel7 = new javax.swing.JLabel();
spinnerPhaseRef = new javax.swing.JSpinner();
jButton1 = new javax.swing.JButton();
buttonSet = new javax.swing.JButton();
buttonStart.setText("Start");
buttonStart.addActionListener(new java.awt.event.ActionListener() {
@@ -228,10 +220,10 @@ public class ShottkyScan extends Panel {
}
});
jButton1.setText("Set");
jButton1.addActionListener(new java.awt.event.ActionListener() {
buttonSet.setText("Set");
buttonSet.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
buttonSetActionPerformed(evt);
}
});
@@ -246,7 +238,7 @@ public class ShottkyScan extends Panel {
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerPhaseRef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING))
.addComponent(buttonSet, javax.swing.GroupLayout.Alignment.TRAILING))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
@@ -257,7 +249,7 @@ public class ShottkyScan extends Panel {
.addComponent(jLabel7)
.addComponent(spinnerPhaseRef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addComponent(buttonSet)
.addContainerGap(79, Short.MAX_VALUE))
);
@@ -346,18 +338,18 @@ public class ShottkyScan extends Panel {
}
}//GEN-LAST:event_spinnerPhaseRefStateChanged
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
private void buttonSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSetActionPerformed
try {
//caput("SINEG01-RSYS:CALC-VSUM-PHASE-OFFSET", spinnerPhaseRef.value)
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_jButton1ActionPerformed
}//GEN-LAST:event_buttonSetActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.JButton buttonSet;
private javax.swing.JButton buttonStart;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;

View File

@@ -23,7 +23,7 @@ phase.config.maxValue = 360.0
phase.config.resolution = 0.5
phase.initialize()
camtool = Camtool("sflca", "10000")
camtool = Camtool("sflca:10000")
camtool.startPipeline("simulated")
camtool.startReceiver()
x = camtool.getValue("x_fit_mean")
@@ -40,10 +40,6 @@ try:
dE = [val.mean/1000.0/disp*energy0 for val in r.getReadable(1)]
finally:
phase.close()
V.close()
P.close()
st.close()
camtool.close()
p = plot([E, dE],"data", rf_phase, title="Phase scan")[0]
p.addSeries(LinePlotSeries("fit"))
p.getSeries(1).setData(fit_x, fit_y)

View File

@@ -42,7 +42,7 @@ finally:
y = charge
x = rf_phase
index_max = y.index(max(y))
phase_ref = x[index_max] - 90
phase_ref = x[index_max] - 80
phase_offset = - phase_ref
caput("SINEG01-RSYS:CALC-VSUM-PHASE-OFFSET", phase_offset)