Startup
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
#Fri Jun 02 16:57:43 CEST 2017
|
||||
#Fri Jun 02 17:12:43 CEST 2017
|
||||
colormap=Flame
|
||||
colormapAutomatic=false
|
||||
colormapMax=1000.0
|
||||
colormapAutomatic=true
|
||||
colormapMax=42400.0
|
||||
colormapMin=10.0
|
||||
flipHorizontally=false
|
||||
flipVertically=false
|
||||
grayscale=false
|
||||
imageHeight=2148
|
||||
imageWidth=2272
|
||||
imageHeight=2160
|
||||
imageWidth=1936
|
||||
invert=false
|
||||
regionStartX=129
|
||||
regionStartY=7
|
||||
regionStartX=321
|
||||
regionStartY=1
|
||||
rescaleFactor=1.0
|
||||
rescaleOffset=0.0
|
||||
roiHeight=-1
|
||||
@@ -21,9 +21,9 @@ rotation=0.0
|
||||
rotationCrop=false
|
||||
scale=1.0
|
||||
serverURL=localhost\:10000
|
||||
spatialCalOffsetX=-158.5197404227148
|
||||
spatialCalOffsetY=-106.41406334370838
|
||||
spatialCalScaleX=-14.401765522203947
|
||||
spatialCalScaleY=-13.617021560668945
|
||||
spatialCalOffsetX=-50.03909304143862
|
||||
spatialCalOffsetY=-50.048875855327466
|
||||
spatialCalScaleX=-1.0
|
||||
spatialCalScaleY=-1.0
|
||||
spatialCalUnits=mm
|
||||
transpose=false
|
||||
|
||||
@@ -1123,9 +1123,7 @@ public class ScreenPanel extends Panel {
|
||||
Overlays.Text textFit = null;
|
||||
if ((xMean != null) && (yMean != null)) {
|
||||
textFit = new Overlays.Text(penFit,
|
||||
String.format("x: m=%1.3f \u03C3=%1.3f\ny: m=%1.3f \u03C3=%1.3f",
|
||||
xMean, xSigma,
|
||||
yMean, ySigma),
|
||||
String.format("x: m=%1.1f \u03C3=%1.1f\ny: m=%1.1f \u03C3=%1.1f",xMean, xSigma, yMean, ySigma),
|
||||
new Font(Font.MONOSPACED, 0, 14), new Point(20, 20));
|
||||
textFit.setFixed(true);
|
||||
textFit.setAnchor(Overlay.ANCHOR_VIEWPORT_TOP_LEFT);
|
||||
@@ -1138,24 +1136,16 @@ public class ScreenPanel extends Panel {
|
||||
}
|
||||
cross = new Overlays.Crosshairs(penCross, center, new Dimension(Math.abs(2 * xSigma.intValue()), 2 * Math.abs(ySigma.intValue())));
|
||||
}
|
||||
|
||||
Overlays.Text textCom = null;
|
||||
if ((xCom != null) && (yCom != null)) {
|
||||
textFit = new Overlays.Text(penFit,
|
||||
String.format("x: m=%1.3f \u03C3=%1.3f\ny: m=%1.3f \u03C3=%1.3f",
|
||||
xMean, xSigma,
|
||||
yMean, ySigma),
|
||||
new Font(Font.MONOSPACED, 0, 14), new Point(20, 20));
|
||||
textFit.setFixed(true);
|
||||
textFit.setAnchor(Overlay.ANCHOR_VIEWPORT_TOP_LEFT);
|
||||
|
||||
Point center = new Point(xMean.intValue(), yMean.intValue());
|
||||
if (renderer.getCalibration() != null) {
|
||||
center = renderer.getCalibration().convertToImagePosition(new PointDouble(xMean, yMean));
|
||||
xSigma /= renderer.getCalibration().getScaleX();
|
||||
ySigma /= renderer.getCalibration().getScaleY();
|
||||
}
|
||||
cross = new Overlays.Crosshairs(penCross, center, new Dimension(Math.abs(2 * xSigma.intValue()), 2 * Math.abs(ySigma.intValue())));
|
||||
textCom = new Overlays.Text(renderer.getPenProfile(),
|
||||
String.format("x: m=%1.1f \u03C3=%1.1f\ny: m=%1.1f \u03C3=%1.1f",xCom, xRms,yCom, yRms),
|
||||
new Font(Font.MONOSPACED, 0, 14), new Point(20, 60));
|
||||
textCom.setFixed(true);
|
||||
textCom.setAnchor(Overlay.ANCHOR_VIEWPORT_TOP_LEFT);
|
||||
}
|
||||
return new Overlay[]{hprofile, vprofile, hgaussian, vgaussian, cross, textFit};
|
||||
return new Overlay[]{hprofile, vprofile, hgaussian, vgaussian, cross, textFit, textCom};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -52,12 +52,14 @@ try:
|
||||
energy = [val.mean/1000.0/disp*energy0 for val in r.getReadable(0)]
|
||||
caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(energy, 'd'))
|
||||
caput(station + "-RSYS:GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
try:
|
||||
#(energy_max, angular_frequency, phase0, in_range, phase_fit_max, fit_x, fit_y) = hfit(energy , xdata = rf_phase)
|
||||
run("CPython/wrapper")
|
||||
(fit_amplitude, fit_phase_deg, fit_offset, ph_crest, fit_x, fit_y) = hfitoff(energy , rf_phase)
|
||||
except:
|
||||
raise Exception("Fit failure")
|
||||
run("CPython/wrapper")
|
||||
(fit_amplitude, fit_phase_deg, fit_offset, ph_crest, fit_x, fit_y) = hfitoff(energy , rf_phase)
|
||||
#try:
|
||||
#(energy_max, angular_frequency, phase0, in_range, ph_crest, fit_x, fit_y) = hfit(energy , xdata = rf_phase)
|
||||
#run("CPython/wrapper")
|
||||
#(fit_amplitude, fit_phase_deg, fit_offset, ph_crest, fit_x, fit_y) = hfitoff(energy , rf_phase)
|
||||
#except:
|
||||
# raise Exception("Fit failure")
|
||||
plot([energy, fit_y], ["data", "fit"], [rf_phase, fit_x])
|
||||
energy_max = fit_amplitude - fit_offset
|
||||
caput(station + "-RSYS:GET-ONCREST-VSUM-PHASE", ph_crest)
|
||||
|
||||
Reference in New Issue
Block a user