Issue with beammark and rois
There looks to be an issue with beammark persisting which is outside the current image size. I guess this has happened by clicking on the beamviewer, then applying an roi, and then the beammark is outside the range of the available image. This breaks image viewing completely as asking for device.bvdata
returns:
>>> d.bvdata
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/device_proxy.py", line 288, in __DeviceProxy__getattr
return __get_attribute_value(self, attr_info, name)
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/device_proxy.py", line 251, in __get_attribute_value
attr_value = self.read_attribute(name).value
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/green.py", line 195, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/green.py", line 109, in run
return fn(*args, **kwargs)
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/device_proxy.py", line 398, in __DeviceProxy__read_attribute
return __check_read_attribute(self._read_attribute(value, extract_as))
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.7/site-packages/tango/device_proxy.py", line 125, in __check_read_attribute
raise DevFailed(*dev_attr.get_err_stack())
PyTango.DevFailed: DevFailed[
DevError[
desc = IndexError: index 2800 is out of bounds for axis 1 with size 1296
origin = File "/users/blissadm/conda/miniconda/envs/basler/lib/python3.7/site-packages/Lima/Server/plugins/Bpm.py", line 432, in read_bvdata
self.bvdata, self.bvdata_format = construct_bvdata(self)
File "/users/blissadm/conda/miniconda/envs/basler/lib/python3.7/site-packages/Lima/Server/plugins/Bpm.py", line 705, in construct_bvdata
profile_y = image.buffer[:,bpm.beammark[0]].astype(numpy.uint64)
reason = PyDs_PythonError
severity = ERR]
beammark was:
>>> d.beammark
array([2800, 2000], dtype=int32)
Edited by Stuart Fisher