Files
saresb/script/test/demo_histogram2.py
gac-bernina 3edd5ecda9
2024-02-19 16:44:57 +01:00

24 lines
740 B
Python

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", True) #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)