Startup
This commit is contained in:
@@ -8,8 +8,8 @@ import org.apache.commons.math3.stat.correlation.PearsonsCorrelation as Pearsons
|
||||
if get_context().source == CommandSource.ui:
|
||||
#dx = "SINEG01-RLLE-REF10:SIG-PHASE-AVG"
|
||||
#dy = "SINEG01-RLLE-REF20:SIG-PHASE-AVG"
|
||||
dx = "SINEG01-RGUN-PUP10:SIG-AMPLT-AVG 4"
|
||||
dy = "SINEG01-RGUN-PUP20:SIG-AMPLT-AVG 4"
|
||||
#dx = "SINEG01-RGUN-PUP10:SIG-AMPLT-AVG 4"
|
||||
#dy = "SINEG01-RGUN-PUP20:SIG-AMPLT-AVG 4"
|
||||
|
||||
#dx = "SINDI01-RKLY-DCP10:REF-AMPLT"
|
||||
#dy = "SINDI01-RKLY-DCP10:REF-PHASE"
|
||||
@@ -17,8 +17,12 @@ if get_context().source == CommandSource.ui:
|
||||
#dx = "SINDI01-RLLE-REF10:SIG-PHASE-AVG"
|
||||
#dy = "SINDI01-RLLE-REF20:SIG-PHASE-AVG"
|
||||
|
||||
#dx = "SINDI01-RLLE-STA:SLAVE1-CPUTIMER"
|
||||
#dy = "SINDI01-RLLE-STA:SLAVE1-DLTIMER"
|
||||
dx = "SINDI01-RLLE-STA:SLAVE1-CPUTIMER"
|
||||
dy = "SINDI01-RLLE-STA:SLAVE1-DLTIMER"
|
||||
|
||||
#dx = "SINEG01-DICT215:B1_CHARGE"
|
||||
#dy = "SINEG01-DBPM314:Q1"
|
||||
|
||||
|
||||
#dx=gsx.getReadback()
|
||||
#dy=gsy.getReadback()
|
||||
@@ -26,8 +30,12 @@ if get_context().source == CommandSource.ui:
|
||||
window = 40
|
||||
p = plot(None)[0]
|
||||
bs = True
|
||||
print dx
|
||||
print dy
|
||||
#print dx
|
||||
#print dy
|
||||
corr = None
|
||||
pars_lin = None
|
||||
pars_quad = None
|
||||
|
||||
|
||||
for s in p.getAllSeries():
|
||||
p.removeSeries(s)
|
||||
@@ -99,13 +107,12 @@ try:
|
||||
sd.setLinesVisible(False)
|
||||
|
||||
sd.setPointSize(4)
|
||||
|
||||
if globals().has_key("marker"):
|
||||
p.removeMarker(marker)
|
||||
|
||||
marker=None
|
||||
corr = None
|
||||
|
||||
|
||||
if get_context().source == CommandSource.ui:
|
||||
if globals().has_key("marker"):
|
||||
p.removeMarker(marker)
|
||||
marker=None
|
||||
|
||||
|
||||
while(True):
|
||||
#Sample and plot data
|
||||
@@ -129,10 +136,11 @@ try:
|
||||
corr= PearsonsCorrelation().correlation(to_array(ax,'d'), to_array(ay,'d'))
|
||||
s = "Correlation=" + str(round(corr,4))
|
||||
#print s
|
||||
if marker is not None:
|
||||
p.removeMarker(marker)
|
||||
marker = p.addMarker(x2+res, p.AxisId.X, s, p.getBackground())
|
||||
marker.setLabelPaint(STDOUT_COLOR)
|
||||
if get_context().source == CommandSource.ui:
|
||||
if marker is not None:
|
||||
p.removeMarker(marker)
|
||||
marker = p.addMarker(x2+res, p.AxisId.X, s, p.getBackground())
|
||||
marker.setLabelPaint(STDOUT_COLOR)
|
||||
|
||||
#Calculate, print and plot linear fit
|
||||
pars_lin = (a0,a1) = fit_polynomial(ay, ax, 1)
|
||||
|
||||
Reference in New Issue
Block a user