Skip to content

Commit 73c2588

Browse files
committed
Merge branch 'mean-operation' into 'master'
Exposes image_bin_mode See merge request limagroup/Lima-tango-python!123
2 parents 4483bba + 7bbc124 commit 73c2588

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

Lima/Server/LimaCCDs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ def init_device(self):
510510
"saving_managed_mode": "ManagedMode",
511511
"shutter_mode": "Mode",
512512
"image_rotation": "Rotation",
513+
"image_bin_mode": "BinMode",
513514
"video_mode": "Mode",
514515
"buffer_max_number": "MaxNumber",
515516
"acc_mode": "Mode",
@@ -588,6 +589,12 @@ def init_device(self):
588589
"270": Core.Rotation_270,
589590
}
590591

592+
if SystemHasFeature("Core.Bin_Sum"):
593+
self.__ImageBinMode = {
594+
"SUM": Core.Bin_Sum,
595+
"MEAN": Core.Bin_Mean,
596+
}
597+
591598
if SystemHasFeature("Core.CtAccumulation.Parameters.STANDARD"):
592599
self.__AccMode = {
593600
"STANDARD": Core.CtAccumulation.Parameters.STANDARD,
@@ -2676,6 +2683,7 @@ class LimaCCDsClass(PyTango.DeviceClass):
26762683
"image_width": [[PyTango.DevULong, PyTango.SCALAR, PyTango.READ]],
26772684
"image_height": [[PyTango.DevULong, PyTango.SCALAR, PyTango.READ]],
26782685
"image_bin": [[PyTango.DevULong, PyTango.SPECTRUM, PyTango.READ_WRITE, 2]],
2686+
"image_bin_mode": [[PyTango.DevString, PyTango.SCALAR, PyTango.READ_WRITE]],
26792687
"image_flip": [[PyTango.DevBoolean, PyTango.SPECTRUM, PyTango.READ_WRITE, 2]],
26802688
"image_rotation": [[PyTango.DevString, PyTango.SCALAR, PyTango.READ_WRITE]],
26812689
"last_image_acquired": [[PyTango.DevLong, PyTango.SCALAR, PyTango.READ]],

doc/index.rst

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -369,24 +369,27 @@ saving_zbuffer_<field> rw ... The allocation parameters for saving
369369

370370
Image
371371
`````
372-
=========================== ======= ======================= =======================================================================================
373-
Attribute name RW Type Description
374-
=========================== ======= ======================= =======================================================================================
375-
image_type ro DevString Return the current image data type, bit per pixel signed or unsigned:
376-
- Bpp8, Bpp8S, Bpp10, Bpp10S, Bpp12, Bpp12S, Bpp14,
377-
- Bpp14S, Bpp16, Bpp16S, Bpp32, Bpp32S , Bpp32F.
378-
image_width ro DevLong Width size of the detector in pixel
379-
image_height ro DevLong Height size of the detector in pixel
380-
image_sizes ro DevULong[4] Signed(0-unsigned,1-signed), depth(nb bytes), width and height
381-
image_max_dim ro DevULong[2] Maximum image dimension, width and height in pixel
382-
image_roi rw DevLong[4] Region Of Interest on image, [0] = Begin X, [1] = Begin Y,
383-
[2] = Width, [3] = Height, default ROI is [0,0,0,0] (no ROI)
384-
image_bin rw DevLong[2] Binning on image, [0] = Binning factor on X, [1] =
385-
Binning factor on Y. Default binning is 1 x 1
386-
image_flip rw DevBoolean[2] Flip on the image, [0] = flip over X axis, [1] flip over Y
387-
axis. Default flip is False x False
388-
image_rotation rw DevString Rotate the image: "0", "90", "180" or "270"
389-
=========================== ======= ======================= =======================================================================================
372+
======================= ======= ======================= =======================================================================================
373+
Attribute name RW Type Description
374+
======================= ======= ======================= =======================================================================================
375+
image_type ro DevString Return the current image data type, bit per pixel signed or unsigned:
376+
- Bpp8, Bpp8S, Bpp10, Bpp10S, Bpp12, Bpp12S, Bpp14,
377+
- Bpp14S, Bpp16, Bpp16S, Bpp32, Bpp32S , Bpp32F.
378+
image_width ro DevLong Width size of the detector in pixel
379+
image_height ro DevLong Height size of the detector in pixel
380+
image_sizes ro DevULong[4] Signed(0-unsigned,1-signed), depth(nb bytes), width and height
381+
image_max_dim ro DevULong[2] Maximum image dimension, width and height in pixel
382+
image_roi rw DevLong[4] Region Of Interest on image, [0] = Begin X, [1] = Begin Y,
383+
[2] = Width, [3] = Height, default ROI is [0,0,0,0] (no ROI)
384+
image_bin rw DevLong[2] Binning on image, [0] = Binning factor on X, [1] =
385+
Binning factor on Y. Default binning is 1 x 1
386+
image_bin_mode rw DevString Set the operation applied to each bins over the accumulated pixels
387+
- **SUM** returns the sum of the pixel intensities (Default)
388+
- **MEAN** returns the arithmetic mean of the pixel intensities
389+
image_flip rw DevBoolean[2] Flip on the image, [0] = flip over X axis, [1] flip over Y
390+
axis. Default flip is False x False
391+
image_rotation rw DevString Rotate the image: "0", "90", "180" or "270"
392+
======================= ======= ======================= =======================================================================================
390393

391394
Shutter
392395
```````

0 commit comments

Comments
 (0)