Files
saresb/script/test/demo_histogram2.py
2021-04-28 09:14:56 +02:00

24 lines
756 B
Python
Executable File

import ch.psi.pshell.device.HistogramGenerator as HistogramGenerator
CAMERA_NAMES = ["SARES20-PROF141-M1"]
CHANNELS = ["intensity", "x_center_of_mass"]
samples = 100
range_min, range_max = float('nan'),float('nan')
bins = 100
for camera_name in CAMERA_NAMES:
cam_server.start(camera_name + "_sp", camera_name + "_sp1") #Start or connect to ScreenPanel pipeline
cam_server.stream.waitCacheChange(2000)
for channel in CHANNELS:
dev = cam_server.stream.getChild(channel)
hist = HistogramGenerator(camera_name + "_" + channel + "_histogram", dev, samples, range_min, range_max, bins)
hist.monitored=True
add_device(hist, True)
show_panel(hist)
while(True):
time.sleep(1)