mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 21:37:13 +02:00
Compare commits
74 Commits
9.1.0
...
dev/multir
Author | SHA1 | Date | |
---|---|---|---|
ae19c1b102 | |||
6e6b1b64e4 | |||
7c8639b8ae | |||
c32732b22e | |||
1e6b6fef0a | |||
5ab2c1693e | |||
0b3cd499a8 | |||
884e17f0c4 | |||
d0ccf236c0 | |||
396b955db7 | |||
5f14eb32aa | |||
cfec7c18ec | |||
04583acb21 | |||
95e11d668a | |||
772e58c743 | |||
470e2633c3 | |||
3312adddd1 | |||
46152d2419 | |||
b5c82783d6 | |||
dc85a48864 | |||
dc8a34592a | |||
9d0ae22981 | |||
ec3cfc1138 | |||
8ec0d37cc6 | |||
c1406efec6 | |||
7844216812 | |||
fada23365e | |||
89726ab3ff | |||
f313f602ba | |||
6dd0a5b0dd | |||
c3b197f209 | |||
9f49ac6457 | |||
0b3ead6353 | |||
0da508a8b7 | |||
608eb1a436 | |||
c0bc6fe25a | |||
a0d540fd72 | |||
46a46b65e5 | |||
4f62b1a05c | |||
45dadf8b90 | |||
e8e84a4e72 | |||
2f390971e6 | |||
d9a50ad9f4 | |||
ce0450d498 | |||
7b531059a0 | |||
bc187bb198 | |||
eb8c34f53b | |||
3c2f149c22 | |||
5a8213024e | |||
ab01940769 | |||
010f736e80 | |||
4dcbcad435 | |||
8f8a92b9c5 | |||
684eee984d | |||
297c3752e3 | |||
fa504e6675 | |||
b9b4f1ae35 | |||
3c2062f23e | |||
e7247f1fee | |||
905a509a17 | |||
b4dc1dde6c | |||
964ab19b42 | |||
ce8911de10 | |||
d1e5b0bc42 | |||
4b3ed22f76 | |||
aad1ab0cf4 | |||
117637863d | |||
e933a25453 | |||
f1f369b48c | |||
6b149244d3 | |||
436d180e93 | |||
c43a4030a5 | |||
6e826d2840 | |||
315d49f8df |
@ -1,4 +1,4 @@
|
||||
name: CMake
|
||||
name: Native CMake Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@ -14,7 +14,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Configure and build using cmake
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
cache: 'pip'
|
||||
- run: pip install pytest numpy
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev libpng-dev libtiff-dev
|
||||
@ -27,12 +33,15 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build -j2 --config ${{env.BUILD_TYPE}}
|
||||
run: cmake --build ${{github.workspace}}/build -j4 --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Test
|
||||
- name: C++ unit tests
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C ${{env.BUILD_TYPE}} -j1
|
||||
|
||||
- name: Python unit tests
|
||||
working-directory: ${{github.workspace}}/build/bin
|
||||
run: |
|
||||
python -m pytest ${{github.workspace}}/python/tests
|
||||
|
||||
|
42
.github/workflows/conda_library.yaml
vendored
Normal file
42
.github/workflows/conda_library.yaml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Build slsdetlib
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||
python-version: ["3.12",]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
# The setup-miniconda action needs this to activate miniconda
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
channels: conda-forge
|
||||
|
||||
- name: Prepare
|
||||
run: conda install conda-build conda-verify pytest anaconda-client
|
||||
|
||||
- name: Disable upload
|
||||
run: conda config --set anaconda_upload no
|
||||
|
||||
- name: Build
|
||||
run: conda build conda-recipes/main-library --output-folder build_output
|
||||
|
||||
- name: Upload all Conda packages
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: conda-packages
|
||||
path: build_output/** # Uploads all packages
|
42
.github/workflows/conda_python.yaml
vendored
Normal file
42
.github/workflows/conda_python.yaml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: slsdet
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||
python-version: ["3.12",]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
# The setup-miniconda action needs this to activate miniconda
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
channels: conda-forge
|
||||
|
||||
- name: Prepare
|
||||
run: conda install conda-build conda-verify pytest anaconda-client
|
||||
|
||||
- name: Disable upload
|
||||
run: conda config --set anaconda_upload no
|
||||
|
||||
- name: Build
|
||||
run: conda build conda-recipes/python-client --output-folder build_output
|
||||
|
||||
- name: Upload all Conda packages
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: conda-packages
|
||||
path: build_output/** # Uploads all packages
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(slsDetectorPackage)
|
||||
|
||||
# Read VERSION file into project version
|
||||
@ -29,20 +29,40 @@ include(FetchContent)
|
||||
option(SLS_FETCH_ZMQ_FROM_GITHUB "Fetch zmq from github" OFF)
|
||||
option(SLS_FETCH_PYBIND11_FROM_GITHUB "Fetch pybind11 from github" OFF)
|
||||
|
||||
|
||||
|
||||
# Allow FetchContent_Populate to be called with a single argument
|
||||
# otherwise deprecated warning is issued
|
||||
# Note: From cmake 3.28 we can pass EXCLUDE_FROM_ALL to FetchContent_Declare
|
||||
# and avoid direct use of Populate
|
||||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
|
||||
cmake_policy(SET CMP0169 OLD)
|
||||
endif()
|
||||
|
||||
# Patch libzmq to set minimum cmake version to 3.15 to avoid warnings
|
||||
# with newer cmake versions
|
||||
# Patch is applied in the FetchContent_Declare
|
||||
set(SLS_LIBZMQ_VERSION "4.3.4")
|
||||
|
||||
|
||||
if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
||||
# Opt in to pull down a zmq version from github instead of
|
||||
# using the bundled verison
|
||||
# using the bundled version
|
||||
FetchContent_Declare(
|
||||
libzmq
|
||||
GIT_REPOSITORY https://github.com/zeromq/libzmq.git
|
||||
GIT_TAG v4.3.4
|
||||
GIT_TAG v${SLS_LIBZMQ_VERSION}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
||||
UPDATE_DISCONNECTED 1
|
||||
)
|
||||
else()
|
||||
# Standard behaviour use libzmq included in this repo (libs/libzmq)
|
||||
FetchContent_Declare(
|
||||
libzmq
|
||||
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq-4.3.4.tar.gz
|
||||
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq-${SLS_LIBZMQ_VERSION}.tar.gz
|
||||
URL_HASH MD5=cc20b769ac10afa352e5ed2769bb23b3
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
||||
UPDATE_DISCONNECTED 1
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -54,6 +74,11 @@ set(ENABLE_CPACK OFF CACHE BOOL "")
|
||||
set(ENABLE_CLANG OFF CACHE BOOL "")
|
||||
set(ENABLE_CURVE OFF CACHE BOOL "")
|
||||
set(ENABLE_DRAFTS OFF CACHE BOOL "")
|
||||
set(ENABLE_PRECOMPILED OFF CACHE BOOL "")
|
||||
set(WITH_DOC OFF CACHE BOOL "")
|
||||
set(WITH_DOCS OFF CACHE BOOL "")
|
||||
|
||||
|
||||
|
||||
# Using GetProperties and Populate to be able to exclude zmq
|
||||
# from install (not possible with FetchContent_MakeAvailable(libzmq))
|
||||
@ -191,7 +216,7 @@ endif()
|
||||
# to control options for the libraries
|
||||
if(NOT TARGET slsProjectOptions)
|
||||
add_library(slsProjectOptions INTERFACE)
|
||||
target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
|
||||
target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET slsProjectWarnings)
|
||||
@ -329,9 +354,15 @@ if (SLS_USE_CTBGUI)
|
||||
add_subdirectory(pyctbgui)
|
||||
endif(SLS_USE_CTBGUI)
|
||||
|
||||
configure_file( .clang-tidy
|
||||
${CMAKE_BINARY_DIR}/.clang-tidy
|
||||
)
|
||||
# Workaround for file note being copied to build directory
|
||||
# when issuing a python -m build
|
||||
# TODO! Proper fix
|
||||
if(EXISTS ".clang-tidy")
|
||||
configure_file(.clang-tidy
|
||||
${CMAKE_BINARY_DIR}/.clang-tidy
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if (SLS_BUILD_EXAMPLES)
|
||||
add_subdirectory(sample)
|
||||
|
158
RELEASE.txt
158
RELEASE.txt
@ -1,15 +1,21 @@
|
||||
SLS Detector Package Minor Release 9.1.0 released on 28.03.2025
|
||||
SLS Detector Package Major Release x.x.x released on xx.xx.202x
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v9.1.0 and v9.0.0
|
||||
This document describes the differences between vx.x.x and vx.0.2
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1 Changes
|
||||
1.1 New or Changed Features
|
||||
1.2 Resolved Features
|
||||
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
|
||||
@ -18,131 +24,11 @@ This document describes the differences between v9.1.0 and v9.0.0
|
||||
|
||||
|
||||
|
||||
1 Changes
|
||||
==========
|
||||
1 New, Changed or Resolved Features
|
||||
=====================================
|
||||
|
||||
|
||||
|
||||
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
|
||||
@ -150,10 +36,9 @@ This document describes the differences between v9.1.0 and v9.0.0
|
||||
|
||||
|
||||
Eiger 9.0.0
|
||||
Jungfrau 9.1.0
|
||||
Mythen3 9.1.0
|
||||
Jungfrau 9.0.0
|
||||
Mythen3 9.0.0
|
||||
Gotthard2 9.0.0
|
||||
Gotthard 9.0.0
|
||||
Moench 9.0.0
|
||||
|
||||
|
||||
@ -180,17 +65,14 @@ This document describes the differences between v9.1.0 and v9.0.0
|
||||
|
||||
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
||||
|
||||
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)
|
||||
Jungfrau 20.09.2023 (v1.5, HW v1.0) (updated in 8.0.0)
|
||||
21.09.2023 (v2.5, HW v2.0) (updated in 8.0.0)
|
||||
|
||||
Mythen3 13.11.2024 (v2.0) (updated in 9.0.0)
|
||||
Mythen3 11.10.2024 (v1.5) (updated in 9.0.0)
|
||||
|
||||
Gotthard2 03.10.2024 (v1.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)
|
||||
Moench 26.10.2023 (v2.0) (updated in 9.0.0)
|
||||
|
||||
|
||||
Detector Upgrade
|
||||
@ -204,8 +86,6 @@ This document describes the differences between v9.1.0 and v9.0.0
|
||||
Gotthard2 via command <.rbf>
|
||||
Moench via command <.pof>
|
||||
|
||||
Gotthard cannot be upgraded remotely
|
||||
|
||||
Except Eiger,
|
||||
upgrade
|
||||
Using command 'programfpga' or
|
||||
|
@ -1,11 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# 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
|
@ -1,14 +0,0 @@
|
||||
python:
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
|
||||
|
||||
c_stdlib:
|
||||
- sysroot # [linux]
|
||||
|
||||
c_stdlib_version: # [linux]
|
||||
- 2.17 # [linux]
|
@ -1,11 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
mkdir $PREFIX/lib
|
||||
mkdir $PREFIX/bin
|
||||
mkdir $PREFIX/include
|
||||
|
||||
|
||||
|
||||
cp build/bin/ctbGui $PREFIX/bin/.
|
||||
cp build/bin/libctbRootLib.so $PREFIX/lib/.
|
||||
|
@ -1,3 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
ctest -j2
|
@ -8,7 +8,7 @@ if [ ! -d "install" ]; then
|
||||
mkdir install
|
||||
fi
|
||||
cd build
|
||||
cmake .. \
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
|
||||
-DCMAKE_INSTALL_PREFIX=install \
|
||||
-DSLS_USE_TEXTCLIENT=ON \
|
||||
@ -18,7 +18,7 @@ cmake .. \
|
||||
-DSLS_USE_TESTS=ON \
|
||||
-DSLS_USE_PYTHON=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSLS_USE_HDF5=OFF\
|
||||
-DSLS_USE_HDF5=OFF \
|
||||
|
||||
NCORES=$(getconf _NPROCESSORS_ONLN)
|
||||
echo "Building using: ${NCORES} cores"
|
13
conda-recipes/main-library/conda_build_config.yaml
Normal file
13
conda-recipes/main-library/conda_build_config.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
c_compiler:
|
||||
- gcc # [linux]
|
||||
|
||||
c_stdlib:
|
||||
- sysroot # [linux]
|
||||
|
||||
cxx_compiler:
|
||||
- gxx # [linux]
|
||||
|
||||
|
||||
c_stdlib_version: # [linux]
|
||||
- 2.17 # [linux]
|
@ -4,7 +4,6 @@
|
||||
mkdir -p $PREFIX/lib
|
||||
mkdir -p $PREFIX/bin
|
||||
mkdir -p $PREFIX/include/sls
|
||||
# mkdir $PREFIX/include/slsDetectorPackage
|
||||
|
||||
#Shared and static libraries
|
||||
cp build/install/lib/* $PREFIX/lib/
|
||||
@ -15,8 +14,10 @@ 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/.
|
||||
cp build/install/bin/sls_detector $PREFIX/bin/.
|
||||
cp build/install/bin/slsReceiver $PREFIX/bin/.
|
||||
cp build/install/bin/slsMultiReceiver $PREFIX/bin/.
|
||||
cp build/install/bin/slsFrameSynchronizer $PREFIX/bin/.
|
||||
|
||||
|
||||
cp build/install/include/sls/* $PREFIX/include/sls
|
@ -1,10 +1,10 @@
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
|
||||
version: 2025.3.19
|
||||
|
||||
|
||||
source:
|
||||
path: ..
|
||||
path: ../..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
@ -15,19 +15,20 @@ build:
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{stdlib('c')}}
|
||||
- {{compiler('cxx')}}
|
||||
- cmake<=3.28
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
- git
|
||||
- cmake
|
||||
- ninja
|
||||
- qt 5.*
|
||||
|
||||
host:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- libgl-devel
|
||||
- libgl-devel # [linux]
|
||||
- libtiff
|
||||
- zlib
|
||||
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
@ -40,43 +41,14 @@ outputs:
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
- name: slsdet
|
||||
script: build_pylib.sh
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- python
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- setuptools
|
||||
- pybind11=2.13
|
||||
|
||||
host:
|
||||
- python
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- setuptools
|
||||
- pybind11=2.13
|
||||
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- python
|
||||
- numpy
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
test:
|
||||
imports:
|
||||
- slsdet
|
||||
|
||||
|
||||
- name: slsdetgui
|
||||
@ -91,7 +63,7 @@ outputs:
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qt 5.*
|
||||
- expat
|
||||
|
||||
|
||||
- name: moenchzmq
|
||||
script: copy_moench.sh
|
||||
@ -105,5 +77,3 @@ outputs:
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- expat
|
||||
|
16
conda-recipes/python-client/conda_build_config.yaml
Normal file
16
conda-recipes/python-client/conda_build_config.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
python:
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
|
||||
c_compiler:
|
||||
- gcc # [linux]
|
||||
|
||||
c_stdlib:
|
||||
- sysroot # [linux]
|
||||
|
||||
cxx_compiler:
|
||||
- gxx # [linux]
|
||||
|
||||
c_stdlib_version: # [linux]
|
||||
- 2.17 # [linux]
|
45
conda-recipes/python-client/meta.yaml
Normal file
45
conda-recipes/python-client/meta.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
package:
|
||||
name: slsdet
|
||||
version: 2025.3.19 #TODO! how to not duplicate this?
|
||||
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
script:
|
||||
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv # [not win]
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- python {{python}}
|
||||
- {{ compiler('c') }}
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
|
||||
|
||||
host:
|
||||
- cmake
|
||||
- ninja
|
||||
- python {{python}}
|
||||
- pip
|
||||
- scikit-build-core
|
||||
- pybind11 >=2.13.0
|
||||
- fmt
|
||||
- zeromq
|
||||
- nlohmann_json
|
||||
- catch2
|
||||
|
||||
run:
|
||||
- python {{python}}
|
||||
- numpy
|
||||
|
||||
|
||||
test:
|
||||
imports:
|
||||
- slsdet
|
||||
|
||||
|
||||
about:
|
||||
summary: An example project built with pybind11 and scikit-build.
|
||||
# license_file: LICENSE
|
@ -40,6 +40,7 @@ set(SPHINX_SOURCE_FILES
|
||||
src/pydetector.rst
|
||||
src/pyenums.rst
|
||||
src/pyexamples.rst
|
||||
src/pyPatternGenerator.rst
|
||||
src/servers.rst
|
||||
src/receiver_api.rst
|
||||
src/result.rst
|
||||
@ -53,6 +54,7 @@ set(SPHINX_SOURCE_FILES
|
||||
src/serverdefaults.rst
|
||||
src/quick_start_guide.rst
|
||||
src/troubleshooting.rst
|
||||
src/pattern.rst
|
||||
src/receivers.rst
|
||||
src/slsreceiver.rst
|
||||
src/udpheader.rst
|
||||
|
@ -21,7 +21,7 @@ print('\n\n\n\n SERVER CSV')
|
||||
|
||||
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
|
||||
detectors = ['Mythen3', 'Gotthard2', 'Eiger',
|
||||
'Jungfrau', 'Moench', 'Gotthard', 'Ctb']
|
||||
'Jungfrau', 'Moench', 'Ctb']
|
||||
|
||||
|
||||
for det in detectors:
|
||||
|
@ -320,61 +320,6 @@ Moench
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -131,42 +131,6 @@ Program from console
|
||||
|
||||
|
||||
|
||||
Gotthard I
|
||||
-----------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
.. _firmware upgrade using blaster for blackfin:
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
.. warning ::
|
||||
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
||||
| It is generally updated by us.
|
||||
|
||||
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
|
||||
|
||||
|
||||
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
|
||||
|
||||
#. In the Mode combo box, select "Active Serial Programming".
|
||||
|
||||
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
|
||||
|
||||
#. Click on 'Add file'. Select programming (pof) file provided by us.
|
||||
|
||||
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
|
||||
|
||||
#. In case of error messages, check the polarity of cable (that pin1 corresponds) and that the correct programming connector is selected.
|
||||
|
||||
#. Reboot the detector.
|
||||
|
||||
|
||||
Mythen III
|
||||
-----------
|
||||
|
||||
@ -396,7 +360,3 @@ How to get back mtd3 drive remotely (udpating kernel)
|
||||
more /proc/mtd # verify mtd3 is listed
|
||||
|
||||
|
||||
Last Resort using USB Blaster
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If none of these steps work, the last resort might be physically upgrading the firmware using a USB blaster, which also requires opening up the detector. Instructions for all the blackfin detectors are the same as the one for :ref:`gotthard firmware upgrade <firmware upgrade using blaster for blackfin>`.
|
@ -36,6 +36,8 @@ Welcome to slsDetectorPackage's documentation!
|
||||
pydetector
|
||||
pyenums
|
||||
pyexamples
|
||||
pyPatternGenerator
|
||||
pattern
|
||||
|
||||
.. toctree::
|
||||
:caption: Command line
|
||||
|
@ -288,56 +288,6 @@ Moench
|
||||
| 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
|
||||
^^^^^^^^^^^^^^^
|
||||
|
122
docs/src/pattern.rst
Normal file
122
docs/src/pattern.rst
Normal file
@ -0,0 +1,122 @@
|
||||
Pattern
|
||||
========================
|
||||
|
||||
This is a test and development feature implemented only for Ctb, Xilinx_Ctb and Mythen3.
|
||||
|
||||
A pattern is a sequence of 64-bit words which is executed using a clock on the FPGA. Each of the 64 bits is connected to a pin or internal signal of the FPGA. The purpose of a pattern is to provide a way to change these 64 signals with precise timing. Commands run by the detector server could manipulate the same signals as the pattern, but they cannot enforce a change in a specific clock cycle.
|
||||
|
||||
**Usage**
|
||||
|
||||
A pattern is written to memory on the FPGA using the patword command.
|
||||
|
||||
.. code-block::
|
||||
|
||||
patword 0x0000 0x000000000000000A
|
||||
patword 0x0001 0x000000000000000B
|
||||
patword 0x0002 0x000000000000000C
|
||||
patword 0x0003 0x000000000000000D
|
||||
patword 0x0004 0x000000000000000E
|
||||
|
||||
The example above writes a five-word pattern into FPGA memory. The first argument is the memory address, the second argument is the content to be written into this address. Before executing a pattern one has to set the address limits of the pattern:
|
||||
|
||||
.. code-block::
|
||||
|
||||
patlimits 0x0000 0x0004
|
||||
|
||||
This instructs the firmware to execute the commands from address 0 to 4 (including 0 and 4). The execution can be started from the pyctbgui or with the commands
|
||||
|
||||
.. code-block::
|
||||
|
||||
start [Ctb, Xilinx_Ctb]
|
||||
patternstart [Mythen3]
|
||||
|
||||
The maximal number of patword addresses is 8192. However, it is possible to extend the length of the pattern sequence using loops and wait commands. Loops can be configured with the following commands:
|
||||
|
||||
.. code-block::
|
||||
|
||||
patloop 0 0x0001 0x0003
|
||||
patnloop 0 7
|
||||
|
||||
The first argument of both commands is the ID of the loop. Ctb and Xilinx_Ctb can have 6 loops (ID 0-5), Mythen3 can have 4 loop definitions. The commands above configure the loop with ID 0 to run 7 times and jump from the patword with address 3 to the patword with address 1. Important: If patnloop is set to 1, the addresses 0x1-0x3 will execute exactly once; if it is set to 0, the pattern addresses will be skipped.
|
||||
|
||||
The same idea is used to introduce wait times. The example below causes the patword at address 0x0002 to be active for 9 clock cycles before the execution continues.
|
||||
|
||||
.. code-block::
|
||||
|
||||
patwait 0 0x0002
|
||||
patwaittime 0 9
|
||||
|
||||
Waits can be placed inside a loop and loops can be nested.
|
||||
|
||||
**patioctrl**
|
||||
|
||||
The function of each bit in the sequence of 64-bit words depends on the connected detector and firmware version. Some of the 64 bits might connect directly to pads of a chip. The patioctrl command is used to configure the direction of some of these signals (not all of them !! See tables below). Signals where the corresponding bit in the argument of patioctrl is set to 1 will be driven from the FPGA.
|
||||
|
||||
**patsetbit and patmask**
|
||||
|
||||
The functions patsetbit and patmask can be used to ignore a specific bit of the pattern.
|
||||
Example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
patmask 0x0101
|
||||
patsetbit 0x0001
|
||||
|
||||
Patmask configures bit 0 and 8 of the pattern to be set to their value in patsetbit. These bits will be ignored during pattern execution and will always be 0 (bit 8) and 1 (bit 0).
|
||||
|
||||
The mappings of bit positions in the pattern word to signals/pads of the FPGA are listed below for the three detector types where patterns are used. In the case of the two CTB's, connections of the signals to actual pads of a chip depend on the layout of the used detector adapter board. Therefore, each type of detector adapter board adds an additional mapping layer.
|
||||
|
||||
**CTB Pattern Bit Mapping**
|
||||
|
||||
.. table::
|
||||
|
||||
+----+---+------+----+----------+-------------------+----------------+
|
||||
| 63 | 62| 61-57| 56 | 55-48 | 47-32 | 31-0 |
|
||||
+----+---+------+----+----------+-------------------+----------------+
|
||||
| A | D| --- | T | EXTIO | DO, stream source | DIO |
|
||||
+----+---+------+----+----------+-------------------+----------------+
|
||||
|
||||
DIO: Driving the 32 FPGA pins corresponding to the lowest 32 bits of the patioctrl command. If bits in patioctrl are 0, the same bit positions in DIO will switch to input pins and connect to dbit sampling. Additionally, some of these 32 bits have an automatic override by detector-specific statemachines which is active whenever one of these statemachines is running (currently bits 7,8,11,14 and 20).
|
||||
|
||||
DO: Directly connected to 16 FPGA pins. Output only. Not influenced by patioctrl. Also connected to bit 47-32 in all Ctb dbit samples. All of them can be used as dbit sample trigger. In addition, every bit of DO can be selected as trigger for sending out a udp packet with samples to the receiver.
|
||||
|
||||
EXTIO: Similar to DIO, but not used as input to the fpga. With the corresponding patioctrl bits set to 0 these pins will switch to a high impedance mode and be ignored by the firmware.
|
||||
|
||||
T: trigger output
|
||||
|
||||
D: enable signal for digital sampling
|
||||
|
||||
A: adc enable
|
||||
|
||||
**Xilinx_CTB Pattern Bit Mapping**
|
||||
|
||||
.. table::
|
||||
|
||||
+-------+----------------+
|
||||
| 63-32 | 31-0 |
|
||||
+-------+----------------+
|
||||
| --- | DIO |
|
||||
+-------+----------------+
|
||||
|
||||
DIO: Driving the 32 FPGA pins corresponding to the lowest 32 bits of the patioctrl command. If bits in patioctrl are 0, the same bit positions in DIO will switch to input pins and connect to dbit sampling. Additionally, some of these 32 bits have an automatic override by detector-specific statemachines which is active whenever these sm's are running (currently bits 7,8,11,14 and 20).
|
||||
|
||||
|
||||
**Mythen3 Pattern Bit Mapping**
|
||||
|
||||
.. table::
|
||||
|
||||
+-------+--------+-------+--------+------------+----------+----------+-----+-----+
|
||||
| 63-33 | 32 | 31-25 | 24 | 23 | 22 | 21 | 20 | 19 |
|
||||
+-------+--------+-------+--------+------------+----------+----------+-----+-----+
|
||||
| --- | signARD| --- | CHSclk | cnt_rst | sto_rst | STATLOAD | STO | SIN |
|
||||
+-------+--------+-------+--------+------------+----------+----------+-----+-----+
|
||||
|
||||
.. table::
|
||||
|
||||
+---------+-----+-------+-------+----+-------+---------+--------+
|
||||
| 18 | 17 | 16-14 | 13 | 12 | 11 | 10 | 9-0 |
|
||||
+---------+-----+-------+-------+----+-------+---------+--------+
|
||||
| SR_MODE | clk | EN | PULSE | RD | CHSIN | ANAMode | TBLOAD |
|
||||
+---------+-----+-------+-------+----+-------+---------+--------+
|
||||
|
||||
For Mythen3 the pattern word only connects to output pins of the FPGA when the pattern is running. Afterwards the signals will switch back to other logic in the FPGA. Both CTB's hold the last executed pattern word until a new pattern is started.
|
34
docs/src/pyPatternGenerator.rst
Normal file
34
docs/src/pyPatternGenerator.rst
Normal file
@ -0,0 +1,34 @@
|
||||
PatternGenerator
|
||||
=====================================================
|
||||
|
||||
Python class to generate patterns for the Chip Test Board.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from slsdet import PatternGenerator
|
||||
|
||||
p = PatternGenerator()
|
||||
p.SB(5)
|
||||
p.PW()
|
||||
p.SB(8,9)
|
||||
p.PW()
|
||||
p.CB(5)
|
||||
|
||||
Created a pattern like this:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
patword 0x0000 0x0000000000000020
|
||||
patword 0x0001 0x0000000000000320
|
||||
patword 0x0002 0x0000000000000300
|
||||
patioctrl 0x0000000000000000
|
||||
patlimits 0x0000 0x0002
|
||||
...
|
||||
|
||||
.. py:currentmodule:: slsdet
|
||||
|
||||
.. autoclass:: PatternGenerator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
@ -89,18 +89,3 @@ DACS
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Gotthard
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: gotthard.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Gotthard DACS
|
||||
:file: gotthard-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
@ -27,12 +27,11 @@ Arguments
|
||||
-p, --port <port> : TCP communication port with client.
|
||||
-g, --nomodule : [Mythen3][Gotthard2]
|
||||
Generic or No Module mode. Skips detector type checks.
|
||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||
-d, --devel : Developer mode. Skips firmware checks.
|
||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||
-i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench]
|
||||
-i, --ignore-config : [Eiger][Jungfrau][Gotthard2][Moench]
|
||||
Ignore config file.
|
||||
-m, --master <master> : [Eiger][Mythen3][Gotthard][Gotthard2]
|
||||
-m, --master <master> : [Eiger][Mythen3][Gotthard2]
|
||||
Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger.
|
||||
-t, --top <top> : [Eiger] Set Top to 0 or 1. Precedence over config file.
|
||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||
@ -65,7 +64,7 @@ One can start the on-board detector server automatically upon powering on the bo
|
||||
/home/root/executables/eigerDetectorServer &> /dev/null &
|
||||
exit 0
|
||||
|
||||
Jungfrau | Moench | CTB | Gotthard I
|
||||
Jungfrau | Moench | CTB
|
||||
.. code-block:: bash
|
||||
|
||||
# Edit inittab on board
|
||||
|
@ -385,14 +385,6 @@ Cannot get data without a module attached
|
||||
You cannot get data without a module attached as a specific pin is floating. Attach module to get data.
|
||||
|
||||
|
||||
Gotthard
|
||||
----------
|
||||
|
||||
|
||||
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
|
||||
--------
|
||||
|
@ -92,14 +92,14 @@ Detector Enum
|
||||
================ ========
|
||||
GENERIC 0
|
||||
EIGER 1
|
||||
GOTTHARD 2
|
||||
GOTTHARD* 2
|
||||
JUNGFRAU 3
|
||||
CHIPTESTBOARD 4
|
||||
MOENCH 5
|
||||
MYTHEN3 6
|
||||
GOTTHARD2 7
|
||||
================ ========
|
||||
|
||||
* deprecated since v10.0.0
|
||||
|
||||
|
||||
Previous Versions
|
||||
|
@ -22,7 +22,6 @@ Binaries
|
||||
|
||||
eigerDetectorServer_virtual
|
||||
jungfrauDetectorServer_virtual
|
||||
gotthardDetectorServer_virtual
|
||||
gotthard2DetectorServer_virtual
|
||||
mythen3DetectorServer_virtual
|
||||
moenchDetectorServer_virtual
|
||||
|
@ -1,12 +0,0 @@
|
||||
# detector hostname
|
||||
hostname bchip007
|
||||
|
||||
# receiver pc hostname of 1Gb IP of the machine
|
||||
rx_hostname my_receiver_hostname
|
||||
|
||||
# output directory
|
||||
fpath /bigRAID/datadir_gotthard/rec_test_data
|
||||
|
||||
# high voltage
|
||||
highvoltage 120
|
||||
|
18
libs/libzmq/libzmq_cmake_version.patch
Normal file
18
libs/libzmq/libzmq_cmake_version.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dd3d8eb9..c0187747 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,11 +1,8 @@
|
||||
# CMake build script for ZeroMQ
|
||||
project(ZeroMQ)
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
|
||||
- cmake_minimum_required(VERSION 3.0.2)
|
||||
-else()
|
||||
- cmake_minimum_required(VERSION 2.8.12)
|
||||
-endif()
|
||||
+cmake_minimum_required(VERSION 3.15)
|
||||
+message(STATUS "Patched cmake version")
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckCCompilerFlag)
|
@ -12,5 +12,6 @@ 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
|
||||
slsDetectorPackage/9.1.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@ from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as Navigatio
|
||||
from pyctbgui.utils.defines import Defines
|
||||
from pyctbgui.utils.plotPattern import PlotPattern
|
||||
|
||||
from slsdet import DurationWrapper
|
||||
|
||||
class PatternTab(QtWidgets.QWidget):
|
||||
|
||||
@ -61,7 +62,10 @@ class PatternTab(QtWidgets.QWidget):
|
||||
getattr(self.view, f"lineEditLoop{i}Wait").editingFinished.connect(partial(self.setPatLoopWaitAddress, i))
|
||||
getattr(self.view,
|
||||
f"spinBoxLoop{i}Repetition").editingFinished.connect(partial(self.setPatLoopRepetition, i))
|
||||
getattr(self.view, f"spinBoxLoop{i}WaitTime").editingFinished.connect(partial(self.setPatLoopWaitTime, i))
|
||||
getattr(self.view, f"doubleSpinBoxLoop{i}WaitClocks").editingFinished.connect(partial(self.setPatLoopWaitClocks, i))
|
||||
getattr(self.view, f"spinBoxLoop{i}WaitInterval").editingFinished.connect(partial(self.setPatLoopWaitInterval, i))
|
||||
getattr(self.view, f"comboBoxLoop{i}WaitInterval").currentIndexChanged.connect(partial(self.setPatLoopWaitInterval, i))
|
||||
self.view.toolButtonTogglePageWaitTime.clicked.connect(self.setTogglePageWaitTime)
|
||||
self.view.pushButtonCompiler.clicked.connect(self.setCompiler)
|
||||
self.view.pushButtonUncompiled.clicked.connect(self.setUncompiledPatternFile)
|
||||
self.view.pushButtonPatternFile.clicked.connect(self.setPatternFile)
|
||||
@ -91,7 +95,8 @@ class PatternTab(QtWidgets.QWidget):
|
||||
self.getPatLoopStartStopAddress(i)
|
||||
self.getPatLoopWaitAddress(i)
|
||||
self.getPatLoopRepetition(i)
|
||||
self.getPatLoopWaitTime(i)
|
||||
self.getPatLoopWaitClocks(i)
|
||||
self.getPatLoopWaitInterval(i)
|
||||
|
||||
# Pattern Tab functions
|
||||
|
||||
@ -182,17 +187,67 @@ class PatternTab(QtWidgets.QWidget):
|
||||
self.det.patnloop[level] = spinBox.value()
|
||||
self.getPatLoopRepetition(level)
|
||||
|
||||
def getPatLoopWaitTime(self, level):
|
||||
def getPatLoopWaitClocks(self, level):
|
||||
retval = self.det.patwaittime[level]
|
||||
spinBox = getattr(self.view, f"spinBoxLoop{level}WaitTime")
|
||||
spinBox = getattr(self.view, f"doubleSpinBoxLoop{level}WaitClocks")
|
||||
spinBox.editingFinished.disconnect()
|
||||
spinBox.setValue(retval)
|
||||
spinBox.editingFinished.connect(partial(self.setPatLoopWaitTime, level))
|
||||
spinBox.editingFinished.connect(partial(self.setPatLoopWaitClocks, level))
|
||||
|
||||
def setPatLoopWaitClocks(self, level):
|
||||
spinBox = getattr(self.view, f"doubleSpinBoxLoop{level}WaitClocks")
|
||||
self.det.patwaittime[level] = int(spinBox.value())
|
||||
self.getPatLoopWaitClocks(level)
|
||||
|
||||
def getPatLoopWaitInterval(self, level):
|
||||
retval = self.det.getPatternWaitInterval(level)[0].count()
|
||||
spinBox = getattr(self.view, f"spinBoxLoop{level}WaitInterval")
|
||||
comboBox = getattr(self.view, f"comboBoxLoop{level}WaitInterval")
|
||||
spinBox.editingFinished.disconnect()
|
||||
comboBox.currentIndexChanged.disconnect()
|
||||
# Converting to right time unit for period
|
||||
if retval >= 1e9:
|
||||
comboBox.setCurrentIndex(0)
|
||||
spinBox.setValue(retval / 1e9)
|
||||
elif retval >= 1e6:
|
||||
comboBox.setCurrentIndex(1)
|
||||
spinBox.setValue(retval / 1e6)
|
||||
elif retval >= 1e3:
|
||||
comboBox.setCurrentIndex(2)
|
||||
spinBox.setValue(retval / 1e3)
|
||||
else:
|
||||
comboBox.setCurrentIndex(3)
|
||||
spinBox.setValue(retval)
|
||||
spinBox.editingFinished.connect(partial(self.setPatLoopWaitInterval, level))
|
||||
comboBox.currentIndexChanged.connect(partial(self.setPatLoopWaitInterval, level))
|
||||
|
||||
def setPatLoopWaitInterval(self, level):
|
||||
spinBox = getattr(self.view, f"spinBoxLoop{level}WaitInterval")
|
||||
comboBox = getattr(self.view, f"comboBoxLoop{level}WaitInterval")
|
||||
value = spinBox.value()
|
||||
if comboBox.currentIndex() == 0:
|
||||
value *= 1e9
|
||||
elif comboBox.currentIndex() == 1:
|
||||
value *= 1e6
|
||||
elif comboBox.currentIndex() == 2:
|
||||
value *= 1e3
|
||||
t = DurationWrapper()
|
||||
t.set_count(int(value))
|
||||
self.det.patwaittime[level] = t
|
||||
self.getPatLoopWaitInterval(level)
|
||||
|
||||
def setTogglePageWaitTime(self):
|
||||
if self.view.stackedWidgetWaitTime.currentIndex() == 0:
|
||||
self.view.stackedWidgetWaitTime.setCurrentIndex(1)
|
||||
self.view.labelWaitTime.setText("Time")
|
||||
for i in range(Defines.pattern.loops_count):
|
||||
self.getPatLoopWaitInterval(i)
|
||||
else:
|
||||
self.view.stackedWidgetWaitTime.setCurrentIndex(0)
|
||||
self.view.labelWaitTime.setText("Clocks")
|
||||
for i in range(Defines.pattern.loops_count):
|
||||
self.getPatLoopWaitClocks(i)
|
||||
|
||||
def setPatLoopWaitTime(self, level):
|
||||
spinBox = getattr(self.view, f"spinBoxLoop{level}WaitTime")
|
||||
self.det.patwaittime[level] = spinBox.value()
|
||||
self.getPatLoopWaitTime(level)
|
||||
|
||||
def setCompiler(self):
|
||||
response = QtWidgets.QFileDialog.getOpenFileName(
|
||||
@ -450,7 +505,7 @@ class PatternTab(QtWidgets.QWidget):
|
||||
f"{getattr(self.view, f'lineEditLoop{i}Stop').text()}")
|
||||
|
||||
commands.append(f"patwait {i} {getattr(self.view, f'lineEditLoop{i}Wait').text()}")
|
||||
commands.append(f"patwaittime {i} {getattr(self.view, f'spinBoxLoop{i}WaitTime').text()}")
|
||||
commands.append(f"patwaittime {i} {getattr(self.view, f'doubleSpinBoxLoop{i}WaitClocks').text()}")
|
||||
commands.append(f"patlimits {self.view.lineEditStartAddress.text()}, {self.view.lineEditStopAddress.text()}")
|
||||
# commands.append(f"patfname {self.view.lineEditPatternFile.text()}")
|
||||
return commands
|
||||
|
File diff suppressed because it is too large
Load Diff
27
pyproject.toml
Normal file
27
pyproject.toml
Normal file
@ -0,0 +1,27 @@
|
||||
[build-system]
|
||||
requires = ["scikit-build-core>=0.10", "pybind11", "numpy"]
|
||||
build-backend = "scikit_build_core.build"
|
||||
|
||||
[project]
|
||||
name = "slsdet"
|
||||
version = "2025.3.19"
|
||||
|
||||
|
||||
[tool.cibuildwheel]
|
||||
before-all = "uname -a"
|
||||
|
||||
[tool.scikit-build]
|
||||
build.verbose = true
|
||||
cmake.build-type = "Release"
|
||||
install.components = ["python"]
|
||||
|
||||
|
||||
[tool.scikit-build.cmake.define]
|
||||
#Only build the control software and python ext
|
||||
SLS_USE_RECEIVER = "OFF"
|
||||
SLS_USE_RECEIVER_BINARIES = "OFF"
|
||||
SLS_USE_TEXTCLIENT = "OFF"
|
||||
SLS_BUILD_SHARED_LIBRARIES = "OFF"
|
||||
|
||||
SLS_USE_PYTHON = "ON"
|
||||
SLS_INSTALL_PYTHONEXT = "ON"
|
@ -20,13 +20,14 @@ target_link_libraries(_slsdet PUBLIC
|
||||
|
||||
|
||||
set_target_properties(_slsdet PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/slsdet
|
||||
)
|
||||
|
||||
#Copy Python code
|
||||
set( PYTHON_FILES
|
||||
slsdet/__init__.py
|
||||
slsdet/adcs.py
|
||||
slsdet/bits.py
|
||||
slsdet/dacs.py
|
||||
slsdet/powers.py
|
||||
slsdet/decorators.py
|
||||
@ -37,8 +38,8 @@ set( PYTHON_FILES
|
||||
slsdet/enums.py
|
||||
slsdet/errors.py
|
||||
slsdet/gaincaps.py
|
||||
slsdet/gotthard.py
|
||||
slsdet/pattern.py
|
||||
slsdet/PatternGenerator.py
|
||||
slsdet/gotthard2.py
|
||||
slsdet/moench.py
|
||||
slsdet/proxy.py
|
||||
@ -71,9 +72,18 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
||||
if(SLS_INSTALL_PYTHONEXT)
|
||||
install(TARGETS _slsdet
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/python
|
||||
LIBRARY DESTINATION slsdet
|
||||
COMPONENT python
|
||||
)
|
||||
install(
|
||||
FILES ${PYTHON_FILES}
|
||||
DESTINATION slsdet
|
||||
COMPONENT python
|
||||
)
|
||||
install(
|
||||
FILES ../VERSION
|
||||
DESTINATION slsdet
|
||||
COMPONENT python
|
||||
)
|
||||
|
||||
install(FILES ${PYTHON_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
||||
install(FILES ../VERSION DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
||||
endif()
|
@ -55,7 +55,6 @@ servers = [
|
||||
# "jungfrauDetectorServer",
|
||||
"mythen3DetectorServer",
|
||||
# "gotthard2DetectorServer",
|
||||
# "gotthardDetectorServer",
|
||||
# "ctbDetectorServer",
|
||||
# "moenchDetectorServer",
|
||||
]
|
||||
|
@ -1,77 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
"""
|
||||
Setup file for slsdet
|
||||
Build upon the pybind11 example found here: https://github.com/pybind/python_example
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from setuptools import setup, find_packages
|
||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
||||
|
||||
def read_version():
|
||||
try:
|
||||
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():
|
||||
"""
|
||||
Keep this a function if we need some fancier logic later
|
||||
"""
|
||||
print('Prefix: ', os.environ['CONDA_PREFIX'])
|
||||
return os.environ['CONDA_PREFIX']
|
||||
|
||||
|
||||
#TODO migrate to CMake build or fetch files from cmake?
|
||||
ext_modules = [
|
||||
Pybind11Extension(
|
||||
'_slsdet',
|
||||
['src/main.cpp',
|
||||
'src/enums.cpp',
|
||||
'src/current.cpp',
|
||||
'src/detector.cpp',
|
||||
'src/network.cpp',
|
||||
'src/pattern.cpp',
|
||||
'src/scan.cpp',
|
||||
'src/duration.cpp',
|
||||
'src/DurationWrapper.cpp',
|
||||
'src/pedestal.cpp',
|
||||
]
|
||||
|
||||
|
||||
,
|
||||
include_dirs=[
|
||||
os.path.join(get_conda_path(), 'include'),
|
||||
|
||||
],
|
||||
libraries=['SlsDetector', 'SlsSupport', 'SlsReceiver'],
|
||||
library_dirs=[
|
||||
os.path.join(get_conda_path(), 'lib'),
|
||||
],
|
||||
language='c++'
|
||||
),
|
||||
]
|
||||
|
||||
setup(
|
||||
name='slsdet',
|
||||
version=__version__,
|
||||
author='Erik Frojdh',
|
||||
author_email='erik.frojdh@psi.ch',
|
||||
url='https://github.com/slsdetectorgroup/slsDetectorPackage',
|
||||
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,
|
||||
)
|
226
python/slsdet/PatternGenerator.py
Normal file
226
python/slsdet/PatternGenerator.py
Normal file
@ -0,0 +1,226 @@
|
||||
from . import Detector, Pattern
|
||||
from .bits import setbit, clearbit
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class PatternGenerator:
|
||||
"""
|
||||
Class to generate a pattern for the SLS detector. Intents to as closely as possible
|
||||
mimic the old pattern generation in the C code.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.pattern = Pattern()
|
||||
self.iaddr = 0
|
||||
|
||||
def SB(self, *bits):
|
||||
"""
|
||||
Set one or several bits. Change will take affect with the next PW.
|
||||
"""
|
||||
for bit in bits:
|
||||
self.pattern.word[self.iaddr] = setbit(bit, self.pattern.word[self.iaddr])
|
||||
return self.pattern.word[self.iaddr]
|
||||
|
||||
def CB(self, *bits):
|
||||
"""
|
||||
Clear one or several bits. Change will take affect with the next PW.
|
||||
"""
|
||||
for bit in bits:
|
||||
self.pattern.word[self.iaddr] = clearbit(bit, self.pattern.word[self.iaddr])
|
||||
return self.pattern.word[self.iaddr]
|
||||
|
||||
|
||||
def _pw(self, verbose = False):
|
||||
if verbose:
|
||||
print(f'{self.iaddr:#06x} {self.pattern.word[self.iaddr]:#018x}')
|
||||
|
||||
#Limits are inclusive so we need to increment the address before writing the next word
|
||||
self.pattern.limits[1] = self.iaddr
|
||||
self.iaddr += 1
|
||||
self.pattern.word[self.iaddr] = self.pattern.word[self.iaddr-1]
|
||||
|
||||
def PW(self, x = 1, verbose = False):
|
||||
for i in range(x):
|
||||
self._pw(verbose)
|
||||
|
||||
# def REPEAT(self, x, verbose = False):
|
||||
# for i in range(x):
|
||||
# self._pw(verbose)
|
||||
|
||||
# def PW2(self, verbose = 0):
|
||||
# self.REPEAT(2, verbose)
|
||||
|
||||
|
||||
def CLOCKS(self, bit, times = 1, length = 1, verbose = False):
|
||||
"""
|
||||
clocks "bit" n "times", every half clock is long "length"
|
||||
length is optional, default value is 1
|
||||
"""
|
||||
for i in range(0, times):
|
||||
self.SB(bit); self.PW(length, verbose)
|
||||
self.CB(bit); self.PW(length, verbose)
|
||||
|
||||
def CLOCK(self, bit, length = 1, verbose = 0):
|
||||
self.CLOCKS(bit, 1, length ,verbose)
|
||||
|
||||
def serializer(self, value, serInBit, clkBit, nbits, msbfirst = True, length = 1):
|
||||
"""serializer(value,serInBit,clkBit,nbits,msbfirst=1,length=1)
|
||||
Produces the .pat file needed to serialize a word into a shift register.
|
||||
value: value to be serialized
|
||||
serInBit: control bit corresponding to serial in
|
||||
clkBit: control bit corresponding to the clock
|
||||
nbits: number of bits of the target register to load
|
||||
msbfirst: if 1 pushes in the MSB first (default),
|
||||
if 0 pushes in the LSB first
|
||||
length: length of all the PWs in the pattern
|
||||
It produces no output because it modifies directly the members of the class pat via SB and CB"""
|
||||
|
||||
c = value
|
||||
self.CB(serInBit, clkBit)
|
||||
self.PW(length) #generate initial line with clk and serIn to 0
|
||||
|
||||
start = 0
|
||||
stop = nbits
|
||||
step = 1
|
||||
|
||||
if msbfirst:
|
||||
start = nbits - 1
|
||||
stop = -1
|
||||
step =- 1 #reverts loop if msb has to be pushed in first
|
||||
|
||||
for i in range(start, stop, step):
|
||||
if c & (1<<i):
|
||||
self.SB(serInBit)
|
||||
self.PW(length)
|
||||
else:
|
||||
self.CB(serInBit)
|
||||
self.PW(length)
|
||||
self.SB(clkBit)
|
||||
self.PW(length)
|
||||
self.CB(clkBit)
|
||||
self.PW(length)
|
||||
|
||||
self.CB(serInBit, clkBit)
|
||||
self.PW(length) #generate final line with clk and serIn to 0
|
||||
|
||||
|
||||
#NOT IMPLEMENTED YET
|
||||
#TODO! What should setstop do? Or can we remove it?
|
||||
#def setstop():
|
||||
#
|
||||
|
||||
def setoutput(self, bit):
|
||||
self.pattern.ioctrl = setbit(bit, self.pattern.ioctrl)
|
||||
|
||||
def setinput(self, bit):
|
||||
self.pattern.ioctrl= clearbit(bit, self.pattern.ioctrl)
|
||||
|
||||
#TODO! What should setclk do? Or can we remove it?
|
||||
# def setclk(bit):
|
||||
# self.clkctrl=self.setbit(bit,self.clkctrl)
|
||||
|
||||
def setinputs(self, *args):
|
||||
for i in args:
|
||||
self.setinput(i)
|
||||
|
||||
def setoutputs(self, *args):
|
||||
for i in args:
|
||||
self.setoutput(i)
|
||||
|
||||
#def setclks(self, *args):
|
||||
# for i in args:
|
||||
# self.setclk(i)
|
||||
|
||||
def setnloop(self, i, reps):
|
||||
self.pattern.nloop[i] = reps
|
||||
|
||||
def setstartloop(self, i):
|
||||
"""
|
||||
Set startloop[i] to the current address.
|
||||
"""
|
||||
self.pattern.startloop[i] = self.iaddr
|
||||
|
||||
def setstoploop(self, i):
|
||||
"""
|
||||
Set stoploop[i] to the current address.
|
||||
"""
|
||||
self.pattern.stoploop[i] = self.iaddr
|
||||
|
||||
|
||||
def setstart(self):
|
||||
"""
|
||||
Set start of pattern to the current address.
|
||||
"""
|
||||
self.pattern.limits[0]=self.iaddr
|
||||
|
||||
|
||||
def setstop(self,l):
|
||||
"""
|
||||
Set stop of pattern to the current address.
|
||||
"""
|
||||
self.pattern.limits[1] = self.iaddr
|
||||
|
||||
|
||||
def setwaitpoint(self, i):
|
||||
"""
|
||||
Set wait[i] to the current address.
|
||||
"""
|
||||
self.pattern.wait[i] = self.iaddr
|
||||
|
||||
|
||||
def setwaittime(self, i, t):
|
||||
"""
|
||||
Set waittime[i] to t.
|
||||
"""
|
||||
self.pattern.waittime[i] = t
|
||||
|
||||
|
||||
def setwait(self, i, t):
|
||||
"""
|
||||
Set wait[i] to the current address and waittime[i] to t.
|
||||
"""
|
||||
self.setwait(i)
|
||||
self.setwaittime(i, t)
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return textwrap.dedent(f"""\
|
||||
PatternBuilder:
|
||||
patlimits: {self.pattern.limits}
|
||||
startloop: {self.pattern.startloop}
|
||||
stoploop: {self.pattern.stoploop}
|
||||
nloop: {self.pattern.nloop}
|
||||
wait: {self.pattern.wait}
|
||||
waittime: {self.pattern.waittime}""")
|
||||
|
||||
def __str__(self):
|
||||
return self.pattern.str()
|
||||
|
||||
def print(self):
|
||||
print(self)
|
||||
|
||||
def save(self, fname):
|
||||
"""Save pattern to text file"""
|
||||
fname = str(fname) #Accept also Path objects, but C++ code needs a string
|
||||
self.pattern.save(fname)
|
||||
|
||||
def load(self, fname):
|
||||
"""Load pattern from text file"""
|
||||
fname = str(fname) #Accept also Path objects, but C++ code needs a string
|
||||
n = self.pattern.load(fname)
|
||||
|
||||
#If the firs and only word is 0 we assume an empty pattern
|
||||
if n == 1 and self.pattern.word[0] == 0:
|
||||
n = 0
|
||||
self.iaddr = n
|
||||
|
||||
#To make PW work as expected we need to set 1+last word to the last word
|
||||
if n > 0:
|
||||
self.pattern.word[n] = self.pattern.word[n-1]
|
||||
|
||||
|
||||
def send_to_detector(self, det):
|
||||
"""
|
||||
Load the pattern into the detector.
|
||||
"""
|
||||
det.setPattern(self.pattern)
|
@ -9,12 +9,12 @@ from .detector import Detector
|
||||
from .jungfrau import Jungfrau
|
||||
from .mythen3 import Mythen3
|
||||
from .gotthard2 import Gotthard2
|
||||
from .gotthard import Gotthard
|
||||
from .moench import Moench
|
||||
from .pattern import Pattern, patternParameters
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
from .PatternGenerator import PatternGenerator
|
||||
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
xy = _slsdet.xy
|
||||
defs = _slsdet.slsDetectorDefs
|
||||
|
||||
@ -41,3 +41,6 @@ def read_version():
|
||||
|
||||
__version__ = read_version()
|
||||
|
||||
|
||||
|
||||
|
||||
|
31
python/slsdet/bits.py
Normal file
31
python/slsdet/bits.py
Normal file
@ -0,0 +1,31 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
def setbit(bit, word):
|
||||
if isinstance(word, np.generic):
|
||||
mask = word.dtype.type(1)
|
||||
mask = mask << bit
|
||||
else:
|
||||
mask = 1 << bit
|
||||
return word | mask
|
||||
|
||||
|
||||
def setbit_arr(bit, arr):
|
||||
arr |= arr.dtype.type(1 << bit)
|
||||
|
||||
|
||||
def clearbit(bit, word):
|
||||
"""
|
||||
Clear the bit at position bit in word.
|
||||
Two paths to avoid converting the types.
|
||||
"""
|
||||
if isinstance(word, np.generic):
|
||||
mask = word.dtype.type(1)
|
||||
mask = ~(mask << bit)
|
||||
else:
|
||||
mask = ~(1 << bit)
|
||||
return word & mask
|
||||
|
||||
|
||||
def clearbit_arr(bit, arr):
|
||||
arr &= arr.dtype.type(~(1 << bit))
|
@ -4,7 +4,7 @@ from .detector import Detector, freeze
|
||||
from .utils import element_if_equal
|
||||
from .dacs import DetectorDacs, NamedDacs
|
||||
from .powers import DetectorPowers, NamedPowers
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
from .detector_property import DetectorProperty
|
||||
from functools import partial
|
||||
import numpy as np
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
from .detector import freeze
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
class Dac(DetectorProperty):
|
||||
|
@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
from _slsdet import CppDetectorApi
|
||||
from _slsdet import slsDetectorDefs
|
||||
from _slsdet import IpAddr, MacAddr
|
||||
from ._slsdet import CppDetectorApi
|
||||
from ._slsdet import slsDetectorDefs
|
||||
from ._slsdet import IpAddr, MacAddr
|
||||
|
||||
runStatus = slsDetectorDefs.runStatus
|
||||
timingMode = slsDetectorDefs.timingMode
|
||||
@ -15,7 +15,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 ._slsdet import xy
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
from . import utils as ut
|
||||
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
||||
@ -274,7 +274,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def serialnumber(self):
|
||||
"""Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
|
||||
"""Jungfrau][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
|
||||
return ut.lhex(self.getSerialNumber())
|
||||
|
||||
@property
|
||||
@ -312,7 +312,7 @@ class Detector(CppDetectorApi):
|
||||
-----
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
|
||||
[Mythen3] Options: 8, 16, 32 \n
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16
|
||||
[Jungfrau][Moench][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16
|
||||
"""
|
||||
return self.getDynamicRange()
|
||||
|
||||
@ -372,7 +372,6 @@ class Detector(CppDetectorApi):
|
||||
|
||||
[Eiger] Use threshold command to load settings
|
||||
[Jungfrau] GAIN0, HIGHGAIN0 \n
|
||||
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
|
||||
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
|
||||
[Eiger] settings loaded from file found in settingspath
|
||||
[Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN
|
||||
@ -404,7 +403,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def framesl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -635,7 +634,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def periodl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
[Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Period left for current frame.
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -657,7 +656,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def delay(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
|
||||
[Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
|
||||
|
||||
:getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTrigger
|
||||
|
||||
@ -699,7 +698,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def delayl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||
[Jungfrau][Moench][CTB][Mythen3][Gotthard2][Xilinx Ctb] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -1444,8 +1443,6 @@ class Detector(CppDetectorApi):
|
||||
@udp_srcip.setter
|
||||
def udp_srcip(self, ip):
|
||||
if ip == "auto":
|
||||
if self.type == detectorType.GOTTHARD:
|
||||
raise NotImplementedError('Auto for udp_srcip cannot be used for GotthardI')
|
||||
ip = socket.gethostbyname(self.hostname[0])
|
||||
ip = ut.make_ip(ip)
|
||||
ut.set_using_dict(self.setSourceUDPIP, ip)
|
||||
@ -1526,7 +1523,6 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
[Gotthard] 0, 90, 110, 120, 150, 180, 200 \n
|
||||
[Eiger][Mythen3][Gotthard2] 0 - 200 \n
|
||||
[Jungfrau][Moench][Ctb] 0, 60 - 200
|
||||
"""
|
||||
@ -1654,7 +1650,7 @@ class Detector(CppDetectorApi):
|
||||
def master(self):
|
||||
"""
|
||||
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n
|
||||
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master.
|
||||
[Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master.
|
||||
"""
|
||||
return self.getMaster()
|
||||
|
||||
@ -1912,7 +1908,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def adcreg(self):
|
||||
"""[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register
|
||||
"""[Jungfrau][Moench][Ctb] Writes to an adc register
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -1941,7 +1937,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def triggersl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n
|
||||
[Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -2206,7 +2202,7 @@ class Detector(CppDetectorApi):
|
||||
Note
|
||||
-----
|
||||
Default: AUTO_TIMING \n
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Jungfrau][Moench][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
"""
|
||||
@ -2263,7 +2259,7 @@ class Detector(CppDetectorApi):
|
||||
def type(self):
|
||||
""" Returns detector type.
|
||||
Enum: detectorType
|
||||
[EIGER, JUNGFRAU, GOTTHARD, MOENCH, MYTHEN3, GOTTHARD2, CHIPTESTBOARD]
|
||||
[EIGER, JUNGFRAU, MOENCH, MYTHEN3, GOTTHARD2, CHIPTESTBOARD]
|
||||
|
||||
:setter: Not implemented
|
||||
"""
|
||||
@ -3479,15 +3475,13 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def adcphase(self):
|
||||
"""[Gotthard][Jungfrau][Moench][CTB] Sets phase shift of ADC clock.
|
||||
"""[Jungfrau][Moench][CTB] Sets phase shift of ADC clock.
|
||||
|
||||
Note
|
||||
-----
|
||||
[Jungfrau][Moench] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
|
||||
[Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
|
||||
[Gotthard] Relative phase shift.
|
||||
[Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.
|
||||
|
||||
:getter: Not implemented for Gotthard
|
||||
"""
|
||||
return self.getADCPhase()
|
||||
|
||||
@ -3702,7 +3696,13 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patwaittime(self):
|
||||
"""
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles of loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles of loop level provided.
|
||||
|
||||
Info
|
||||
----
|
||||
|
||||
:getter: Always return in clock cycles. To get in DurationWrapper, use getPatternWaitInterval
|
||||
:setter: Accepts either a value in clock cycles or a time unit (timedelta, DurationWrapper)
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3713,41 +3713,85 @@ class Detector(CppDetectorApi):
|
||||
0: 5
|
||||
1: 20
|
||||
2: 30
|
||||
>>> # using timedelta (up to microseconds precision)
|
||||
>>> from datetime import timedelta
|
||||
>>> d.patwaittime[0] = timedelta(seconds=1, microseconds=3)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in seconds
|
||||
>>> from slsdet import DurationWrapper
|
||||
>>> d.patwaittime[0] = DurationWrapper(1.2)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in ns
|
||||
>>> t = DurationWrapper()
|
||||
>>> t.set_count(500)
|
||||
>>> d.patwaittime = t
|
||||
>>>
|
||||
>>> # to get in clock cycles
|
||||
>>> d.patwaittime
|
||||
1000
|
||||
>>>
|
||||
>>> d.getPatternWaitInterval(0)
|
||||
sls::DurationWrapper(total_seconds: 1.23 count: 1230000000)
|
||||
"""
|
||||
return PatWaitTimeProxy(self)
|
||||
|
||||
@property
|
||||
@element
|
||||
def patwaittime0(self):
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 0 time in clock cycles."""
|
||||
return self.getPatternWaitTime(0)
|
||||
|
||||
@patwaittime0.setter
|
||||
def patwaittime0(self, nclk):
|
||||
nclk = ut.merge_args(0, nclk)
|
||||
ut.set_using_dict(self.setPatternWaitTime, *nclk)
|
||||
def create_patwaittime_property(level):
|
||||
docstring_template ="""
|
||||
Deprecated command. Use patwaittime instead.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles of loop level {level} provided.
|
||||
|
||||
@property
|
||||
@element
|
||||
def patwaittime1(self):
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 1 time in clock cycles."""
|
||||
return self.getPatternWaitTime(1)
|
||||
Info
|
||||
----
|
||||
|
||||
@patwaittime1.setter
|
||||
def patwaittime1(self, nclk):
|
||||
nclk = ut.merge_args(1, nclk)
|
||||
ut.set_using_dict(self.setPatternWaitTime, *nclk)
|
||||
:getter: Always return in clock cycles. To get in DurationWrapper, use getPatternWaitInterval
|
||||
:setter: Accepts either a value in clock cycles or a time unit (timedelta, DurationWrapper)
|
||||
|
||||
Example
|
||||
-------
|
||||
>>> d.patwaittime{level} = 5
|
||||
>>> d.patwaittime{level}
|
||||
5
|
||||
>>> # using timedelta (up to microseconds precision)
|
||||
>>> from datetime import timedelta
|
||||
>>> d.patwaittime{level} = timedelta(seconds=1, microseconds=3)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in seconds
|
||||
>>> from slsdet import DurationWrapper
|
||||
>>> d.patwaittime{level} = DurationWrapper(1.2)
|
||||
>>>
|
||||
>>> # using DurationWrapper to set in ns
|
||||
>>> t = DurationWrapper()
|
||||
>>> t.set_count(500)
|
||||
>>> d.patwaittime{level} = t
|
||||
>>>
|
||||
>>> # to get in clock cycles
|
||||
>>> d.patwaittime{level}
|
||||
1000
|
||||
>>>
|
||||
>>> d.getPatternWaitInterval(level)
|
||||
sls::DurationWrapper(total_seconds: 1.23 count: 1230000000)
|
||||
"""
|
||||
@property
|
||||
@element
|
||||
def patwaittime(self):
|
||||
return self.getPatternWaitClocks(level)
|
||||
|
||||
@property
|
||||
@element
|
||||
def patwaittime2(self):
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 2 time in clock cycles."""
|
||||
return self.getPatternWaitTime(2)
|
||||
@patwaittime.setter
|
||||
def patwaittime(self, value):
|
||||
if isinstance(value, (int, float)) and not isinstance(value, bool):
|
||||
nclk = ut.merge_args(level, value)
|
||||
ut.set_using_dict(self.setPatternWaitClocks, level, *nclk)
|
||||
else:
|
||||
ut.set_time_using_dict(self.setPatternWaitInterval, level, value)
|
||||
|
||||
patwaittime.__doc__ = docstring_template.format(level=level)
|
||||
|
||||
@patwaittime2.setter
|
||||
def patwaittime2(self, nclk):
|
||||
nclk = ut.merge_args(2, nclk)
|
||||
ut.set_using_dict(self.setPatternWaitTime, *nclk)
|
||||
return patwaittime
|
||||
|
||||
patwaittime0 = create_patwaittime_property(0)
|
||||
patwaittime1 = create_patwaittime_property(1)
|
||||
patwaittime2 = create_patwaittime_property(2)
|
||||
|
||||
|
||||
@property
|
||||
@ -4038,27 +4082,6 @@ class Detector(CppDetectorApi):
|
||||
return ClkDivProxy(self)
|
||||
|
||||
|
||||
"""
|
||||
---------------------------<<<Gotthard specific>>>---------------------------
|
||||
"""
|
||||
|
||||
@property
|
||||
def exptimel(self):
|
||||
"""[Gotthard] Exposure time left for current frame.
|
||||
|
||||
:getter: always returns in seconds. To get in DurationWrapper, use getExptimeLeft
|
||||
:setter: Not Implemented
|
||||
|
||||
Example
|
||||
-----------
|
||||
>>> d.exptimel
|
||||
181.23
|
||||
>>> d.getExptimeLeft()
|
||||
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||
"""
|
||||
t = self.getExptimeLeft()
|
||||
return reduce_time(t)
|
||||
|
||||
|
||||
"""
|
||||
---------------------------<<<Mythen3 specific>>>---------------------------
|
||||
|
@ -11,7 +11,7 @@ Created on Wed Dec 6 11:51:18 2017
|
||||
from .detector import Detector
|
||||
from .temperature import Temperature, DetectorTemperature
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
@ -15,8 +15,8 @@ if dt === detectorType.EIGER:
|
||||
"""
|
||||
|
||||
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
for name, cls in _slsdet.slsDetectorDefs.__dict__.items():
|
||||
if isinstance(cls, type):
|
||||
exec(f'{name} = {cls.__module__}.{cls.__qualname__}')
|
||||
exec(f'{name} = _slsdet.{cls.__qualname__}')
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
gc = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
This file contains the specialization for the Moench detector
|
||||
"""
|
||||
|
||||
|
||||
from .detector import Detector, freeze
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
# @freeze
|
||||
|
||||
# vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp, ib_test_c
|
||||
class GotthardDacs(DetectorDacs):
|
||||
_dacs = [('vref_ds', dacIndex.VREF_DS, 0, 4000, 660),
|
||||
('vcascn_pb', dacIndex.VCASCN_PB, 0, 4000, 650),
|
||||
('vcascp_pb,', dacIndex.VCASCP_PB, 0, 4000, 1480),
|
||||
('vout_cm', dacIndex.VOUT_CM, 0, 4000, 1520),
|
||||
('vcasc_out', dacIndex.VCASC_OUT, 0, 4000, 1320),
|
||||
('vin_cm', dacIndex.VIN_CM, 0, 4000, 1350),
|
||||
('vref_comp', dacIndex.VREF_COMP, 0, 4000, 350),
|
||||
('ib_test_c', dacIndex.IB_TESTC, 0, 4000, 2001),
|
||||
]
|
||||
_dacnames = [_d[0] for _d in _dacs]
|
||||
|
||||
#vthreshold??
|
||||
|
||||
|
||||
@freeze
|
||||
class Gotthard(Detector):
|
||||
"""
|
||||
Subclassing Detector to set up correct dacs and detector specific
|
||||
functions.
|
||||
"""
|
||||
_detector_dynamic_range = [16]
|
||||
|
||||
|
||||
_settings = ['standard', 'highgain', 'lowgain', 'veryhighgain', 'verylowgain']
|
||||
"""available settings for Eiger, note almost always standard"""
|
||||
|
||||
def __init__(self, id=0):
|
||||
super().__init__(id)
|
||||
self._frozen = False
|
||||
self._dacs = GotthardDacs(self)
|
||||
|
||||
@property
|
||||
def dacs(self):
|
||||
return self._dacs
|
@ -11,7 +11,7 @@ from .detector import Detector, freeze
|
||||
|
||||
# from .adcs import Adc, DetectorAdcs
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
@ -11,7 +11,7 @@ from .detector import Detector, freeze
|
||||
|
||||
# from .adcs import Adc, DetectorAdcs
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
@ -9,7 +9,7 @@ This file contains the specialization for the Moench detector
|
||||
|
||||
from .detector import Detector, freeze
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
|
@ -11,7 +11,7 @@ from .detector import Detector, freeze
|
||||
|
||||
# from .adcs import Adc, DetectorAdcs
|
||||
from .dacs import DetectorDacs
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
gc_enums = _slsdet.slsDetectorDefs.M3_GainCaps
|
||||
from .detector_property import DetectorProperty
|
||||
|
@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
|
||||
from _slsdet import Pattern
|
||||
from ._slsdet import Pattern
|
||||
|
||||
|
||||
class patternParameters(_slsdet.patternParameters):
|
||||
|
@ -3,7 +3,7 @@
|
||||
from .detector_property import DetectorProperty
|
||||
from functools import partial
|
||||
import numpy as np
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
from .detector import freeze
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
class Power(DetectorProperty):
|
||||
|
@ -3,7 +3,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
|
||||
from ._slsdet import slsDetectorDefs
|
||||
detectorType = slsDetectorDefs.detectorType
|
||||
|
||||
|
||||
@ -275,10 +275,13 @@ class PatWaitTimeProxy:
|
||||
self.det = det
|
||||
|
||||
def __getitem__(self, key):
|
||||
return element_if_equal(self.det.getPatternWaitTime(key))
|
||||
return element_if_equal(self.det.getPatternWaitClocks(key))
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
set_proxy_using_dict(self.det.setPatternWaitTime, key, value)
|
||||
if isinstance(value, (int, float)) and not isinstance(value, bool):
|
||||
set_proxy_using_dict(self.det.setPatternWaitClocks, key, value)
|
||||
else:
|
||||
set_proxy_using_dict(self.det.setPatternWaitInterval, key, value)
|
||||
|
||||
def __repr__(self):
|
||||
max_levels = MAX_PATTERN_LEVELS
|
||||
|
@ -6,7 +6,7 @@ but not directly used in controlling the detector
|
||||
"""
|
||||
|
||||
from collections import namedtuple
|
||||
import _slsdet #C++ lib
|
||||
from . import _slsdet #C++ lib
|
||||
import functools
|
||||
import datetime as dt
|
||||
import pathlib
|
||||
|
@ -1293,20 +1293,6 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(defs::collectionMode, sls::Positions)) &
|
||||
Detector::setCollectionMode,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("getROI",
|
||||
(Result<defs::ROI>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getROI,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("setROI",
|
||||
(void (Detector::*)(defs::ROI, int)) & Detector::setROI,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def(
|
||||
"clearROI", (void (Detector::*)(sls::Positions)) & Detector::clearROI,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("getExptimeLeft",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getExptimeLeft,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("getNumberOfBursts",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getNumberOfBursts,
|
||||
@ -1861,13 +1847,22 @@ void init_det(py::module &m) {
|
||||
Detector::setPatternWaitAddr,
|
||||
py::arg(), py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getPatternWaitTime",
|
||||
"getPatternWaitClocks",
|
||||
(Result<uint64_t>(Detector::*)(int, sls::Positions) const) &
|
||||
Detector::getPatternWaitTime,
|
||||
Detector::getPatternWaitClocks,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("setPatternWaitTime",
|
||||
CppDetectorApi.def("setPatternWaitClocks",
|
||||
(void (Detector::*)(int, uint64_t, sls::Positions)) &
|
||||
Detector::setPatternWaitTime,
|
||||
Detector::setPatternWaitClocks,
|
||||
py::arg(), py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getPatternWaitInterval",
|
||||
(Result<sls::ns>(Detector::*)(int, sls::Positions) const) &
|
||||
Detector::getPatternWaitInterval,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("setPatternWaitInterval",
|
||||
(void (Detector::*)(int, sls::ns, sls::Positions)) &
|
||||
Detector::setPatternWaitInterval,
|
||||
py::arg(), py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("getPatternMask",
|
||||
(Result<uint64_t>(Detector::*)(sls::Positions)) &
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <chrono>
|
||||
#include "py_headers.h"
|
||||
|
||||
#include "DurationWrapper.h"
|
||||
@ -19,4 +20,25 @@ void init_duration(py::module &m) {
|
||||
<< " count: " << self.count() << ")";
|
||||
return ss.str();
|
||||
});
|
||||
|
||||
m.def(
|
||||
"test_return_DurationWrapper",
|
||||
[]() {
|
||||
DurationWrapper t(1.3);
|
||||
return t;
|
||||
},
|
||||
R"(
|
||||
Test function to return a DurationWrapper object. Ensures that the automatic conversion in typecaster.h works.
|
||||
)");
|
||||
|
||||
m.def(
|
||||
"test_duration_to_ns",
|
||||
[](const std::chrono::nanoseconds t) {
|
||||
//Duration wrapper is used to be able to convert from time in python to chrono::nanoseconds
|
||||
//return count to have something to test
|
||||
return t.count();
|
||||
},
|
||||
R"(
|
||||
Test function convert DurationWrapper or number to chrono::ns. Ensures that the automatic conversion in typecaster.h works.
|
||||
)"); // default value to test the default constructor
|
||||
}
|
||||
|
@ -121,13 +121,9 @@ void init_enums(py::module &m) {
|
||||
.value("VTHRESHOLD", slsDetectorDefs::dacIndex::VTHRESHOLD)
|
||||
.value("IO_DELAY", slsDetectorDefs::dacIndex::IO_DELAY)
|
||||
.value("VREF_DS", slsDetectorDefs::dacIndex::VREF_DS)
|
||||
.value("VCASCN_PB", slsDetectorDefs::dacIndex::VCASCN_PB)
|
||||
.value("VCASCP_PB", slsDetectorDefs::dacIndex::VCASCP_PB)
|
||||
.value("VOUT_CM", slsDetectorDefs::dacIndex::VOUT_CM)
|
||||
.value("VCASC_OUT", slsDetectorDefs::dacIndex::VCASC_OUT)
|
||||
.value("VIN_CM", slsDetectorDefs::dacIndex::VIN_CM)
|
||||
.value("VREF_COMP", slsDetectorDefs::dacIndex::VREF_COMP)
|
||||
.value("IB_TESTC", slsDetectorDefs::dacIndex::IB_TESTC)
|
||||
.value("VB_COMP", slsDetectorDefs::dacIndex::VB_COMP)
|
||||
.value("VDD_PROT", slsDetectorDefs::dacIndex::VDD_PROT)
|
||||
.value("VIN_COM", slsDetectorDefs::dacIndex::VIN_COM)
|
||||
|
@ -20,8 +20,10 @@ void init_pattern(py::module &m) {
|
||||
});
|
||||
|
||||
py::class_<sls::Pattern> Pattern(m, "Pattern");
|
||||
Pattern.def(py::init());
|
||||
Pattern.def("load", &sls::Pattern::load);
|
||||
Pattern.def("data", (pat * (sls::Pattern::*)()) & sls::Pattern::data,
|
||||
Pattern.def(py::init())
|
||||
.def("load", &sls::Pattern::load)
|
||||
.def("save", &sls::Pattern::save)
|
||||
.def("str", &sls::Pattern::str)
|
||||
.def("data", (pat * (sls::Pattern::*)()) & sls::Pattern::data,
|
||||
py::return_value_policy::reference);
|
||||
}
|
||||
|
@ -54,11 +54,16 @@ template <> struct type_caster<std::chrono::nanoseconds> {
|
||||
value = duration_cast<nanoseconds>(duration<double>(PyFloat_AsDouble(src.ptr())));
|
||||
return true;
|
||||
}
|
||||
// If invoked with an int we assume it is nanoseconds and convert, same as in chrono.h
|
||||
if (PyLong_Check(src.ptr())) {
|
||||
value = duration_cast<nanoseconds>(duration<int64_t>(PyLong_AsLongLong(src.ptr())));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Lastly if we were actually called with a DurationWrapper object we get
|
||||
// the number of nanoseconds and create a std::chrono::nanoseconds from it
|
||||
py::object py_cls = py::module::import("_slsdet").attr("DurationWrapper");
|
||||
py::object py_cls = py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
||||
if (py::isinstance(src, py_cls)){
|
||||
sls::DurationWrapper *cls = src.cast<sls::DurationWrapper *>();
|
||||
value = nanoseconds(cls->count());
|
||||
@ -77,7 +82,7 @@ template <> struct type_caster<std::chrono::nanoseconds> {
|
||||
* set the count from chrono::nanoseconds and return
|
||||
*/
|
||||
static handle cast(std::chrono::nanoseconds src, return_value_policy /* policy */, handle /* parent */) {
|
||||
py::object py_cls = py::module::import("_slsdet").attr("DurationWrapper");
|
||||
py::object py_cls = py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
||||
py::object* obj = new py::object;
|
||||
*obj = py_cls();
|
||||
sls::DurationWrapper *dur = obj->cast<sls::DurationWrapper *>();
|
||||
|
58
python/tests/test_DurationWrapper.py
Normal file
58
python/tests/test_DurationWrapper.py
Normal file
@ -0,0 +1,58 @@
|
||||
import pytest
|
||||
|
||||
from slsdet import DurationWrapper
|
||||
|
||||
#import the compiled extension to use test functions for the automatic conversion
|
||||
from slsdet import _slsdet
|
||||
|
||||
|
||||
def test_default_construction_of_DurationWrapper():
|
||||
"""Test default construction of DurationWrapper"""
|
||||
t = DurationWrapper()
|
||||
assert t.count() == 0
|
||||
assert t.total_seconds() == 0
|
||||
|
||||
def test_construction_of_DurationWrapper():
|
||||
"""Test construction of DurationWrapper with total_seconds"""
|
||||
t = DurationWrapper(5)
|
||||
assert t.count() == 5e9
|
||||
assert t.total_seconds() == 5
|
||||
|
||||
def test_set_count_on_DurationWrapper():
|
||||
"""Test set_count on DurationWrapper"""
|
||||
t = DurationWrapper()
|
||||
t.set_count(10)
|
||||
assert t.count() == 10
|
||||
assert t.total_seconds() == 10e-9
|
||||
t.set_count(0)
|
||||
assert t.count() == 0
|
||||
assert t.total_seconds() == 0
|
||||
|
||||
|
||||
def test_return_a_DurationWrapper_from_cpp():
|
||||
"""Test returning a DurationWrapper from C++"""
|
||||
t = _slsdet.test_return_DurationWrapper()
|
||||
assert t.count() == 1.3e9
|
||||
assert t.total_seconds() == 1.3
|
||||
|
||||
def test_call_a_cpp_function_with_a_duration_wrapper():
|
||||
"""C++ functions can accept a DurationWrapper"""
|
||||
t = DurationWrapper(5)
|
||||
assert _slsdet.test_duration_to_ns(t) == 5e9
|
||||
|
||||
def test_call_a_cpp_function_converting_number_to_DurationWrapper():
|
||||
"""int and float can be converted to std::chrono::nanoseconds"""
|
||||
assert _slsdet.test_duration_to_ns(0) == 0
|
||||
assert _slsdet.test_duration_to_ns(3) == 3e9
|
||||
assert _slsdet.test_duration_to_ns(1.3) == 1.3e9
|
||||
assert _slsdet.test_duration_to_ns(10e-9) == 10
|
||||
|
||||
def test_call_a_cpp_function_with_datetime_timedelta():
|
||||
"""datetime.timedelta can be converted to std::chrono::nanoseconds"""
|
||||
import datetime
|
||||
t = datetime.timedelta(seconds=5)
|
||||
assert _slsdet.test_duration_to_ns(t) == 5e9
|
||||
t = datetime.timedelta(seconds=0)
|
||||
assert _slsdet.test_duration_to_ns(t) == 0
|
||||
t = datetime.timedelta(seconds=1.3)
|
||||
assert _slsdet.test_duration_to_ns(t) == 1.3e9
|
152
python/tests/test_PatternGenerator.py
Normal file
152
python/tests/test_PatternGenerator.py
Normal file
@ -0,0 +1,152 @@
|
||||
import pytest
|
||||
from slsdet import PatternGenerator
|
||||
|
||||
|
||||
def apply_detconf(p):
|
||||
"""
|
||||
Hacky workaround to apply detConf_mh02 to a pattern
|
||||
"""
|
||||
DACMON = 0
|
||||
cnt_en_3 = 1
|
||||
pulse_counter_en = 2
|
||||
cnt_en_1 = 3
|
||||
par_load = 4
|
||||
pulse_mux_ctr = 5
|
||||
reset_cnt = 6
|
||||
reset_periphery = 7
|
||||
config_load = 8
|
||||
cnt_en_0 = 9
|
||||
tbl = 10
|
||||
clk_ext = 11
|
||||
trimbit_load_reg = 12
|
||||
store = 13
|
||||
data_in = 14
|
||||
en_pll_clk = 15
|
||||
cnt_en_2 = 16
|
||||
DACINT = 17
|
||||
data_out_slow = 18 #IN
|
||||
COMP2_MON = 19 #IN
|
||||
start_read = 20
|
||||
dac_store = 21
|
||||
CNT3_MON = 22 #IN
|
||||
EN_PIX_DIG_MON = 23
|
||||
clk_sel = 24
|
||||
BUSY = 25 #IN
|
||||
COMP3_MON = 26 #IN
|
||||
CNT2_MON = 27 #IN
|
||||
|
||||
dbit_ena=62 #FIFO LATCH
|
||||
adc_ena=63 #ADC ENABLE
|
||||
|
||||
#FPGA input/ouutputs
|
||||
p.setoutput(DACMON)
|
||||
p.setoutput(cnt_en_3)
|
||||
p.setoutput(pulse_counter_en)
|
||||
p.setoutput(cnt_en_1)
|
||||
p.setoutput(par_load)
|
||||
p.setoutput(pulse_mux_ctr)
|
||||
p.setoutput(reset_cnt)
|
||||
p.setoutput(reset_periphery)
|
||||
p.setoutput(cnt_en_0)
|
||||
p.setoutput(tbl)
|
||||
p.setoutput(clk_ext)
|
||||
p.setoutput(config_load)
|
||||
p.setoutput(trimbit_load_reg)
|
||||
p.setoutput(store)
|
||||
p.setoutput(data_in)
|
||||
p.setoutput(en_pll_clk)
|
||||
p.setoutput(cnt_en_2)
|
||||
p.setoutput(DACINT)
|
||||
p.setinput(data_out_slow)
|
||||
p.setinput(COMP2_MON)
|
||||
p.setoutput(start_read)
|
||||
p.setoutput(dac_store)
|
||||
p.setinput(CNT3_MON)
|
||||
p.setoutput(EN_PIX_DIG_MON)
|
||||
p.setoutput(clk_sel)
|
||||
p.setinput(BUSY)
|
||||
p.setinput(COMP3_MON)
|
||||
p.setinput(CNT2_MON)
|
||||
|
||||
#system signals
|
||||
p.setoutput(adc_ena)
|
||||
# FIFO LATCH
|
||||
p.setoutput(dbit_ena)
|
||||
return p
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def test_first_two_PW():
|
||||
p = PatternGenerator()
|
||||
|
||||
#The pattern is created with a single empty word
|
||||
assert p.pattern.limits[0] == 0
|
||||
assert p.pattern.limits[1] == 0
|
||||
|
||||
p.SB(8)
|
||||
p.PW()
|
||||
|
||||
#When doing the first PW the empty word is overwritten
|
||||
assert p.pattern.limits[0] == 0
|
||||
assert p.pattern.limits[1] == 0
|
||||
assert p.pattern.word[0] == 256
|
||||
|
||||
p.SB(9)
|
||||
p.PW()
|
||||
|
||||
#When doing the second PW we add a new word
|
||||
assert p.pattern.limits[0] == 0
|
||||
assert p.pattern.limits[1] == 1
|
||||
assert p.pattern.word[0] == 256
|
||||
assert p.pattern.word[1] == 768
|
||||
|
||||
def test_simple_pattern():
|
||||
"""
|
||||
Using enable pll pattern for MH02
|
||||
"""
|
||||
en_pll_clk = 15
|
||||
p = PatternGenerator()
|
||||
p = apply_detconf(p)
|
||||
p.SB(en_pll_clk)
|
||||
p.PW()
|
||||
p.PW()
|
||||
|
||||
lines = str(p).split("\n")
|
||||
|
||||
enable_pll_pattern = [
|
||||
"patword 0x0000 0x0000000000008000",
|
||||
"patword 0x0001 0x0000000000008000",
|
||||
"patioctrl 0xc000000001b3ffff",
|
||||
"patlimits 0x0000 0x0001",
|
||||
"patloop 0 0x1fff 0x1fff",
|
||||
"patnloop 0 0",
|
||||
"patloop 1 0x1fff 0x1fff",
|
||||
"patnloop 1 0",
|
||||
"patloop 2 0x1fff 0x1fff",
|
||||
"patnloop 2 0",
|
||||
"patloop 3 0x1fff 0x1fff",
|
||||
"patnloop 3 0",
|
||||
"patloop 4 0x1fff 0x1fff",
|
||||
"patnloop 4 0",
|
||||
"patloop 5 0x1fff 0x1fff",
|
||||
"patnloop 5 0",
|
||||
"patwait 0 0x1fff",
|
||||
"patwaittime 0 0",
|
||||
"patwait 1 0x1fff",
|
||||
"patwaittime 1 0",
|
||||
"patwait 2 0x1fff",
|
||||
"patwaittime 2 0",
|
||||
"patwait 3 0x1fff",
|
||||
"patwaittime 3 0",
|
||||
"patwait 4 0x1fff",
|
||||
"patwaittime 4 0",
|
||||
"patwait 5 0x1fff",
|
||||
"patwaittime 5 0",
|
||||
]
|
||||
|
||||
assert len(lines) == len(enable_pll_pattern)
|
||||
|
||||
for i, line in enumerate(lines):
|
||||
assert line == enable_pll_pattern[i]
|
50
python/tests/test_bits.py
Normal file
50
python/tests/test_bits.py
Normal file
@ -0,0 +1,50 @@
|
||||
from slsdet.bits import clearbit, clearbit_arr, setbit, setbit_arr
|
||||
import numpy as np
|
||||
|
||||
|
||||
def test_clearbit_on_python_int():
|
||||
val = 5 # 0b101
|
||||
r = clearbit(0, val)
|
||||
assert r == 4
|
||||
assert val == 5
|
||||
|
||||
def test_setbit_on_python_int():
|
||||
val = 5 # 0b101
|
||||
r = setbit(1, val)
|
||||
assert r == 7
|
||||
assert val == 5
|
||||
|
||||
|
||||
def test_setbit_doesnt_change_type():
|
||||
word = np.int32(5)
|
||||
ret = setbit(0, word)
|
||||
assert isinstance(ret, np.int32)
|
||||
|
||||
|
||||
def test_clearbit_doesnt_change_type():
|
||||
word = np.uint8(5)
|
||||
ret = clearbit(0, word)
|
||||
assert isinstance(ret, np.uint8)
|
||||
|
||||
|
||||
|
||||
def test_setbit_on_array_element():
|
||||
arr = np.zeros(10, dtype=np.uint64)
|
||||
arr[5] = setbit(0, arr[5])
|
||||
arr[5] = setbit(1, arr[5])
|
||||
arr[5] = setbit(4, arr[5])
|
||||
assert arr[4] == 0
|
||||
assert arr[5] == 19 # 0b10011
|
||||
assert arr[6] == 0
|
||||
|
||||
|
||||
def test_setbit_arr():
|
||||
arr = np.zeros(10, dtype=np.int32)
|
||||
setbit_arr(3, arr[3:9])
|
||||
assert all(arr == np.array((0, 0, 0, 8, 8, 8, 8, 8, 8, 0), dtype=np.int32))
|
||||
|
||||
|
||||
def test_clearbit_arr():
|
||||
arr = np.array((5, 5, 5), dtype=np.int8)
|
||||
clearbit_arr(0, arr)
|
||||
assert all(arr == (4, 4, 4))
|
1
serverBin/ctbDetectorServer_developer
Symbolic link
1
serverBin/ctbDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.1.0
|
1
serverBin/eigerDetectorServer_developer
Symbolic link
1
serverBin/eigerDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv9.0.0
|
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
1
serverBin/gotthard2DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv9.0.0
|
1
serverBin/gotthardDetectorServer_developer
Symbolic link
1
serverBin/gotthardDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv9.0.0
|
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
1
serverBin/jungfrauDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
|
1
serverBin/moenchDetectorServer_developer
Symbolic link
1
serverBin/moenchDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv9.0.0
|
1
serverBin/mythen3DetectorServer_developer
Symbolic link
1
serverBin/mythen3DetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.1.0
|
1
serverBin/xilinx_ctbDetectorServer_developer
Symbolic link
1
serverBin/xilinx_ctbDetectorServer_developer
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServer_developer
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.1.0
|
@ -1,155 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef GOTTHARD2MODULEDATANEW_H
|
||||
#define GOTTHARD2MODULEDATANEW_H
|
||||
#include "gotthardModuleDataNew.h"
|
||||
|
||||
class gotthardDoubleModuleDataNew : public slsDetectorData<uint16_t> {
|
||||
|
||||
private:
|
||||
const int nModules;
|
||||
const int offset;
|
||||
int iframe;
|
||||
|
||||
public:
|
||||
/**
|
||||
Implements the slsReceiverData structure for the gotthard read out by a module
|
||||
i.e. using the slsReceiver (1x1280 pixels, 2 packets 1286 large etc.) \param c
|
||||
crosstalk parameter for the output buffer
|
||||
|
||||
*/
|
||||
|
||||
gotthardDoubleModuleDataNew(int off = 24 * 2, int nmod = 2)
|
||||
: slsDetectorData<uint16_t>(1280 * nmod, 1, nmod * (1280 * 2 + off)),
|
||||
nModules(nmod), offset(off), iframe(0) {
|
||||
|
||||
#ifdef BCHIP074_BCHIP075
|
||||
cout << "This is a bchip074-bchip075 system " << endl;
|
||||
#endif
|
||||
|
||||
uint16_t **dMask;
|
||||
int **dMap;
|
||||
int ix, iy;
|
||||
int ypixels = 1;
|
||||
int xpixels = 1280 * nmod;
|
||||
int imod, ipix;
|
||||
dMask = new uint16_t *[1];
|
||||
dMap = new int *[1];
|
||||
dMap[0] = new int[1280 * nmod];
|
||||
dMask[0] = new uint16_t[1280 * nmod];
|
||||
|
||||
for (int ix = 0; ix < xpixels; ix++) {
|
||||
imod = ix % 2;
|
||||
if (imod == 0)
|
||||
ipix = ix / 2;
|
||||
else
|
||||
ipix = 1280 - 1 - ix / 2;
|
||||
if (imod == 0)
|
||||
dMap[0][ix] = ipix * 2 + offset;
|
||||
else
|
||||
dMap[0][ix] = 1280 * 2 + 2 * offset +
|
||||
ipix * 2; // dataSize-2-ix;//+2*offset;
|
||||
// dMap[0][ix] = 2*ipix+offset*(imod+1)+1280*2*imod;
|
||||
dMask[0][ix] = 0x0;
|
||||
#ifdef BCHIP074_BCHIP075
|
||||
int ibad = ix / 2 + 1280 * imod;
|
||||
if ((ibad >= 128 * 4 && ibad < 128 * 5) ||
|
||||
(ibad >= 9 * 128 && ibad < 10 * 128) ||
|
||||
(ibad >= (1280 + 128 * 4) && ibad < ibad >= (1280 + 128 * 6)))
|
||||
dataROIMask[0][ix] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
setDataMap(dMap);
|
||||
setDataMask(dMask);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Returns the frame number for the given dataset.
|
||||
\param buff pointer to the dataset
|
||||
\returns frame number
|
||||
|
||||
*/
|
||||
|
||||
int getFrameNumber(char *buff) {
|
||||
if (offset >= sizeof(sls_detector_header))
|
||||
return ((sls_detector_header *)buff)->frameNumber;
|
||||
return iframe;
|
||||
}; //*((int*)(buff+5))&0xffffff;};
|
||||
|
||||
/**
|
||||
gets the packets number (last packet is labelled with 0 and is replaced with
|
||||
40) \param buff pointer to the memory \returns packet number
|
||||
|
||||
*/
|
||||
|
||||
int getPacketNumber(char *buff) {
|
||||
if (offset >= sizeof(sls_detector_header))
|
||||
return ((sls_detector_header *)buff)->packetNumber;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loops over a memory slot until a complete frame is found (i.e. all
|
||||
packets 0 to nPackets, same frame number). purely virtual func \param
|
||||
data pointer to the memory to be analyzed \param ndata reference to the
|
||||
amount of data found for the frame, in case the frame is incomplete at
|
||||
the end of the memory slot \param dsize size of the memory slot to be
|
||||
analyzed \returns pointer to the beginning of the last good frame (might
|
||||
be incomplete if ndata smaller than dataSize), or NULL if no frame is
|
||||
found
|
||||
|
||||
*/
|
||||
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
||||
if (dsize < dataSize)
|
||||
ndata = dsize;
|
||||
else
|
||||
ndata = dataSize;
|
||||
return data;
|
||||
}
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin) {
|
||||
int ff = -1, np = -1;
|
||||
return readNextFrame(filebin, ff, np);
|
||||
};
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff) {
|
||||
int np = -1;
|
||||
return readNextFrame(filebin, ff, np);
|
||||
};
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
||||
char *data = new char[dataSize];
|
||||
char *d = readNextFrame(filebin, ff, np, data);
|
||||
if (d == NULL) {
|
||||
delete[] data;
|
||||
data = NULL;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np,
|
||||
char *data) {
|
||||
char *retval = 0;
|
||||
int nd;
|
||||
int fnum = -1;
|
||||
np = 0;
|
||||
int pn;
|
||||
|
||||
// cout << dataSize << endl;
|
||||
if (ff >= 0)
|
||||
fnum = ff;
|
||||
|
||||
if (filebin.is_open()) {
|
||||
if (filebin.read(data, dataSize)) {
|
||||
ff = getFrameNumber(data);
|
||||
np = getPacketNumber(data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
@ -1,105 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef GOTTHARDSHORTMODULEDATA_H
|
||||
#define GOTTHARDSHORTMODULEDATA_H
|
||||
#include "slsReceiverData.h"
|
||||
|
||||
class gotthardShortModuleData : public slsReceiverData<uint16_t> {
|
||||
public:
|
||||
/**
|
||||
Implements the slsReceiverData structure for the gotthard short read out by a
|
||||
module i.e. using the slsReceiver (1x256 pixels, 1 packet 256 large etc.)
|
||||
\param c crosstalk parameter for the output buffer
|
||||
|
||||
*/
|
||||
|
||||
gotthardShortModuleData(double c = 0)
|
||||
: slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize),
|
||||
xtalk(c) {
|
||||
|
||||
uint16_t **dMask;
|
||||
int **dMap;
|
||||
int ix, iy;
|
||||
int offset = 2;
|
||||
|
||||
dMask = new uint16_t *[ypixels];
|
||||
dMap = new int *[ypixels];
|
||||
for (int i = 0; i < ypixels; i++) {
|
||||
dMap[i] = new int[xpixels];
|
||||
dMask[i] = new uint16_t[xpixels];
|
||||
}
|
||||
|
||||
for (ix = 0; ix < ypixels; ++ix)
|
||||
for (iy = 0; iy < xpixels; ++iy)
|
||||
dMask[ix][iy] = 0x0;
|
||||
|
||||
for (ix = 0; ix < ypixels; ++ix)
|
||||
for (iy = 0; iy < xpixels; ++iy) {
|
||||
dMap[ix][iy] = offset;
|
||||
offset++;
|
||||
}
|
||||
|
||||
setDataMap(dMap);
|
||||
setDataMask(dMask);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Returns the frame number for the given dataset.
|
||||
\param buff pointer to the dataset
|
||||
\returns frame number
|
||||
|
||||
*/
|
||||
|
||||
int getFrameNumber(char *buff) { return (*(int *)buff); };
|
||||
|
||||
/**
|
||||
gets the packets number (last packet is labelled with 0 and is replaced with
|
||||
40) \param buff pointer to the memory \returns packet number
|
||||
|
||||
*/
|
||||
|
||||
int getPacketNumber(char *buff) { return 1; };
|
||||
|
||||
/**
|
||||
returns the pixel value as double correcting for the output buffer crosstalk
|
||||
\param data pointer to the memory
|
||||
\param ix coordinate in the x direction
|
||||
\param iy coordinate in the y direction
|
||||
\returns channel value as double
|
||||
|
||||
*/
|
||||
double getValue(char *data, int ix, int iy = 0) {
|
||||
// check how it is for gotthard
|
||||
if (xtalk == 0)
|
||||
return slsDetectorData<uint16_t>::getValue(data, ix, iy);
|
||||
else
|
||||
return slsDetectorData<uint16_t>::getValue(data, ix, iy) -
|
||||
xtalk *
|
||||
slsDetectorData<uint16_t>::getValue(data, ix - 1, iy);
|
||||
};
|
||||
|
||||
/** sets the output buffer crosstalk correction parameter
|
||||
\param c output buffer crosstalk correction parameter to be set
|
||||
\returns current value for the output buffer crosstalk correction parameter
|
||||
|
||||
*/
|
||||
double setXTalk(double c) {
|
||||
xtalk = c;
|
||||
return xtalk;
|
||||
}
|
||||
|
||||
/** gets the output buffer crosstalk parameter
|
||||
\returns current value for the output buffer crosstalk correction parameter
|
||||
*/
|
||||
double getXTalk() { return xtalk; }
|
||||
|
||||
private:
|
||||
double xtalk; /**<output buffer crosstalk correction parameter */
|
||||
const static int xpixels = 256;
|
||||
const static int ypixels = 1;
|
||||
const static int npackets = 1;
|
||||
const static int buffersize = 518;
|
||||
};
|
||||
|
||||
#endif
|
@ -72,7 +72,7 @@
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="elideMode">
|
||||
<enum>Qt::ElideLeft</enum>
|
||||
@ -178,309 +178,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_roi">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Region of Interest</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X Min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<widget class="QPushButton" name="btnClearRoi">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Clear ROI at detector level</p><p>#clearroi#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear ROI </string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/erase.png</normaloff>:/icons/images/erase.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinXmin">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set ROI at detector level</p><p>#roi#</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1279</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set ROI at detector level</p><p>#roi#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X Max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QSpinBox" name="spinXmax">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set ROI at detector level</p><p>#roi#</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1279</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="btnSetRoi">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set ROI at detector level</p><p>#roi#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set ROI </string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="comboReadout">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Select readout to set ROI at detector level</p><p>#roi#</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_network">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -2238,11 +1935,6 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>spinSetAllTrimbits</tabstop>
|
||||
<tabstop>comboReadout</tabstop>
|
||||
<tabstop>spinXmin</tabstop>
|
||||
<tabstop>spinXmax</tabstop>
|
||||
<tabstop>btnSetRoi</tabstop>
|
||||
<tabstop>btnClearRoi</tabstop>
|
||||
<tabstop>comboDetector</tabstop>
|
||||
<tabstop>spinControlPort</tabstop>
|
||||
<tabstop>spinStopPort</tabstop>
|
||||
|
@ -38,87 +38,21 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="comboHV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage</p><p> #highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>90</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>110</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>120</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>150</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>180</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>200</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblSettings">
|
||||
<item row="4" column="5">
|
||||
<widget class="QSpinBox" name="spinThreshold2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -128,52 +62,42 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Settings of the detector. </p><p> #settings#</p></body></html></string>
|
||||
<string><html><head/><body><p>Threshold energy of 2nd counter</p><p>#threshold#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings:</string>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblComboHV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage</p><p> #highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Voltage: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<item row="4" column="9">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<item row="6" column="4">
|
||||
<widget class="QCheckBox" name="chkCounter3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -201,29 +125,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblSpinHV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Voltage: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="7">
|
||||
<item row="4" column="7">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -239,97 +141,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QCheckBox" name="chkCounter1">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enable 1st counter</p><p>#counters#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lblThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy. The trim energy values need to be loaded first using &quot;trimen&quot;</p><p>#threshold#</p><p>#trimen#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lblDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Dynamic Range of pixel/channel of detector</p><p>#dr#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dynamic Range:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="3">
|
||||
<item row="1" column="2" colspan="3">
|
||||
<widget class="QSpinBox" name="spinHV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -369,8 +181,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QCheckBox" name="chkCounter2">
|
||||
<item row="6" column="2">
|
||||
<widget class="QCheckBox" name="chkCounter1">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -387,17 +199,222 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enable 2nd counter</p><p>#counters#</p></body></html></string>
|
||||
<string><html><head/><body><p>Enable 1st counter</p><p>#counters#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="3">
|
||||
<item row="7" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<widget class="QSpinBox" name="spinThreshold3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy of 3rd counter</p><p>#threshold#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="3">
|
||||
<widget class="QSpinBox" name="spinThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy. The trim energy values need to be loaded first using &quot;trimen&quot;</p><p>#threshold#</p><p>#trimen#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="comboDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Dynamic Range of pixel/channel of detector</p><p>#dr#</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.67772e+07</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>65535</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4095</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>255</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lblCounter">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enable counters</p><p>#counters#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Counters:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="comboSettings">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@ -542,7 +559,7 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="8">
|
||||
<item row="4" column="8">
|
||||
<widget class="QPushButton" name="btnSetThreshold">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@ -626,130 +643,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblGainMode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Gain Mode of the detector</p><p>#gainmode#</p><p><br/></p><p>Fix G0 is to be used with utmost caution. Can damage the detector!</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gain Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="3">
|
||||
<widget class="QSpinBox" name="spinThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy. The trim energy values need to be loaded first using &quot;trimen&quot;</p><p>#threshold#</p><p>#trimen#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="5">
|
||||
<widget class="QSpinBox" name="spinThreshold2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy of 2nd counter</p><p>#threshold#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="3">
|
||||
<item row="3" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="comboGainMode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -813,21 +707,15 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="6">
|
||||
<widget class="QSpinBox" name="spinThreshold3">
|
||||
<item row="6" column="3">
|
||||
<widget class="QCheckBox" name="chkCounter2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -837,112 +725,18 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy of 3rd counter</p><p>#threshold#</p><p><br/></p></body></html></string>
|
||||
<string><html><head/><body><p>Enable 2nd counter</p><p>#counters#</p></body></html></string>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="comboDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Dynamic Range of pixel/channel of detector</p><p>#dr#</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.67772e+07</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>65535</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4095</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>255</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lblCounter">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lblDynamicRange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -965,30 +759,147 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enable counters</p><p>#counters#</p></body></html></string>
|
||||
<string><html><head/><body><p>Dynamic Range of pixel/channel of detector</p><p>#dr#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Counters:</string>
|
||||
<string>Dynamic Range:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="9">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblSettings">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Settings of the detector. </p><p> #settings#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Threshold energy. The trim energy values need to be loaded first using &quot;trimen&quot;</p><p>#threshold#</p><p>#trimen#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblGainMode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Gain Mode of the detector</p><p>#gainmode#</p><p><br/></p><p>Fix G0 is to be used with utmost caution. Can damage the detector!</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gain Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblSpinHV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Voltage: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>comboHV</tabstop>
|
||||
<tabstop>spinHV</tabstop>
|
||||
<tabstop>comboSettings</tabstop>
|
||||
<tabstop>comboGainMode</tabstop>
|
||||
|
@ -38,9 +38,6 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
|
||||
void SetRxrUDPMAC(bool force = false);
|
||||
void ForceSetRxrUDPMAC();
|
||||
void SetRxrZMQPort(int port);
|
||||
void GetROI();
|
||||
void ClearROI();
|
||||
void SetROI();
|
||||
void SetAllTrimbits();
|
||||
void SetNumStoragecells(int value);
|
||||
void SetSubExposureTime();
|
||||
|
@ -192,7 +192,6 @@ void qDetectorMain::SetUpDetector(const std::string &config_file, int multiID) {
|
||||
actionLoadTrimbits->setEnabled(true);
|
||||
actionSaveTrimbits->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD:
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
@ -405,12 +404,12 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
||||
|
||||
void qDetectorMain::ExecuteHelp(QAction *action) {
|
||||
if (action == actionAbout) {
|
||||
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
||||
"Gotthard, Gotthard2 and Moench detectors";
|
||||
LOG(logDEBUG) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
||||
"Gotthard2 and Moench detectors";
|
||||
|
||||
std::string clientVersion = "unknown";
|
||||
std::string packageVersion = "unknown";
|
||||
try {
|
||||
clientVersion = det->getClientVersion();
|
||||
packageVersion = det->getPackageVersion();
|
||||
}
|
||||
CATCH_DISPLAY("Could not get client version.",
|
||||
"qDetectorMain::ExecuteHelp")
|
||||
@ -419,12 +418,12 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
|
||||
qDefs::INFORMATION,
|
||||
"<p style=\"font-family:verdana;\">"
|
||||
|
||||
"<b>SLS Detector Client version: " +
|
||||
clientVersion +
|
||||
"<b>SLS Detector Package: v" +
|
||||
packageVersion +
|
||||
"</b><br><br>"
|
||||
|
||||
"Common GUI to control the SLS Detectors: "
|
||||
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and "
|
||||
"Jungfrau, Eiger, Mythen3, Gotthard2 and "
|
||||
"Moench.<br><br>"
|
||||
|
||||
"It can be operated in parallel with the command "
|
||||
|
@ -83,9 +83,7 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
fileSaveName = "Image";
|
||||
}
|
||||
|
||||
gotthard25 = ((detType == slsDetectorDefs::GOTTHARD2 ||
|
||||
detType == slsDetectorDefs::GOTTHARD) &&
|
||||
det->size() == 2);
|
||||
gotthard25 = (detType == slsDetectorDefs::GOTTHARD2 && det->size() == 2);
|
||||
|
||||
SetupPlots();
|
||||
SetDataCallBack(true);
|
||||
|
@ -28,9 +28,6 @@ void qTabAdvanced::SetupWidgetWindow() {
|
||||
spinSubDeadTime->setEnabled(true);
|
||||
comboSubDeadTimeUnit->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD:
|
||||
tab_roi->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
tab_trimming->setEnabled(true);
|
||||
lblDiscardBits->setEnabled(true);
|
||||
@ -114,14 +111,6 @@ void qTabAdvanced::Initialization() {
|
||||
connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this,
|
||||
SLOT(SetRxrZMQPort(int)));
|
||||
|
||||
// roi
|
||||
if (tab_roi->isEnabled()) {
|
||||
connect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(GetROI()));
|
||||
connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(SetROI()));
|
||||
connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(ClearROI()));
|
||||
}
|
||||
|
||||
// storage cells
|
||||
if (lblNumStoragecells->isEnabled()) {
|
||||
connect(spinNumStoragecells, SIGNAL(valueChanged(int)), this,
|
||||
@ -173,23 +162,16 @@ void qTabAdvanced::PopulateDetectors() {
|
||||
LOG(logDEBUG) << "Populating detectors";
|
||||
disconnect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SetDetector()));
|
||||
disconnect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(GetROI()));
|
||||
|
||||
comboDetector->clear();
|
||||
comboReadout->clear();
|
||||
auto res = det->getHostname();
|
||||
for (auto &it : res) {
|
||||
comboDetector->addItem(QString(it.c_str()));
|
||||
comboReadout->addItem(QString(it.c_str()));
|
||||
}
|
||||
comboDetector->setCurrentIndex(0);
|
||||
comboReadout->setCurrentIndex(0);
|
||||
|
||||
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SetDetector()));
|
||||
connect(comboReadout, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(GetROI()));
|
||||
}
|
||||
|
||||
void qTabAdvanced::GetControlPort() {
|
||||
@ -570,40 +552,6 @@ void qTabAdvanced::SetRxrZMQPort(int port) {
|
||||
&qTabAdvanced::GetRxrZMQPort)
|
||||
}
|
||||
|
||||
void qTabAdvanced::GetROI() {
|
||||
LOG(logDEBUG) << "Getting ROI";
|
||||
try {
|
||||
slsDetectorDefs::ROI roi =
|
||||
det->getROI({comboReadout->currentIndex()})[0];
|
||||
spinXmin->setValue(roi.xmin);
|
||||
spinXmax->setValue(roi.xmax);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get ROI.", "qTabAdvanced::GetROI")
|
||||
}
|
||||
|
||||
void qTabAdvanced::ClearROI() {
|
||||
LOG(logINFO) << "Clearing ROI";
|
||||
spinXmin->setValue(-1);
|
||||
spinXmax->setValue(-1);
|
||||
SetROI();
|
||||
LOG(logDEBUG) << "ROIs cleared";
|
||||
}
|
||||
|
||||
void qTabAdvanced::SetROI() {
|
||||
|
||||
slsDetectorDefs::ROI roi(spinXmin->value(), spinXmax->value());
|
||||
|
||||
// set roi
|
||||
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax << "]";
|
||||
try {
|
||||
det->setROI(roi, {comboReadout->currentIndex()});
|
||||
}
|
||||
CATCH_DISPLAY("Could not set these ROIs.", "qTabAdvanced::SetROI")
|
||||
|
||||
// update corrected list
|
||||
GetROI();
|
||||
}
|
||||
|
||||
void qTabAdvanced::GetAllTrimbits() {
|
||||
LOG(logDEBUG) << "Getting all trimbits value";
|
||||
disconnect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this,
|
||||
@ -831,11 +779,6 @@ void qTabAdvanced::Refresh() {
|
||||
// update all network widgets
|
||||
SetDetector();
|
||||
|
||||
// roi
|
||||
if (tab_roi->isEnabled()) {
|
||||
GetROI();
|
||||
}
|
||||
|
||||
// storage cells
|
||||
if (lblNumStoragecells->isEnabled()) {
|
||||
GetNumStoragecells();
|
||||
|
@ -34,15 +34,6 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
new qDacWidget(this, det, false, sls::ToString(it), it));
|
||||
}
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD:
|
||||
ind = slsDetectorDefs::TEMPERATURE_ADC;
|
||||
adcWidgets.push_back(
|
||||
new qDacWidget(this, det, false, sls::ToString(ind), ind));
|
||||
ind = slsDetectorDefs::TEMPERATURE_FPGA;
|
||||
adcWidgets.push_back(
|
||||
new qDacWidget(this, det, false, sls::ToString(ind), ind));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
ind = slsDetectorDefs::TEMPERATURE_ADC;
|
||||
adcWidgets.push_back(
|
||||
|
@ -47,7 +47,6 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
// enabling according to det type
|
||||
is1d = false;
|
||||
switch (det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::GOTTHARD:
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
is1d = true;
|
||||
break;
|
||||
|
@ -18,8 +18,6 @@ qTabSettings::qTabSettings(QWidget *parent, Detector *detector)
|
||||
qTabSettings::~qTabSettings() {}
|
||||
|
||||
void qTabSettings::SetupWidgetWindow() {
|
||||
comboHV->hide();
|
||||
lblComboHV->hide();
|
||||
lblSpinHV->hide();
|
||||
spinHV->hide();
|
||||
hvmin = HV_MIN;
|
||||
@ -100,9 +98,6 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
} else if (detType == slsDetectorDefs::MOENCH) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD) {
|
||||
comboHV->show();
|
||||
lblComboHV->show();
|
||||
} else if (detType == slsDetectorDefs::GOTTHARD2) {
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
@ -189,8 +184,6 @@ void qTabSettings::ShowFixG0(bool expertMode) {
|
||||
|
||||
void qTabSettings::Initialization() {
|
||||
// High voltage
|
||||
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SetHighVoltage()));
|
||||
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||
|
||||
// Settings
|
||||
@ -231,12 +224,10 @@ void qTabSettings::Initialization() {
|
||||
|
||||
void qTabSettings::GetHighVoltage() {
|
||||
// not enabled for eiger
|
||||
if (!comboHV->isVisible() && !spinHV->isVisible())
|
||||
if (!spinHV->isVisible())
|
||||
return;
|
||||
LOG(logDEBUG) << "Getting High Voltage";
|
||||
disconnect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||
disconnect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SetHighVoltage()));
|
||||
try {
|
||||
Result<int> retvals = det->getHighVoltage();
|
||||
|
||||
@ -258,55 +249,19 @@ void qTabSettings::GetHighVoltage() {
|
||||
master_retvals.tsquash("Inconsistent values for high voltage.");
|
||||
}
|
||||
|
||||
// spinHV
|
||||
if (spinHV->isVisible()) {
|
||||
if (retval != 0 && retval < hvmin && retval > HV_MAX) {
|
||||
throw RuntimeError(std::string("Unknown High Voltage: ") +
|
||||
std::to_string(retval));
|
||||
}
|
||||
spinHV->setValue(retval);
|
||||
}
|
||||
// combo HV
|
||||
else {
|
||||
switch (retval) {
|
||||
case 0:
|
||||
comboHV->setCurrentIndex(HV_0);
|
||||
break;
|
||||
case 90:
|
||||
comboHV->setCurrentIndex(HV_90);
|
||||
break;
|
||||
case 110:
|
||||
comboHV->setCurrentIndex(HV_110);
|
||||
break;
|
||||
case 120:
|
||||
comboHV->setCurrentIndex(HV_120);
|
||||
break;
|
||||
case 150:
|
||||
comboHV->setCurrentIndex(HV_150);
|
||||
break;
|
||||
case 180:
|
||||
comboHV->setCurrentIndex(HV_180);
|
||||
break;
|
||||
case 200:
|
||||
comboHV->setCurrentIndex(HV_200);
|
||||
break;
|
||||
default:
|
||||
throw RuntimeError(std::string("Unknown High Voltage: ") +
|
||||
std::to_string(retval));
|
||||
}
|
||||
if (retval != 0 && retval < hvmin && retval > HV_MAX) {
|
||||
throw RuntimeError(std::string("Unknown High Voltage: ") +
|
||||
std::to_string(retval));
|
||||
}
|
||||
spinHV->setValue(retval);
|
||||
}
|
||||
CATCH_DISPLAY("Could not get high voltage.", "qTabSettings::GetHighVoltage")
|
||||
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(SetHighVoltage()));
|
||||
}
|
||||
|
||||
void qTabSettings::SetHighVoltage() {
|
||||
int val = (comboHV->isVisible() ? comboHV->currentText().toInt()
|
||||
: spinHV->value());
|
||||
int val = spinHV->value();
|
||||
LOG(logINFO) << "Setting high voltage:" << val;
|
||||
|
||||
try {
|
||||
det->setHighVoltage(val);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ install(TARGETS slsProjectCSettings
|
||||
add_subdirectory(ctbDetectorServer)
|
||||
add_subdirectory(xilinx_ctbDetectorServer)
|
||||
add_subdirectory(eigerDetectorServer)
|
||||
add_subdirectory(gotthardDetectorServer)
|
||||
add_subdirectory(jungfrauDetectorServer)
|
||||
add_subdirectory(mythen3DetectorServer)
|
||||
add_subdirectory(gotthard2DetectorServer)
|
||||
|
@ -4,7 +4,6 @@
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer
|
||||
gotthardDetectorServer
|
||||
gotthard2DetectorServer
|
||||
jungfrauDetectorServer
|
||||
mythen3DetectorServer
|
||||
|
@ -4,7 +4,6 @@
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer"
|
||||
"gotthardDetectorServer"
|
||||
"gotthard2DetectorServer"
|
||||
"jungfrauDetectorServer"
|
||||
"mythen3DetectorServer"
|
||||
|
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -1095,26 +1095,17 @@ int setNumTransceiverSamples(int val) {
|
||||
int getNumTransceiverSamples() { return ntSamples; }
|
||||
|
||||
int setExpTime(int64_t val) {
|
||||
if (val < 0) {
|
||||
LOG(logERROR, ("Invalid exptime: %lld ns\n", (long long int)val));
|
||||
return FAIL;
|
||||
}
|
||||
LOG(logINFO, ("Setting exptime %lld ns\n", (long long int)val));
|
||||
val *= (1E-3 * clkFrequency[RUN_CLK]);
|
||||
setPatternWaitTime(0, val);
|
||||
setPatternWaitInterval(0, val);
|
||||
|
||||
// validate for tolerance
|
||||
int64_t retval = getExpTime();
|
||||
val /= (1E-3 * clkFrequency[RUN_CLK]);
|
||||
if (val != retval) {
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
int64_t getExpTime() {
|
||||
return getPatternWaitTime(0) / (1E-3 * clkFrequency[RUN_CLK]);
|
||||
}
|
||||
int64_t getExpTime() { return getPatternWaitInterval(0); }
|
||||
|
||||
int setPeriod(int64_t val) {
|
||||
if (val < 0) {
|
||||
|
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
Executable file
BIN
slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
Executable file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user