From 9f82e428a0fec86275bc284516c49b493f239b0e Mon Sep 17 00:00:00 2001 From: sfop Date: Mon, 22 May 2017 15:32:54 +0200 Subject: [PATCH] Closedown --- devices/CurrentCamera.properties | 20 ++++++++++---------- plugins/GunSolenoidAlignment.java | 11 ++++++----- plugins/LaserGunAlignment.java | 11 ++++++----- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 2e9131c..8e3e28f 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,16 +1,16 @@ -#Mon May 22 13:05:12 CEST 2017 +#Mon May 22 15:31:27 CEST 2017 colormap=Flame colormapAutomatic=true -colormapMax=1500.0 +colormapMax=0.0 colormapMin=0.0 flipHorizontally=false flipVertically=false grayscale=false -imageHeight=2160 -imageWidth=2560 +imageHeight=1200 +imageWidth=1246 invert=false -regionStartX=1 -regionStartY=1 +regionStartX=304 +regionStartY=8 rescaleFactor=1.0 rescaleOffset=0.0 roiHeight=-1 @@ -21,9 +21,9 @@ rotation=0.0 rotationCrop=false scale=1.0 serverURL=localhost\:10000 -spatialCalOffsetX=-1057.4895329398094 -spatialCalOffsetY=-1420.5549062527236 -spatialCalScaleX=-8.510638153514359 -spatialCalScaleY=-8.235817137431614 +spatialCalOffsetX=-630.5060320164276 +spatialCalOffsetY=-612.5104241897614 +spatialCalScaleX=-26.761820720381525 +spatialCalScaleY=-26.595744663521685 spatialCalUnits=mm transpose=false diff --git a/plugins/GunSolenoidAlignment.java b/plugins/GunSolenoidAlignment.java index e74b916..80e4b3f 100644 --- a/plugins/GunSolenoidAlignment.java +++ b/plugins/GunSolenoidAlignment.java @@ -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) { diff --git a/plugins/LaserGunAlignment.java b/plugins/LaserGunAlignment.java index 98d98af..5a6f79c 100644 --- a/plugins/LaserGunAlignment.java +++ b/plugins/LaserGunAlignment.java @@ -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 LaserGunAlignment 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) {