diff --git a/devices/detector_image.properties b/devices/detector_image.properties index 588f586..246cb41 100644 --- a/devices/detector_image.properties +++ b/devices/detector_image.properties @@ -1,4 +1,4 @@ -#Wed Oct 31 09:06:14 CET 2018 +#Wed Oct 31 09:08:35 CET 2018 colormap=Flame colormapAutomatic=true colormapLogarithmic=false diff --git a/script/daq/daq1.py b/script/daq/daq1.py index 0d6f6fb..78a4feb 100644 --- a/script/daq/daq1.py +++ b/script/daq/daq1.py @@ -1,9 +1,12 @@ set_count_time(1.0) transm.write(1e-10) -detectors = [mythen, mythen.acquire_time, pixel, pixel.image_filename, image.intensity,image.corrected_intensity, image.matrix] +#detectors = [mythen, mythen.acquire_time, pixel, pixel.image_filename, image.intensity,image.corrected_intensity, image.matrix] +detectors = [mythen, mythen.acquire_time, pixel, pixel.image_filename] +#pixel.set_image_root_folder("/sls/X04SA/data/x04sa/ES3/pixel/images/") +pixel.set_path("tmp", "gobbo") pixel.set_threshold(40, 500, 8000, 100000) pixel.show() pixel.assert_ready() diff --git a/script/device/Image.py b/script/device/Image.py index 24444dd..4b16d81 100644 --- a/script/device/Image.py +++ b/script/device/Image.py @@ -119,11 +119,17 @@ class ReadableImage(ReadableMatrix): - - add_device( Image("image", pixel), True) -image.matrix.polling = 10 +if "_pixelListener" in globals(): pixel.removeListener(_pixelListener) +class PixelListener (DeviceListener): + def onValueChanged(self, device, value, former): + image.matrix.update() +_pixelListener = PixelListener() +pixel.addListener(_pixelListener) + + + add_device(RegisterMatrixSource("detector_image", image.matrix), True) detector_image.monitored = True diff --git a/script/device/Pixel.py b/script/device/Pixel.py index 677ff6d..7a415f3 100644 --- a/script/device/Pixel.py +++ b/script/device/Pixel.py @@ -37,6 +37,9 @@ class Pixel(DeviceBase, Readable, Readable.IntegerType): print "connected. Please disconnect in tvx and disconnect and" print "re-connect with the CCD/Pixel Epics widget." + def set_image_root_folder(self, path): + self.image_root_folder = path + def set_threshold(self, threshold1= None, threshold2= None, threshold3= None, threshold4= None): if threshold1 is not None: self.PIX_THRESH1 = threshold1