diff --git a/README.md b/README.md
index a646d587a..abee0e773 100755
--- a/README.md
+++ b/README.md
@@ -1,102 +1,233 @@
-### Note
+## Dependencies
+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.
-Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tags for internal usage.
-Use only releases with tags such as x.x.x or x.x.x-rcx.
+## 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).
-### Documentation
-##### 5.0.0 - Latest Release
-Detailed documentation on the latest release 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).
+## Installation
-##### Older Releases
-Documentation is found in the package.
+### 1. 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
-### Binaries
-Binaries for the slsDetectorPackage are available through conda.
```
-#Add conda channels
+#Add channels for dependencies and our library
conda config --add channels conda-forge
conda config --add channels slsdetectorgroup
conda config --set channel_priority strict
-conda install slsdetlib #only shared lib and command line
-conda install slsdet #python bindings (includes slsdetlib)
-conda install slsdetgui #gui (includes qt4)
-
-#Install specific version
-conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
+#create and activate an environment with our library
+#replace 6.1.1 with the required tag
+conda create -n myenv slsdetlib=6.1.1
+conda activate myenv
+#ready to use
+sls_detector_get exptime
+etc ...
```
-### Source code
-One can also obtain the source code from this repository and compile.
```
-git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
+# List available versions
+# lib and binaries
+conda search slsdetlib
+# python
+conda search slsdet
+# gui
+conda search slsdetgui
+```
+
+### 2. Build from source
+
+##### 2.1 Download Source Code from github
+```
+git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
+```
+
+**Pybind for Python**
+* **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.
```
-#### Dependencies
+# clone using recursive to get pybind11 submodule
+git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
-Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
-
-
-#### Compilation
-
-Compiling can be done in two ways. Either with the convenience script
-cmk.sh or directly with cmake for more control.
-
-**1. Compile using script cmk.sh**
-
-These are mainly aimed at those not familiar with using ccmake and cmake.
+# update submodule when switching between releases
+cd slsDetectorPackage
+git submodule update --init
```
- The binaries are generated in slsDetectorPackage/build/bin directory.
- Usage: ./cmk.sh [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d ] [-l Install directory] [-k ] [-j ]
- -[no option]: only make
- -c: Clean
- -b: Builds/Rebuilds CMake files normal mode
- -p: Builds/Rebuilds Python API
- -h: Builds/Rebuilds Cmake files with HDF5 package
- -d: HDF5 Custom Directory
- -k: CMake command
- -l: Install directory
- -t: Build/Rebuilds only text client
- -r: Build/Rebuilds only receiver
- -g: Build/Rebuilds only gui
- -s: Simulator
- -u: Chip Test Gui
- -j: Number of threads to compile through
- -e: Debug mode
- -i: Builds tests
- -m: Manuals
- -n: Manuals without compiling doxygen (only rst)
- -z: Moench zmq processor
+##### 2.2 Build from source
+
+
+###### Build using CMake
+
+```
+# outside slsDetecorPackage folder
+mkdir build && cd build
+
+# configure & generate Makefiles using cmake
+# by listing all your options (alternately use ccmake described below)
+# cmake3 for some systems
+cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
+
+# compiled to the build/bin directory
+make -j12 #or whatever number of cores you are using to build
+
+# install headers and libs in /your/install/path directory
+make install
+```
+
+Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
+
+
+```
+# ccmake3 for some systems
+ccmake ..
+
+# choose the options
+# first press [c] - configure
+# 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 |
+| -DSLS_USE_GUI=ON | GUI |
+
+
+###### Build using in-built cmk.sh script
+
+```
+The binaries are generated in slsDetectorPackage/build/bin directory.
+
+Usage: ./cmk.sh [-b] [-c] [-d ] [e] [g] [-h] [i] [-j ]
+[-k ] [-l ] [m] [n] [-p] [-q ]
+[r] [s] [t] [u] [z]
+-[no option]: only make
+-b: Builds/Rebuilds CMake files normal mode
+-c: Clean
+-d: HDF5 Custom Directory
+-e: Debug mode
+-g: Build/Rebuilds gui
+-h: Builds/Rebuilds Cmake files with HDF5 package
+-i: Builds tests
+-j: Number of threads to compile through
+-k: CMake command
+-l: Install directory
+-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
+-u: Chip Test Gui
+-z: Moench zmq processor
- # get all options
- ./cmk.sh -?
+# display all options
+./cmk.sh -?
- # new build and compile in parallel:
- ./cmk.sh -bj5
-```
-
-**2. Compile without script**
-Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
-```
- $ mkdir build
- $ cd build
- $ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
- $ make -j12 #or whatever number of threads wanted
+# new build and compile in parallel (recommended basic option):
+./cmk.sh -cbj5
+
+# new build, python and compile in parallel:
+./cmk.sh -cbpj5
+
+#To use the system zmq (/usr/lib64) instead
+./cmk.sh -cbj5 -q /usr/lib64
```
-To install binaries using CMake
+###### 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
+using this compiler
+
```
- git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
- mkdir build && cd build
- cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
- make -j12 #or whatever number of cores you are using to build
- make install
+#Create an environment with the dependencies
+conda create -n myenv gxx_linux-64 cmake zmq
+conda activate myenv
+
+# outside slsDetecorPackage folder
+mkdir build && cd build
+cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
+make -j12
+```
+
+###### Build slsDetectorGui (Qt5)
+
+1. Using pre-built binary on conda
+```
+conda create -n myenv slsdetgui=7.0.0
+conda activate myenv
+```
+
+2. Using system installation on RHEL7
+```
+yum install qt5-qtbase-devel.x86_64
+yum install qt5-qtsvg-devel.x86_64
+```
+
+3. Using conda
+```
+#Add channels for dependencies and our library
+conda config --add channels conda-forge
+conda config --add channels slsdetectorgroup
+conda config --set channel_priority strict
+
+# create environment to compile
+# on rhel7
+conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
+# on fedora or newer systems
+conda create -n slsgui zeromq qt
+
+# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
+
+# activate environment
+conda activate slsgui
+
+# compile with cmake outside slsDetecorPackage folder
+mkdir build && cd build
+cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
+make -j12
+
+# or compile with cmk.sh
+cd slsDetectorPackage
+./cmk.sh -cbgj9
+```
+
+###### 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
+```
+
+```
+# using cmake or ccmake to enable DSLS_BUILD_DOCS
+# outside slsDetecorPackage folder
+mkdir build && cd build
+cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
+
+make docs # generate API docs and build Sphinx RST
+make rst # rst only, saves time in case the API did not change
```
-### Support
+## Support
dhanya.thattil@psi.ch
- erik.frojdh@psi.ch
\ No newline at end of file
+ erik.frojdh@psi.ch
diff --git a/RELEASE.txt b/RELEASE.txt
index f10de5cfb..36162120c 100644
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -1,36 +1,39 @@
-SLS Detector Package Minor Release 7.0.0.rc1 released on 12.12.2021
-===================================================================
+SLS Detector Package Major Release 7.x.x released on xx.xx.2023
+===============================================================
-This document describes the differences between v7.0.0.rc1 and v6.1.2
+This document describes the differences between v7.x.x and v7.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
- 2. On-board Detector Server Compatibility
- 3. Firmware Requirements
- 4. Kernel Requirements
- 5. Download, Documentation & Support
+ 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
+ 2 On-board Detector Server Compatibility
+ 3 Firmware Requirements
+ 4 Kernel Requirements
+ 5 Download, Documentation & Support
-1. New or Changed Features
-==========================
+1 New, Changed or Resolved Features
+=====================================
+
- moench being made compatible with jungfrau 2.0 boards (jungfrau structure, away from ctb)
- eiger febl and feb in versions
-2. On-board Detector Server Compatibility
+
+2 On-board Detector Server Compatibility
==========================================
@@ -57,16 +60,16 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
-3. Firmware Requirements
+3 Firmware Requirements
========================
- Eiger 17.02.2022 (v30)
+ Eiger 20.02.2023 (v31)
Jungfrau 04.11.2022 (v1.4, HW v1.0)
03.11.2022 (v2.4, HW v2.0)
- Mythen3 05.12.2022 (v1.4)
+ Mythen3 24.01.2023 (v1.4)
Gotthard2 23.11.2022 (v0.3)
@@ -106,22 +109,22 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
-4. Kernel Requirements
+4 Kernel Requirements
======================
Blackfin
- ========
+ --------
Latest version: Fri Oct 29 00:00:00 2021
Older ones will work, but might have issues with programming firmware via
the package.
Nios
- ====
+ -----
Compatible version: Mon May 10 18:00:21 CEST 2021
Kernel Upgrade
- ==============
+ ---------------
Eiger via bit files
Others via command
@@ -134,7 +137,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
-5. Download, Documentation & Support
+5 Download, Documentation & Support
====================================
Download
@@ -190,6 +193,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
https://slsdetectorgroup.github.io/devdoc/udpheader.html
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
+ slsReceiver Zmq Format:
+ https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
+
TroubleShooting:
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html#receiver-pc-tuning-options
@@ -206,4 +212,3 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
dhanya.thattil@psi.ch
erik.frojdh@psi.ch
-
diff --git a/cmk.sh b/cmk.sh
index 8df13ac68..9ed267843 100755
--- a/cmk.sh
+++ b/cmk.sh
@@ -33,7 +33,7 @@ Usage: $0 [-b] [-c] [-d ] [e] [g] [-h] [i] [-j ` |
+ | | [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` |
+ | | [From detector udp header] |
+ +--------------+----------------------------------------------+
+ | detSpec3 | See :ref:`here` |
+ | | [From detector udp header] |
+ +--------------+----------------------------------------------+
+ | detSpec4 | See :ref:`here` |
+ | | [From detector udp header] |
+ +--------------+----------------------------------------------+
+ | detType | Detector type enum |
+ | detSpec3 | See :ref:`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 `)
+ * 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
--------------
@@ -117,8 +295,6 @@ Some file name examples:
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
-SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
-
**Binary file format**
This is the default file format.
diff --git a/docs/src/udpheader.rst b/docs/src/udpheader.rst
index 8b3999e70..04f3a5a6a 100644
--- a/docs/src/udpheader.rst
+++ b/docs/src/udpheader.rst
@@ -11,7 +11,7 @@ Current Version
**v2.0 (slsDetectorPackage v7.0.0+)**
-.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
+.. table:: <---------------------------------------------------- 8 bytes per row --------------------------------------------->
:align: center
:widths: 30,30,30,15,15
diff --git a/examples/badchannel.txt b/examples/badchannel.txt
new file mode 100644
index 000000000..1de3c6eb6
--- /dev/null
+++ b/examples/badchannel.txt
@@ -0,0 +1,6 @@
+0
+10, 30
+40:45 50:52
+1279
+# all bad channels are applied for all counters in deector
+
diff --git a/examples/virtual_ctb_moench.config b/examples/virtual_ctb_moench.config
index e5c74c65e..3b6c35bde 100644
--- a/examples/virtual_ctb_moench.config
+++ b/examples/virtual_ctb_moench.config
@@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1910
-# receiver hostname
-rx_hostname mpc1922:2010
-
# udp destination ports
udp_dstport 50010
-# udp destination ip from rx_hostname
-udp_dstip auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2010
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+
# output file directory
fpath /tmp
@@ -27,418 +27,7 @@ dbitclk 40
# patterns
-patword 0x0000 0x0000000000000000
-patword 0x0001 0x0000000000000000
-patword 0x0002 0x0008000900080000
-patword 0x0003 0x0008000900080000
-patword 0x0004 0x0008000900080000
-patword 0x0005 0x0008000900080000
-patword 0x0006 0x0008000900080000
-patword 0x0007 0x0008000900080000
-patword 0x0008 0x0008000900080000
-patword 0x0009 0x0008000900080000
-patword 0x000a 0x0008000900080000
-patword 0x000b 0x0008000900080000
-patword 0x000c 0x0008000900080000
-patword 0x000d 0x0008000900080000
-patword 0x000e 0x0008000900080000
-patword 0x000f 0x0008000900080000
-patword 0x0010 0x0008000900080000
-patword 0x0011 0x0008000900080000
-patword 0x0012 0x0008000900080000
-patword 0x0013 0x0008000900080000
-patword 0x0014 0x0008000900080000
-patword 0x0015 0x0008000900080000
-patword 0x0016 0x0008400900080020
-patword 0x0017 0x0008400900080020
-patword 0x0018 0x0008599f0418503a
-patword 0x0019 0x0008599f0418503a
-patword 0x001a 0x0108599f0418503a
-patword 0x001b 0x0108599f0418503a
-patword 0x001c 0x0108599f0418503a
-patword 0x001d 0x0108599f0418503a
-patword 0x001e 0x0108599f0418503a
-patword 0x001f 0x0108599f0418503a
-patword 0x0020 0x0108599f0418503a
-patword 0x0021 0x0108599f0418503a
-patword 0x0022 0x0108599f0418503a
-patword 0x0023 0x0108599f0418503a
-patword 0x0024 0x0108599f0418503a
-patword 0x0025 0x0108599f0418503a
-patword 0x0026 0x0108599f0418503a
-patword 0x0027 0x0108599f0418503a
-patword 0x0028 0x0108599f0418503a
-patword 0x0029 0x0108599f0418503a
-patword 0x002a 0x0108599f0418503a
-patword 0x002b 0x0108599f0418503a
-patword 0x002c 0x0108599f0418503a
-patword 0x002d 0x0108599f0418503a
-patword 0x002e 0x0108599f0418503a
-patword 0x002f 0x0108599f0418503a
-patword 0x0030 0x0108599f0418503a
-patword 0x0031 0x0108599f0418503a
-patword 0x0032 0x0108599f0418503a
-patword 0x0033 0x0108599f0418503a
-patword 0x0034 0x0108599f0418503a
-patword 0x0035 0x0108599f0418503a
-patword 0x0036 0x0108599f0418503a
-patword 0x0037 0x0108599f0418503a
-patword 0x0038 0x0108599f0418503a
-patword 0x0039 0x0108599f0418503a
-patword 0x003a 0x0108599f0418503a
-patword 0x003b 0x0108599f0418503a
-patword 0x003c 0x0108599f0418503a
-patword 0x003d 0x0108599f0418503a
-patword 0x003e 0x0108599f0418503a
-patword 0x003f 0x0108599f0418503a
-patword 0x0040 0x0108599f0418503a
-patword 0x0041 0x0108599f0418503a
-patword 0x0042 0x0108599f0418503a
-patword 0x0043 0x0108599f0418503a
-patword 0x0044 0x0108599f0418503a
-patword 0x0045 0x0108599f0418503a
-patword 0x0046 0x0108599f0418503a
-patword 0x0047 0x0108599f0418503a
-patword 0x0048 0x0108599f0418503a
-patword 0x0049 0x0108599f0418503a
-patword 0x004a 0x0108599f0418503a
-patword 0x004b 0x0108599f0418503a
-patword 0x004c 0x0108599f0418503a
-patword 0x004d 0x0108599f0418503a
-patword 0x004e 0x0108599f0418503a
-patword 0x004f 0x0108599f0418503a
-patword 0x0050 0x0108599f0418503a
-patword 0x0051 0x0108599f0418503a
-patword 0x0052 0x0108599f0418503a
-patword 0x0053 0x0108599f0418503a
-patword 0x0054 0x0108599f0418503a
-patword 0x0055 0x0108599f0418503a
-patword 0x0056 0x0108599f0418503a
-patword 0x0057 0x0108599f0418503a
-patword 0x0058 0x0108599f0418503a
-patword 0x0059 0x0108599f0418503a
-patword 0x005a 0x0108599f0418503a
-patword 0x005b 0x0108599f0418503a
-patword 0x005c 0x0108599f0418503a
-patword 0x005d 0x0108599f0418503a
-patword 0x005e 0x0108599f0418503a
-patword 0x005f 0x0108599f0418503a
-patword 0x0060 0x0108599f0418503a
-patword 0x0061 0x0108599f0418503a
-patword 0x0062 0x0108599f0418503a
-patword 0x0063 0x0108599f0418503a
-patword 0x0064 0x0108599f0418503a
-patword 0x0065 0x0108599f0418503a
-patword 0x0066 0x0108599f0418503a
-patword 0x0067 0x0108599f0418503a
-patword 0x0068 0x0108599f0418503a
-patword 0x0069 0x0108599f0418503a
-patword 0x006a 0x0108599f0418503a
-patword 0x006b 0x0108599f0418503a
-patword 0x006c 0x0108599f0418503a
-patword 0x006d 0x0108599f0418503a
-patword 0x006e 0x0108599f0418503a
-patword 0x006f 0x0108599f0418503a
-patword 0x0070 0x0108599f0418503a
-patword 0x0071 0x0108599f0418503a
-patword 0x0072 0x0108599f0418503a
-patword 0x0073 0x0108599f0418503a
-patword 0x0074 0x0108599f0418503a
-patword 0x0075 0x0108599f0418503a
-patword 0x0076 0x0108599f0418503a
-patword 0x0077 0x0108599f0418503a
-patword 0x0078 0x0108599f0418503a
-patword 0x0079 0x0108599f0418503a
-patword 0x007a 0x0108599f0418503a
-patword 0x007b 0x0108599f0418503a
-patword 0x007c 0x0108599f0418503a
-patword 0x007d 0x0108599f0418503a
-patword 0x007e 0x010859960418503a
-patword 0x007f 0x010859960418503a
-patword 0x0080 0x010859960418503a
-patword 0x0081 0x010859960418503a
-patword 0x0082 0x010859960418503a
-patword 0x0083 0x010859960418503a
-patword 0x0084 0x010859960418503a
-patword 0x0085 0x010859960418503a
-patword 0x0086 0x010859960418503a
-patword 0x0087 0x010859960418503a
-patword 0x0088 0x010859960418503a
-patword 0x0089 0x010859960418503a
-patword 0x008a 0x010859960418503a
-patword 0x008b 0x010859960418503a
-patword 0x008c 0x010859960418503a
-patword 0x008d 0x010859960418503a
-patword 0x008e 0x010859960418503a
-patword 0x008f 0x010859960418503a
-patword 0x0090 0x010859960418503a
-patword 0x0091 0x010859960418503a
-patword 0x0092 0x010819960418501a
-patword 0x0093 0x010819960418501a
-patword 0x0094 0x010819960418501a
-patword 0x0095 0x010819960418501a
-patword 0x0096 0x030819960418501a
-patword 0x0097 0x030819960418501a
-patword 0x0098 0x030819960418501a
-patword 0x0099 0x030819960418501a
-patword 0x009a 0x030819960418501a
-patword 0x009b 0x030819960418501a
-patword 0x009c 0x030819960418501a
-patword 0x009d 0x030819960418501a
-patword 0x009e 0x030819960418501a
-patword 0x009f 0x030819960418501a
-patword 0x00a0 0x030819960418501a
-patword 0x00a1 0x030819960418501a
-patword 0x00a2 0x030819960418501a
-patword 0x00a3 0x030819960418501a
-patword 0x00a4 0x030819960418501a
-patword 0x00a5 0x030819960418501a
-patword 0x00a6 0x030819960418501a
-patword 0x00a7 0x030819960418501a
-patword 0x00a8 0x030819960418501a
-patword 0x00a9 0x030819960418501a
-patword 0x00aa 0x030819960418501a
-patword 0x00ab 0x030819960418501a
-patword 0x00ac 0x030819960008501a
-patword 0x00ad 0x030819960008501a
-patword 0x00ae 0x030819960008501a
-patword 0x00af 0x030819960008501a
-patword 0x00b0 0x030819960008501a
-patword 0x00b1 0x030819960008501a
-patword 0x00b2 0x030819960008501a
-patword 0x00b3 0x030819960008501a
-patword 0x00b4 0x030819960008501a
-patword 0x00b5 0x030819960008501a
-patword 0x00b6 0x030819960008501a
-patword 0x00b7 0x030819960008501a
-patword 0x00b8 0x030819960008501a
-patword 0x00b9 0x030819960008501a
-patword 0x00ba 0x030819960008501a
-patword 0x00bb 0x030819960008501a
-patword 0x00bc 0x030819960008501a
-patword 0x00bd 0x030819960008501a
-patword 0x00be 0x030819960008501a
-patword 0x00bf 0x030819960008501a
-patword 0x00c0 0x0308199f0008501a
-patword 0x00c1 0x0308199f0008501a
-patword 0x00c2 0x0308199f0008501a
-patword 0x00c3 0x0308199f0008501a
-patword 0x00c4 0x0308199f0008501a
-patword 0x00c5 0x0308199f0008501a
-patword 0x00c6 0x0308199f0008501a
-patword 0x00c7 0x0308199f0008501a
-patword 0x00c8 0x0308199f0008501a
-patword 0x00c9 0x0308199f0008501a
-patword 0x00ca 0x0308199f0008501a
-patword 0x00cb 0x0308199f0008501a
-patword 0x00cc 0x0308199f0008501a
-patword 0x00cd 0x0308199f0008501a
-patword 0x00ce 0x0308199f0008501a
-patword 0x00cf 0x0308199f0008501a
-patword 0x00d0 0x0308199f0008501a
-patword 0x00d1 0x0308199f0008501a
-patword 0x00d2 0x0308199f0008501a
-patword 0x00d3 0x0308199f0008501a
-patword 0x00d4 0x0308599f0008503a
-patword 0x00d5 0x0308599f0008503a
-patword 0x00d6 0x030c599f000850ba
-patword 0x00d7 0x030c599f000850ba
-patword 0x00d8 0x030c599f000850ba
-patword 0x00d9 0x030c599f000850ba
-patword 0x00da 0x030c599f000850ba
-patword 0x00db 0x030c599f000850ba
-patword 0x00dc 0x030c599f000850ba
-patword 0x00dd 0x030c599f000850ba
-patword 0x00de 0x030c599f000850ba
-patword 0x00df 0x030c599f000850ba
-patword 0x00e0 0x030c599f000850ba
-patword 0x00e1 0x030c599f000850ba
-patword 0x00e2 0x030c599f000850ba
-patword 0x00e3 0x030c599f000850ba
-patword 0x00e4 0x030c599f000850ba
-patword 0x00e5 0x030c599f000850ba
-patword 0x00e6 0x030c599f000850ba
-patword 0x00e7 0x030c599f000850ba
-patword 0x00e8 0x030c599f000850ba
-patword 0x00e9 0x030c599f000850ba
-patword 0x00ea 0x030c799f010858ba
-patword 0x00eb 0x030c799f010858ba
-patword 0x00ec 0x030c599f000850ba
-patword 0x00ed 0x030c599f000850ba
-patword 0x00ee 0x030c599f000850ba
-patword 0x00ef 0x030c599f000850ba
-patword 0x00f0 0x030c599f000850ba
-patword 0x00f1 0x030c599f000850ba
-patword 0x00f2 0x030c599f000850ba
-patword 0x00f3 0x030c599f000850ba
-patword 0x00f4 0x030c599f000850ba
-patword 0x00f5 0x030c599f000850ba
-patword 0x00f6 0x030c599f000850ba
-patword 0x00f7 0x030c599f000850ba
-patword 0x00f8 0x030c599f000850ba
-patword 0x00f9 0x030c599f000850ba
-patword 0x00fa 0x030c599f000850ba
-patword 0x00fb 0x030c599f000850ba
-patword 0x00fc 0x030c599f000850ba
-patword 0x00fd 0x030c599f000850ba
-patword 0x00fe 0x030c599f000850ba
-patword 0x00ff 0x030c599f000850ba
-patword 0x0100 0x030c599f000850ba
-patword 0x0101 0x030c599f000850ba
-patword 0x0102 0x030c599f400850ba
-patword 0x0103 0x030c599f400850ba
-patword 0x0104 0x030c599f600850ba
-patword 0x0105 0x030c599f400850ba
-patword 0x0106 0x030c599f400850ba
-patword 0x0107 0x030c599f400850ba
-patword 0x0108 0x870c599f682e50ba
-patword 0x0109 0x870c599f482850ba
-patword 0x010a 0x870c599f000e50ba
-patword 0x010b 0x870c599f000850ba
-patword 0x010c 0x870c599f000e50ba
-patword 0x010d 0x870c599f000850ba
-patword 0x010e 0x870c599f000e50ba
-patword 0x010f 0x870c599f000850ba
-patword 0x0110 0x870c599f000e50ba
-patword 0x0111 0x870c599f000850ba
-patword 0x0112 0x870c599f000e50ba
-patword 0x0113 0x870c599f000850ba
-patword 0x0114 0x870c599f000e50ba
-patword 0x0115 0x870c599f000850ba
-patword 0x0116 0x870c599f000e50ba
-patword 0x0117 0x870c599f000850ba
-patword 0x0118 0x870c599f000e50ba
-patword 0x0119 0x870c599f000850ba
-patword 0x011a 0x870c599f000e50ba
-patword 0x011b 0x870c599f000850ba
-patword 0x011c 0x870c599f000e50ba
-patword 0x011d 0x870c599f000850ba
-patword 0x011e 0x870c599f000e50ba
-patword 0x011f 0x870c599f000850ba
-patword 0x0120 0x870c599f000e50ba
-patword 0x0121 0x870c599f000850ba
-patword 0x0122 0x870c599f200e50ba
-patword 0x0123 0x870c599f000850ba
-patword 0x0124 0x870c599f000e50ba
-patword 0x0125 0x870c599f000850ba
-patword 0x0126 0x870c599f000e50ba
-patword 0x0127 0x870c599f000850ba
-patword 0x0128 0x870c599f000e50ba
-patword 0x0129 0x870c599f000850ba
-patword 0x012a 0x870c599f000e50ba
-patword 0x012b 0x870c599f000850ba
-patword 0x012c 0x870c599f000e50ba
-patword 0x012d 0x870c599f000850ba
-patword 0x012e 0x870c599f000e50ba
-patword 0x012f 0x870c599f000850ba
-patword 0x0130 0x870c599f000e50ba
-patword 0x0131 0x870c599f000850ba
-patword 0x0132 0x870c599f000e50ba
-patword 0x0133 0x870c599f000850ba
-patword 0x0134 0x870c599f000e50ba
-patword 0x0135 0x870c599f000850ba
-patword 0x0136 0x870c599f000e50ba
-patword 0x0137 0x870c599f000850ba
-patword 0x0138 0x870c599f000e50ba
-patword 0x0139 0x870c599f000850ba
-patword 0x013a 0x870c599f282e50ba
-patword 0x013b 0x870c599f082850ba
-patword 0x013c 0x870c599f000e50ba
-patword 0x013d 0x870c599f000850ba
-patword 0x013e 0x870c599f000e50ba
-patword 0x013f 0x870c599f000850ba
-patword 0x0140 0x870c599f000e50ba
-patword 0x0141 0x870c599f000850ba
-patword 0x0142 0x870c599f000e50ba
-patword 0x0143 0x870c599f000850ba
-patword 0x0144 0x870c599f000e50ba
-patword 0x0145 0x870c599f000850ba
-patword 0x0146 0x870c599f000e50ba
-patword 0x0147 0x870c599f000850ba
-patword 0x0148 0x870c599f000e50ba
-patword 0x0149 0x870c599f000850ba
-patword 0x014a 0x870c599f000e50ba
-patword 0x014b 0x870c599f000850ba
-patword 0x014c 0x870c599f000e50ba
-patword 0x014d 0x870c599f000850ba
-patword 0x014e 0x870c599f000e50ba
-patword 0x014f 0x870c599f000850ba
-patword 0x0150 0x870c599f000e50ba
-patword 0x0151 0x870c599f000850ba
-patword 0x0152 0x870c599f000e50ba
-patword 0x0153 0x870c599f000850ba
-patword 0x0154 0x870c599f200e50ba
-patword 0x0155 0x870c599f000850ba
-patword 0x0156 0x870c599f000e50ba
-patword 0x0157 0x870c599f000850ba
-patword 0x0158 0x870c599f000e50ba
-patword 0x0159 0x870c599f000850ba
-patword 0x015a 0x870c599f000e50ba
-patword 0x015b 0x870c599f000850ba
-patword 0x015c 0x870c599f000e50ba
-patword 0x015d 0x870c599f000850ba
-patword 0x015e 0x870c599f000e50ba
-patword 0x015f 0x870c599f000850ba
-patword 0x0160 0x870c599f000e50ba
-patword 0x0161 0x870c599f000850ba
-patword 0x0162 0x870c599f000e50ba
-patword 0x0163 0x870c599f000850ba
-patword 0x0164 0x870c599f000e50ba
-patword 0x0165 0x870c599f000850ba
-patword 0x0166 0x870c599f000e50ba
-patword 0x0167 0x870c599f000850ba
-patword 0x0168 0x870c599f000e50ba
-patword 0x0169 0x870c599f000850ba
-patword 0x016a 0x870c599f000e50ba
-patword 0x016b 0x870c599f000850ba
-patword 0x016c 0x070c599f000850ba
-patword 0x016d 0x070c599f000850ba
-patword 0x016e 0x000c599f000850ba
-patword 0x016f 0x000c599f000850ba
-patword 0x0170 0x0008599f200e503a
-patword 0x0171 0x0008599f0008503a
-patword 0x0172 0x0008599f200e503a
-patword 0x0173 0x0008599f0008503a
-patword 0x0174 0x0008599f0008503a
-patword 0x0175 0x0008599f0008503a
-patword 0x0176 0x0008599f0008503a
-patword 0x0177 0x0008599f0008503a
-patword 0x0178 0x0008599f0008503a
-patword 0x0179 0x0008599f0008503a
-patword 0x017a 0x0008599f0008503a
-patword 0x017b 0x0008599f0008503a
-patword 0x017c 0x0008599f0008503a
-patword 0x017d 0x0008599f0008503a
-patword 0x017e 0x0008599f0008503a
-patword 0x017f 0x0008599f0008503a
-patword 0x0180 0x0008599f0008503a
-patword 0x0181 0x0008599f0008503a
-patword 0x0182 0x0008599f0008503a
-patword 0x0183 0x0008599f0008503a
-patword 0x0184 0x0008599f0008503a
-patword 0x0185 0x0008599f0008503a
-patword 0x0186 0x0008599f0008503a
-patword 0x0187 0x0008599f0008503a
-patword 0x0188 0x0008599f0008503a
-patword 0x0189 0x0008599f0008503a
-patword 0x018a 0x0008599f0008503a
-patword 0x018b 0x0008599f0008503a
-patword 0x018c 0x0008599f0008503a
-patword 0x018d 0x0008599f0008503a
-patioctrl 0x8f0effff6dbffdbf
-patlimits 0x0000 0x018c
-patloop 0 0x013a 0x016b
-patnloop 0 0x199
-patloop 1 0x0400 0x0400
-patnloop 1 0
-patloop 2 0x0400 0x0400
-patnloop 2 0
-patwait 0 0x00aa
-patwaittime 0 10000
-patwait 1 0x0400
-patwaittime 1 0
-patwait 2 0x0400
-patwaittime 2 0
+pattern /tmp/pattern.pat
# dacs
dac 6 800
diff --git a/examples/virtual_eiger_1_half_module.config b/examples/virtual_eiger_1_half_module.config
index fa815af3e..c88cd0fde 100644
--- a/examples/virtual_eiger_1_half_module.config
+++ b/examples/virtual_eiger_1_half_module.config
@@ -1,13 +1,13 @@
# detector hostname
hostname localhost:1900
-# receiver hostname
-rx_hostname mpc1922:2000
-
# udp destination ports
udp_dstport 50000
udp_dstport2 50001
+# receiver hostname
+rx_hostname mpc1922:2000
+
# udp destination ip from rx_hostname
udp_dstip auto
diff --git a/examples/virtual_eiger_2_half_modules.config b/examples/virtual_eiger_2_half_modules.config
index f58270678..e4d1f5ed8 100644
--- a/examples/virtual_eiger_2_half_modules.config
+++ b/examples/virtual_eiger_2_half_modules.config
@@ -1,15 +1,15 @@
# detector hostname
hostname localhost:1900+localhost:1902+
-# receiver hostname
-rx_hostname mpc1922:2000+mpc1922:2001+
-
# udp destination ports
0:udp_dstport 50000
0:udp_dstport2 50001
1:udp_dstport 50002
1:udp_dstport2 50003
+# receiver hostname
+rx_hostname mpc1922:2000+mpc1922:2001+
+
# udp destination ip from rx_hostname
udp_dstip auto
diff --git a/examples/virtual_gotthard.config b/examples/virtual_gotthard.config
index c30957154..df4482d0b 100644
--- a/examples/virtual_gotthard.config
+++ b/examples/virtual_gotthard.config
@@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1904
-# receiver hostname
-rx_hostname mpc1922:2004
-
# udp destination ports
udp_dstport 50004
-# udp destination ip from rx_hostname
-udp_dstip auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2004
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+
# output file directory
fpath /tmp
diff --git a/examples/virtual_gotthard2.config b/examples/virtual_gotthard2.config
index 9e2456fe9..8ebf9326a 100644
--- a/examples/virtual_gotthard2.config
+++ b/examples/virtual_gotthard2.config
@@ -1,24 +1,12 @@
# detector hostname
hostname localhost:1914
-# receiver hostname
-rx_hostname mpc1922:2014
-
# udp destination ports
udp_dstport 50014
-# udp destination ip from rx_hostname
-udp_dstip auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
-# output file directory
-fpath /tmp
-
-# disable file writing
-fwrite 0
-
# enable 2nd interface for veto debugging
# udp destination port for veto
udp_dstport2 50015
@@ -27,6 +15,18 @@ udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip2 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2014
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+
+# output file directory
+fpath /tmp
+
+# disable file writing
+fwrite 0
+
# to enable 2nd interface for veto debugging
numinterfaces 2
diff --git a/examples/virtual_jungfrau.config b/examples/virtual_jungfrau.config
index c81b8d08c..4f7ed99f5 100644
--- a/examples/virtual_jungfrau.config
+++ b/examples/virtual_jungfrau.config
@@ -1,21 +1,21 @@
# detector hostname
hostname localhost:1906
-# receiver hostname
-rx_hostname mpc1922:2006
-
# udp destination ports
udp_dstport 50006
udp_dstport2 50007
-# udp destination ip from rx_hostname
-udp_dstip auto
-udp_dstip2 auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2006
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+udp_dstip2 auto
+
# output file directory
fpath /tmp
diff --git a/examples/virtual_jungfrau_4.config b/examples/virtual_jungfrau_4.config
index 91e5b259f..021c2c4ae 100644
--- a/examples/virtual_jungfrau_4.config
+++ b/examples/virtual_jungfrau_4.config
@@ -4,13 +4,6 @@ detsize 2048 1024
# detector hostname
virtual 4 1952
-# receiver hostname and tcpports
-0:rx_tcpport 1970
-1:rx_tcpport 1971
-2:rx_tcpport 1972
-3:rx_tcpport 1973
-rx_hostname mpc1922
-
# udp destination ports
0:udp_dstport2 50001
0:udp_dstport2 50002
@@ -21,14 +14,21 @@ rx_hostname mpc1922
3:udp_dstport 50007
3:udp_dstport2 50008
-# udp destination ip from rx_hostname
-udp_dstip auto
-udp_dstip2 auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
+# receiver hostname and tcpports
+0:rx_tcpport 1970
+1:rx_tcpport 1971
+2:rx_tcpport 1972
+3:rx_tcpport 1973
+rx_hostname mpc1922
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+udp_dstip2 auto
+
# transmission delay frame
0:txndelay_frame 0
1:txndelay_frame 1
diff --git a/examples/virtual_moench.config b/examples/virtual_moench.config
index be9adfb14..921f3a77c 100644
--- a/examples/virtual_moench.config
+++ b/examples/virtual_moench.config
@@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1908
-# receiver hostname
-rx_hostname mpc1922:2008
-
# udp destination ports
udp_dstport 50008
-# udp destination ip from rx_hostname
-udp_dstip auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2008
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+
# output file directory
fpath /tmp
diff --git a/examples/virtual_mythen3.config b/examples/virtual_mythen3.config
index 55bcfc625..02f5a672d 100644
--- a/examples/virtual_mythen3.config
+++ b/examples/virtual_mythen3.config
@@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1912
-# receiver hostname
-rx_hostname mpc1922:2012
-
# udp destination ports
udp_dstport 50012
-# udp destination ip from rx_hostname
-udp_dstip auto
-
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
+# receiver hostname
+rx_hostname mpc1922:2012
+
+# udp destination ip from rx_hostname
+udp_dstip auto
+
# output file directory
fpath /tmp
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 51bb92de7..ae05bbf99 100755
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -34,6 +34,7 @@ set( PYTHON_FILES
slsdet/eiger.py
slsdet/enums.py
slsdet/errors.py
+ slsdet/gaincaps.py
slsdet/gotthard.py
slsdet/pattern.py
slsdet/gotthard2.py
diff --git a/python/scripts/compare_with_commandline.py b/python/scripts/compare_with_commandline.py
index d4d68fab6..ef72bc0a6 100644
--- a/python/scripts/compare_with_commandline.py
+++ b/python/scripts/compare_with_commandline.py
@@ -2,7 +2,7 @@
# Copyright (C) 2021 Contributors to the SLS Detector Package
import subprocess
import locale
-out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
+out = subprocess.run(['sls_detector_get', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
cmd = out.stdout.splitlines()
cmd.pop(0)
@@ -99,7 +99,6 @@ intentionally_missing = [
'temp_slowadc',
'temp_sodl',
'temp_sodr',
- 'trigger', #use sendSoftwareTrigger
'update', #use updateServerAndFirmare
'udp_validate', #use validateUdpConfiguration
'udp_reconfigure', #use reconfigureUdpDestination
diff --git a/python/slsdet/__init__.py b/python/slsdet/__init__.py
index cf03a8a4e..09568cbd1 100755
--- a/python/slsdet/__init__.py
+++ b/python/slsdet/__init__.py
@@ -11,7 +11,7 @@ from .gotthard2 import Gotthard2
from .gotthard import Gotthard
from .moench import Moench
from .pattern import Pattern, patternParameters
-
+from .gaincaps import Mythen3GainCapsWrapper
import _slsdet
xy = _slsdet.xy
diff --git a/python/slsdet/defines.py b/python/slsdet/defines.py
index 4f86a03f3..244ce207e 100644
--- a/python/slsdet/defines.py
+++ b/python/slsdet/defines.py
@@ -26,6 +26,7 @@ SHORT_STR_LENGTH=20
MAX_PATTERN_LENGTH=0x2000
MAX_PATTERN_LEVELS=6
M3_MAX_PATTERN_LEVELS=3
+MAX_NUM_COUNTERS=3
DEFAULT_STREAMING_TIMER_IN_MS=500
NUM_RX_THREAD_IDS=9
MAX_NUM_PACKETS=512
diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py
index 6148b72bd..d3dc29377 100755
--- a/python/slsdet/detector.py
+++ b/python/slsdet/detector.py
@@ -16,6 +16,7 @@ defs = slsDetectorDefs
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
from _slsdet import xy
+from .gaincaps import Mythen3GainCapsWrapper
from . import utils as ut
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
from .registers import Register, Adc_register
@@ -231,7 +232,7 @@ class Detector(CppDetectorApi):
"""
[Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] Hardware version of detector.
"""
- return ut.lhex(self.getHardwareVersion())
+ return self.getHardwareVersion()
@property
@element
@@ -263,11 +264,17 @@ class Detector(CppDetectorApi):
"""Receiver version """
return self.getReceiverVersion()
+ @property
+ @element
+ def serialnumber(self):
+ """Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
+ return ut.lhex(self.getSerialNumber())
+
@property
@element
def rx_threads(self):
"""
- Get thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping].
+ Get kernel thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping].
Note
-----
@@ -451,6 +458,56 @@ class Detector(CppDetectorApi):
def triggers(self, n_triggers):
self.setNumberOfTriggers(n_triggers)
+ def resetdacs(self, use_hardware_values):
+ self.resetToDefaultDacs(use_hardware_values)
+
+ def trigger(self):
+ self.sendSoftwareTrigger()
+
+ def blockingtrigger(self):
+ self.sendSoftwareTrigger(True)
+
+ @property
+ @element
+ def gaincaps(self):
+ """
+ [Mythen3] Gain caps. Enum: M3_GainCaps \n
+
+ Note
+ ----
+ Options: M3_GainCaps, M3_C15sh, M3_C30sh, M3_C50sh, M3_C225ACsh, M3_C15pre
+
+ Example
+ -------
+ >>> d.gaincaps
+ C15pre, C30sh
+ >>> d.gaincaps = M3_GainCaps.M3_C30sh
+ >>> d.gaincaps
+ C30sh
+ >>> d.gaincaps = M3_GainCaps.M3_C30sh | M3_GainCaps.M3_C15sh
+ >>> d.gaincaps
+ C15sh, C30sh
+ """
+ res = [Mythen3GainCapsWrapper(it) for it in self.getGainCaps()]
+ return res
+
+ @gaincaps.setter
+ def gaincaps(self, caps):
+ #convert to int if called with Wrapper
+ if isinstance(caps, Mythen3GainCapsWrapper):
+ self.setGainCaps(caps.value)
+ elif isinstance(caps, dict):
+ corr = {}
+ for key, value in caps.items():
+ if isinstance(value, Mythen3GainCapsWrapper):
+ corr[key] = value.value
+ else:
+ corr[key] = value
+ ut.set_using_dict(self.setGainCaps, corr)
+ else:
+ self.setGainCaps(caps)
+
+
@property
def exptime(self):
"""
@@ -498,7 +555,7 @@ class Detector(CppDetectorApi):
@exptime.setter
def exptime(self, t):
- if self.type == detectorType.MYTHEN3 and is_iterable(t):
+ if self.type == detectorType.MYTHEN3 and is_iterable(t) and not isinstance(t,dict):
for i, v in enumerate(t):
if isinstance(v, int):
v = float(v)
@@ -507,8 +564,6 @@ class Detector(CppDetectorApi):
ut.set_time_using_dict(self.setExptime, t)
-
-
@property
def period(self):
"""
@@ -647,6 +702,10 @@ class Detector(CppDetectorApi):
"""Start detector acquisition. Status changes to RUNNING or WAITING and automatically returns to idle at the end of acquisition."""
self.startDetector()
+ def clearbusy(self):
+ """If acquisition aborted during acquire command, use this to clear acquiring flag in shared memory before starting next acquisition"""
+ self.clearAcquiringFlag()
+
def rx_start(self):
"""Starts receiver listener for detector data packets and create a data file (if file write enabled)."""
self.startReceiver()
@@ -1563,6 +1622,20 @@ class Detector(CppDetectorApi):
def trimval(self, value):
ut.set_using_dict(self.setAllTrimbits, value)
+ @property
+ @element
+ def fliprows(self):
+ """
+ [Eiger] flips rows paramater sent to slsreceiver to stream as json parameter to flip rows in gui. \n
+ [Jungfrau] flips rows in the detector itself. For bottom module and number of interfaces must be set to 2. slsReceiver and slsDetectorGui does not handle.
+ """
+ return self.getFlipRows()
+
+ @fliprows.setter
+ def fliprows(self, value):
+ ut.set_using_dict(self.setFlipRows, value)
+
+
@property
@element
def master(self):
@@ -1588,6 +1661,19 @@ class Detector(CppDetectorApi):
def sync(self, value):
ut.set_using_dict(self.setSynchronization, value)
+ @property
+ @element
+ def badchannels(self):
+ """
+ [fname|none|0]\n\t[Gotthard2][Mythen3] Sets the bad channels (from file of bad channel numbers) to be masked out. None or 0 unsets all the badchannels.\n
+ [Mythen3] Also does trimming
+ """
+ return self.getBadChannels()
+
+ @badchannels.setter
+ def badchannels(self, value):
+ ut.set_using_dict(self.setBadChannels, value)
+
@property
@element
def lock(self):
@@ -1696,6 +1782,11 @@ class Detector(CppDetectorApi):
"""Gets the list of timing modes (timingMode) for this detector."""
return self.getTimingModeList()
+ @property
+ def readoutspeedlist(self):
+ """List of readout speed levels implemented for this detector."""
+ return self.getReadoutSpeedList()
+
@property
def templist(self):
"""List of temperature enums (dacIndex) implemented for this detector."""
@@ -1797,25 +1888,24 @@ class Detector(CppDetectorApi):
@property
def versions(self):
- if self.type == detectorType.EIGER:
- return {'type': self.type,
+ version_list = {'type': self.type,
'package': self.packageversion,
'client': self.clientversion,
- 'firmware (Beb)': self.firmwareversion,
- 'firmware(Febl)': self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT),
- 'firmware (Febr)': self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT),
'detectorserver': self.detectorserverversion,
- 'kernel': self.kernelversion,
- 'receiver': self.rx_version}
+ 'kernel': self.kernelversion}
- return {'type': self.type,
- 'package': self.packageversion,
- 'client': self.clientversion,
- 'firmware': self.firmwareversion,
- 'detectorserver': self.detectorserverversion,
- 'hardware':self.hardwareversion,
- 'kernel': self.kernelversion,
- 'receiver': self.rx_version}
+ if self.type == detectorType.EIGER:
+ version_list ['firmware (Beb)'] = self.firmwareversion
+ version_list ['firmware(Febl)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT)
+ version_list ['firmware (Febr)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT)
+ else:
+ version_list ['firmware'] = self.firmwareversion
+ version_list ['hardware'] = self.hardwareversion
+
+ if self.use_receiver:
+ version_list ['receiver'] = self.rx_version
+
+ return version_list
@property
def virtual(self):
@@ -3103,6 +3193,17 @@ class Detector(CppDetectorApi):
def dbitclk(self, value):
ut.set_using_dict(self.setDBITClock, value)
+ @property
+ @element
+ def adcvpp(self):
+ """[Ctb][Moench] Vpp of ADC. [0 -> 1V | 1 -> 1.14V | 2 -> 1.33V | 3 -> 1.6V | 4 -> 2V] \n
+ Advanced User function!"""
+ return self.getADCVpp(False)
+
+ @adcvpp.setter
+ def adcvpp(self, value):
+ ut.set_using_dict(self.setADCVpp, value, False)
+
@property
@element
def dbitpipeline(self):
@@ -3713,6 +3814,23 @@ class Detector(CppDetectorApi):
"""
return self.getMeasuredCurrent(dacIndex.I_POWER_IO)
+ @property
+ def clkphase(self):
+ """
+ [Gotthard2][Mythen3] Phase shift of all clocks.
+
+ Example
+ -------
+ >>> d.clkphase[0] = 20
+ >>> d.clkphase
+ 0: 20
+ 1: 10
+ 2: 20
+ 3: 10
+ 4: 10
+ 5: 5
+ """
+ return ClkPhaseProxy(self)
@property
def clkdiv(self):
diff --git a/python/slsdet/gaincaps.py b/python/slsdet/gaincaps.py
new file mode 100644
index 000000000..ab3acd381
--- /dev/null
+++ b/python/slsdet/gaincaps.py
@@ -0,0 +1,42 @@
+
+
+import _slsdet
+gc = _slsdet.slsDetectorDefs.M3_GainCaps
+
+
+class Mythen3GainCapsWrapper:
+ """Holds M3_GainCaps enums and facilitates printing"""
+ # 'M3_C10pre', 'M3_C15pre', 'M3_C15sh', 'M3_C225ACsh', 'M3_C30sh', 'M3_C50sh'
+ all_bits = gc.M3_C10pre | gc.M3_C15pre | gc.M3_C15sh | gc.M3_C225ACsh | gc.M3_C30sh | gc.M3_C50sh
+ all_caps = (gc.M3_C10pre, gc.M3_C15pre, gc.M3_C15sh, gc.M3_C225ACsh, gc.M3_C30sh, gc.M3_C50sh)
+ def __init__(self, value = 0):
+ self._validate(value)
+ self.value = value
+
+
+ def __eq__(self, other) -> bool:
+ if isinstance(other, Mythen3GainCapsWrapper):
+ return self.value == other.value
+ else:
+ return self.value == other
+
+
+ def __ne__(self, other) -> bool:
+ return not self.__eq__(other)
+
+ def __str__(self) -> str:
+ s = ', '.join(str(c).rsplit('_', 1)[1] for c in self.all_caps if self.value & c)
+ return s
+
+ def __repr__(self) -> str:
+ return self.__str__()
+
+ def _validate(self, value):
+ """Check that only bits representing real capacitors are set"""
+ if isinstance(value, gc):
+ return True
+ elif isinstance(value, int):
+ if value & (~self.all_bits):
+ raise ValueError(f"The value: {value} is not allowed for Mythen3GainCapsWrapper")
+ else:
+ raise ValueError("GainCaps can only be initialized from int or M3_GainCaps enum")
\ No newline at end of file
diff --git a/python/slsdet/mythen3.py b/python/slsdet/mythen3.py
index b018699df..369d6ac99 100644
--- a/python/slsdet/mythen3.py
+++ b/python/slsdet/mythen3.py
@@ -13,6 +13,7 @@ from .detector import Detector, freeze
from .dacs import DetectorDacs
import _slsdet
dacIndex = _slsdet.slsDetectorDefs.dacIndex
+gc_enums = _slsdet.slsDetectorDefs.M3_GainCaps
from .detector_property import DetectorProperty
@@ -62,4 +63,6 @@ class Mythen3(Detector):
@property
def dacs(self):
- return self._dacs
\ No newline at end of file
+ return self._dacs
+
+
diff --git a/python/slsdet/proxy.py b/python/slsdet/proxy.py
index a02a3267a..90c9f4523 100644
--- a/python/slsdet/proxy.py
+++ b/python/slsdet/proxy.py
@@ -4,6 +4,7 @@ from .utils import element_if_equal
from .enums import dacIndex
from .defines import M3_MAX_PATTERN_LEVELS, MAX_PATTERN_LEVELS
from _slsdet import slsDetectorDefs
+detectorType = slsDetectorDefs.detectorType
def set_proxy_using_dict(func, key, value, unpack = False):
@@ -87,7 +88,10 @@ class ClkDivProxy:
def __repr__(self):
rstr = ''
- for i in range(6):
+ num_clocks = 6
+ if self.det.type == detectorType.MYTHEN3:
+ num_clocks = 5
+ for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
@@ -96,10 +100,35 @@ class ClkDivProxy:
return rstr.strip('\n')
+class ClkPhaseProxy:
+ """
+ Proxy class to allow for more intuitive reading clock phase
+ """
+ def __init__(self, det):
+ self.det = det
+
+ def __getitem__(self, key):
+ return element_if_equal(self.det.getClockPhase(key))
+
+ def __setitem__(self, key, value):
+ set_proxy_using_dict(self.det.setClockPhase, key, value)
+
+ def __repr__(self):
+ rstr = ''
+ if self.det.type == detectorType.MYTHEN3:
+ num_clocks = 5
+ for i in range(num_clocks):
+ r = element_if_equal(self.__getitem__(i))
+ if isinstance(r, list):
+ rstr += ' '.join(f'{item}' for item in r)
+ else:
+ rstr += f'{i}: {r}\n'
+
+ return rstr.strip('\n')
class MaxPhaseProxy:
"""
- Proxy class to allow for more intuitive reading clockdivider
+ Proxy class to allow for more intuitive reading max clock phase shift
"""
def __init__(self, det):
self.det = det
@@ -109,7 +138,9 @@ class MaxPhaseProxy:
def __repr__(self):
rstr = ''
- for i in range(5):
+ if self.det.type == detectorType.MYTHEN3:
+ num_clocks = 5
+ for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
@@ -120,7 +151,7 @@ class MaxPhaseProxy:
class ClkFreqProxy:
"""
- Proxy class to allow for more intuitive reading clockdivider
+ Proxy class to allow for more intuitive reading clock frequency
"""
def __init__(self, det):
self.det = det
@@ -130,7 +161,9 @@ class ClkFreqProxy:
def __repr__(self):
rstr = ''
- for i in range(5):
+ if self.det.type == detectorType.MYTHEN3:
+ num_clocks = 5
+ for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
diff --git a/python/src/detector.cpp b/python/src/detector.cpp
index 708bfe0b3..9d7fba35e 100644
--- a/python/src/detector.cpp
+++ b/python/src/detector.cpp
@@ -224,6 +224,21 @@ void init_det(py::module &m) {
(void (Detector::*)(const std::string &, sls::Positions)) &
Detector::setBadChannels,
py::arg(), py::arg() = Positions{});
+ CppDetectorApi.def(
+ "getBadChannels",
+ (Result>(Detector::*)(sls::Positions) const) &
+ Detector::getBadChannels,
+ py::arg() = Positions{});
+ CppDetectorApi.def(
+ "setBadChannels",
+ (void (Detector::*)(const std::vector, sls::Positions)) &
+ Detector::setBadChannels,
+ py::arg(), py::arg() = Positions{});
+ CppDetectorApi.def(
+ "setBadChannels",
+ (void (Detector::*)(const std::vector>)) &
+ Detector::setBadChannels,
+ py::arg());
CppDetectorApi.def("isVirtualDetectorServer",
(Result(Detector::*)(sls::Positions) const) &
Detector::isVirtualDetectorServer,
diff --git a/python/tests/test_m3gaincaps.py b/python/tests/test_m3gaincaps.py
new file mode 100644
index 000000000..d1e5e4bcc
--- /dev/null
+++ b/python/tests/test_m3gaincaps.py
@@ -0,0 +1,24 @@
+import pytest
+
+from slsdet import Mythen3GainCapsWrapper
+from slsdet.enums import M3_GainCaps #this is the c++ enum
+
+
+def test_comapre_with_int():
+ c = Mythen3GainCapsWrapper(128) #C10pre
+ assert c == 128
+ assert c != 5
+ assert c != 1280
+
+def test_compare_with_other():
+ a = Mythen3GainCapsWrapper(128)
+ b = Mythen3GainCapsWrapper(1<<10)
+ c = Mythen3GainCapsWrapper(128)
+ assert a!=b
+ assert (a==b) == False
+ assert a==c
+
+def test_can_be_default_constructed():
+ c = Mythen3GainCapsWrapper()
+ assert c == 0
+
diff --git a/serverBin/ctbDetectorServerv7.0.0 b/serverBin/ctbDetectorServerv7.0.0
new file mode 120000
index 000000000..bc7dc05d2
--- /dev/null
+++ b/serverBin/ctbDetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/eigerDetectorServerv7.0.0 b/serverBin/eigerDetectorServerv7.0.0
new file mode 120000
index 000000000..06272c8f6
--- /dev/null
+++ b/serverBin/eigerDetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/gotthard2DetectorServerv7.0.0 b/serverBin/gotthard2DetectorServerv7.0.0
new file mode 120000
index 000000000..6e601d619
--- /dev/null
+++ b/serverBin/gotthard2DetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/gotthardDetectorServerv7.0.0 b/serverBin/gotthardDetectorServerv7.0.0
new file mode 120000
index 000000000..d8d2d651e
--- /dev/null
+++ b/serverBin/gotthardDetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/jungfrauDetectorServerv7.0.0 b/serverBin/jungfrauDetectorServerv7.0.0
new file mode 120000
index 000000000..c91c000b3
--- /dev/null
+++ b/serverBin/jungfrauDetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/moenchDetectorServerv7.0.0 b/serverBin/moenchDetectorServerv7.0.0
new file mode 120000
index 000000000..ea12c878c
--- /dev/null
+++ b/serverBin/moenchDetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0
\ No newline at end of file
diff --git a/serverBin/mythen3DetectorServerv7.0.0 b/serverBin/mythen3DetectorServerv7.0.0
new file mode 120000
index 000000000..f5fe23393
--- /dev/null
+++ b/serverBin/mythen3DetectorServerv7.0.0
@@ -0,0 +1 @@
+../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0
\ No newline at end of file
diff --git a/slsDetectorCalibration/dataStructures/jungfrauModuleData.h b/slsDetectorCalibration/dataStructures/jungfrauModuleData.h
index ab7b7e463..272a8a831 100644
--- a/slsDetectorCalibration/dataStructures/jungfrauModuleData.h
+++ b/slsDetectorCalibration/dataStructures/jungfrauModuleData.h
@@ -40,20 +40,31 @@ class jungfrauModuleData : public slsDetectorData {
out by a module i.e. using the slsReceiver (160x160 pixels, 40 packets
1286 large etc.) \param c crosstalk parameter for the output buffer
- */
+ */
+#ifndef ZMQ
+#define off sizeof(jf_header)
+#endif
+#ifdef ZMQ
+#define off 0
+#endif
+
+
jungfrauModuleData()
: slsDetectorData(1024, 512,
- 1024* 512 * 2 + sizeof(jf_header)) {
-
+ 1024* 512 * 2 + off) {
+
for (int ix = 0; ix < 1024; ix++) {
for (int iy = 0; iy < 512; iy++) {
- dataMap[iy][ix] = sizeof(jf_header) + (1024 * iy + ix) * 2;
+ dataMap[iy][ix] = off + (1024 * iy + ix) * 2;
#ifdef HIGHZ
dataMask[iy][ix] = 0x3fff;
#endif
}
}
+
+
+
iframe = 0;
// cout << "data struct created" << endl;
};
diff --git a/slsDetectorCalibration/jungfrauExecutables/Makefile.rawdataprocess b/slsDetectorCalibration/jungfrauExecutables/Makefile.rawdataprocess
new file mode 100644
index 000000000..d4fa773fc
--- /dev/null
+++ b/slsDetectorCalibration/jungfrauExecutables/Makefile.rawdataprocess
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: LGPL-3.0-or-other
+# Copyright (C) 2021 Contributors to the SLS Detector Package
+#module add CBFlib/0.9.5
+INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include
+
+LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
+
+MAIN=jungfrauClusterFinder.cpp
+
+
+all: jungfrauRawDataProcess
+
+jungfrauRawDataProcess: jungfrauRawDataProcess.cpp $(INCS) clean
+ g++ -o jungfrauRawDataProcess jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DMODULE
+
+jungfrauRawDataProcessStrx: jungfrauRawDataProcess.cpp $(INCS) clean
+ g++ -o jungfrauRawDataProcessStrx jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRX
+
+jungfrauRawDataProcessStrxAldo: jungfrauRawDataProcess.cpp $(INCS) clean
+ g++ -o jungfrauRawDataProcessStrxAldo jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRX -DALDO
+
+jungfrauRawDataProcessStrxOld: jungfrauRawDataProcess.cpp $(INCS) clean
+ g++ -o jungfrauRawDataProcessStrxOld jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRXOLD
+
+jungfrauRawDataProcessStrxOldAldo: jungfrauRawDataProcess.cpp $(INCS) clean
+ g++ -o jungfrauRawDataProcessStrxOldAldo jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRXOLD -DALDO
+
+
+
+jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
+ g++ -o jungfrauClusterFinder jungfrauClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL
+
+
+jungfrauClusterFinderHighZ: jungfrauClusterFinder.cpp $(INCS) clean
+ g++ -o jungfrauClusterFinderHighZ jungfrauClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DHIGHZ
+
+
+
+
+jungfrauMakeEta: jungfrauInterpolation.cpp $(INCS) clean
+ g++ -o jungfrauMakeEta jungfrauInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DFF
+
+jungfrauInterpolation: jungfrauInterpolation.cpp $(INCS) clean
+ g++ -o jungfrauInterpolation jungfrauInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
+
+jungfrauNoInterpolation: jungfrauNoInterpolation.cpp $(INCS) clean
+ g++ -o jungfrauNoInterpolation jungfrauNoInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
+
+jungfrauPhotonCounter: jungfrauPhotonCounter.cpp $(INCS) clean
+ g++ -o jungfrauPhotonCounter jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER
+
+jungfrauAnalog: jungfrauPhotonCounter.cpp $(INCS) clean
+ g++ -o jungfrauAnalog jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG
+
+jungfrauPhotonCounterHighZ: jungfrauPhotonCounter.cpp $(INCS) clean
+ g++ -o jungfrauPhotonCounterHighZ jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DHIGHZ
+
+jungfrauAnalogHighZ: jungfrauPhotonCounter.cpp $(INCS) clean
+ g++ -o jungfrauAnalogHighZ jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG -DHIGHZ
+
+clean:
+ rm -f jungfrauClusterFinder jungfrauMakeEta jungfrauInterpolation jungfrauNoInterpolation jungfrauPhotonCounter jungfrauAnalog
+
+
diff --git a/slsDetectorCalibration/jungfrauExecutables/Makefile.zmq b/slsDetectorCalibration/jungfrauExecutables/Makefile.zmq
index af60de798..007e8cfed 100644
--- a/slsDetectorCalibration/jungfrauExecutables/Makefile.zmq
+++ b/slsDetectorCalibration/jungfrauExecutables/Makefile.zmq
@@ -1,25 +1,19 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
-INCDIR= -I. -I../dataStructures ../tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/
+INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
#-L../../bin -lhdf5 -L.
#DESTDIR?=../bin
-all: moenchZmqProcess moenchZmq04Process
- #moenchZmqProcessCtbGui
+all: jungfrauZmqProcess
+ #jungfrauZmqProcessCtbGui
-moenchZmqProcess: moenchZmqProcess.cpp clean
- g++ -o moenchZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
-
-moenchZmq04Process: moenchZmqProcess.cpp clean
- g++ -o moench04ZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DMOENCH04
-
-#moenchZmqProcessCtbGui: moenchZmqProcess.cpp clean
-# g++ -o moenchZmqProcessCtbGui moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DCTBGUI
+jungfrauZmqProcess: jungfrauZmqProcess.cpp clean
+ g++ -o jungfrauZmqProcess jungfrauZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
clean:
- rm -f moenchZmqProcess
+ rm -f jungfrauZmqProcess
diff --git a/slsDetectorCalibration/jungfrauExecutables/Makefile.zmqrootdisp b/slsDetectorCalibration/jungfrauExecutables/Makefile.zmqrootdisp
new file mode 100644
index 000000000..86db24343
--- /dev/null
+++ b/slsDetectorCalibration/jungfrauExecutables/Makefile.zmqrootdisp
@@ -0,0 +1,26 @@
+ROOTSYS=/opt/cern/v6/root
+#/afs/psi.ch/project/sls_det_sof/roottware/root_v5.34.23_sl6_64bit
+
+
+
+LIBZMQDIR = $(PWD)
+LIBZMQ = -L$(LIBZMQDIR) -lzmq
+SHLIB_PATH=/opt/cern/v6/root/lib
+CMAKE_PREFIX_PATH=/opt/cern/v6/root
+DYLD_LIBRARY_PATH=/opt/cern/v6/root/lib
+
+
+INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
+LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
+#-L../../bin -lhdf5 -L.
+
+
+
+default: onlinedisp_zmq
+
+onlinedisp_zmq: onlinedisp_zmq.cpp onlinedisp_zmq.h
+# flags from root-config --cflags --glibs
+ g++ -o onlinedisp_zmq onlinedisp_zmq.cpp -I. -I$(ROOTSYS)/include -Wall -g -lm -L. -lzmq -pthread -lrt -L$(ROOTSYS)/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -m64 $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
+
+#-lCint
+
diff --git a/slsDetectorCalibration/jungfrauExecutables/examples.txt b/slsDetectorCalibration/jungfrauExecutables/examples.txt
new file mode 100644
index 000000000..b72d370e1
--- /dev/null
+++ b/slsDetectorCalibration/jungfrauExecutables/examples.txt
@@ -0,0 +1,10 @@
+
+
+ sls_detector_put rx_jsonpara detectorMode counting
+ sls_detector_put rx_jsonpara frameMode newPedestal
+ sls_detector_put rx_jsonpara frameMode frame
+ sls_detector_put rx_jsonpara detectorMode analog
+ sls_detector_put rx_jsonpara threshold 150
+ sls_detector_put rx_jsonpara threshold 0
+ sls_detector_put rx_jsonpara threshold 300
+ sls_detector_put rx_zmqhwm 50
diff --git a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp
new file mode 100644
index 000000000..1f574a49b
--- /dev/null
+++ b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp
@@ -0,0 +1,418 @@
+// SPDX-License-Identifier: LGPL-3.0-or-other
+// Copyright (C) 2021 Contributors to the SLS Detector Package
+//#include "sls/ansi.h"
+#include
+#undef CORR
+
+#define C_GHOST 0.0004
+
+#define CM_ROWS 50
+
+#define RAWDATA
+
+#ifndef JFSTRX
+#ifndef JFSTRXOLD
+#ifndef MODULE
+#include "jungfrauHighZSingleChipData.h"
+#endif
+#ifdef MODULE
+#include "jungfrauModuleData.h"
+#endif
+#endif
+#endif
+#ifdef JFSTRX
+#include "jungfrauLGADStrixelsData.h"
+#endif
+#ifdef JFSTRXOLD
+#include "jungfrauStrixelsHalfModuleOldDesign.h"
+#endif
+
+#include "multiThreadedCountingDetector.h"
+#include "singlePhotonDetector.h"
+
+#include
+#include