From 9b3e2c1e015c601457df648d716dfac9a1d77e04 Mon Sep 17 00:00:00 2001 From: gac-maloja Date: Mon, 17 May 2021 19:14:48 +0200 Subject: [PATCH] added auto_monitor=True for the image PV (otherwise callbacks do not work); height and width where switched in shape --- sources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources.py b/sources.py index 60a1814..75ebaef 100644 --- a/sources.py +++ b/sources.py @@ -55,6 +55,7 @@ class Camera(PVCollection): width = base + ":WIDTH", height = base + ":HEIGHT" ) + self.pvs.image.auto_monitor = True def get(self): data = self.pvs.image.get() @@ -64,7 +65,9 @@ class Camera(PVCollection): def get_shape(self): width = self.pvs.width.get() height = self.pvs.height.get() - shape = (width, height) + width = int(round(width)) + height = int(round(height)) + shape = (height, width) return shape def add_callback(self, callback, **kwargs):