esrf-bliss / Lima-camera-pilatus

Lima pilatus plugin
lima.blissgarden.org
GNU General Public License v3.0
0 stars 9 forks source link

Error: This detector doesn't manage hardware roi #9

Open PhilLAL opened 11 months ago

PhilLAL commented 11 months ago

Hi, I encountered an error with our Pilatus DS.

We have a detector identified in camera_model as a 'PILATUS3 300K-W, S/N 3-xxxx-Z, X serie'. I followed each step instructions of page https://lima1.readthedocs.io/en/latest/camera/pilatus/doc/index.html#installation

(base) det@dec1641:~/p2_det> mount /dev/mapper/VolGroup00-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) /dev/mapper/VolGroup00-lv_home on /home type ext4 (rw) none on /lima_data type tmpfs (rw,size=8g,mode=0777) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

- camera dimensions are set in `~det/p2_det/config/cam_data/camera.def `:

(base) det@dec1641:~/p2_det> tail ~det/p2_det/config/cam_data/camera.def data_selector_image_11 0000 0000 0000 0000 0000 1000 0000 0000 data_selector_image_12 0000 0000 0000 0000 0001 0000 0000 0000 data_selector_image_13 0000 0000 0000 0000 0010 0000 0000 0000 data_selector_image_14 0000 0000 0000 0000 0100 0000 0000 0000 data_selector_image_15 0000 0000 0000 0000 1000 0000 0000 0000 data_selector_image_16 0000 0000 0000 0000 0000 0000 0000 0000 # 0's to end

camera_wide = 1475 camera_high = 195


I launched the Pilatus device server with following properties:
- config_file = `/home/det/p2_det/config/cam_data/camera.def`
- hostname = `localhost`
- host_port = `41234`
- tmpfs_path = `/lima_data`

However, when I launch the command `prepareAcq`, I got the following message: `Error: This detector doesn't manage hardware roi`.

Do you know how to solve this?

Note: I do not know if this is linked but when I launched ATKPanel, I got following warnings (in commandline):

Warning, AttributeFactory.getScalar(XLH/OP/XPC.01/last_image) : Unsupported DevEncoded attribute. Try to set the format attribute property to 'RawImage'. Warning, AttributeFactory.getScalar(XLH/OP/XPC.01/video_last_image) : Unsupported DevEncoded attribute. Try to set the format attribute property to 'RawImage'. Warning, AttributeFactory.getScalar(XLH/OP/XPC.01/last_image) : Unsupported DevEncoded attribute. Try to set the format attribute property to 'RawImage'. Warning, AttributeFactory.getScalar(XLH/OP/XPC.01/video_last_image) : Unsupported DevEncoded attribute. Try to set the format attribute property to 'RawImage'. CommandFactory.getCommandOfType() : Warning, Unsupported type for command XLH/OP/XPC.01 readImage(in type=3,out type=28) CommandFactory.getCommandOfType() : Warning, Unsupported type for command XLH/OP/XPC.01 readImageSeq(in type=11,out type=28)


However LimaCCDs `saving_format` attribute is `RAW` (but this is an attribute and not an attribute property).

Regards
laurent-claustre commented 11 months ago

Salut Philippe, could you send me the whole error message stack, please? Which conda package version did you install?

In the meantime you can try to force "no hw roi" by adding the following line in your camera.def file: camera_s_serie

It seems you X serie model detector (maybe camserver version) does not have the command to check if hw roi is supported.

PhilLAL commented 11 months ago

Hi @laurent-claustre , thank you for your message.

Here is the output on the pilatus server:

We use conda 4.8.2 and the system installed is CentOS 6.5:

(pilatus) det@dec1641:~/p2_det> conda --version
conda 4.8.2
(pilatus) det@dec1641:~/p2_det> lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.5 (Final)
Release:    6.5
Codename:   Final

We installed conda package as following

conda create -n pilatus -c conda-forge -c esrf-bcu lima-camera-pilatus-tango

Here is the list of conda packages installed in the dedicated env:

