Files
dev/script/test/TestCom.py
2018-01-19 10:56:53 +01:00

18 lines
379 B
Python
Executable File

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)