Startup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ch.psi.pshell.epics.ControlledVariable as ControlledVariable
|
||||
|
||||
CAMERA = "S10DI01-DSCR020"
|
||||
#CAMERA = "SINDI02-DLAC055"
|
||||
#CAMERA = "SINDI02-DLAC055"
|
||||
QUADRUPOLE = "S10CB01-MQUA430" # quadrupole for the scan with S10DI01-DSCR020: S10CB02-MQUA230
|
||||
CHARGE_BPM = "SINEG01-DBPM340:Q1"
|
||||
CHARGE_ICT = "SINEG01-DICT215:B1_CHARGE-OP"
|
||||
@@ -9,19 +9,13 @@ RANGE = (-0.485, 1.515)
|
||||
STEPS = 100
|
||||
SETTLING_TIME = 0.1
|
||||
|
||||
#kill_camtool()
|
||||
check_camtool()
|
||||
print camtool.getCameras()
|
||||
|
||||
#camtool.start("SINBD01-DSCR010")
|
||||
camtool.start(CAMERA)
|
||||
camtool.stream.waitCacheChange(10000)
|
||||
print camtool.value.identifiers
|
||||
|
||||
#plot(camtool.getValue("y_fit_gauss_function"))
|
||||
m=camtool.getDataMatrix()
|
||||
x = camtool.stream.getChild("x_fit_mean")
|
||||
y = camtool.stream.getChild("y_fit_mean")
|
||||
print cam_server.cameras
|
||||
cam_server.start(CAMERA)
|
||||
wait_cam_server_message()
|
||||
print cam_server.value.identifiers
|
||||
m=cam_server.getDataMatrix()
|
||||
x = cam_server.stream.getChild("x_fit_mean")
|
||||
y = cam_server.stream.getChild("y_fit_mean")
|
||||
|
||||
"""
|
||||
ax = create_averager(x, 5, -1, "X Fit")
|
||||
@@ -56,21 +50,21 @@ except:
|
||||
try:
|
||||
laser_off()
|
||||
#save_dataset("/Background", m.read())
|
||||
#mscan (camtool.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
#mscan (cam_server.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
tscan(m, 10, 1.0) # 10 samples every 0.2 s -> For machine at 1Hz
|
||||
laser_on()
|
||||
|
||||
#tscan((m, x, y), 10, 1.0) # 10 samples every 1.0 s
|
||||
#mscan (camtool.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (camtool.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#mscan (cam_server.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (cam_server.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#lscan(quad, (m, x, y), RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
|
||||
readables = camtool.stream.getReadables().clone() + [bpm, ict]
|
||||
readables.remove(camtool.stream.getChild("image"))
|
||||
readables = cam_server.stream.getReadables().clone() + [bpm, ict]
|
||||
readables.remove(cam_server.stream.getChild("image"))
|
||||
readables.insert(0,m)
|
||||
lscan(quad, readables, RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
|
||||
finally:
|
||||
quad.close()
|
||||
camtool.stop()
|
||||
cam_server.stop()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ch.psi.pshell.epics.ControlledVariable as ControlledVariable
|
||||
|
||||
#Easy script to read the camtool camera data and save it
|
||||
#Easy script to read the camera data and save it
|
||||
#
|
||||
|
||||
#CAMERA = "S10DI01-DSCR020" #"simulation"
|
||||
@@ -16,23 +16,19 @@ WirePos = "SINDI01-DWSC090:MOTOR_1.RBV"
|
||||
#STEPS = 100
|
||||
#SETTLING_TIME = 1
|
||||
|
||||
#kill_camtool()
|
||||
check_camtool()
|
||||
print camtool.getCameras()
|
||||
print cam_server.cameras
|
||||
cam_server.start(CAMERA)
|
||||
wait_cam_server_message()
|
||||
print cam_server.value.identifiers
|
||||
|
||||
#camtool.start("SINBD01-DSCR010")
|
||||
camtool.start(CAMERA)
|
||||
camtool.stream.waitCacheChange(10000)
|
||||
print camtool.value.identifiers
|
||||
|
||||
#plot(camtool.getValue("y_fit_gauss_function"))
|
||||
m=camtool.getDataMatrix()
|
||||
x = camtool.stream.getChild("x_fit_mean")
|
||||
y = camtool.stream.getChild("y_fit_mean")
|
||||
x_profile = camtool.stream.getChild("x_profile")
|
||||
y_profile = camtool.stream.getChild("y_profile")
|
||||
x_axis = camtool.stream.getChild("x_axis")
|
||||
y_axis = camtool.stream.getChild("y_axis")
|
||||
#plot(cam_server.getValue("y_fit_gauss_function"))
|
||||
m=cam_server.getDataMatrix()
|
||||
x = cam_server.stream.getChild("x_fit_mean")
|
||||
y = cam_server.stream.getChild("y_fit_mean")
|
||||
x_profile = cam_server.stream.getChild("x_profile")
|
||||
y_profile = cam_server.stream.getChild("y_profile")
|
||||
x_axis = cam_server.stream.getChild("x_axis")
|
||||
y_axis = cam_server.stream.getChild("y_axis")
|
||||
|
||||
"""
|
||||
ax = create_averager(x, 5, -1, "X Fit")
|
||||
@@ -67,22 +63,22 @@ except:
|
||||
try:
|
||||
#laser_off()
|
||||
#save_dataset("/Background", m.read())
|
||||
#mscan (camtool.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
#mscan (cam_server.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
#tscan(m, 10, 0.2) # 10 samples every 0.2 s -> For machine at 1Hz
|
||||
#laser_on()
|
||||
|
||||
#tscan((m, x, y), 10, 1.0) # 10 samples every 1.0 s
|
||||
#mscan (camtool.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (camtool.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#mscan (cam_server.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (cam_server.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#lscan(quad, (m, x, y), RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
|
||||
#readables = camtool.stream.getReadables().clone() + [bpm, ict]
|
||||
#readables.remove(camtool.stream.getChild("image"))
|
||||
#readables = cam_server.stream.getReadables().clone() + [bpm, ict]
|
||||
#readables.remove(cam_server.stream.getChild("image"))
|
||||
#readables.insert(0,m)
|
||||
# lscan(quad, readables, RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
#tscan((m, x_profile, y_profile, x_axis, y_axis, bpm, wcs), 10, 1.0) #Saves 10 samples waiting 1.0 s between them
|
||||
tscan((m, x_profile, y_profile, x_axis, y_axis, bpm, wcs), 10, 1)
|
||||
finally:
|
||||
# quad.close()
|
||||
camtool.stop()
|
||||
cam_server.stop()
|
||||
|
||||
|
||||
@@ -9,19 +9,16 @@ RANGE = (-3.0, 0.0)
|
||||
STEPS = 100
|
||||
SETTLING_TIME = 1
|
||||
|
||||
#kill_camtool()
|
||||
check_camtool()
|
||||
print camtool.getCameras()
|
||||
print cam_server.cameras
|
||||
cam_server.start(CAMERA)
|
||||
wait_cam_server_message()
|
||||
print cam_server.value.identifiers
|
||||
|
||||
#camtool.start("SINBD01-DSCR010")
|
||||
camtool.start(CAMERA)
|
||||
camtool.stream.waitCacheChange(10000)
|
||||
print camtool.value.identifiers
|
||||
|
||||
#plot(camtool.getValue("y_fit_gauss_function"))
|
||||
m=camtool.getDataMatrix()
|
||||
x = camtool.stream.getChild("x_fit_mean")
|
||||
y = camtool.stream.getChild("y_fit_mean")
|
||||
#plot(cam_server.getValue("y_fit_gauss_function"))
|
||||
m=cam_server.getDataMatrix()
|
||||
x = cam_server.stream.getChild("x_fit_mean")
|
||||
y = cam_server.stream.getChild("y_fit_mean")
|
||||
|
||||
"""
|
||||
ax = create_averager(x, 5, -1, "X Fit")
|
||||
@@ -56,21 +53,21 @@ except:
|
||||
try:
|
||||
laser_off()
|
||||
#save_dataset("/Background", m.read())
|
||||
#mscan (camtool.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
#mscan (cam_server.stream, m, 10) #Saves 10 next frames -> For machine at 10 -> 100Hz
|
||||
tscan(m, 10, 1.0) # 10 samples every 0.2 s -> For machine at 1Hz
|
||||
laser_on()
|
||||
|
||||
#tscan((m, x, y), 10, 1.0) # 10 samples every 1.0 s
|
||||
#mscan (camtool.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (camtool.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#mscan (cam_server.stream,(m, x, y), -1, 5.0) #Saves all frames received in 5s
|
||||
#mscan (cam_server.stream,(m, x, y), 50) # Saves firs 50 frames
|
||||
#lscan(quad, (m, x, y), RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
|
||||
readables = camtool.stream.getReadables().clone() + [bpm, ict]
|
||||
readables.remove(camtool.stream.getChild("image"))
|
||||
readables = cam_server.stream.getReadables().clone() + [bpm, ict]
|
||||
readables.remove(cam_server.stream.getChild("image"))
|
||||
readables.insert(0,m)
|
||||
lscan(quad, readables, RANGE[0], RANGE[1], STEPS, latency=SETTLING_TIME)
|
||||
|
||||
finally:
|
||||
quad.close()
|
||||
camtool.stop()
|
||||
cam_server.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user