Closedown
This commit is contained in:
@@ -8,3 +8,4 @@ pbpg_mx=ch.psi.pshell.epics.Motor|SARFE10-PBPG050:MOTOR_X|||true
|
||||
pbpg_my=ch.psi.pshell.epics.Motor|SARFE10-PBPG050:MOTOR_Y|||true
|
||||
adc_xh1=ch.psi.pshell.epics.ChannelInteger|SARFE10-PBPG050:HAMP-014-x-h1-DATA-SUM|||true
|
||||
adc_yh2=ch.psi.pshell.epics.ChannelInteger|SARFE10-PBPG050:HAMP-011-y-h2-DATA-SUM|||true
|
||||
camtool=ch.psi.pshell.bs.Camtool|localhost:10000|||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Tue Aug 29 17:10:09 CEST 2017
|
||||
#Fri Sep 01 16:45:20 CEST 2017
|
||||
colormap=Flame
|
||||
colormapAutomatic=true
|
||||
colormapMax=NaN
|
||||
@@ -16,9 +16,9 @@ roiY=0
|
||||
rotation=0.0
|
||||
rotationCrop=false
|
||||
scale=1.0
|
||||
spatialCalOffsetX=-50.03909304143862
|
||||
spatialCalOffsetY=-50.048875855327466
|
||||
spatialCalScaleX=-1.0
|
||||
spatialCalScaleY=-1.0
|
||||
spatialCalOffsetX=-677.5082585941401
|
||||
spatialCalOffsetY=-627.4707187276099
|
||||
spatialCalScaleX=-8.737659534534535
|
||||
spatialCalScaleY=-8.834897886167417
|
||||
spatialCalUnits=mm
|
||||
transpose=false
|
||||
|
||||
@@ -17,16 +17,16 @@ r=lscan(pbpg_mx, [av_hamp_x, av_xbpm_x], -0.5, 0.5, 20, latency = 0.0)
|
||||
#Fitting
|
||||
values = to_array(r.getReadable(0), 'd')
|
||||
positions = r.getPositions(0)
|
||||
pars_polynomial = (a0, a1, a2) = fit_polynomial(values, positions, 2)
|
||||
pars_polynomial = (a0, a1) = fit_polynomial(values, positions, 1)
|
||||
|
||||
#Writing metadata to data file
|
||||
path = get_exec_pars().scanPath
|
||||
set_attribute(path, "a0", a0)
|
||||
set_attribute(path, "a1", a1)
|
||||
set_attribute(path, "a2", a2)
|
||||
#set_attribute(path, "a2", a2)
|
||||
|
||||
#Plotting fit and writing fitting parameters
|
||||
outp = "a0="+ ("%0.4f" % a0) + "a1="+ ("%0.4f" % a1) + "a2="+ ("%0.4f" % a2)
|
||||
outp = "a0="+ ("%0.4f" % a0) + "a1="+ ("%0.4f" % a1)
|
||||
print outp
|
||||
p = get_plots()[0]
|
||||
p.addText((min(positions) + max(positions))/2, max(values), outp, Color.BLACK)
|
||||
|
||||
Reference in New Issue
Block a user