Lima-tango-python issueshttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues2023-12-15T08:30:22+01:00https://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/66Missing __annotations__ on callables readers/writers2023-12-15T08:30:22+01:00Samuel DebionneMissing __annotations__ on callables readers/writers```
$ LimaCCDs bcu_simulator1_devel
-------> Received a DevFailed exception: DevFailed[
DevError[
desc = AttributeError: 'CallableReadEnum' object has no attribute '__annotations__'
origin = Traceback (most recent call last):
Fi...```
$ LimaCCDs bcu_simulator1_devel
-------> Received a DevFailed exception: DevFailed[
DevError[
desc = AttributeError: 'CallableReadEnum' object has no attribute '__annotations__'
origin = Traceback (most recent call last):
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/tango/device_class.py", line 669, in __DeviceClass__device_factory
device = self._new_device(deviceImplClass, klass, dev_name)
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/tango/device_class.py", line 648, in __DeviceClass__new_device
return klass(dev_class, dev_name)
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/Lima/Server/LimaCCDs.py", line 400, in __init__
self.init_device()
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/Lima/Core/Debug.py", line 64, in real_fn
return new_fn(*arg, **kw)
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/Lima/Server/LimaCCDs.py", line 734, in init_device
self.add_attribute(
File "/users/blissadm/conda/miniconda/envs/lima_dev/lib/python3.9/site-packages/tango/device_server.py", line 572, in __DeviceImpl__add_attribute
type_hint = dict(r_meth.__annotations__).get("return", None)
AttributeError: 'CallableReadEnum' object has no attribute '__annotations__'
reason = PyDs_PythonError
severity = ERR]
]
```
with
```
$ conda list pytango
# packages in environment at /users/blissadm/conda/miniconda/envs/lima_dev:
#
# Name Version Build Channel
pytango 9.5.0 py39hb1babde_1 conda-forgev1.9.20Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/65doc: fix sphinx error2023-11-03T16:17:56+01:00Laurent Claustredoc: fix sphinx errorLaurent ClaustreLaurent Claustrehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/64'HwDetInfoCtrlObj' object has no attribute 'setUserInstrumentName'2023-09-19T15:37:43+02:00Samuel Debionne'HwDetInfoCtrlObj' object has no attribute 'setUserInstrumentName'When setting the instrument name property, the DS won't start with:
```py
File "C:\Mambaforge\envs\pco\lib\site-packages\Lima\Server\LimaCCDs.py", line 398, in __init__
self.init_device()
File "C:\Mambaforge\envs\pco\lib\site-pa...When setting the instrument name property, the DS won't start with:
```py
File "C:\Mambaforge\envs\pco\lib\site-packages\Lima\Server\LimaCCDs.py", line 398, in __init__
self.init_device()
File "C:\Mambaforge\envs\pco\lib\site-packages\Lima\Core\Debug.py", line 64, in real_fn
return new_fn(*arg, **kw)
File "C:\Mambaforge\envs\pco\lib\site-packages\Lima\Server\LimaCCDs.py", line 666, in init_device
self.__detinfo.setUserInstrumentName(self.UserInstrumentName)
AttributeError: 'HwDetInfoCtrlObj' object has no attribute 'setUserInstrumentName'
```
Obvious mistake in
```py
# Setup a user-defined detector name if it exists
if self.UserInstrumentName:
if SystemHasFeature("Core.HwDetInfoCtrlObj.setInstrumentName"):
self.__detinfo.setUserInstrumentName(self.UserInstrumentName)
else:
deb.Warning("UserInstrumentName not supported in this version")
```
`__detinfo.setUserInstrumentName` should be `__detinfo.setInstrumentName`.Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/62update the doc for newest cameras2023-05-11T17:57:14+02:00Laurent Claustreupdate the doc for newest camerasupdate the doc for newest camerasupdate the doc for newest camerasLaurent ClaustreLaurent Claustrehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/60numpy.int removed in numpy 1.24.02022-12-21T11:25:56+01:00Lucas Felixnumpy.int removed in numpy 1.24.0Using numpy.int fails with last numpy version.
Here are the occurrences I found with grep:
```
Server/plugins/RoiCollection.py:220: list_size * spectrum_size + 3, dtype=numpy.int
Server/plugins/RoiCollection.py:230: ...Using numpy.int fails with last numpy version.
Here are the occurrences I found with grep:
```
Server/plugins/RoiCollection.py:220: list_size * spectrum_size + 3, dtype=numpy.int
Server/plugins/RoiCollection.py:230: return numpy.array([], dtype=numpy.int)
Server/plugins/Bpm.py:303: profile_x = result.profile_x.buffer.astype(numpy.int)
Server/plugins/Bpm.py:305: profile_x = numpy.array([], dtype=numpy.int)
Server/plugins/Bpm.py:307: profile_y = result.profile_y.buffer.astype(numpy.int)
Server/plugins/Bpm.py:309: profile_y = numpy.array([], dtype=numpy.int)
Server/plugins/Bpm.py:318: profile_x = numpy.array([], dtype=numpy.int)
Server/plugins/Bpm.py:319: profile_y = numpy.array([], dtype=numpy.int)
```Marie Claire LagierMarie Claire Lagierhttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/59Add new CtAccumulation attributes2023-09-19T15:37:28+02:00Samuel DebionneAdd new CtAccumulation attributesRelated to lima#185.
Add `acc_out_type` that can be set with `ImageType` value, aka `Bpp8`, `Bpp8S`, `Bpp16`, `Bpp16S`...Related to lima#185.
Add `acc_out_type` that can be set with `ImageType` value, aka `Bpp8`, `Bpp8S`, `Bpp16`, `Bpp16S`...Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/57CMake install is broken2022-08-23T16:28:06+02:00Samuel DebionneCMake install is brokenFollowing up of https://github.com/esrf-bliss/Lima-tango-python/issues/25
The file `scripts/LimaCCDs` was removed when the project was reorganized in a more pythonic way and the `CMakeLists.txt` is broken.Following up of https://github.com/esrf-bliss/Lima-tango-python/issues/25
The file `scripts/LimaCCDs` was removed when the project was reorganized in a more pythonic way and the `CMakeLists.txt` is broken.Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/56BPM plugin starts with UNKNOWN state2022-06-21T09:15:23+02:00Samuel DebionneBPM plugin starts with UNKNOWN stateSubsequent calls to `RunLevel` fail with `it is currently not allowed to write attribute RunLevel. The device state is UNKNOWN`Subsequent calls to `RunLevel` fail with `it is currently not allowed to write attribute RunLevel. The device state is UNKNOWN`Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/55Test: Lima tango server broken (RunLevel)2022-06-21T11:05:50+02:00Valentin VallsTest: Lima tango server broken (RunLevel)```
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 816, in apply_parameter...```
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 816, in apply_parameters
gevent.joinall(tasks, raise_error=True)
File "src/gevent/greenlet.py", line 1057, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 1073, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 371, in gevent._gevent_cgreenlet.Greenlet._raise_exception
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 456, in apply_parameters
self.device.apply_parameters(self._ctrl_params)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/controllers/lima/lima_base.py", line 463, in apply_parameters
proxy.RunLevel = self.processing.runlevel_bpm
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/tango.py", line 218, in __setattr__
super().__setattr__(name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/proxy.py", line 195, in __setattr__
setattr(self.__wrapped__, name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 418, in __DeviceProxy__setattr
six.raise_from(e, cause)
File "<string>", line 3, in raise_from
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 415, in __DeviceProxy__setattr
name, value)
AttributeError: Tried to set non-existent attr 'RunLevel' to 10
```Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/54Allow readImage to get last frame since a given frame index2023-09-19T15:37:10+02:00Samuel DebionneAllow readImage to get last frame since a given frame index`readImage(-1)` fetches the last image, but there is no way to get the last image after a given frame index to avoid fetching the same image multiple times.
The idea is to introduce a new command `readLastImage(n)` that would fetch the ...`readImage(-1)` fetches the last image, but there is no way to get the last image after a given frame index to avoid fetching the same image multiple times.
The idea is to introduce a new command `readLastImage(n)` that would fetch the last image only if the last image index is `> n`.
Discussed with @valentin.vallsSamuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/53Remove Ct devices2022-03-10T08:57:53+01:00Laurent ClaustreRemove Ct devicesSince PyTango does not support this dynamic device creation for ct objects and since there is no use-case for this ct objects exportation we get ride of it.Since PyTango does not support this dynamic device creation for ct objects and since there is no use-case for this ct objects exportation we get ride of it.Laurent ClaustreLaurent Claustrehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/52default config not loaded at startup2022-01-21T12:29:54+01:00Laurent Claustredefault config not loaded at startuplast commit about ImageOpMode does disable the "default" config to be loaded at startuplast commit about ImageOpMode does disable the "default" config to be loaded at startupValentin VallsValentin Vallshttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/51update documentation for missing attributes and properties2022-04-07T14:07:51+02:00Gauronupdate documentation for missing attributes and propertiesHi,
I noticed the attribute `saving_managed_mode` is not present in [saving attributes doc section](https://lima1.readthedocs.io/en/latest/applications/tango/python/doc/index.html#saving)
In the C++ API, I found https://lima1.readthedoc...Hi,
I noticed the attribute `saving_managed_mode` is not present in [saving attributes doc section](https://lima1.readthedocs.io/en/latest/applications/tango/python/doc/index.html#saving)
In the C++ API, I found https://lima1.readthedocs.io/en/latest/cpp_api.html#_CPPv4N4lima8CtSaving14setManagedModeE11ManagedMode so I imagine this is the same.
Cheers,
Philippe.https://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/50fix documentation mistakes2022-08-23T16:30:09+02:00Laurent Claustrefix documentation mistakessome attributes/properties do not have correct unitsome attributes/properties do not have correct unitLaurent ClaustreLaurent Claustrehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/49update documentation for new plugin RoiCollection and for new attribute/prope...2021-08-12T15:43:47+02:00Laurent Claustreupdate documentation for new plugin RoiCollection and for new attribute/property in RoiCounter and Roi2Spectrumpixel size is unit/pixel, so data must be divided by and not multiply by, for instance user can set 10um/pixel so the beam positions in pixels will be converted to um by dividing by 10.pixel size is unit/pixel, so data must be divided by and not multiply by, for instance user can set 10um/pixel so the beam positions in pixels will be converted to um by dividing by 10.https://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/48new roi threshold overflow control2021-08-11T16:26:00+02:00Laurent Claustrenew roi threshold overflow control!77
New feature in RoiCounter/RoiCollection to pass a threshold to filter overflow on pixel value.!77
New feature in RoiCounter/RoiCollection to pass a threshold to filter overflow on pixel value.https://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/45readImage does not give access to frame metadata2022-06-16T18:20:59+02:00Samuel DebionnereadImage does not give access to frame metadataWith the current API `readImage()` return the image for given idx as a `DATA_ARRAY`. With `frame_number== -1`, the last image is returned, but the image is stripped from its metadata (like the usefull frame idx).
Introduce a new version...With the current API `readImage()` return the image for given idx as a `DATA_ARRAY`. With `frame_number== -1`, the last image is returned, but the image is stripped from its metadata (like the usefull frame idx).
Introduce a new version of the data encoding with the metadata.
Discussed with @valentin.vallsAlejandro Homs PuronAlejandro Homs Puronhttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/44documentation update for new cameras2021-05-04T14:57:08+02:00Laurent Claustredocumentation update for new camerasLaurent ClaustreLaurent Claustrehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/43Missing HDF5 format in `saving_format` doc2021-04-08T14:06:54+02:00Samuel DebionneMissing HDF5 format in `saving_format` docThe doc currently reads:
> ##### The data format for saving:
>
> - Raw, save in binary format
> - Edf, save in ESRF Data Format
> - edfgz (or edf.gz), EDF with gz compression
> - Tiff, The famous TIFF format
> - Cbf, save in CBF forma...The doc currently reads:
> ##### The data format for saving:
>
> - Raw, save in binary format
> - Edf, save in ESRF Data Format
> - edfgz (or edf.gz), EDF with gz compression
> - Tiff, The famous TIFF format
> - Cbf, save in CBF format (a compressed format for crystallography)Samuel DebionneSamuel Debionnehttps://gitlab.esrf.fr/limagroup/Lima-tango-python/-/issues/42BPM viewer's PyTurboJPEG should be sourced from Conda2021-03-29T09:20:51+02:00Samuel DebionneBPM viewer's PyTurboJPEG should be sourced from CondaReported by @naudet on [#lima-support](https://chat.esrf.fr/channel/lima-support?msg=HqDdFXxYEdAFQitqi).
Running the current ansible playbook, `numpy` is accidentally sourced from pypi:
```
# Name Version ...Reported by @naudet on [#lima-support](https://chat.esrf.fr/channel/lima-support?msg=HqDdFXxYEdAFQitqi).
Running the current ansible playbook, `numpy` is accidentally sourced from pypi:
```
# Name Version Build Channel
numpy 1.20.1 pypi_0 pypi
numpy-base 1.19.2 py37hfa32c7d_0
```
Since PyTurboJPEG, required by the BPM viewer and not avail in Conda at the time, we have this additional task:
```
TASK [lima : Installing pip package PyTurboJPEG.]
```
- [ ] Fix the Ansible playbook (remove the pip install task)
- [ ] Update the requirements of the Tango DS (add conda-forge / `pyturbojpeg`)Samuel DebionneSamuel Debionne