mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
Compare commits
169 Commits
patrick_25
...
9.1.0
Author | SHA1 | Date | |
---|---|---|---|
37b2efb1ed | |||
7ac18fbad9 | |||
6839315a7c | |||
527915a2ca | |||
64aad1e196 | |||
d3f847100e | |||
e1224936ca | |||
f29ef9e345 | |||
00e3b196f6 | |||
0109973e68 | |||
ad995b381a | |||
53b84b17a6 | |||
16d404c21b | |||
34ce96ffa0 | |||
d5fa26ef9a | |||
77f20b4e97 | |||
a295208c12 | |||
36a6087e1d | |||
fb406a7c6c | |||
6e4380db43 | |||
903652bb72 | |||
1609706093 | |||
14d2d171bb | |||
dd8452b365 | |||
15a9fb86da | |||
222d2b3fad | |||
a57531312f | |||
85a03a1d72 | |||
fc197ed002 | |||
a5d242876b | |||
76ce5de89e | |||
dbb0dbcbcd | |||
87d40d418e | |||
c82712b587 | |||
9dd1509714 | |||
c8290598db | |||
ff6a2655a2 | |||
7b2e6ae4ab | |||
706f3a103c | |||
5de98b3db0 | |||
7494e41862 | |||
7607fdc9a7 | |||
1bfffb842d | |||
7c48ae9a49 | |||
bf82aeee8d | |||
84e83bf551 | |||
60ce31bb17 | |||
2947b65e02 | |||
e92578f89d | |||
0e45ae189d | |||
e6e260d8ca | |||
fcc9b6ad54 | |||
0771461c01 | |||
ed6686d4a7 | |||
ec3d3e38a6 | |||
e47d3d4d15 | |||
f9dbffcb6e | |||
e83527adee | |||
1b41e39ad1 | |||
64fea22c2b | |||
dee86c63eb | |||
ce41e8aa34 | |||
9beaed7813 | |||
0aeb7e4417 | |||
7e2c8a37dc | |||
aeb59364c5 | |||
1f16f84fed | |||
0123169e35 | |||
ffd7cd1070 | |||
c6c7632ef7 | |||
b79759bcff | |||
d9e8e1c1c2 | |||
c57e835a41 | |||
b3d9af29fc | |||
4829429abd | |||
f1ffc6057a | |||
8f51215cb3 | |||
7b21ce34d6 | |||
e1497f9cb9 | |||
5088e5a205 | |||
06266f3905 | |||
5f805f8789 | |||
60868ae74e | |||
37e65634d4 | |||
6fcdba56a4 | |||
0b9fd0664e | |||
6add9aad5d | |||
4880f87791 | |||
97f0c1fe46 | |||
a86fd00e59 | |||
24894667b7 | |||
4b414bfddb | |||
15d357d9ab | |||
f95de054f9 | |||
0aef8113dd | |||
9785a41048 | |||
417e1a88a5 | |||
9c0dd0385d | |||
5ab64efe3e | |||
8f77e4d4fe | |||
41c5b75b10 | |||
bfe53c6693 | |||
f7997dd09a | |||
c64e87a2b6 | |||
5eeb8e29c1 | |||
09697fa325 | |||
90b4daef39 | |||
2082f1eee7 | |||
d3a636b563 | |||
50b9b6ca39 | |||
e86b57cdfc | |||
14e11e8b5b | |||
beafe86554 | |||
af3dc1e7f4 | |||
573177203b | |||
a3ca9ebce5 | |||
8174fc9691 | |||
d6eac6da71 | |||
56c7ae4852 | |||
9b9b09ceaf | |||
cfebaee2a5 | |||
4613c54f57 | |||
51f9d6f011 | |||
58ac7ac280 | |||
82edfa75d3 | |||
35ed926047 | |||
4023ed0775 | |||
b6ef3bc39e | |||
2035666792 | |||
1ff4d806e7 | |||
3861379653 | |||
91140bbb71 | |||
a5632fcbea | |||
d44329117d | |||
4a454aa698 | |||
0e43072db8 | |||
6c67025ea8 | |||
e5ee27dbfa | |||
601249cc71 | |||
ff60b8c379 | |||
37ce3d6f59 | |||
bf26533fd8 | |||
7106273521 | |||
1484d038de | |||
fb0090c79e | |||
adc68cd519 | |||
1566eef247 | |||
e7cd90db78 | |||
45414149fe | |||
48759f440e | |||
b367b7e431 | |||
f0b2a6f6f9 | |||
f761046bfc | |||
1a859b83db | |||
70bfc875a6 | |||
c0755308a4 | |||
ab5509e10c | |||
004cb26646 | |||
a4f47a5945 | |||
312f3f473d | |||
5871086cd6 | |||
6a0fe823b3 | |||
5912aae53e | |||
8833ccf5cc | |||
77c558a7be | |||
378fc301b8 | |||
87d6e16090 | |||
2ef021041c | |||
574127b5ac |
2
.github/workflows/cmake.yml
vendored
2
.github/workflows/cmake.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev
|
||||
packages: libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev libpng-dev libtiff-dev
|
||||
version: 1.0
|
||||
|
||||
- name: Configure CMake
|
||||
|
@ -1 +0,0 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
@ -2,7 +2,15 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(slsDetectorPackage)
|
||||
set(PROJECT_VERSION 9.0.0)
|
||||
|
||||
# Read VERSION file into project version
|
||||
set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION")
|
||||
file(READ "${VERSION_FILE}" VERSION_CONTENT)
|
||||
string(STRIP "${VERSION_CONTENT}" PROJECT_VERSION_STRING)
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION_STRING})
|
||||
|
||||
# Pass it to the compiler
|
||||
add_compile_definitions(SLS_DET_VERSION="${PROJECT_VERSION}")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
|
||||
@ -241,7 +249,7 @@ endif()
|
||||
if(SLS_USE_SANITIZER)
|
||||
target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
|
||||
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
|
||||
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
#target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread -fno-omit-frame-pointer)
|
||||
#target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
endif()
|
||||
|
||||
@ -296,19 +304,20 @@ if (SLS_USE_INTEGRATION_TESTS)
|
||||
endif (SLS_USE_INTEGRATION_TESTS)
|
||||
|
||||
if (SLS_USE_PYTHON)
|
||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||
find_package (Python 3.8 COMPONENTS Interpreter Development)
|
||||
if(SLS_FETCH_PYBIND11_FROM_GITHUB)
|
||||
FetchContent_Declare(
|
||||
pybind11
|
||||
GIT_REPOSITORY https://github.com/pybind/pybind11
|
||||
GIT_TAG v2.11.0
|
||||
GIT_TAG v2.13.6
|
||||
)
|
||||
|
||||
else()
|
||||
# https://github.com/pybind/pybind11/releases
|
||||
FetchContent_Declare(
|
||||
pybind11
|
||||
URL ${CMAKE_SOURCE_DIR}/libs/pybind11/v2.11.0.tar.gz
|
||||
URL_HASH MD5=90c4946e87c64d8d8fc0ae4edf35d780
|
||||
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/pybind11/v2.13.6.tar.gz
|
||||
URL_HASH MD5=a04dead9c83edae6d84e2e343da7feeb
|
||||
)
|
||||
endif()
|
||||
FetchContent_MakeAvailable(pybind11)
|
||||
|
120
README.md
120
README.md
@ -2,7 +2,11 @@
|
||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
## Documentaion
|
||||
Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
||||
|
||||
Different releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
||||
|
||||
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
||||
|
||||
## Installation
|
||||
|
||||
@ -42,33 +46,20 @@ conda search slsdet
|
||||
conda search slsdetgui
|
||||
```
|
||||
|
||||
### 2. Build from source
|
||||
## 2. Build from source
|
||||
|
||||
##### 2.1 Download Source Code from github
|
||||
### 2.1 Download Source Code from github
|
||||
```
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||
```
|
||||
|
||||
**Pybind for Python**<br>
|
||||
* **v7.0.0+**:
|
||||
pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||
|
||||
* **Older versions**:
|
||||
pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||
|
||||
```
|
||||
# clone using recursive to get pybind11 submodule
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
# update submodule when switching between releases
|
||||
cd slsDetectorPackage
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
##### 2.2 Build from source
|
||||
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
||||
|
||||
|
||||
###### Build using CMake
|
||||
### 2.2 Build from source
|
||||
|
||||
|
||||
### Build using CMake
|
||||
|
||||
```
|
||||
# outside slsDetecorPackage folder
|
||||
@ -94,26 +85,28 @@ Instead of the cmake command, one can use ccmake to get a list of options to con
|
||||
ccmake ..
|
||||
|
||||
# choose the options
|
||||
# first press [c] - configure
|
||||
# first press [c] - configure (unil you see [g])
|
||||
# then press [g] - generate
|
||||
```
|
||||
|
||||
|Example cmake options|Comment|
|
||||
|---|---|
|
||||
| -DSLS_USE_PYTHON=ON | Python |
|
||||
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment |
|
||||
| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead |
|
||||
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda env |
|
||||
| -DSLS_USE_GUI=ON | GUI |
|
||||
| -DSLS_USE_HDF5=ON | HDF5 |
|
||||
| -DSLS_USE_SIMULATOR=ON | Simulator |
|
||||
|
||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
||||
|
||||
###### Build using in-built cmk.sh script
|
||||
### Build using in-built cmk.sh script
|
||||
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
|
||||
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
|
||||
[r] [s] [t] [u] [z]
|
||||
Usage: $0 [-b] [-c] [-d <HDF5 directory>] [-e] [-g] [-h] [-i]
|
||||
[-j <Number of threads>] [-k <CMake command>] [-l <Install directory>]
|
||||
[-m] [-n] [-p] [-r] [-s] [-t] [-u] [-z]
|
||||
-[no option]: only make
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-c: Clean
|
||||
@ -128,7 +121,6 @@ Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-p: Builds/Rebuilds Python API
|
||||
-q: Zmq hint directory
|
||||
-r: Build/Rebuilds only receiver
|
||||
-s: Simulator
|
||||
-t: Build/Rebuilds only text client
|
||||
@ -145,11 +137,14 @@ Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of
|
||||
# new build, python and compile in parallel:
|
||||
./cmk.sh -cbpj5
|
||||
|
||||
#To use the system zmq (/usr/lib64) instead
|
||||
./cmk.sh -cbj5 -q /usr/lib64
|
||||
#For rebuilding only certain sections
|
||||
./cmk.sh -tg #only text client and gui
|
||||
./cmk.sh -r #only receiver
|
||||
```
|
||||
|
||||
###### Build on old distributions
|
||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
||||
|
||||
### Build on old distributions
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
@ -166,7 +161,10 @@ cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||
make -j12
|
||||
```
|
||||
|
||||
###### Build slsDetectorGui (Qt5)
|
||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||
|
||||
|
||||
### Build slsDetectorGui (Qt5)
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
```
|
||||
@ -180,7 +178,14 @@ yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
```
|
||||
|
||||
3. Using conda
|
||||
3. Using system installation on RHEL8
|
||||
```
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
yum install expat-devel.x86_64
|
||||
```
|
||||
|
||||
4. Using conda
|
||||
```
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
@ -208,13 +213,15 @@ cd slsDetectorPackage
|
||||
./cmk.sh -cbgj9
|
||||
```
|
||||
|
||||
###### Build documentation from package
|
||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||
|
||||
### Build documentation from package
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
is to use conda
|
||||
|
||||
```
|
||||
conda create -n myenv python sphinx_rtd_theme breathe
|
||||
conda create -n myenv python=3.12 sphinx sphinx_rtd_theme breathe doxygen numpy
|
||||
```
|
||||
|
||||
```
|
||||
@ -228,6 +235,47 @@ make rst # rst only, saves time in case the API did not change
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Pybind and Zeromq
|
||||
|
||||
### Pybind11 for Python
|
||||
**v8.0.0+**:
|
||||
pybind11 is built
|
||||
* by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz)
|
||||
* or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [link].
|
||||
* v9.0.0+: pybind11 (v2.13.6)
|
||||
* v8.x.x : pybind11 (v2.11.0)
|
||||
|
||||
**v7.x.x**:
|
||||
pybind11 packaged into ‘libs/pybind’. No longer a submodule. No need for “recursive” or “submodule update”.
|
||||
|
||||
**Older versions**:
|
||||
pybind11 is a submodule. Must be cloned using “recursive” and updated when switching between versions using the following commands.
|
||||
|
||||
```
|
||||
# Note: Only for v6.x.x versions and older
|
||||
|
||||
# clone using recursive to get pybind11 submodule
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
# update submodule when switching between releases
|
||||
cd slsDetectorPackage
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
### Zeromq
|
||||
**v8.0.0+**:
|
||||
zeromq (v4.3.4) is built
|
||||
* by default from tar file in repo (libs/libzmq/libzmq-4.3.4.tar.gz)
|
||||
* or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [link].
|
||||
|
||||
**v7.x.x and older**:
|
||||
zeromq-devel must be installed and one can hint its location using
|
||||
* cmake option:’-DZeroMQ_HINT=/usr/lib64’ or
|
||||
* option ‘-q’ in cmk.sh script: : ./cmk.sh -cbj5 -q /usr/lib64
|
||||
* ‘zeromq’ dependency added when installing using conda
|
||||
|
||||
|
||||
## Support
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
152
RELEASE.txt
152
RELEASE.txt
@ -1,21 +1,15 @@
|
||||
SLS Detector Package Major Release x.x.x released on xx.xx.202x
|
||||
SLS Detector Package Minor Release 9.1.0 released on 28.03.2025
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between vx.x.x and vx.0.2
|
||||
This document describes the differences between v9.1.0 and v9.0.0
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1 New, Changed or Resolved Features
|
||||
1.1 Compilation
|
||||
1.2 Callback
|
||||
1.3 Python
|
||||
1.4 Client
|
||||
1.5 Detector Server
|
||||
1.6 Simulator
|
||||
1.7 Receiver
|
||||
1.8 Gui
|
||||
1 Changes
|
||||
1.1 New or Changed Features
|
||||
1.2 Resolved Features
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
@ -24,11 +18,131 @@ This document describes the differences between vx.x.x and vx.0.2
|
||||
|
||||
|
||||
|
||||
1 New, Changed or Resolved Features
|
||||
=====================================
|
||||
1 Changes
|
||||
==========
|
||||
|
||||
|
||||
|
||||
1.1 New or Changed Features
|
||||
============================
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* Frame Synchronizer (experimental)
|
||||
Added a new binary, similar to slsMultiReceiver, to collect images from
|
||||
several receivers and stream them out as a ZMQ multipart message
|
||||
(one part for each UDP port). No reconstuction of the image. Includeds start
|
||||
and end ZMQ messages as well for the start and end callback parameters.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
||||
* Command line - multi module and multi detector indices
|
||||
Help on this topic has been added to the 'Command line' topic.
|
||||
|
||||
|
||||
* Row and column index (UDP header or callback)
|
||||
Help on how this is determined from the hostname is added to the 'UDP
|
||||
Header' and the 'Quick Start Guide' topics. Also added to the help in '
|
||||
hostname' command line help. Please note that this can be overwritten by
|
||||
corresponding row and column commands.
|
||||
|
||||
|
||||
|
||||
1.2 Resolved Features
|
||||
======================
|
||||
|
||||
|
||||
Firmware
|
||||
---------
|
||||
|
||||
|
||||
* [Jungfrau] Column select and filter resistor
|
||||
Configuration fix for chip v1.1 for these parameters
|
||||
|
||||
|
||||
Firmware &/ On-board Detector Server
|
||||
------------------------------------
|
||||
|
||||
|
||||
* [Jungfrau] Timing Info Decoder
|
||||
Only allowed for hardware v2.0 now.
|
||||
|
||||
|
||||
* [Jungfrau] Auto Comparator Disable - chip v1.0
|
||||
Previously, this mode for chip v1.0 automatically disabled the on-chip
|
||||
gain switching compatator after a fixed portion of the exposure time.
|
||||
Now, one must set also the comparator disable time using 'compdisabletime'
|
||||
just as in chip v1.1.
|
||||
|
||||
|
||||
* [Mythen3] Default period on server start up is 0 now.
|
||||
|
||||
|
||||
Client
|
||||
-------
|
||||
|
||||
|
||||
* Command line - Multi detector index inside file
|
||||
Multi detector index '[index]-' was ignored silently in the config/parameter
|
||||
file since 5.0.0. Now, it will throw an exception. Please use the multi
|
||||
detector index on the 'config' or 'parameter' command instead.
|
||||
|
||||
|
||||
* [Mythen3] patternX command autocompletes the argument to a path now.
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* Multiple Receiver objects in multiple threads
|
||||
slsMultiReceiver uses child processes, but if user rewrote to use multiple
|
||||
receiver objects in multiple threads instead, a callback mutex is now
|
||||
implemented to handle the locking mechanism between threads for the callbacks.
|
||||
|
||||
|
||||
* Removed potentially unsafe str().c_str() calls.
|
||||
|
||||
|
||||
* slsMultiReceiver Ctrl + C
|
||||
Now cleans up properly upon Ctrl + C, including exiting the Arping thread.
|
||||
|
||||
|
||||
* slsMultiReceiver version
|
||||
--version or -v now gives the version of slsMultiReceiver.
|
||||
|
||||
|
||||
ZMQ
|
||||
---
|
||||
|
||||
|
||||
* [Moench] Reduced significant print out in zmq processing using energy
|
||||
threshold.
|
||||
|
||||
|
||||
* [Moench] Zmq dummy packet restreaming command did nothing
|
||||
Temporary solution was to move from 'stop' to 'rx_stop' as 'stop' did not
|
||||
go further if module is idle.
|
||||
|
||||
|
||||
* [Moench] Too many Zmq dummy packets- unclear end in acquire
|
||||
Give time to process dummy packet before restreaming it and wait more
|
||||
before restreaming to reduce amoutn of zmq dummy packets to process.
|
||||
|
||||
|
||||
Simulators
|
||||
-----------
|
||||
|
||||
|
||||
* [Jungfrau][Moench] Slightly faster transmistting time by removing sleeping
|
||||
only if there is a transmission delay
|
||||
|
||||
|
||||
|
||||
2 On-board Detector Server Compatibility
|
||||
@ -36,8 +150,8 @@ This document describes the differences between vx.x.x and vx.0.2
|
||||
|
||||
|
||||
Eiger 9.0.0
|
||||
Jungfrau 9.0.0
|
||||
Mythen3 9.0.0
|
||||
Jungfrau 9.1.0
|
||||
Mythen3 9.1.0
|
||||
Gotthard2 9.0.0
|
||||
Gotthard 9.0.0
|
||||
Moench 9.0.0
|
||||
@ -66,14 +180,14 @@ This document describes the differences between vx.x.x and vx.0.2
|
||||
|
||||
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
||||
|
||||
Jungfrau 01.10.2024 (v1.6, HW v1.0) (updated in 9.0.0)
|
||||
01.10.2024 (v2.6, HW v2.0) (updated in 9.0.0)
|
||||
Jungfrau 09.02.2025 (v1.6, HW v1.0) (updated in 9.1.0)
|
||||
08.02.2025 (v2.6, HW v2.0) (updated in 9.1.0)
|
||||
|
||||
Mythen3 11.10.2024 (v1.5) (updated in 9.0.0)
|
||||
Mythen3 13.11.2024 (v2.0) (updated in 9.0.0)
|
||||
|
||||
Gotthard2 03.10.2024 (v1.0) (updated in 9.0.0)
|
||||
|
||||
Moench 26.10.2023 (v2.0) (updated in 9.0.0)
|
||||
Moench 26.10.2023 (v2.0) (updated in 8.0.2)
|
||||
|
||||
Gotthard 08.02.2018 (50um and 25um Master)
|
||||
09.02.2018 (25 um Slave)
|
||||
|
@ -1,7 +0,0 @@
|
||||
python:
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
- 3.12
|
||||
|
@ -1,8 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
if [ ! -d "build" ]; then
|
||||
mkdir build
|
||||
fi
|
||||
if [ ! -d "install" ]; then
|
||||
mkdir install
|
||||
fi
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
|
@ -2,5 +2,10 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
echo "|<-------- starting python build"
|
||||
|
||||
cd python
|
||||
|
||||
# copy VERSION into slsdet for installation
|
||||
cp ../VERSION slsdet/VERSION
|
||||
|
||||
${PYTHON} setup.py install
|
14
conda-recipe/conda_build_config.yaml
Normal file
14
conda-recipe/conda_build_config.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
python:
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
|
||||
|
||||
c_stdlib:
|
||||
- sysroot # [linux]
|
||||
|
||||
c_stdlib_version: # [linux]
|
||||
- 2.17 # [linux]
|
@ -11,6 +11,7 @@ cp build/install/lib/* $PREFIX/lib/
|
||||
|
||||
#Binaries
|
||||
cp build/install/bin/sls_detector_acquire $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_acquire_zmq $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_get $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_put $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_help $PREFIX/bin/.
|
@ -1,10 +1,10 @@
|
||||
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
|
||||
|
||||
|
||||
source:
|
||||
- path: ..
|
||||
path: ..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
@ -15,35 +15,18 @@ build:
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{stdlib('c')}}
|
||||
- {{compiler('cxx')}}
|
||||
- cmake
|
||||
- cmake<=3.28
|
||||
- ninja
|
||||
- qt 5.*
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
- xorg-libxext
|
||||
- xorg-libsm
|
||||
- xorg-libxau
|
||||
- xorg-libxrender
|
||||
- xorg-libxfixes
|
||||
- {{ cdt('mesa-libgl-devel') }} # [linux]
|
||||
- {{ cdt('mesa-libegl-devel') }} # [linux]
|
||||
- {{ cdt('mesa-dri-drivers') }} # [linux]
|
||||
- {{ cdt('libselinux') }} # [linux]
|
||||
- {{ cdt('libxdamage') }} # [linux]
|
||||
- {{ cdt('libxxf86vm') }} # [linux]
|
||||
- expat
|
||||
|
||||
host:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
- xorg-libxext
|
||||
- xorg-libsm
|
||||
- xorg-libxau
|
||||
- xorg-libxrender
|
||||
- xorg-libxfixes
|
||||
- expat
|
||||
- libgl-devel
|
||||
- libtiff
|
||||
- zlib
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
@ -61,13 +44,11 @@ outputs:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
- name: slsdet
|
||||
|
||||
script: build_pylib.sh
|
||||
|
||||
requirements:
|
||||
@ -77,12 +58,13 @@ outputs:
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- setuptools
|
||||
- pybind11=2.11
|
||||
- pybind11=2.13
|
||||
|
||||
host:
|
||||
- python
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- pybind11=2.11
|
||||
- setuptools
|
||||
- pybind11=2.13
|
||||
|
||||
|
||||
run:
|
||||
@ -92,11 +74,11 @@ outputs:
|
||||
- numpy
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
|
||||
test:
|
||||
imports:
|
||||
- slsdet
|
||||
|
||||
|
||||
- name: slsdetgui
|
||||
script: copy_gui.sh
|
||||
requirements:
|
||||
@ -124,3 +106,4 @@ outputs:
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- expat
|
||||
|
@ -58,6 +58,12 @@ set(SPHINX_SOURCE_FILES
|
||||
src/udpheader.rst
|
||||
src/udpconfig.rst
|
||||
src/udpdetspec.rst
|
||||
src/fileformat.rst
|
||||
src/slsreceiverheaderformat.rst
|
||||
src/masterfileattributes.rst
|
||||
src/binaryfileformat.rst
|
||||
src/hdf5fileformat.rst
|
||||
src/zmqjsonheaderformat.rst
|
||||
)
|
||||
|
||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||
|
@ -63,4 +63,4 @@ html_static_path = ['static']
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet('css/extra.css') # may also be an URL
|
||||
app.add_css_file('css/extra.css') # may also be an URL
|
||||
|
438
docs/src/binaryfileformat.rst
Normal file
438
docs/src/binaryfileformat.rst
Normal file
@ -0,0 +1,438 @@
|
||||
Binary File Format
|
||||
====================
|
||||
|
||||
This is the default file format that can be configured using command `fformat <commandline.html#term-fformat-binary-hdf5>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put fformat binary
|
||||
|
||||
|
||||
Master File
|
||||
--------------
|
||||
|
||||
* File Name: [fpath]/[fname]_master_[findex].json :ref:`Details here<file name format>`
|
||||
|
||||
* It is in json format and created for every acquisition.
|
||||
|
||||
* It contains :ref:`attributes<master file attributes>` relevant to the acquisition. This can vary with detector type shown in :ref:`master json file examples <json master file examples>` here.
|
||||
|
||||
* It shows the :ref:`**SLS Receiver Header** <sls receiver header format>` format used in data files.
|
||||
|
||||
* Enabled/disabled using command `fmaster <commandline.html#term-fmaster-0-1>`_.
|
||||
|
||||
|
||||
Data File
|
||||
----------
|
||||
|
||||
* File Name: [fpath]/[fname]_dx_fy_[findex].raw :ref:`Details here<file name format>`
|
||||
|
||||
* It store multiple frames sequentially, with total number of frames determined by `rx_framesperfile <commandline.html#term-rx_framesperfile-n_frames>`_ parameter.
|
||||
|
||||
* Each frame includes a :ref:`**sls_receiver_header** <sls receiver header format>` structure, followed by the actual frame data.
|
||||
|
||||
|
||||
|
||||
.. _json master file examples:
|
||||
|
||||
JSON Master File Examples
|
||||
---------------------------------------------------
|
||||
|
||||
Eiger
|
||||
^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 15:46:30 2024",
|
||||
"Detector Type": "Eiger",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 2,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 262144,
|
||||
"Pixels": {
|
||||
"x": 512,
|
||||
"y": 256
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Dynamic Range": 16,
|
||||
"Ten Giga": 0,
|
||||
"Exptime": "1s",
|
||||
"Period": "1s",
|
||||
"Threshold Energy": -1,
|
||||
"Sub Exptime": "2.62144ms",
|
||||
"Sub Period": "2.62144ms",
|
||||
"Quad": 0,
|
||||
"Number of rows": 256,
|
||||
"Rate Corrections": "[0]",
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Jungfrau
|
||||
^^^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 13:03:53 2024",
|
||||
"Detector Type": "Jungfrau",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 1048576,
|
||||
"Pixels": {
|
||||
"x": 1024,
|
||||
"y": 512
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1000,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "10us",
|
||||
"Period": "2ms",
|
||||
"Number of UDP Interfaces": 1,
|
||||
"Number of rows": 512,
|
||||
"Frames in File": 10,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gotthard2
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 14:18:17 2024",
|
||||
"Detector Type": "Gotthard2",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 2560,
|
||||
"Pixels": {
|
||||
"x": 1280,
|
||||
"y": 1
|
||||
},
|
||||
"Max Frames Per File": 20000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 10,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "0ns",
|
||||
"Period": "0ns",
|
||||
"Burst Mode": "burst_internal",
|
||||
"Frames in File": 10,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
Mythen3
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 14:39:14 2024",
|
||||
"Detector Type": "Mythen3",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 15360,
|
||||
"Pixels": {
|
||||
"x": 3840,
|
||||
"y": 1
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Dynamic Range": 32,
|
||||
"Ten Giga": 1,
|
||||
"Period": "2ms",
|
||||
"Counter Mask": "0x7",
|
||||
"Exptime1": "0.1s",
|
||||
"Exptime2": "0.1s",
|
||||
"Exptime3": "0.1s",
|
||||
"GateDelay1": "0ns",
|
||||
"GateDelay2": "0ns",
|
||||
"GateDelay3": "0ns",
|
||||
"Gates": 1,
|
||||
"Threshold Energies": "[-1, -1, -1]",
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Moench
|
||||
^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 14:41:32 2024",
|
||||
"Detector Type": "Moench",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 320000,
|
||||
"Pixels": {
|
||||
"x": 400,
|
||||
"y": 400
|
||||
},
|
||||
"Max Frames Per File": 100000,
|
||||
"Frame Discard Policy": "discardpartial",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "10us",
|
||||
"Period": "2ms",
|
||||
"Number of UDP Interfaces": 1,
|
||||
"Number of rows": 400,
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
Gotthard I
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 15:16:19 2024",
|
||||
"Detector Type": "Gotthard",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 2560,
|
||||
"Pixels": {
|
||||
"x": 1280,
|
||||
"y": 1
|
||||
},
|
||||
"Max Frames Per File": 20000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "1.00001ms",
|
||||
"Period": "1s",
|
||||
"Detector Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295
|
||||
},
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
||||
|
||||
Chip Test Board
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Wed Nov 13 15:32:59 2024",
|
||||
"Detector Type": "ChipTestBoard",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 48018,
|
||||
"Pixels": {
|
||||
"x": 3,
|
||||
"y": 1
|
||||
},
|
||||
"Max Frames Per File": 20000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "0ns",
|
||||
"Period": "0.18s",
|
||||
"Ten Giga": 0,
|
||||
"ADC Mask": "0x2202",
|
||||
"Analog Flag": 1,
|
||||
"Analog Samples": 8003,
|
||||
"Digital Flag": 0,
|
||||
"Digital Samples": 1000,
|
||||
"Dbit Offset": 0,
|
||||
"Dbit Bitset": 0,
|
||||
"Transceiver Mask": "0x3",
|
||||
"Transceiver Flag": 0,
|
||||
"Transceiver Samples": 1,
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
@ -4,11 +4,54 @@ Command line interface
|
||||
Usage
|
||||
-------------
|
||||
|
||||
Commands can be used either with sls_detector_get or sls_detector_put
|
||||
The syntax is *'[detector index]-[module index]:[command]'*, where the indices are by default '0', when not specified.
|
||||
|
||||
Module index
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Modules are indexed based on their order in the hostname command. They are used to configure a specific module within a detector and are followed by a ':' in syntax.
|
||||
|
||||
.. code-block::
|
||||
|
||||
sls_detector_get vrf
|
||||
# Applies to all modules of detector 0
|
||||
sls_detector_put exptime 5s
|
||||
|
||||
# Applies to only the 4th module
|
||||
sls_detector_put 3:exptime 5s
|
||||
|
||||
|
||||
Detector index
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
This index is useful when configuring multiple detectors from a single host. Each detector uses a unique shared memory identified by a detector index, derived again from the hostname command. It is followed by a '-'.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# For detector with index 2 in shared memory
|
||||
sls_detector_put 2-hostname bchip133+bchip123+bchip456
|
||||
|
||||
# Without '-', the detector index defaults to 0
|
||||
sls_detector_put hostname bchip133+bchip123+bchip456
|
||||
|
||||
# Accessing all modules with detector index 2
|
||||
sls_detector_put 2-exptime
|
||||
|
||||
# Starting acquisition only for detector with index 2
|
||||
sls_detector_put 2-start
|
||||
|
||||
# Applies only to the 2nd detector, 4th module
|
||||
sls_detector_put 1-3:exptime 5s
|
||||
|
||||
|
||||
Command Execution
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Commands can be executed using:
|
||||
|
||||
* **sls_detector_put**: setting values
|
||||
* **sls_detector_get**: getting values
|
||||
* **sls_detector**: automatically infers based on the number of arguments.
|
||||
* **sls_detector_help**: gets help on the specific command
|
||||
* **sls_detector_acquire**: initiates acquisition with the detector. This command blocks until the entire acquisition process is completed.
|
||||
|
||||
|
||||
|
||||
Help
|
||||
--------
|
||||
@ -25,6 +68,19 @@ Help
|
||||
sls_detector_get -h fpath
|
||||
sls_detector_help fpath
|
||||
|
||||
# list of deprecated commands
|
||||
list deprecated
|
||||
|
||||
|
||||
Autocompletion
|
||||
---------------
|
||||
|
||||
bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the main package folder to enable auto completion of commands and arguments for the command line on that shell.
|
||||
|
||||
.. code-block::
|
||||
|
||||
source bash_autocomplete.sh
|
||||
|
||||
|
||||
Commands
|
||||
-----------
|
||||
|
@ -20,8 +20,8 @@ the shared libraries these are needed:
|
||||
Python bindings
|
||||
-----------------------
|
||||
|
||||
* Python > 3.6
|
||||
* pybind11 2.11.0 (packaged in libs)
|
||||
* Python >= 3.8
|
||||
* pybind11 2.13.6 (packaged in libs)
|
||||
|
||||
.. note ::
|
||||
|
||||
|
@ -13,7 +13,6 @@ containing results from all modules. (:ref:`Result class<Result Class>`)
|
||||
|
||||
Here are some :ref:`examples <Cplusplus Api Examples>` on how to use the API.
|
||||
|
||||
.. _Cplusplus Api Examples:
|
||||
.. doxygenclass:: sls::Detector
|
||||
:members:
|
||||
:undoc-members:
|
62
docs/src/fileformat.rst
Normal file
62
docs/src/fileformat.rst
Normal file
@ -0,0 +1,62 @@
|
||||
File format
|
||||
================================
|
||||
|
||||
If `fwrite <commandline.html#term-fwrite-0-1>`_ is enabled, the receiver will write data to files.
|
||||
|
||||
Number of Files
|
||||
----------------
|
||||
|
||||
Every acquisition will create a master file and data files.
|
||||
|
||||
An acquisition can have multiple data files for a single frame. The number of files is determined by the number of UDP ports per module and the number of modules.
|
||||
|
||||
* Every modules has its own receiver process. Every receiver process can have 1 or 2 UDP ports.
|
||||
* Each UDP port will create its own file. Therefore, each receiver can write 1 or 2 files.
|
||||
* So, for example a detector with 4 modules with 2 UDP ports each will create a total of 8 files with file names containing UDP port index **'_d0'** to **'_d7'**.
|
||||
|
||||
A new file containing **'_f[file_index]'** in file name is also created when reaching the maximum frames per file. Configured using `rx_framesperfile <commandline.html#term-rx_framesperfile-n_frames>`_.
|
||||
|
||||
.. _file name format:
|
||||
|
||||
Naming
|
||||
-------
|
||||
| Master File Name: [fpath]/[fname]_master_[findex].[ext]
|
||||
|
||||
|
||||
| Data File Name: [fpath]/[fname]_dx_fy_[findex].[ext]
|
||||
|
||||
* fpath: file path set using command `fpath <commandline.html#term-fpath-path>`_. Default: '/'
|
||||
* fname: file name prefix using command `fname <commandline.html#term-fname-name>`_. Default: "run"
|
||||
* findex: acquisition index using command `findex <commandline.html#term-findex-n_value>`_. Automatically incremented for every acquisition with `sls_detector_acquire <commandline.html#term-acquire>`_ (if `fwrite <commandline.html#term-fwrite-0-1>`_ enabled).
|
||||
* x: unique udp port index. New file per UDP port.
|
||||
* y: file index. New file created after reaching max frames per file.
|
||||
* ext: file extension. Default: "raw"(data file) or "json"(master file)
|
||||
|
||||
|
||||
Some file name examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# first file
|
||||
path-to-file/run_d0_f0_0.raw
|
||||
|
||||
# first file for second UDP port
|
||||
path-to-file/run_d1_f0_0.raw
|
||||
|
||||
# second file after reaching max frames in first file
|
||||
path-to-file/run_d0_f1_0.raw
|
||||
|
||||
# second acquisition, first file
|
||||
path-to-file/run_d0_f0_1.raw
|
||||
|
||||
|
||||
Formats
|
||||
--------
|
||||
|
||||
There are 2 file formats supported by the receiver:
|
||||
|
||||
* Binary - extension .json (master file) or .raw (data files)
|
||||
* HDF5 - extension .h5
|
||||
|
||||
The default is binary. HDF5 can be enabled by compiling the package with HDF5 option enabled. The file format is set using the command `fformat <commandline.html#term-fformat-binary-hdf5>`_.
|
||||
|
@ -98,7 +98,7 @@ Upgrade
|
||||
|
||||
* 6.1.2 server has a fix for seamless fpga programming
|
||||
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command `updatedetectorserver <commandline.html#term-updatedetectorserver-server_name-with-full-path>`_.
|
||||
|
||||
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||
|
||||
@ -257,7 +257,7 @@ Upgrade
|
||||
|
||||
* 6.1.2 server has a fix for seamless fpga programming
|
||||
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command `updatedetectorserver <commandline.html#term-updatedetectorserver-server_name-with-full-path>`_.
|
||||
|
||||
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "CmdProxy.h"
|
||||
#include "Caller.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
@ -37,8 +37,8 @@ int main() {
|
||||
|
||||
std::cout << "Generating command line documentation!\n";
|
||||
|
||||
sls::CmdProxy proxy(nullptr);
|
||||
auto commands = proxy.GetProxyCommands();
|
||||
sls::Caller caller(nullptr);
|
||||
auto commands = caller.getAllCommands();
|
||||
|
||||
std::ofstream fs("commands.rst");
|
||||
fs << ".. glossary::\n";
|
||||
@ -46,7 +46,7 @@ int main() {
|
||||
for (const auto &cmd : commands) {
|
||||
std::ostringstream os;
|
||||
std::cout << cmd << '\n';
|
||||
proxy.Call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os);
|
||||
caller.call(cmd, {}, -1, slsDetectorDefs::HELP_ACTION, os);
|
||||
|
||||
auto tmp = os.str().erase(0, cmd.size());
|
||||
auto usage = tmp.substr(0, tmp.find_first_of('\n'));
|
||||
@ -57,7 +57,7 @@ int main() {
|
||||
|
||||
std::ofstream fs2("deprecated.csv");
|
||||
fs2 << "Old, New\n";
|
||||
auto cmds = proxy.GetDeprecatedCommands();
|
||||
auto cmds = caller.GetDeprecatedCommands();
|
||||
for (auto it : cmds) {
|
||||
fs2 << it.first << ", " << it.second << '\n';
|
||||
}
|
||||
|
89
docs/src/hdf5fileformat.rst
Normal file
89
docs/src/hdf5fileformat.rst
Normal file
@ -0,0 +1,89 @@
|
||||
|
||||
|
||||
HDF5 File Format
|
||||
================================
|
||||
|
||||
Compilation
|
||||
-------------
|
||||
|
||||
#. Compile the package with HDF5 option enabled
|
||||
|
||||
#. Using cmk script: ./cmk.sh -hj9 -d [path of hdf5 dir] (-d is optional and for custom installation folder)
|
||||
|
||||
#. Enable using cmake option **-DSLS_USE_HDF5=ON** and **-DCMAKE_INSTALL_PREFIX=/path/to/custom/hdf/installation** (optional).
|
||||
|
||||
|
||||
Setup
|
||||
-------
|
||||
|
||||
#. Start Receiver process
|
||||
|
||||
#. Load config file
|
||||
|
||||
#. Set file format using command `fformat <commandline.html#term-fformat-binary-hdf5>`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put fformat hdf5
|
||||
|
||||
|
||||
Master File
|
||||
-------------
|
||||
|
||||
* File Name: [fpath]/[fname]_master_[findex].h5 :ref:`Details here<file name format>`
|
||||
|
||||
* It contains :ref:`attributes<master file attributes>` relevant to the acquisition. This can vary with detector type.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
/ # Root level
|
||||
|---> entry # entry group
|
||||
| |---> data # data group
|
||||
| |---> column # dataset of each sls_receiver_header member
|
||||
| |---> data
|
||||
| |---> detector header version
|
||||
| |---> detector specific 1
|
||||
| |---> detector specific 2
|
||||
| |---> detector specific 3
|
||||
| |---> detector specific 4
|
||||
| |---> detector type
|
||||
| |---> exp length or sub exposure time
|
||||
| |---> frame number
|
||||
| |---> mod id
|
||||
| |---> packets caught
|
||||
| |---> packets caught bit mask
|
||||
| |---> row
|
||||
| |---> timestamp
|
||||
| |---> instrument # instrument group
|
||||
| |---> beam # beam group
|
||||
| |---> detector # detector group
|
||||
| |---> Master File Attribute 1 # dataset of each master file attribute
|
||||
| |---> Master File Attribute 2
|
||||
| |---> Master File Attribute 3
|
||||
| |---> Master File Attribute ..
|
||||
| |---> sample # sample group
|
||||
|
||||
|
||||
If more than 1 data file per frame:
|
||||
* The dataset of each :ref:`**SLS Receiver Header** <sls receiver header format>` member is a virtual dataset.
|
||||
* **data** dataset is a virtual dataset.
|
||||
|
||||
|
||||
More details regarding master file attributes can be found :ref:`here<master file attributes>`.
|
||||
|
||||
Data File
|
||||
-----------
|
||||
|
||||
* File Name: [fpath]/[fname]_dx_fy_[findex].h5 :ref:`Details here<file name format>`
|
||||
|
||||
|
||||
Virtual Data File
|
||||
------------------
|
||||
|
||||
* File Name: [fpath]/[fname]_virtual_[findex].h5 :ref:`Details here<file name format>`
|
||||
|
||||
* For multiple modules, a virtual file linking data from all the modules is created. The individual files are expected to be present.
|
||||
|
||||
* It is linked in the master file.
|
||||
|
||||
|
@ -12,7 +12,7 @@ Welcome to slsDetectorPackage's documentation!
|
||||
For further documentation, visit the official page: https://www.psi.ch/en/detectors/documentation
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:maxdepth: 3
|
||||
:caption: Installation:
|
||||
|
||||
installation
|
||||
@ -39,7 +39,7 @@ Welcome to slsDetectorPackage's documentation!
|
||||
|
||||
.. toctree::
|
||||
:caption: Command line
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
|
||||
commandline
|
||||
quick_start_guide
|
||||
@ -82,6 +82,22 @@ Welcome to slsDetectorPackage's documentation!
|
||||
receivers
|
||||
slsreceiver
|
||||
|
||||
.. toctree::
|
||||
:caption: Receiver Files
|
||||
:maxdepth: 3
|
||||
|
||||
fileformat
|
||||
slsreceiverheaderformat
|
||||
masterfileattributes
|
||||
binaryfileformat
|
||||
hdf5fileformat
|
||||
|
||||
.. toctree::
|
||||
:caption: Receiver ZMQ Stream
|
||||
:maxdepth: 2
|
||||
|
||||
zmqjsonheaderformat
|
||||
|
||||
.. toctree::
|
||||
:caption: Troubleshooting
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||
manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
|
||||
.. _Installation:
|
||||
@ -11,18 +6,32 @@
|
||||
Installation
|
||||
===============
|
||||
|
||||
One can either install pre-built binaries using conda or build from source.
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||
manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
-------------------------------
|
||||
----------------------------------
|
||||
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||
are from the developer branch. Please use released tags for stability.
|
||||
|
||||
We have three different packages available:
|
||||
|
||||
* **slsdetlib** shared libraries and command line utilities
|
||||
* **slsdetgui** GUI
|
||||
* **slsdet** Python bindings
|
||||
We have four different packages available:
|
||||
============== =============================================
|
||||
Package Description
|
||||
============== =============================================
|
||||
slsdetlib shared libraries and command line utilities
|
||||
slsdetgui GUI
|
||||
slsdet Python bindings
|
||||
moenchzmq moench
|
||||
============== =============================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -38,7 +47,7 @@ We have three different packages available:
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
...
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
@ -50,12 +59,14 @@ We have three different packages available:
|
||||
conda search slsdet
|
||||
# gui
|
||||
conda search slsdetgui
|
||||
# moench
|
||||
conda search moenchzmq
|
||||
|
||||
|
||||
|
||||
|
||||
Build from source
|
||||
-------------------
|
||||
----------------------
|
||||
|
||||
1. Download Source Code from github
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -75,8 +86,10 @@ Build from source
|
||||
2. Build from Source
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
One can either build using cmake or use the in-built cmk.sh script.
|
||||
|
||||
Build using CMake
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -103,7 +116,7 @@ Instead of the cmake command, one can use ccmake to get a list of options to con
|
||||
ccmake ..
|
||||
|
||||
# choose the options
|
||||
# first press [c] - configure (maybe multiple times till you see [g])
|
||||
# first press [c] - configure (until you see [g])
|
||||
# then press [g] - generate
|
||||
|
||||
|
||||
@ -123,7 +136,7 @@ Example cmake options Comment
|
||||
|
||||
|
||||
Build using in-built cmk.sh script
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
@ -173,7 +186,7 @@ Build using in-built cmk.sh script
|
||||
|
||||
|
||||
Build on old distributions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
@ -198,9 +211,10 @@ using this compiler
|
||||
|
||||
|
||||
Build slsDetectorGui (Qt5)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda create -n myenv slsdetgui=7.0.0
|
||||
@ -208,13 +222,22 @@ Build slsDetectorGui (Qt5)
|
||||
|
||||
|
||||
2. Using system installation on RHEL7
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
|
||||
3. Using system installation on RHEL8
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
yum install qt5-qtbase-devel.x86_64
|
||||
yum install qt5-qtsvg-devel.x86_64
|
||||
yum install expat-devel.x86_64
|
||||
|
||||
4. Using conda
|
||||
|
||||
3. Using conda
|
||||
.. code-block:: bash
|
||||
|
||||
#Add channels for dependencies and our library
|
||||
@ -249,7 +272,7 @@ Build slsDetectorGui (Qt5)
|
||||
|
||||
|
||||
Build this documentation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
@ -272,16 +295,18 @@ is to use conda
|
||||
|
||||
|
||||
Pybind and Zeromq
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _pybind for different slsDetectorPackage versions:
|
||||
|
||||
|
||||
| **Pybind for Python**
|
||||
| **Pybind11 for Python**
|
||||
| v8.0.0+:
|
||||
| pybind11 (v2.11.0) is built
|
||||
| * by default from tar file in repo (libs/pybind/v2.11.0.tar.gz)
|
||||
| pybind11 is built
|
||||
| * by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz)
|
||||
| * or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [`link <https://github.com/pybind/pybind11>`__].
|
||||
| * v9.0.0+: pybind11 (v2.13.6)
|
||||
| * v8.x.x : pybind11 (v2.11.0)
|
||||
|
|
||||
| v7.x.x:
|
||||
| pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||
@ -312,7 +337,7 @@ Pybind and Zeromq
|
||||
| * or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [`link <https://github.com/zeromq/libzmq.git>`__].
|
||||
|
|
||||
| v7.x.x and older:
|
||||
| zeromq must be installed and one can hint its location using
|
||||
| zeromq-devel must be installed and one can hint its location using
|
||||
| * cmake option:'-DZeroMQ_HINT=/usr/lib64' or
|
||||
| * option '-q' in cmk.sh script: : ./cmk.sh -cbj5 -q /usr/lib64
|
||||
| * 'zeromq' dependency added when installing using conda
|
||||
|
409
docs/src/masterfileattributes.rst
Normal file
409
docs/src/masterfileattributes.rst
Normal file
@ -0,0 +1,409 @@
|
||||
|
||||
.. _master file attributes:
|
||||
|
||||
Master File Attributes
|
||||
=======================
|
||||
|
||||
These attributes are the same in binary and HDF5 file, but vary depending on detector type.
|
||||
|
||||
|
||||
Eiger
|
||||
^^^^^
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dynamic Range | Bits per pixel |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Ten Giga | 10GbE enable for data |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Threshold Energy | Threshold energy |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Sub Exptime | Sub exposure time in 32 bit mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Sub Period | Sub period between frames in 32 bit mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Quad | Quad enable (hardware) |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Number of rows | Number of rows enabled for readout |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Rate Corrections | Rate Corrections |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
|
||||
Jungfrau
|
||||
^^^^^^^^
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Number of UDP | Number of UDP Interfaces enabled per module |
|
||||
| Interfaces | |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Number of rows | Number of rows enabled for readout |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
Gotthard II
|
||||
^^^^^^^^^^^^
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Burst Mode | Burst mode of detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
Mythen3
|
||||
^^^^^^^
|
||||
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dynamic Range | Bits per pixel |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Ten Giga | 10GbE enable for data |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Counter Mask | Mask of counters enabled |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime1 | Exposure time of counter 1 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime2 | Exposure time of counter 2 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime3 | Exposure time of counter 3 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| GateDelay1 | Gate delay of counter 1 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| GateDelay2 | Gate delay of counter 2 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| GateDelay3 | Gate delay of counter 3 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Gates | Number of gates |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Threshold energies | Threshold energy of all 3 counters |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
|
||||
Moench
|
||||
^^^^^^
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Number of UDP | Number of UDP Interfaces enabled per module |
|
||||
| Interfaces | |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Number of rows | Number of rows enabled for readout |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
Gotthard I
|
||||
^^^^^^^^^^^
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Roi | Roi in detector restricted to an ADC. |
|
||||
| | Includes xmax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Burst Mode | Burst mode of detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
|
||||
Chip Test Board
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| **Key** | **Description** |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Version | Version of the master file |
|
||||
| | Current value:8.0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timestamp | Timestamp of creation of master file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Detector Type | Detector type |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Timing Mode | Timing Mode |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Geometry | Number of UDP ports in x and y dimension for |
|
||||
| | complete detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Image Size in bytes | Image size in bytes per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Pixels | Number of pixels in x and y dimension |
|
||||
| | per UDP port |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Max Frames Per File | Maximum frames per file |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Discard Policy | Receiever Frame discard policy |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Padding | Receiver Frame padding enable |
|
||||
| | for partial frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Scan Parameters | Scanning mode on detector |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Total Frames | Total number of frames and triggers expected |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Receiver Roi | Receiver ROI in file including xmax and ymax |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Exptime | Exposure time |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Period | Period between frames |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Ten Giga | Ten giga enable |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| ADC Mask | Mask of channels enabled in ADC |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Analog Flag | Analog readout enable |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Analog Samples | Number of analog samples |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Digital Flag | Digital readout enable |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Digital Samples | Number of digital samples |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dbit Offset | Digital offset of valid data in bytes |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Dbit Bitset | Digital 64 bit mask of bits enabled in receiver |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Transceiver Mask | Mask of channels enabled in Transceiver |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Transceiver Flag | Transceiver readout enable |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Transceiver Samples | Number of transceiver samples |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frames in File | Number of frames written to file by Receiver 0 |
|
||||
+-----------------------+-------------------------------------------------+
|
||||
| Frame Header Format | Expected frame header format for the data files |
|
||||
+-----------------------+-------------------------------------------------+
|
@ -6,7 +6,7 @@ Getting Started
|
||||
Which Python?
|
||||
--------------------
|
||||
|
||||
We require at least Python 3.6 and strongly recommended that you don't use the system
|
||||
We require at least Python 3.8 and strongly recommended that you don't use the system
|
||||
Python installation. The examples in this documentation uses `conda
|
||||
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
||||
also for non Python packages but there are also other alternatives like, pyenv.
|
||||
|
@ -128,6 +128,10 @@ For Multiple Modules
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
.. note ::
|
||||
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
|
||||
Gui
|
||||
----
|
||||
|
||||
|
@ -39,13 +39,13 @@ Arguments
|
||||
|
||||
|
||||
.. _Automatic start servers:
|
||||
|
||||
Automatic start
|
||||
------------------
|
||||
|
||||
One can start the on-board detector server automatically upon powering on the board.
|
||||
|
||||
#. Create a soft link to the binary on board
|
||||
:
|
||||
#. Create a soft link to the binary on board:
|
||||
.. code-block:: bash
|
||||
|
||||
ln -sf someDetectorServervx.x.x someDetectorServer
|
||||
@ -87,8 +87,7 @@ One can start the on-board detector server automatically upon powering on the bo
|
||||
/root/xxxDetectorServer >> /dev/null &
|
||||
|
||||
|
||||
#. Sync, reboot and verify
|
||||
:
|
||||
#. Sync, reboot and verify:
|
||||
.. code-block:: bash
|
||||
|
||||
sync
|
||||
|
@ -91,245 +91,6 @@ Client Commands
|
||||
sls_detector_get -h rx_framescaught
|
||||
|
||||
|
||||
ZMQ: Json Header Format
|
||||
------------------------
|
||||
|
||||
|
||||
**Change in field names from slsDetectorPackage v6.x.x to v7.0.0**
|
||||
|
||||
* detSpec1 <- bunchId
|
||||
* detSpec2 <- reserved
|
||||
* detSpec3 <- debug
|
||||
* detSpec4 <- roundRNumber
|
||||
|
||||
|
||||
**Format**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
"jsonversion": unsigned int,
|
||||
"bitmode": unsigned int,
|
||||
"fileIndex": unsigned long int,
|
||||
"detshape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"shape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"size": unsigned int,
|
||||
"acqIndex": unsigned long int,
|
||||
"frameIndex": unsigned long int,
|
||||
"progress": double,
|
||||
"fname": string,
|
||||
"data": unsigned int,
|
||||
"completeImage": unsigned int,
|
||||
|
||||
"frameNumber": unsigned long long int,
|
||||
"expLength": unsigned int,
|
||||
"packetNumber": unsigned int,
|
||||
"detSpec1": unsigned long int,
|
||||
"timestamp": unsigned long int,
|
||||
"modId": unsigned int,
|
||||
"row": unsigned int,
|
||||
"column": unsigned int,
|
||||
"detSpec2": unsigned int,
|
||||
"detSpec3": unsigned int,
|
||||
"detSpec4": unsigned int,
|
||||
"detType": unsigned int,
|
||||
"version": unsigned int,
|
||||
|
||||
"flipRows": unsigned int,
|
||||
"quad": unsigned int,
|
||||
"addJsonHeader": {
|
||||
string : string
|
||||
}
|
||||
}
|
||||
|
||||
+--------------+----------------------------------------------+
|
||||
| Field | Description |
|
||||
+--------------+----------------------------------------------+
|
||||
| jsonversion | Version of the json header. |
|
||||
| | Value at 4 for v6.x.x and v7.x.x |
|
||||
+--------------+----------------------------------------------+
|
||||
| bitmode | Bits per pixel [4|8|16|32] |
|
||||
+--------------+----------------------------------------------+
|
||||
| fileIndex | Current file acquisition index |
|
||||
+--------------+----------------------------------------------+
|
||||
| detshape | Geometry of the entire detector |
|
||||
+--------------+----------------------------------------------+
|
||||
| shape | Geometry of the current port streamed out |
|
||||
+--------------+----------------------------------------------+
|
||||
| size | Size of image of current port in bytesout |
|
||||
+--------------+----------------------------------------------+
|
||||
| acqIndex | Frame number from the detector (redundant) |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameIndex | Frame number of current acquisition |
|
||||
| | (Starting at 0) |
|
||||
+--------------+----------------------------------------------+
|
||||
| progress | Progress of current acquisition in % |
|
||||
+--------------+----------------------------------------------+
|
||||
| fname | Current file name |
|
||||
+--------------+----------------------------------------------+
|
||||
| data | 1 if there is data following |
|
||||
| | 0 if dummy header |
|
||||
+--------------+----------------------------------------------+
|
||||
| completeImage| 1 if no missing packets for this frame |
|
||||
| | in this port, else 0 |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameNumber | Frame number |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| expLength | subframe number (32 bit eiger) |
|
||||
| | or real time exposure time in 100ns (others) |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| packetNumber | Number of packets caught for that frame |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec1 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| timestamp | Timestamp with 10 MHz clock |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| modId | Module Id |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| row | Row number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| column | Column number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec2 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec3 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec4 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detType | Detector type enum |
|
||||
| detSpec3 | See :ref:`Detector enum<Detector Enum>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| version | Detector header version. At 2 |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| flipRows | 1 if rows should be flipped. |
|
||||
| | Usually for Eiger bottom. |
|
||||
+--------------+----------------------------------------------+
|
||||
| quad | 1 if its an Eiger quad. |
|
||||
+--------------+----------------------------------------------+
|
||||
| addJsonHeader| Optional custom parameters that is required |
|
||||
| | for processing code. |
|
||||
+--------------+----------------------------------------------+
|
||||
|
||||
|
||||
SLS Receiver Header Format
|
||||
--------------------------
|
||||
|
||||
It is 112 bytes and consists of:
|
||||
* 48 bytes of the SLS Detector Header (described in :ref:`the current detector header <detector udp header>`)
|
||||
* 64 bytes of packet mask
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
typedef struct {
|
||||
uint64_t frameNumber;
|
||||
uint32_t expLength;
|
||||
uint32_t packetNumber;
|
||||
uint64_t detSpec1;
|
||||
uint64_t timestamp;
|
||||
uint16_t modId;
|
||||
uint16_t row;
|
||||
uint16_t column;
|
||||
uint16_t detSpec2;
|
||||
uint32_t detSpec3;
|
||||
uint16_t detSpec4;
|
||||
uint8_t detType;
|
||||
uint8_t version;
|
||||
} sls_detector_header;
|
||||
|
||||
struct sls_receiver_header {
|
||||
sls_detector_header detHeader; /**< is the detector header */
|
||||
sls_bitset packetsMask; /**< is the packets caught bit mask */
|
||||
};
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
| The packetNumber in the SLS Receiver Header will be modified to number of packets caught by receiver for that frame. For eg. Jungfrau will have 128 packets per frame. If it is less, then this is a partial frame due to missing packets.
|
||||
|
||||
| Furthermore, the bit mask will specify which packets have been received.
|
||||
|
||||
|
||||
|
||||
|
||||
File format
|
||||
--------------
|
||||
|
||||
Master file is in json format.
|
||||
|
||||
The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
||||
|
||||
|
||||
Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
||||
|
||||
|
||||
Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
||||
|
||||
|
||||
Some file name examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# first file
|
||||
path-to-file/run_d0_f0_0.raw
|
||||
|
||||
# second file after reaching max frames in first file
|
||||
path-to-file/run_d0_f1_0.raw
|
||||
|
||||
# second acquisition, first file
|
||||
path-to-file/run_d0_f0_1.raw
|
||||
|
||||
|
||||
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||
|
||||
|
||||
**Binary file format**
|
||||
|
||||
This is the default file format.
|
||||
|
||||
|
||||
Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
||||
|
||||
|
||||
Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
||||
|
||||
|
||||
**HDF5 file formats**
|
||||
|
||||
#. Compile the package with HDF5 option enabled
|
||||
|
||||
#. Using cmk script: ./cmk.sh -hj9 -d [path of hdf5 dir]
|
||||
|
||||
#. Enable using cmake **-DCMAKE_INSTALL_PREFIX=/path/to/hdf/installation** and **-DSLS_USE_HDF5=ON**
|
||||
|
||||
#. Start Receiver process
|
||||
|
||||
#. Load config file
|
||||
|
||||
#. Set file format from client or in config file
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put fformat hdf5
|
||||
|
||||
|
||||
| For multiple, modules, a virtual file linking all the modules is created. Both the data files and virtual files are linked in the master file.
|
||||
|
||||
|
||||
Performance
|
||||
|
40
docs/src/slsreceiverheaderformat.rst
Normal file
40
docs/src/slsreceiverheaderformat.rst
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
.. _sls receiver header format:
|
||||
|
||||
SLS Receiver Header Format
|
||||
====================================================
|
||||
|
||||
It is 112 bytes and consists of:
|
||||
* 48 bytes of the SLS Detector Header
|
||||
* 64 bytes of packet mask
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
typedef struct {
|
||||
uint64_t frameNumber;
|
||||
uint32_t expLength;
|
||||
uint32_t packetNumber;
|
||||
uint64_t detSpec1;
|
||||
uint64_t timestamp;
|
||||
uint16_t modId;
|
||||
uint16_t row;
|
||||
uint16_t column;
|
||||
uint16_t detSpec2;
|
||||
uint32_t detSpec3;
|
||||
uint16_t detSpec4;
|
||||
uint8_t detType;
|
||||
uint8_t version;
|
||||
} sls_detector_header;
|
||||
|
||||
struct sls_receiver_header {
|
||||
sls_detector_header detHeader; /**< is the detector header */
|
||||
sls_bitset packetsMask; /**< is the packets caught bit mask */
|
||||
};
|
||||
|
||||
|
||||
|
||||
| **sls_detector_header** (described in :ref:`the current detector header <detector udp header>`)
|
||||
|
||||
| The **packetNumber** from detector UDP header is modified in **sls_receiver_header** to number of packets caught by receiver for that frame and the bit mask for each packet caught is the **packetsMask**. The packetsMask is a total of 512 bits due to the largest number of packets per frame among our detectors.
|
||||
|
||||
| For eg. Jungfrau has 128 packets per frame. If **packetNumeber** is 128, then this frame is complete. If it is 127 or less, it is a partial frame due to missing packets. If one would still like to use it, the **packetsMask** will specify which packet has been received or is missing.
|
@ -394,6 +394,14 @@ Missing first frame or next frame after a delay
|
||||
Connect the data link from the Module directly to receiver pc or to a private network.
|
||||
|
||||
|
||||
Mythen3
|
||||
--------
|
||||
|
||||
Detector status is waiting even in auto timing mode
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Check if the control board or the flat band cable is connected properly. If not, connect them properly and try again.
|
||||
|
||||
|
||||
Jungfrau
|
||||
---------
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
Format
|
||||
=======
|
||||
|
||||
The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
||||
The UDP data format for the packets consist of a common header of 48 bytes for all detectors, followed by the data for that one packet.
|
||||
|
||||
|
||||
Current Version
|
||||
@ -11,6 +11,25 @@ Current Version
|
||||
|
||||
**v2.0 (slsDetectorPackage v7.0.0+)**
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
typedef struct {
|
||||
uint64_t frameNumber;
|
||||
uint32_t expLength;
|
||||
uint32_t packetNumber;
|
||||
uint64_t detSpec1;
|
||||
uint64_t timestamp;
|
||||
uint16_t modId;
|
||||
uint16_t row;
|
||||
uint16_t column;
|
||||
uint16_t detSpec2;
|
||||
uint32_t detSpec3;
|
||||
uint16_t detSpec4;
|
||||
uint8_t detType;
|
||||
uint8_t version;
|
||||
} sls_detector_header;
|
||||
|
||||
|
||||
.. table:: <---------------------------------------------------- 8 bytes per row --------------------------------------------->
|
||||
:align: center
|
||||
:widths: 30,30,30,15,15
|
||||
@ -54,15 +73,17 @@ Description
|
||||
|
||||
* **modId**: module ID picked up from det_id_[detector type].txt on the detector cpu.
|
||||
|
||||
* **row**: row position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||
* **row**: row position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
* **column**: column position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||
* **column**: column position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
* **detType**: detector type from enum of detectorType in the package.
|
||||
|
||||
* **version**: current version of the detector header (0x2).
|
||||
|
||||
|
||||
.. _detector enum:
|
||||
|
||||
Detector Enum
|
||||
--------------
|
||||
|
||||
|
137
docs/src/zmqjsonheaderformat.rst
Normal file
137
docs/src/zmqjsonheaderformat.rst
Normal file
@ -0,0 +1,137 @@
|
||||
ZMQ: Json Header Format
|
||||
========================
|
||||
|
||||
|
||||
**Change in field names from slsDetectorPackage v6.x.x to v7.0.0**
|
||||
|
||||
* detSpec1 <- bunchId
|
||||
* detSpec2 <- reserved
|
||||
* detSpec3 <- debug
|
||||
* detSpec4 <- roundRNumber
|
||||
|
||||
|
||||
**Format**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
"jsonversion": unsigned int,
|
||||
"bitmode": unsigned int,
|
||||
"fileIndex": unsigned long int,
|
||||
"detshape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"shape": [
|
||||
unsigned int,
|
||||
unsigned int
|
||||
],
|
||||
"size": unsigned int,
|
||||
"acqIndex": unsigned long int,
|
||||
"frameIndex": unsigned long int,
|
||||
"progress": double,
|
||||
"fname": string,
|
||||
"data": unsigned int,
|
||||
"completeImage": unsigned int,
|
||||
|
||||
"frameNumber": unsigned long long int,
|
||||
"expLength": unsigned int,
|
||||
"packetNumber": unsigned int,
|
||||
"detSpec1": unsigned long int,
|
||||
"timestamp": unsigned long int,
|
||||
"modId": unsigned int,
|
||||
"row": unsigned int,
|
||||
"column": unsigned int,
|
||||
"detSpec2": unsigned int,
|
||||
"detSpec3": unsigned int,
|
||||
"detSpec4": unsigned int,
|
||||
"detType": unsigned int,
|
||||
"version": unsigned int,
|
||||
|
||||
"flipRows": unsigned int,
|
||||
"quad": unsigned int,
|
||||
"addJsonHeader": {
|
||||
string : string
|
||||
}
|
||||
}
|
||||
|
||||
+--------------+----------------------------------------------+
|
||||
| Field | Description |
|
||||
+--------------+----------------------------------------------+
|
||||
| jsonversion | Version of the json header. |
|
||||
| | Value at 4 for v6.x.x and v7.x.x |
|
||||
+--------------+----------------------------------------------+
|
||||
| bitmode | Bits per pixel [4|8|16|32] |
|
||||
+--------------+----------------------------------------------+
|
||||
| fileIndex | Current file acquisition index |
|
||||
+--------------+----------------------------------------------+
|
||||
| detshape | Geometry of the entire detector |
|
||||
+--------------+----------------------------------------------+
|
||||
| shape | Geometry of the current port streamed out |
|
||||
+--------------+----------------------------------------------+
|
||||
| size | Size of image of current port in bytesout |
|
||||
+--------------+----------------------------------------------+
|
||||
| acqIndex | Frame number from the detector (redundant) |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameIndex | Frame number of current acquisition |
|
||||
| | (Starting at 0) |
|
||||
+--------------+----------------------------------------------+
|
||||
| progress | Progress of current acquisition in % |
|
||||
+--------------+----------------------------------------------+
|
||||
| fname | Current file name |
|
||||
+--------------+----------------------------------------------+
|
||||
| data | 1 if there is data following |
|
||||
| | 0 if dummy header |
|
||||
+--------------+----------------------------------------------+
|
||||
| completeImage| 1 if no missing packets for this frame |
|
||||
| | in this port, else 0 |
|
||||
+--------------+----------------------------------------------+
|
||||
| frameNumber | Frame number |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| expLength | subframe number (32 bit eiger) |
|
||||
| | or real time exposure time in 100ns (others) |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| packetNumber | Number of packets caught for that frame |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec1 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| timestamp | Timestamp with 10 MHz clock |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| modId | Module Id |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| row | Row number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| column | Column number in detector |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec2 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec3 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detSpec4 | See :ref:`here<Detector Specific Fields>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| detType | Detector type enum |
|
||||
| detSpec3 | See :ref:`Detector enum<detector enum>` |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| version | Detector header version. At 2 |
|
||||
| | [From detector udp header] |
|
||||
+--------------+----------------------------------------------+
|
||||
| flipRows | 1 if rows should be flipped. |
|
||||
| | Usually for Eiger bottom. |
|
||||
+--------------+----------------------------------------------+
|
||||
| quad | 1 if its an Eiger quad. |
|
||||
+--------------+----------------------------------------------+
|
||||
| addJsonHeader| Optional custom parameters that is required |
|
||||
| | for processing code. |
|
||||
+--------------+----------------------------------------------+
|
||||
|
Binary file not shown.
BIN
libs/pybind11/v2.13.6.tar.gz
Normal file
BIN
libs/pybind11/v2.13.6.tar.gz
Normal file
Binary file not shown.
@ -11,4 +11,6 @@ slsDetectorPackage/8.0.1_rh7 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.1_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.2_rh7 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
|
||||
|
||||
|
@ -14,6 +14,8 @@ from pyctbgui.utils.defines import Defines
|
||||
import pyctbgui.utils.pixelmap as pm
|
||||
from pyctbgui.utils.recordOrApplyPedestal import recordOrApplyPedestal
|
||||
|
||||
from slsdet import detectorType
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from pyctbgui.services import AcquisitionTab, PlotTab
|
||||
|
||||
@ -30,6 +32,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.acquisitionTab: AcquisitionTab | None = None
|
||||
self.legend: LegendItem | None = None
|
||||
self.logger = logging.getLogger('AdcTab')
|
||||
self.tengiga = True
|
||||
|
||||
def setup_ui(self):
|
||||
self.plotTab = self.mainWindow.plotTab
|
||||
@ -43,6 +46,12 @@ class AdcTab(QtWidgets.QWidget):
|
||||
# subscribe to toggle legend
|
||||
self.plotTab.subscribeToggleLegend(self.updateLegend)
|
||||
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.checkBoxADC0_15Inv.setDisabled(True)
|
||||
self.view.checkBoxADC16_31Inv.setDisabled(True)
|
||||
self.view.lineEditADCInversion.setDisabled(True)
|
||||
self.view.labelADCInversion.setDisabled(True)
|
||||
|
||||
def initializeAllAnalogPlots(self):
|
||||
self.mainWindow.plotAnalogWaveform = pg.plot()
|
||||
self.mainWindow.plotAnalogWaveform.addLegend(colCount=Defines.colCount)
|
||||
@ -67,6 +76,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
|
||||
def connect_ui(self):
|
||||
for i in range(Defines.adc.count):
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
getattr(self.view, f"checkBoxADC{i}Inv").stateChanged.connect(partial(self.setADCInv, i))
|
||||
getattr(self.view, f"checkBoxADC{i}En").stateChanged.connect(partial(self.setADCEnable, i))
|
||||
getattr(self.view, f"checkBoxADC{i}Plot").stateChanged.connect(partial(self.setADCEnablePlot, i))
|
||||
@ -77,14 +87,16 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.view.checkBoxADC0_15Plot.stateChanged.connect(partial(self.setADCEnablePlotRange, 0, Defines.adc.half))
|
||||
self.view.checkBoxADC16_31Plot.stateChanged.connect(
|
||||
partial(self.setADCEnablePlotRange, Defines.adc.half, Defines.adc.count))
|
||||
self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.view.checkBoxADC0_15Inv.stateChanged.connect(partial(self.setADCInvRange, 0, Defines.adc.half))
|
||||
self.view.checkBoxADC16_31Inv.stateChanged.connect(
|
||||
partial(self.setADCInvRange, Defines.adc.half, Defines.adc.count))
|
||||
self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg)
|
||||
self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg)
|
||||
|
||||
def refresh(self):
|
||||
self.updateADCNames()
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.updateADCInv()
|
||||
self.updateADCEnable()
|
||||
|
||||
@ -196,9 +208,11 @@ class AdcTab(QtWidgets.QWidget):
|
||||
return decoder.decode(analog_array, pm.moench04_analog())
|
||||
|
||||
def getADCEnableReg(self):
|
||||
retval = self.det.adcenable
|
||||
if self.det.tengiga:
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.tengiga = self.det.tengiga
|
||||
retval = self.det.adcenable10g
|
||||
if not self.tengiga:
|
||||
retval = self.det.adcenable
|
||||
self.view.lineEditADCEnable.editingFinished.disconnect()
|
||||
self.view.lineEditADCEnable.setText("0x{:08x}".format(retval))
|
||||
self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg)
|
||||
@ -207,8 +221,8 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCEnableReg(self):
|
||||
self.view.lineEditADCEnable.editingFinished.disconnect()
|
||||
try:
|
||||
mask = int(self.mainWindow.lineEditADCEnable.text(), 16)
|
||||
if self.det.tengiga:
|
||||
mask = int(self.view.lineEditADCEnable.text(), 16)
|
||||
if self.tengiga:
|
||||
self.det.adcenable10g = mask
|
||||
else:
|
||||
self.det.adcenable = mask
|
||||
@ -239,7 +253,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCEnable(self, i):
|
||||
checkBox = getattr(self.view, f"checkBoxADC{i}En")
|
||||
try:
|
||||
if self.det.tengiga:
|
||||
if self.tengiga:
|
||||
enableMask = manipulate_bit(checkBox.isChecked(), self.det.adcenable10g, i)
|
||||
self.det.adcenable10g = enableMask
|
||||
else:
|
||||
@ -265,7 +279,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
for i in range(start_nr, end_nr):
|
||||
mask = manipulate_bit(checkBox.isChecked(), mask, i)
|
||||
try:
|
||||
if self.det.tengiga:
|
||||
if self.tengiga:
|
||||
self.det.adcenable10g = mask
|
||||
else:
|
||||
self.det.adcenable = mask
|
||||
@ -344,7 +358,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCInvReg(self):
|
||||
self.view.lineEditADCInversion.editingFinished.disconnect()
|
||||
try:
|
||||
self.det.adcinvert = int(self.mainWindow.lineEditADCInversion.text(), 16)
|
||||
self.det.adcinvert = int(self.view.lineEditADCInversion.text(), 16)
|
||||
except Exception as e:
|
||||
QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Inversion Fail", str(e), QtWidgets.QMessageBox.Ok)
|
||||
pass
|
||||
@ -395,7 +409,12 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.updateADCInv()
|
||||
|
||||
def saveParameters(self) -> list[str]:
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
return [
|
||||
f"adcenable {self.view.lineEditADCEnable.text()}",
|
||||
f"adcinvert {self.view.lineEditADCInversion.text()}",
|
||||
]
|
||||
else:
|
||||
return [
|
||||
f"adcenable {self.view.lineEditADCEnable.text()}"
|
||||
]
|
||||
|
@ -7,7 +7,7 @@ import zmq
|
||||
from PyQt5 import QtWidgets, uic
|
||||
import logging
|
||||
|
||||
from slsdet import readoutMode, runStatus
|
||||
from slsdet import readoutMode, runStatus, detectorType
|
||||
from pyctbgui.utils.defines import Defines
|
||||
from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager
|
||||
from pyctbgui.utils.numpyWriter.npz_writer import NpzFileWriter
|
||||
@ -49,14 +49,31 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
self.adcTab = self.mainWindow.adcTab
|
||||
self.plotTab = self.mainWindow.plotTab
|
||||
self.toggleStartButton(False)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.labelRunF.setDisabled(True)
|
||||
self.view.labelADCF.setDisabled(True)
|
||||
self.view.labelADCPhase.setDisabled(True)
|
||||
self.view.labelADCPipeline.setDisabled(True)
|
||||
self.view.labelDBITF.setDisabled(True)
|
||||
self.view.labelDBITPhase.setDisabled(True)
|
||||
self.view.labelDBITPipeline.setDisabled(True)
|
||||
self.view.spinBoxRunF.setDisabled(True)
|
||||
self.view.spinBoxADCF.setDisabled(True)
|
||||
self.view.spinBoxADCPhase.setDisabled(True)
|
||||
self.view.spinBoxADCPipeline.setDisabled(True)
|
||||
self.view.spinBoxDBITF.setDisabled(True)
|
||||
self.view.spinBoxDBITPhase.setDisabled(True)
|
||||
self.view.spinBoxDBITPipeline.setDisabled(True)
|
||||
|
||||
def connect_ui(self):
|
||||
# For Acquistions Tab
|
||||
self.view.comboBoxROMode.currentIndexChanged.connect(self.setReadOut)
|
||||
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
||||
self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver)
|
||||
self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog)
|
||||
self.view.spinBoxDigital.editingFinished.connect(self.setDigital)
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
||||
self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency)
|
||||
self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase)
|
||||
self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline)
|
||||
@ -77,16 +94,19 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
|
||||
def refresh(self):
|
||||
self.getReadout()
|
||||
self.getRunFrequency()
|
||||
self.getTransceiver()
|
||||
self.getAnalog()
|
||||
self.getDigital()
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getRunFrequency()
|
||||
self.getADCFrequency()
|
||||
self.getADCPhase()
|
||||
self.getADCPipeline()
|
||||
self.getDBITFrequency()
|
||||
self.getDBITPhase()
|
||||
self.getDBITPipeline()
|
||||
|
||||
self.getFileWrite()
|
||||
self.getFileName()
|
||||
self.getFilePath()
|
||||
@ -697,6 +717,7 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
self.socket.subscribe("")
|
||||
|
||||
def saveParameters(self) -> list[str]:
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
return [
|
||||
f'romode {self.view.comboBoxROMode.currentText().lower()}',
|
||||
f'runclk {self.view.spinBoxRunF.value()}',
|
||||
@ -717,3 +738,18 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
f'dsamples {self.view.spinBoxDigital.value()}',
|
||||
f'tsamples {self.view.spinBoxTransceiver.value()}',
|
||||
]
|
||||
else:
|
||||
return [
|
||||
f'romode {self.view.comboBoxROMode.currentText().lower()}',
|
||||
f'fwrite {int(self.view.checkBoxFileWriteRaw.isChecked())}',
|
||||
f'fname {self.view.lineEditFileName.text()}',
|
||||
f'fpath {self.view.lineEditFilePath.text()}',
|
||||
f'findex {self.view.spinBoxAcquisitionIndex.value()}',
|
||||
f'frames {self.view.spinBoxFrames.value()}',
|
||||
f'triggers {self.view.spinBoxTriggers.value()}',
|
||||
f'period {self.view.spinBoxPeriod.value()} {self.view.comboBoxPeriod.currentText().lower()}',
|
||||
f'asamples {self.view.spinBoxAnalog.value()}',
|
||||
f'dsamples {self.view.spinBoxDigital.value()}',
|
||||
f'tsamples {self.view.spinBoxTransceiver.value()}',
|
||||
]
|
||||
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import QtWidgets, uic
|
||||
from pyctbgui.utils.defines import Defines
|
||||
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class DacTab(QtWidgets.QWidget):
|
||||
@ -19,7 +19,14 @@ class DacTab(QtWidgets.QWidget):
|
||||
dac = getattr(dacIndex, f"DAC_{i}")
|
||||
getattr(self.view, f"spinBoxDAC{i}").setValue(self.det.getDAC(dac)[0])
|
||||
|
||||
if self.det.highvoltage == 0:
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.checkBoxHighVoltage.setDisabled(True)
|
||||
self.view.spinBoxHighVoltage.setDisabled(True)
|
||||
self.view.labelHighVoltage.setDisabled(True)
|
||||
self.view.labelADCVppDacName.setDisabled(True)
|
||||
self.view.labelADCVpp.setDisabled(True)
|
||||
self.view.comboBoxADCVpp.setDisabled(True)
|
||||
elif self.det.highvoltage == 0:
|
||||
self.view.spinBoxHighVoltage.setDisabled(True)
|
||||
self.view.checkBoxHighVoltage.setChecked(False)
|
||||
|
||||
@ -30,7 +37,9 @@ class DacTab(QtWidgets.QWidget):
|
||||
getattr(self.view, f"checkBoxDAC{i}").stateChanged.connect(partial(self.setDACTristate, i))
|
||||
getattr(self.view, f"checkBoxDAC{i}mV").stateChanged.connect(partial(self.getDAC, i))
|
||||
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
self.view.comboBoxADCVpp.currentIndexChanged.connect(self.setADCVpp)
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
self.view.spinBoxHighVoltage.editingFinished.connect(self.setHighVoltage)
|
||||
self.view.checkBoxHighVoltage.stateChanged.connect(self.setHighVoltage)
|
||||
|
||||
@ -40,7 +49,9 @@ class DacTab(QtWidgets.QWidget):
|
||||
self.getDACTristate(i)
|
||||
self.getDAC(i)
|
||||
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
self.getADCVpp()
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
self.getHighVoltage()
|
||||
|
||||
def updateDACNames(self):
|
||||
@ -165,6 +176,8 @@ class DacTab(QtWidgets.QWidget):
|
||||
unit = " mV" if inMV else ""
|
||||
commands.append(f"dac {i} {value}{unit}")
|
||||
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
commands.append(f"adcvpp {self.view.comboBoxADCVpp.currentText()} mV")
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
commands.append(f"highvoltage {self.view.spinBoxHighVoltage.value()}")
|
||||
return commands
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import QtWidgets, uic
|
||||
from pyctbgui.utils.defines import Defines
|
||||
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
@ -18,6 +18,7 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
self.updateVoltageNames()
|
||||
for i in Defines.powerSupplies:
|
||||
self.getVoltage(i)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getCurrent(i)
|
||||
|
||||
def connect_ui(self):
|
||||
@ -38,6 +39,12 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
if retval == 0:
|
||||
checkBox.setChecked(False)
|
||||
spinBox.setDisabled(True)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
label = getattr(self.view, f"labelI{i}")
|
||||
label.setDisabled(True)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.spinBoxVChip.setDisabled(True)
|
||||
|
||||
|
||||
def updateVoltageNames(self):
|
||||
retval = self.det.getPowerNames()
|
||||
@ -56,6 +63,9 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
spinBox.editingFinished.disconnect()
|
||||
checkBox.stateChanged.disconnect()
|
||||
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
retval = self.det.getPower(voltageIndex)[0]
|
||||
else:
|
||||
retval = self.det.getMeasuredPower(voltageIndex)[0]
|
||||
# spinBox.setValue(retval)
|
||||
if retval > 1:
|
||||
@ -69,6 +79,7 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
spinBox.editingFinished.connect(partial(self.setVoltage, i))
|
||||
checkBox.stateChanged.connect(partial(self.setVoltage, i))
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getVChip()
|
||||
|
||||
# TODO: handle multiple events when pressing enter (twice)
|
||||
@ -91,6 +102,7 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
# TODO: (properly) disconnecting and connecting to handle multiple events (out of focus and pressing enter).
|
||||
spinBox.editingFinished.connect(partial(self.setVoltage, i))
|
||||
self.getVoltage(i)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getCurrent(i)
|
||||
|
||||
def getCurrent(self, i):
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import uic, QtWidgets
|
||||
|
||||
from pyctbgui.utils.defines import Defines
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class SlowAdcTab(QtWidgets.QWidget):
|
||||
@ -17,7 +17,8 @@ class SlowAdcTab(QtWidgets.QWidget):
|
||||
self.det = None
|
||||
|
||||
def setup_ui(self):
|
||||
pass
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.pushButtonTemp.setDisabled(True)
|
||||
|
||||
def connect_ui(self):
|
||||
for i in range(Defines.slowAdc.count):
|
||||
@ -28,6 +29,7 @@ class SlowAdcTab(QtWidgets.QWidget):
|
||||
self.updateSlowAdcNames()
|
||||
for i in range(Defines.slowAdc.count):
|
||||
self.updateSlowAdc(i)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.updateTemperature()
|
||||
|
||||
def updateSlowAdcNames(self):
|
||||
|
@ -817,7 +817,7 @@ Only pressing enter on spinbox will set DAC (with this condition).</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<widget class="QLabel" name="label_125">
|
||||
<widget class="QLabel" name="labelADCVppDacName">
|
||||
<property name="text">
|
||||
<string>ADC_VPP</string>
|
||||
</property>
|
||||
|
@ -118,7 +118,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_70">
|
||||
<widget class="QLabel" name="labelRunF">
|
||||
<property name="text">
|
||||
<string>Run Clock Frequency (MHz):</string>
|
||||
</property>
|
||||
@ -218,7 +218,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_74">
|
||||
<widget class="QLabel" name="labelDBITF">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
@ -231,7 +231,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_71">
|
||||
<widget class="QLabel" name="labelADCF">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -278,7 +278,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="label_76">
|
||||
<widget class="QLabel" name="labelDBITPipeline">
|
||||
<property name="text">
|
||||
<string>DBIT Pipeline:</string>
|
||||
</property>
|
||||
@ -338,21 +338,21 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_73">
|
||||
<widget class="QLabel" name="labelADCPipeline">
|
||||
<property name="text">
|
||||
<string>ADC Pipeline:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_72">
|
||||
<widget class="QLabel" name="labelADCPhase">
|
||||
<property name="text">
|
||||
<string>ADC Clock Phase (a.u.):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="label_75">
|
||||
<widget class="QLabel" name="labelDBITPhase">
|
||||
<property name="text">
|
||||
<string>DBIT Clock Phase (a.u.):</string>
|
||||
</property>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_7">
|
||||
<widget class="QFrame" name="frame_ADC">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -3142,7 +3142,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_20">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_67">
|
||||
<widget class="QLabel" name="labelADCInversion">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
@ -3188,7 +3188,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_68">
|
||||
<widget class="QLabel" name="labelADCEnable">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<widget class="QFrame" name="frame_slowadcs">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -49,7 +49,6 @@ set( PYTHON_FILES
|
||||
slsdet/temperature.py
|
||||
slsdet/lookup.py
|
||||
slsdet/utils.py
|
||||
|
||||
)
|
||||
|
||||
foreach(FILE ${PYTHON_FILES})
|
||||
@ -58,7 +57,6 @@ foreach(FILE ${PYTHON_FILES})
|
||||
|
||||
endforeach(FILE ${PYTHON_FILES})
|
||||
|
||||
|
||||
configure_file( scripts/basic.py
|
||||
${CMAKE_BINARY_DIR}/basic.py
|
||||
)
|
||||
@ -66,6 +64,9 @@ configure_file( scripts/test_virtual.py
|
||||
${CMAKE_BINARY_DIR}/test_virtual.py
|
||||
)
|
||||
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
||||
${CMAKE_BINARY_DIR}/bin/slsdet/VERSION
|
||||
)
|
||||
|
||||
if(SLS_INSTALL_PYTHONEXT)
|
||||
install(TARGETS _slsdet
|
||||
@ -74,4 +75,5 @@ if(SLS_INSTALL_PYTHONEXT)
|
||||
)
|
||||
|
||||
install(FILES ${PYTHON_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
||||
install(FILES ../VERSION DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
||||
endif()
|
19
python/scripts/frameSynchronizerPullSocket.py
Normal file
19
python/scripts/frameSynchronizerPullSocket.py
Normal file
@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
# Script to get combined zmq packets from frame synchronizer using pull zmq sockets
|
||||
import json
|
||||
import zmq
|
||||
|
||||
c = zmq.Context()
|
||||
s = c.socket(zmq.PULL)
|
||||
s.connect("tcp://127.0.0.1:5555")
|
||||
|
||||
while True:
|
||||
m = s.recv_multipart()
|
||||
for p in m:
|
||||
if p.startswith(b"{"):
|
||||
print(p.decode().strip())
|
||||
else:
|
||||
print("binary")
|
||||
print("--------")
|
||||
|
@ -123,6 +123,9 @@ def visit(node):
|
||||
if node.kind == cindex.CursorKind.CLASS_DECL:
|
||||
if node.displayname == "Detector":
|
||||
for child in node.get_children():
|
||||
# Skip assignment operators
|
||||
if child.kind == cindex.CursorKind.CXX_METHOD and child.spelling == "operator=":
|
||||
continue
|
||||
if (
|
||||
child.kind == cindex.CursorKind.CXX_METHOD
|
||||
and child.access_specifier == cindex.AccessSpecifier.PUBLIC
|
||||
|
@ -10,14 +10,15 @@ import sys
|
||||
from setuptools import setup, find_packages
|
||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
||||
|
||||
|
||||
import subprocess
|
||||
def get_git_tag():
|
||||
def read_version():
|
||||
try:
|
||||
return subprocess.check_output(['git', 'describe', '--tags', '--abbrev=0']).strip().decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
return 'developer'
|
||||
__version__ = get_git_tag()
|
||||
version_file = os.path.join(os.path.dirname(__file__), 'slsdet', 'VERSION')
|
||||
with open(version_file, "r") as f:
|
||||
return f.read().strip()
|
||||
except:
|
||||
raise RuntimeError("VERSION file not found in slsdet package from setup.py.")
|
||||
|
||||
__version__ = read_version()
|
||||
|
||||
|
||||
def get_conda_path():
|
||||
@ -67,6 +68,9 @@ setup(
|
||||
description='Detector API for SLS Detector Group detectors',
|
||||
long_description='',
|
||||
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
|
||||
package_data={
|
||||
'slsdet': ['VERSION'],
|
||||
},
|
||||
ext_modules=ext_modules,
|
||||
cmdclass={"build_ext": build_ext},
|
||||
zip_safe=False,
|
||||
|
@ -22,6 +22,7 @@ defs = _slsdet.slsDetectorDefs
|
||||
from .enums import *
|
||||
from .defines import *
|
||||
|
||||
|
||||
IpAddr = _slsdet.IpAddr
|
||||
MacAddr = _slsdet.MacAddr
|
||||
scanParameters = _slsdet.scanParameters
|
||||
@ -29,12 +30,14 @@ currentSrcParameters = _slsdet.currentSrcParameters
|
||||
DurationWrapper = _slsdet.DurationWrapper
|
||||
pedestalParameters = _slsdet.pedestalParameters
|
||||
|
||||
|
||||
import subprocess
|
||||
def get_git_tag():
|
||||
import os
|
||||
def read_version():
|
||||
try:
|
||||
return subprocess.check_output(['git', 'describe', '--tags', '--abbrev=0']).strip().decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
return 'developer'
|
||||
__version__ = get_git_tag()
|
||||
version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
|
||||
with open(version_file, "r") as f:
|
||||
return f.read().strip()
|
||||
except:
|
||||
raise RuntimeError("VERSION file not found in slsdet package from init.py")
|
||||
|
||||
__version__ = read_version()
|
||||
|
||||
|
@ -152,6 +152,10 @@ class Detector(CppDetectorApi):
|
||||
"""Frees shared memory and sets hostname (or IP address) of all modules concatenated by +
|
||||
Virtual servers can already use the port in hostname separated by ':' and ports incremented by 2 to accomodate the stop server as well.
|
||||
|
||||
Note
|
||||
-----
|
||||
The row and column values in the udp/zmq header are affected by the order in this command and the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on. This only affects row and column in udp/zmq header.
|
||||
|
||||
Example
|
||||
-------
|
||||
>>> d.hostname = 'beb031+beb032+'
|
||||
@ -2566,7 +2570,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
By default, the on-chip gain switching is active during the entire exposure. This mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us). The % is only for chipv1.0, the duration can be set for chipv1.1.\n
|
||||
By default, the on-chip gain switching is active during the entire exposure. This mode disables the on-chip gain switching comparator automatically and the duration is set using compdisabletime.\n
|
||||
Default is 0 or this mode disabled (comparator enabled throughout). 1 enables mode. 0 disables mode.
|
||||
"""
|
||||
return self.getAutoComparatorDisable()
|
||||
@ -2580,10 +2584,6 @@ class Detector(CppDetectorApi):
|
||||
def compdisabletime(self):
|
||||
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
||||
|
||||
Note
|
||||
-----
|
||||
It is only possible for chipv1.1.
|
||||
|
||||
:getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime
|
||||
|
||||
Example
|
||||
@ -2913,7 +2913,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def timing_info_decoder(self):
|
||||
"""[Jungfrau] [Jungfrau] Advanced Command and only for SWISSFEL and SHINE. Sets the bunch id or timing info decoder. Default is SWISSFEL.
|
||||
"""[Jungfrau] [Jungfrau] Advanced Command and only for SWISSFEL and SHINE. Sets the bunch id or timing info decoder. Default is SWISSFEL. Only allowed for pcbv2.0.
|
||||
Enum: timingInfoDecoder
|
||||
"""
|
||||
return self.getTimingInfoDecoder()
|
||||
|
@ -24,7 +24,7 @@ class JungfrauDacs(DetectorDacs):
|
||||
('vdd_prot', dacIndex.VDD_PROT, 0, 4000, 3000),
|
||||
('vin_com', dacIndex.VIN_COM, 0, 4000, 1053),
|
||||
('vref_prech', dacIndex.VREF_PRECH, 0, 4000, 1450),
|
||||
('vb_pixbuff', dacIndex.VB_PIXBUF, 0, 4000, 750),
|
||||
('vb_pixbuf', dacIndex.VB_PIXBUF, 0, 4000, 750),
|
||||
('vb_ds', dacIndex.VB_DS, 0, 4000, 1000),
|
||||
('vref_ds', dacIndex.VREF_DS, 0, 4000, 480),
|
||||
('vref_comp', dacIndex.VREF_COMP, 0, 4000, 420),
|
||||
|
@ -21,11 +21,13 @@ void init_det(py::module &m) {
|
||||
using sls::Positions;
|
||||
using sls::Result;
|
||||
|
||||
m.def("freeSharedMemory",
|
||||
(void (*)(const int, const int)) & sls::freeSharedMemory,
|
||||
py::arg() = 0, py::arg() = -1);
|
||||
|
||||
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
||||
CppDetectorApi.def(py::init<int>());
|
||||
|
||||
CppDetectorApi.def("freeSharedMemory",
|
||||
(void (Detector::*)()) & Detector::freeSharedMemory);
|
||||
CppDetectorApi.def("loadConfig",
|
||||
(void (Detector::*)(const std::string &)) &
|
||||
Detector::loadConfig,
|
||||
|
@ -18,6 +18,8 @@ void init_det(py::module &m) {
|
||||
using sls::Positions;
|
||||
using sls::Result;
|
||||
|
||||
m.def("freeSharedMemory", (void (*)(const int, const int)) &sls::freeSharedMemory, py::arg() = 0, py::arg() = -1);
|
||||
|
||||
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
||||
CppDetectorApi.def(py::init<int>());
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
1
serverBin/ctbDetectorServerv9.1.0
Symbolic link
1
serverBin/ctbDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.1.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
1
serverBin/eigerDetectorServerv9.0.0
Symbolic link
1
serverBin/eigerDetectorServerv9.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
1
serverBin/gotthard2DetectorServerv9.0.0
Symbolic link
1
serverBin/gotthard2DetectorServerv9.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
1
serverBin/gotthardDetectorServerv9.0.0
Symbolic link
1
serverBin/gotthardDetectorServerv9.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
1
serverBin/jungfrauDetectorServerv9.1.0
Symbolic link
1
serverBin/jungfrauDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
1
serverBin/moenchDetectorServerv9.0.0
Symbolic link
1
serverBin/moenchDetectorServerv9.0.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
1
serverBin/mythen3DetectorServerv9.1.0
Symbolic link
1
serverBin/mythen3DetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.1.0
|
1
serverBin/xilinx_ctbDetectorServerv9.1.0
Symbolic link
1
serverBin/xilinx_ctbDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.1.0
|
@ -503,6 +503,7 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
}
|
||||
#endif
|
||||
if (ee == PHOTON && val[iy * nx + ix] == max) {
|
||||
good = 1;
|
||||
ee = PHOTON_MAX;
|
||||
// cout << "**" <<id<< " " << iframe << " " << nDark << " "
|
||||
// << ix << " " << iy << " " << rms << " " << max << " " <<
|
||||
@ -536,7 +537,6 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
cout << max << " " << val[iy * nx + ix] << endl;
|
||||
}
|
||||
//else (clusters + nph)->print();
|
||||
good = 1;
|
||||
if (eMin > 0 && tot < eMin)
|
||||
good = 0;
|
||||
if (eMax > 0 && tot > eMax)
|
||||
|
@ -457,7 +457,7 @@
|
||||
<string><html><head/><body><p>If sub images have missing packets</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Complete Image</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@ -523,6 +523,7 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -61,7 +61,9 @@ class qDefs : public QWidget {
|
||||
}
|
||||
}
|
||||
|
||||
template <class CT> struct NonDeduced { using type = CT; };
|
||||
template <class CT> struct NonDeduced {
|
||||
using type = CT;
|
||||
};
|
||||
template <class S, typename RT, typename... CT>
|
||||
static void HandleExceptions(const std::string emsg, const std::string src,
|
||||
S *s, RT (S::*somefunc)(CT...),
|
||||
|
@ -123,7 +123,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
QString zTitle2d{"Intensity"};
|
||||
QString plotTitle{""};
|
||||
QString indexTitle{""};
|
||||
bool completeImage{false};
|
||||
bool completeImage{true};
|
||||
bool xyRangeChanged{false};
|
||||
double xyRange[4]{0, 0, 0, 0};
|
||||
bool isXYRange[4]{false, false, false, false};
|
||||
|
@ -107,7 +107,7 @@ void qDrawPlot::SetupPlots() {
|
||||
LOG(logINFO) << "nPixelsY:" << nPixelsY;
|
||||
|
||||
widgetStatistics->hide();
|
||||
lblCompleteImage->hide();
|
||||
lblCompleteImage->show();
|
||||
lblInCompleteImage->hide();
|
||||
lblRxRoiEnabled->hide();
|
||||
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.1.0
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.1.0
Executable file
Binary file not shown.
@ -51,12 +51,12 @@ int dataBytes = 0;
|
||||
int analogDataBytes = 0;
|
||||
int digitalDataBytes = 0;
|
||||
int transceiverDataBytes = 0;
|
||||
char *analogData = 0;
|
||||
char *digitalData = 0;
|
||||
char *transceiverData = 0;
|
||||
char volatile *analogDataPtr = 0;
|
||||
char volatile *digitalDataPtr = 0;
|
||||
char volatile *transceiverDataPtr = 0;
|
||||
char *analogData = NULL;
|
||||
char *digitalData = NULL;
|
||||
char *transceiverData = NULL;
|
||||
char volatile *analogDataPtr = NULL;
|
||||
char volatile *digitalDataPtr = NULL;
|
||||
char volatile *transceiverDataPtr = NULL;
|
||||
char udpPacketData[UDP_PACKET_DATA_BYTES + sizeof(sls_detector_header)];
|
||||
uint32_t adcEnableMask_1g = BIT32_MSK;
|
||||
// 10g readout
|
||||
@ -475,21 +475,15 @@ void setupDetector() {
|
||||
analogDataBytes = 0;
|
||||
digitalDataBytes = 0;
|
||||
transceiverDataBytes = 0;
|
||||
if (analogData) {
|
||||
free(analogData);
|
||||
analogData = 0;
|
||||
}
|
||||
if (digitalData) {
|
||||
analogData = NULL;
|
||||
free(digitalData);
|
||||
digitalData = 0;
|
||||
}
|
||||
if (transceiverData) {
|
||||
digitalData = NULL;
|
||||
free(transceiverData);
|
||||
transceiverData = 0;
|
||||
}
|
||||
analogDataPtr = 0;
|
||||
digitalDataPtr = 0;
|
||||
transceiverData = 0;
|
||||
transceiverData = NULL;
|
||||
analogDataPtr = NULL;
|
||||
digitalDataPtr = NULL;
|
||||
transceiverData = NULL;
|
||||
{
|
||||
for (int i = 0; i < NUM_CLOCKS; ++i) {
|
||||
clkPhase[i] = 0;
|
||||
@ -640,22 +634,15 @@ int updateDatabytesandAllocateRAM() {
|
||||
return FAIL;
|
||||
}
|
||||
// clear RAM
|
||||
if (analogData) {
|
||||
free(analogData);
|
||||
analogData = 0;
|
||||
}
|
||||
if (digitalData) {
|
||||
analogData = NULL;
|
||||
free(digitalData);
|
||||
digitalData = 0;
|
||||
}
|
||||
if (transceiverData) {
|
||||
digitalData = NULL;
|
||||
free(transceiverData);
|
||||
transceiverData = 0;
|
||||
}
|
||||
transceiverData = NULL;
|
||||
// allocate RAM
|
||||
if (analogDataBytes) {
|
||||
analogData = malloc(analogDataBytes);
|
||||
// cannot malloc
|
||||
if (analogData == NULL) {
|
||||
LOG(logERROR, ("Can not allocate analog data RAM for even 1 frame. "
|
||||
"Probable cause: Memory Leak.\n"));
|
||||
@ -665,7 +652,6 @@ int updateDatabytesandAllocateRAM() {
|
||||
}
|
||||
if (digitalDataBytes) {
|
||||
digitalData = malloc(digitalDataBytes);
|
||||
// cannot malloc
|
||||
if (digitalData == NULL) {
|
||||
LOG(logERROR,
|
||||
("Can not allocate digital data RAM for even 1 frame. "
|
||||
@ -677,7 +663,6 @@ int updateDatabytesandAllocateRAM() {
|
||||
}
|
||||
if (transceiverDataBytes) {
|
||||
transceiverData = malloc(transceiverDataBytes);
|
||||
// cannot malloc
|
||||
if (transceiverData == NULL) {
|
||||
LOG(logERROR,
|
||||
("Can not allocate transceiver data RAM for even 1 frame. "
|
||||
@ -2209,7 +2194,8 @@ int startStateMachine() {
|
||||
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
||||
sharedMemory_setStatus(IDLE);
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
pthread_detach(pthread_virtual_tid);
|
||||
LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
||||
return OK;
|
||||
#endif
|
||||
|
@ -46,17 +46,27 @@ int Beb_deactivated_left_datastream = 1;
|
||||
int Beb_deactivated_right_datastream = 1;
|
||||
int Beb_deactivated_num_destinations = 1;
|
||||
|
||||
void Beb_Beb() {
|
||||
int Beb_Beb() {
|
||||
Beb_send_ndata = 0;
|
||||
Beb_send_buffer_size = 1026;
|
||||
|
||||
Beb_send_data_raw =
|
||||
malloc((Beb_send_buffer_size + 1) * sizeof(unsigned int));
|
||||
if (Beb_send_data_raw == NULL) {
|
||||
LOG(logERROR, ("Could not allocate memory for beb (send_data_raw)\n"));
|
||||
return 0;
|
||||
}
|
||||
Beb_send_data = &Beb_send_data_raw[1];
|
||||
|
||||
Beb_recv_ndata = 0;
|
||||
Beb_recv_buffer_size = 1026;
|
||||
|
||||
Beb_recv_data_raw =
|
||||
malloc((Beb_recv_buffer_size + 1) * sizeof(unsigned int));
|
||||
if (Beb_recv_data_raw == NULL) {
|
||||
LOG(logERROR, ("Could not allocate memory for beb (recv_data_raw)\n"));
|
||||
return 0;
|
||||
}
|
||||
Beb_recv_data = &Beb_recv_data_raw[1];
|
||||
|
||||
udp_header = (struct udp_header_type){
|
||||
@ -83,6 +93,7 @@ void Beb_Beb() {
|
||||
Beb_ClearHeaderData(1);
|
||||
|
||||
Beb_bit_mode = 4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Beb_ClearHeaderData(int ten_gig) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "slsDetectorServer_defs.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void Beb_Beb();
|
||||
int Beb_Beb();
|
||||
void Beb_ClearHeaderData(int ten_gig);
|
||||
int Beb_SetUpUDPHeader(unsigned int header_number, int ten_gig,
|
||||
uint64_t src_mac, uint32_t src_ip, uint16_t src_port,
|
||||
|
@ -57,11 +57,19 @@ int Feb_Control_FebControl(int normal) {
|
||||
Feb_Control_externalEnableMode = 0;
|
||||
Feb_Control_subFrameMode = 0;
|
||||
Feb_Control_trimbit_size = 263680;
|
||||
|
||||
Feb_Control_last_downloaded_trimbits =
|
||||
malloc(Feb_Control_trimbit_size * sizeof(int));
|
||||
if (Feb_Control_last_downloaded_trimbits == NULL) {
|
||||
LOG(logERROR,
|
||||
("Could not allocate memory for last downloaded trimbits\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Feb_Control_normal = normal;
|
||||
Feb_Interface_SetAddress(Feb_Control_rightAddress, Feb_Control_leftAddress);
|
||||
if (!Feb_Interface_SetAddress(Feb_Control_rightAddress,
|
||||
Feb_Control_leftAddress))
|
||||
return 0;
|
||||
if (Feb_Control_activated) {
|
||||
return Feb_Interface_SetByteOrder();
|
||||
}
|
||||
|
@ -22,34 +22,57 @@ unsigned int Feb_Interface_recv_buffer_size;
|
||||
unsigned int *Feb_Interface_recv_data_raw;
|
||||
unsigned int *Feb_Interface_recv_data;
|
||||
|
||||
void Feb_Interface_FebInterface() {
|
||||
int Feb_Interface_FebInterface() {
|
||||
ll = &ll_local;
|
||||
Feb_Interface_nfebs = 0;
|
||||
Feb_Interface_feb_numb = 0;
|
||||
|
||||
Feb_Interface_send_ndata = 0;
|
||||
Feb_Interface_send_buffer_size = 1026;
|
||||
|
||||
Feb_Interface_send_data_raw =
|
||||
malloc((Feb_Interface_send_buffer_size + 1) * sizeof(unsigned int));
|
||||
if (Feb_Interface_send_data_raw == NULL) {
|
||||
LOG(logERROR,
|
||||
("Could not allocate memory for feb interface (send_data_raw)\n"));
|
||||
return 0;
|
||||
}
|
||||
Feb_Interface_send_data = &Feb_Interface_send_data_raw[1];
|
||||
|
||||
Feb_Interface_recv_ndata = 0;
|
||||
Feb_Interface_recv_buffer_size = 1026;
|
||||
|
||||
Feb_Interface_recv_data_raw =
|
||||
malloc((Feb_Interface_recv_buffer_size + 1) * sizeof(unsigned int));
|
||||
if (Feb_Interface_recv_data_raw == NULL) {
|
||||
LOG(logERROR,
|
||||
("Could not allocate memory for feb interface (recv_data_raw)\n"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
Feb_Interface_recv_data = &Feb_Interface_recv_data_raw[1];
|
||||
|
||||
Local_LocalLinkInterface(
|
||||
ll, XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT_BASEADDR);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr) {
|
||||
if (Feb_Interface_feb_numb)
|
||||
int Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr) {
|
||||
free(Feb_Interface_feb_numb);
|
||||
Feb_Interface_nfebs = 2;
|
||||
|
||||
Feb_Interface_feb_numb = malloc(2 * sizeof(unsigned int));
|
||||
if (Feb_Interface_feb_numb == NULL) {
|
||||
LOG(logERROR,
|
||||
("Could not allocate memory for feb interface (feb_numb)\n"));
|
||||
Feb_Interface_nfebs = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Feb_Interface_feb_numb[0] = leftAddr;
|
||||
Feb_Interface_feb_numb[1] = rightAddr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Feb_Interface_WriteTo(unsigned int ch) {
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
int Feb_Interface_WriteTo(unsigned int ch);
|
||||
int Feb_Interface_ReadFrom(unsigned int ch, unsigned int ntrys);
|
||||
void Feb_Interface_FebInterface();
|
||||
void Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr);
|
||||
int Feb_Interface_FebInterface();
|
||||
int Feb_Interface_SetAddress(unsigned int leftAddr, unsigned int rightAddr);
|
||||
int Feb_Interface_SetByteOrder();
|
||||
int Feb_Interface_ReadRegister(unsigned int sub_num, unsigned int reg_num,
|
||||
unsigned int *value_read);
|
||||
|
@ -131,7 +131,8 @@
|
||||
#define DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING 0x20000000
|
||||
#define DAQ_NEXPOSURERS_ACTIVATE_RATE_CORRECTION 0x40000000
|
||||
|
||||
//#define DAQ_MASTER_HALF_MODULE 0x80000000 currently not
|
||||
// #define DAQ_MASTER_HALF_MODULE 0x80000000 currently
|
||||
// not
|
||||
// used
|
||||
|
||||
// chips static bits
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0
Executable file
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0
Executable file
Binary file not shown.
@ -662,7 +662,15 @@ int checkCommandLineConfiguration() {
|
||||
#ifndef VIRTUAL
|
||||
void setupFebBeb() {
|
||||
sharedMemory_lockLocalLink();
|
||||
Feb_Interface_FebInterface();
|
||||
if (!Feb_Interface_FebInterface()) {
|
||||
initError = FAIL;
|
||||
sprintf(initErrorMessage,
|
||||
"Could not intitalize eiger detector sever: feb interface\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
sharedMemory_unlockLocalLink();
|
||||
return;
|
||||
}
|
||||
if (!Feb_Control_FebControl(normal)) {
|
||||
initError = FAIL;
|
||||
sprintf(initErrorMessage,
|
||||
@ -686,7 +694,14 @@ void setupFebBeb() {
|
||||
LOG(logDEBUG1, ("%s server: FEB Initialization done\n",
|
||||
isControlServer ? "Control" : "Stop"));
|
||||
Beb_SetTopVariable(top);
|
||||
Beb_Beb();
|
||||
if (!Beb_Beb()) {
|
||||
initError = FAIL;
|
||||
sprintf(initErrorMessage,
|
||||
"Could not intitalize eiger detector sever: beb\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
}
|
||||
LOG(logDEBUG1, ("%s server: BEB Initialization done\n",
|
||||
isControlServer ? "Control" : "Stop"));
|
||||
|
||||
@ -724,17 +739,23 @@ void setupFebBeb() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void allocateDetectorStructureMemory() {
|
||||
LOG(logINFO, ("This Server is for 1 Eiger half module (250k)\n\n"));
|
||||
|
||||
// Allocation of memory
|
||||
int allocateDetectorStructureMemory() {
|
||||
detectorModules = malloc(sizeof(sls_detector_module));
|
||||
detectorChans = malloc(NCHIP * NCHAN * sizeof(int));
|
||||
detectorDacs = malloc(NDAC * sizeof(int));
|
||||
if (detectorModules == NULL || detectorChans == NULL ||
|
||||
detectorDacs == NULL) {
|
||||
initError = FAIL;
|
||||
strcpy(initErrorMessage,
|
||||
"Could not allocate memory for dacs or channels in detector\n");
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
return FAIL;
|
||||
}
|
||||
LOG(logDEBUG1,
|
||||
("modules from 0x%x to 0x%x\n", detectorModules, detectorModules));
|
||||
LOG(logDEBUG1, ("chans from 0x%x to 0x%x\n", detectorChans, detectorChans));
|
||||
LOG(logDEBUG1, ("dacs from 0x%x to 0x%x\n", detectorDacs, detectorDacs));
|
||||
|
||||
detectorModules->dacs = detectorDacs;
|
||||
detectorModules->chanregs = detectorChans;
|
||||
detectorModules->ndac = NDAC;
|
||||
@ -748,14 +769,21 @@ void allocateDetectorStructureMemory() {
|
||||
detectorModules->eV[2] = -1;
|
||||
thisSettings = UNINITIALIZED;
|
||||
|
||||
// if trimval requested, should return -1 to acknowledge unknown
|
||||
// initialize (trimbits at -1 for unknown)
|
||||
for (int idac = 0; idac < (detectorModules)->ndac; ++idac) {
|
||||
detectorDacs[idac] = 0;
|
||||
}
|
||||
for (int ichan = 0; ichan < (detectorModules->nchan); ichan++) {
|
||||
*((detectorModules->chanregs) + ichan) = -1;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
void setupDetector() {
|
||||
allocateDetectorStructureMemory();
|
||||
LOG(logINFO, ("This Server is for 1 Eiger half module (250k)\n\n"));
|
||||
|
||||
if (allocateDetectorStructureMemory() == FAIL)
|
||||
return;
|
||||
|
||||
// force top or master if in config file
|
||||
if (readConfigFile() == FAIL)
|
||||
@ -2572,7 +2600,8 @@ int startStateMachine() {
|
||||
sharedMemory_setStatus(IDLE);
|
||||
sharedMemory_unlockAcqFlag();
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
pthread_detach(virtual_tid);
|
||||
LOG(logINFO, ("Virtual Acquisition started\n"));
|
||||
sharedMemory_unlockAcqFlag();
|
||||
return OK;
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0
Executable file
Binary file not shown.
@ -987,6 +987,8 @@ int readConfigFile() {
|
||||
|
||||
// to inform powerchip config parameters are set
|
||||
startupPowerChipConfigDone = 1;
|
||||
chipConfigured = 1;
|
||||
LOG(logINFOBLUE, ("Chip configured\n"));
|
||||
}
|
||||
return initError;
|
||||
}
|
||||
@ -2278,8 +2280,7 @@ int powerChip(int on, char *mess) {
|
||||
if (on) {
|
||||
LOG(logINFO, ("Powering chip: on\n"));
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_PWR_CHIP_MSK);
|
||||
// only if power chip config done, configure chip with current set up
|
||||
if (startupPowerChipConfigDone == 1 && configureChip(mess) == FAIL)
|
||||
if (configureChip(mess) == FAIL)
|
||||
return FAIL;
|
||||
} else {
|
||||
// throw if high voltage on
|
||||
@ -2310,6 +2311,12 @@ int getPowerChip() {
|
||||
int isChipConfigured() { return chipConfigured; }
|
||||
|
||||
int configureChip(char *mess) {
|
||||
|
||||
if (!startupPowerChipConfigDone) {
|
||||
LOG(logINFOBLUE,
|
||||
("Startup: Chip to be configured when reading config file\n"));
|
||||
return OK;
|
||||
}
|
||||
LOG(logINFOBLUE, ("\tConfiguring chip\n"));
|
||||
|
||||
// on chip dacs
|
||||
@ -3319,11 +3326,12 @@ int *getBadChannels(int *numChannels) {
|
||||
if (*numChannels > 0) {
|
||||
// get list of bad channels
|
||||
retvals = malloc(*numChannels * sizeof(int));
|
||||
memset(retvals, 0, *numChannels * sizeof(int));
|
||||
if (retvals == NULL) {
|
||||
LOG(logERROR, ("Could not allocate memory to get bad channels\n"));
|
||||
*numChannels = -1;
|
||||
return NULL;
|
||||
}
|
||||
memset(retvals, 0, *numChannels * sizeof(int));
|
||||
int chIndex = 0;
|
||||
int numAddr = MASK_STRIP_NUM_REGS;
|
||||
// loop through registers
|
||||
@ -3373,7 +3381,8 @@ int startStateMachine() {
|
||||
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
||||
sharedMemory_setStatus(IDLE);
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
pthread_detach(pthread_virtual_tid);
|
||||
LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
||||
return OK;
|
||||
#endif
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0
Executable file
Binary file not shown.
@ -1667,7 +1667,8 @@ int startStateMachine() {
|
||||
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
||||
sharedMemory_setStatus(IDLE);
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
pthread_detach(pthread_virtual_tid);
|
||||
LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
||||
return OK;
|
||||
#endif
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
Executable file
Binary file not shown.
@ -555,6 +555,7 @@ void setupDetector() {
|
||||
setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
|
||||
|
||||
// temp threshold and reset event
|
||||
setTemperatureControl(DEFAULT_TMP_CNTRL);
|
||||
setThresholdTemperature(DEFAULT_TMP_THRSHLD);
|
||||
setTemperatureEvent(0);
|
||||
if (getChipVersion() == 11) {
|
||||
@ -1973,9 +1974,6 @@ int autoCompDisable(int on) {
|
||||
}
|
||||
|
||||
int setComparatorDisableTime(int64_t val) {
|
||||
if (getChipVersion() != 11) {
|
||||
return FAIL;
|
||||
}
|
||||
if (val < 0) {
|
||||
LOG(logERROR,
|
||||
("Invalid comp disable time: %lld ns\n", (long long int)val));
|
||||
@ -2254,7 +2252,6 @@ int setThresholdTemperature(int val) {
|
||||
|
||||
double ftemp = (double)temp / 1000.00;
|
||||
LOG(logDEBUG1, ("Threshold Temperature read %f °C\n", ftemp));
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
@ -2555,6 +2552,7 @@ void getPedestalParameters(uint8_t *frames, uint16_t *loops) {
|
||||
}
|
||||
|
||||
void setPedestalMode(int enable, uint8_t frames, uint16_t loops) {
|
||||
// Note: loops is 8 bit in firmware as a bug.To be fixed in next version
|
||||
int prevPedestalEnable = getPedestalMode();
|
||||
uint32_t addr = PEDESTAL_MODE_REG;
|
||||
|
||||
@ -2733,7 +2731,8 @@ int startStateMachine() {
|
||||
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
||||
sharedMemory_setStatus(IDLE);
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
pthread_detach(pthread_virtual_tid);
|
||||
LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
||||
return OK;
|
||||
#endif
|
||||
@ -2789,9 +2788,9 @@ void *start_timer(void *arg) {
|
||||
}
|
||||
|
||||
if ((i % 1024) < 300) {
|
||||
gainVal = 1;
|
||||
gainVal = 0;
|
||||
} else if ((i % 1024) < 600) {
|
||||
gainVal = 2;
|
||||
gainVal = 1;
|
||||
} else {
|
||||
gainVal = 3;
|
||||
}
|
||||
@ -2815,6 +2814,7 @@ void *start_timer(void *arg) {
|
||||
getNextFrameNumber(&frameNr);
|
||||
int iRxEntry = firstDest;
|
||||
for (int iframes = 0; iframes != numFrames; ++iframes) {
|
||||
if (transmissionDelayUs)
|
||||
usleep(transmissionDelayUs);
|
||||
|
||||
// check if manual stop
|
||||
@ -2828,17 +2828,29 @@ void *start_timer(void *arg) {
|
||||
clock_gettime(CLOCK_REALTIME, &begin);
|
||||
usleep(expUs);
|
||||
|
||||
#ifdef TEST_CHANGE_GAIN_EVERY_FRAME
|
||||
// change gain and data for every frame
|
||||
{
|
||||
const int npixels = (NCHAN * NCHIP);
|
||||
|
||||
// random gain values, 2 becomes 3 as 2 is invalid
|
||||
int randomGainValues[3] = {0};
|
||||
srand(time(0));
|
||||
for (int i = 0; i != 3; ++i) {
|
||||
int r = rand() % 3;
|
||||
if (r == 2)
|
||||
r = 3;
|
||||
randomGainValues[i] = r;
|
||||
}
|
||||
|
||||
for (int i = 0; i < npixels; ++i) {
|
||||
int gainVal = 0;
|
||||
if ((i % 1024) < 300) {
|
||||
gainVal = 1 + iframes;
|
||||
gainVal = randomGainValues[0];
|
||||
} else if ((i % 1024) < 600) {
|
||||
gainVal = 2 + iframes;
|
||||
gainVal = randomGainValues[1];
|
||||
} else {
|
||||
gainVal = 3 + iframes;
|
||||
gainVal = randomGainValues[2];
|
||||
}
|
||||
int dataVal =
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t)));
|
||||
@ -2849,7 +2861,7 @@ void *start_timer(void *arg) {
|
||||
(uint16_t)pixelVal;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
int srcOffset = 0;
|
||||
int srcOffset2 = DATA_BYTES / 2;
|
||||
int row0 = (numInterfaces == 1 ? detPos[1] : detPos[3]);
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define MIN_REQRD_VRSN_T_RD_API 0x171220
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x241001 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x241001 // 2.0 pcb (version = 011)
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x250209 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x250208 // 2.0 pcb (version = 011)
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
@ -48,6 +48,7 @@
|
||||
#define DEFAULT_SETTINGS (GAIN0)
|
||||
#define DEFAULT_GAINMODE (DYNAMIC)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
#define DEFAULT_TMP_CNTRL (1)
|
||||
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
||||
#define DEFAULT_NUM_STRG_CLLS (0)
|
||||
#define DEFAULT_STRG_CLL_STRT (0xf)
|
||||
@ -62,6 +63,7 @@
|
||||
#define DEFAULT_TIMING_INFO_DECODER (SWISSFEL)
|
||||
#define DEFAULT_ELECTRON_COLLECTION_MODE (0)
|
||||
|
||||
#define MAX_PEDESTAL_LOOPS (0xFF) // until fixed in firmware
|
||||
#define HIGHVOLTAGE_MIN (60)
|
||||
#define HIGHVOLTAGE_MAX (200)
|
||||
#define DAC_MIN_MV (0)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user