35 lines
1.0 KiB
Python
Executable File
35 lines
1.0 KiB
Python
Executable File
number_of_frames = 3
|
|
module = 1
|
|
camera_name = "SARFE10-PPRM064"
|
|
|
|
st1 = Stream("st1", dispatcher)
|
|
|
|
def init_bs():
|
|
w,h = caget(camera_name + ":WIDTH", 'i'), caget(camera_name + ":HEIGHT", 'i')
|
|
st1.addScalar("GasDet", "SARFE10-PBPG050:", module, 0)
|
|
st1.addScalar("Y1", "SINEG01-DBPM340:Y1", module, 0)
|
|
st1.addScalar("Q1", "SINEG01-DBPM340:Q1", module, 0)
|
|
st1.addMatrix("VCC", camera_name + ":FPICTURE", module, 0, w,h)
|
|
st1.initialize()
|
|
st1.start()
|
|
st1.waitCacheChange(10000)
|
|
|
|
def init_cam():
|
|
cam_server.start(camera_name+ "_sp")
|
|
x = cam_server.stream.getChild("x_fit_mean")
|
|
y = cam_server.stream.getChild("y_fit_mean")
|
|
cam_server.stream.waitCacheChange(10000);
|
|
|
|
def scan_bs():
|
|
bscan (st1, number_of_frames, title = "BSscan", tag = "BSscan")
|
|
|
|
def scan_cam():
|
|
mscan (cam_server.stream, (x, y), number_of_frames, title = "CAMscan", tag = "CAMscan")
|
|
|
|
|
|
try:
|
|
parallelize(init_bs, init_cam)
|
|
parallelize(scan_bs, scan_cam)
|
|
finally:
|
|
st1.close()
|
|
#cam_server.stop() |