New ScreenPanel
This commit is contained in:
17
script/test/TestCom.py
Executable file
17
script/test/TestCom.py
Executable file
@@ -0,0 +1,17 @@
|
||||
|
||||
data = camtool.getValue("x_profile")
|
||||
x = camtool.getValue("x_axis")
|
||||
y=data
|
||||
|
||||
back = [3160000 if i>3340000 else i for i in y]
|
||||
|
||||
y = arroff(y, "min")
|
||||
#y=arrsub(y, back)
|
||||
|
||||
p=plot(y, xdata = x)[0]
|
||||
#print y
|
||||
com,rms = center_of_mass(y, x)
|
||||
print com,rms
|
||||
p.addMarker(com, None, str(com), Color.GREEN)
|
||||
p.addMarker(com-rms, None, "", Color.GREEN)
|
||||
p.addMarker(com+rms, None, "", Color.GREEN)
|
||||
Reference in New Issue
Block a user