
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)