(pilatus) det@dec1641:~/p2_det> conda list
# packages in environment at /home/det/miniconda3/envs/pilatus:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
blosc                     1.21.3               hafa529b_0    conda-forge
bloscpack                 0.16.0                  py_1000    conda-forge
boost                     1.78.0           py39h7c9e3ff_4    conda-forge
boost-cpp                 1.78.0               h75c5d50_1    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2022.12.7            ha878542_0    conda-forge
cbflib                    0.9.7                h6578b86_0    esrf-bcu
cpptango                  9.4.1                h7f52402_0    conda-forge
deprecated                1.2.13             pyh6c4a22f_0    conda-forge
freetype                  2.12.1               hca18f0e_1    conda-forge
gsl                       2.2.1                h0c605f7_3  
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
icu                       70.1                 h27087fc_0    conda-forge
jpeg                      9e                   h166bdaf_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.20.1               hf9c8cef_0    conda-forge
lcms2                     2.14                 hfd0df8a_1    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libblas                   3.9.0           16_linux64_openblas    conda-forge
libcblas                  3.9.0           16_linux64_openblas    conda-forge
libconfig                 1.7.2                he870fd5_1    conda-forge
libcurl                   7.87.0               h6312ad2_0    conda-forge
libdeflate                1.17                 h0b41bf4_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgfortran-ng            12.2.0              h69a702a_19    conda-forge
libgfortran5              12.2.0              h337968e_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libjpeg-turbo             2.1.4                h166bdaf_0    conda-forge
liblapack                 3.9.0           16_linux64_openblas    conda-forge
libnghttp2                1.51.0               hdcd2b5c_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libnuma                   2.0.16               h0b41bf4_1    conda-forge
libopenblas               0.3.21          pthreads_h78a6416_3    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libssh2                   1.10.0               haa6b8db_3    conda-forge
libstdcxx-ng              12.2.0              h46fd767_19    conda-forge
libtiff                   4.5.0                h6adf6a1_2    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp-base              1.2.4                h166bdaf_0    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
lima-camera-pilatus       1.9.7            py39h2bc3f7f_0    esrf-bcu
lima-camera-pilatus-tango 1.9.7                         0    esrf-bcu
lima-core                 1.9.21           py39h2bc3f7f_0    esrf-bcu
lima-tango-server         1.9.19                     py_0    esrf-bcu
lz4-c                     1.9.4                hcb278e6_0    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
numpy                     1.24.2           py39h7360e5f_0    conda-forge
omniorb-libs              4.2.5                h5e5607d_4    conda-forge
openjpeg                  2.5.0                hfec8fc6_2    conda-forge
openssl                   1.1.1t               h0b41bf4_0    conda-forge
packaging                 23.0               pyhd8ed1ab_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pillow                    9.4.0            py39h2320bf1_1    conda-forge
pip                       23.0.1             pyhd8ed1ab_0    conda-forge
processlib                1.8.6            py39h7703b5b_0    esrf-bcu
psutil                    5.9.4            py39hb9d737c_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pymemcache                4.0.0              pyhd8ed1ab_0    conda-forge
pytango                   9.4.0            py39hcf1797d_0    conda-forge
python                    3.9.15          h47a2c10_0_cpython    conda-forge
python-blosc              1.10.6           py39h4661b88_1    conda-forge
python_abi                3.9                      3_cp39    conda-forge
pyturbojpeg               1.7.0              pyhec5db9e_0    conda-forge
readline                  8.1.2                h0f457ee_0    conda-forge
setuptools                67.4.0             pyhd8ed1ab_0    conda-forge
sip                       4.19.25          py39he80948d_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.9                hbd366e4_2    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
wrapt                     1.15.0           py39h72bdee0_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zlib                      1.2.13               h166bdaf_4    conda-forge
zstd                      1.5.2                h3eb15da_6    conda-forge

I added the camera_s_serie line in camera.def, I do not have any error anymore and I can launch commands prepareAcq and startAcq. Here is the output:

(pilatus) det@dec1641:~/p2_det> conda activate pilatus && LimaCCDs pilatus-b29
[2023/10/19 13:37:03.053308] 2ad4db7daf40 *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_config-Always: Applied config : /home/det/lima_pilatus-b29.cfg : default 
[2023/10/19 13:37:18.170621] 2ad51c6c2700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2023/10/19 13:37:18.380306] 2ad51c6c2700         *Control*Control::Control::readBlock (/opt/conda/conda-bld/lima-core_1671703046756/work/control/src/CtControl.cpp:885)-Error: Exception(Error): Frame(s) not available yet [thrown]
[2023/10/19 13:37:18.684745] 2ad51c6c2700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2023/10/19 13:37:18.701763] 2ad51c6c2700         *Control*Control::Control::readBlock (/opt/conda/conda-bld/lima-core_1671703046756/work/control/src/CtControl.cpp:885)-Error: Exception(Error): Frame(s) not available yet [thrown]
[2023/10/19 13:37:19.048743] 2ad51c6c2700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2023/10/19 13:37:19.049231] 2ad51c6c2700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2023/10/19 13:37:19.049689] 2ad51c6c2700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded

Indeed, an image was created in /lima_data. I'll check with our colleagues to check that it is correct.

Thank you again for you help!

laurent-claustre commented 11 months ago

Ok, good news. With some camserver versions and even if you are running a X model, the hwroi command id not supported and camserver returns an error code. So my trick with camera.def is the only solution. I will add it in the documentation, but I will add a tango property to manage this option and not to have to change the camera.def .