Closedown

This commit is contained in:
sfop
2017-05-22 15:32:54 +02:00
parent ac580e5d92
commit 9f82e428a0
3 changed files with 22 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
*/
import ch.psi.pshell.device.DescStatsDouble;
import ch.psi.pshell.plot.LinePlotErrorSeries;
import ch.psi.pshell.plot.LinePlotJFree;
import ch.psi.pshell.plot.Plot;
@@ -35,11 +36,11 @@ public class GunSolenoidAlignment extends Panel {
public void onNewRecord(Scan scan, ScanRecord record) {
try {
if (running) {
double x = (Double) record.getValues()[0];
double y = (Double) record.getValues()[1];
double stdev_x = (Double) record.getValues()[2];
double stdev_y = (Double) record.getValues()[3];
scanSeries.appendData(x, y, stdev_x, stdev_y);
DescStatsDouble x = (DescStatsDouble) record.getValues()[0];
DescStatsDouble y = (DescStatsDouble) record.getValues()[1];
DescStatsDouble stdev_x = (DescStatsDouble) record.getValues()[2];
DescStatsDouble stdev_y = (DescStatsDouble) record.getValues()[3];
scanSeries.appendData(x.getMean(), y.getMean(), Math.abs(stdev_x.getMean()), Math.abs(stdev_y.getMean()));
progressBar.setValue((int) (1000.0 * record.getIndex() / scan.getNumberOfRecords()));
}
} catch (Exception ex) {