From 6d7089a896e99d37887fdc42f869a0ea45a30106 Mon Sep 17 00:00:00 2001 From: gac-x04sa Date: Tue, 30 Oct 2018 18:13:56 +0100 Subject: [PATCH] Script execution --- script/device/Image.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script/device/Image.py b/script/device/Image.py index ecb5f2d..d3eec6e 100644 --- a/script/device/Image.py +++ b/script/device/Image.py @@ -33,6 +33,14 @@ class ImageCorrectedIntensity(DeviceBase, Readable): self.setCache(ret, None) return ret +class ImageMatrix(DeviceBase, ReadableMatrix, Readable.LongType): + def __init__(self, image): + DeviceBase.__init__(self, image.name + " matrix") + self.setParent(image) + + def read(self): + return self.getParent().get_image() + class Image(DeviceBase, Readable): def __init__(self, name, pixel): @@ -41,6 +49,7 @@ class Image(DeviceBase, Readable): self.roi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_XDIM] self.broi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM] self.intensity = ImageIntensity(self) + self.matrix = ImageMatrix(self) self.corrected_intensity = ImageCorrectedIntensity(self)