mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
Compare commits
214 Commits
Author | SHA1 | Date | |
---|---|---|---|
c10bc5e530 | |||
0d1642c56e | |||
9bb25445f5 | |||
376514606f | |||
8707196f58 | |||
![]() |
9f9b1d496c | ||
b2dd964907 | |||
348d820265 | |||
d414c7459b | |||
8eb2134d9f | |||
b8b067d74b | |||
![]() |
3619a032ac | ||
2ee7e36fb3 | |||
d739453f2b | |||
3bfa3bfba3 | |||
894c227723 | |||
f3e5804d02 | |||
2c4cd80748 | |||
674865120b | |||
c0ae090be0 | |||
a85ad6cd84 | |||
5f6dea2d6d | |||
f5bf509525 | |||
03eded30f9 | |||
684f511bf8 | |||
2c93d40e81 | |||
9889a31f81 | |||
b00a37bc16 | |||
15030ab732 | |||
0ecc6030c6 | |||
6c604e2340 | |||
0f4d10912b | |||
af386a736e | |||
a43f2c946f | |||
8d21fd364b | |||
9aceb07d80 | |||
7b3accf372 | |||
cfde194834 | |||
8ac9cd6b15 | |||
3e38de5092 | |||
70e7879dd9 | |||
37b2efb1ed | |||
7ac18fbad9 | |||
6839315a7c | |||
527915a2ca | |||
64aad1e196 | |||
d3f847100e | |||
e1224936ca | |||
f29ef9e345 | |||
00e3b196f6 | |||
0109973e68 | |||
ad995b381a | |||
53b84b17a6 | |||
16d404c21b | |||
34ce96ffa0 | |||
d5fa26ef9a | |||
77f20b4e97 | |||
a295208c12 | |||
![]() |
36a6087e1d | ||
fb406a7c6c | |||
6e4380db43 | |||
903652bb72 | |||
1609706093 | |||
14d2d171bb | |||
dd8452b365 | |||
15a9fb86da | |||
222d2b3fad | |||
a57531312f | |||
85a03a1d72 | |||
fc197ed002 | |||
a5d242876b | |||
76ce5de89e | |||
dbb0dbcbcd | |||
87d40d418e | |||
c82712b587 | |||
9dd1509714 | |||
c8290598db | |||
ff6a2655a2 | |||
7b2e6ae4ab | |||
706f3a103c | |||
5de98b3db0 | |||
7494e41862 | |||
7607fdc9a7 | |||
1bfffb842d | |||
7c48ae9a49 | |||
bf82aeee8d | |||
84e83bf551 | |||
60ce31bb17 | |||
2947b65e02 | |||
e92578f89d | |||
0e45ae189d | |||
![]() |
e6e260d8ca | ||
fcc9b6ad54 | |||
0771461c01 | |||
ed6686d4a7 | |||
ec3d3e38a6 | |||
e47d3d4d15 | |||
f9dbffcb6e | |||
e83527adee | |||
dee86c63eb | |||
ce41e8aa34 | |||
7e2c8a37dc | |||
aeb59364c5 | |||
1f16f84fed | |||
![]() |
0123169e35 | ||
ffd7cd1070 | |||
c6c7632ef7 | |||
b79759bcff | |||
d9e8e1c1c2 | |||
c57e835a41 | |||
b3d9af29fc | |||
4829429abd | |||
f1ffc6057a | |||
8f51215cb3 | |||
7b21ce34d6 | |||
e1497f9cb9 | |||
5088e5a205 | |||
06266f3905 | |||
5f805f8789 | |||
60868ae74e | |||
37e65634d4 | |||
6fcdba56a4 | |||
0b9fd0664e | |||
6add9aad5d | |||
76ab0228ac | |||
a1e69bba37 | |||
270ee48148 | |||
c679135138 | |||
0f88617477 | |||
04eed990c7 | |||
d2bfb91a16 | |||
5e024153bc | |||
e59de85a33 | |||
fd010b9aa5 | |||
45957391a6 | |||
f2f3817a7f | |||
f43bb8eea4 | |||
8a7ed30676 | |||
5b832cb6aa | |||
7fa5b5d70a | |||
6348ccd05b | |||
8144397b2c | |||
2dc0963c56 | |||
a44ba4dc35 | |||
007330caa7 | |||
492b4815a6 | |||
33b8e0817e | |||
ab7425a9d3 | |||
d8f925520e | |||
9f079b17a2 | |||
5b61ff24bb | |||
c6477e0ed6 | |||
38d7fb0c38 | |||
e848293916 | |||
![]() |
15e8c0d9f1 | ||
588d11dedf | |||
782c8abd9a | |||
1d4a5d6d29 | |||
9c57571a41 | |||
b4533ac11f | |||
991a4115d4 | |||
ff107faae6 | |||
d57643434d | |||
de33aff077 | |||
c13049f144 | |||
ce7f01bdc4 | |||
![]() |
bf523c0c5e | ||
1efd106c6a | |||
08dc8e3cbb | |||
96f7a1ecfb | |||
64d489f1e6 | |||
56abf82d92 | |||
3d21bb64c4 | |||
f6b0ba9703 | |||
d17bc5da62 | |||
a884db0e2c | |||
5e9fd43d49 | |||
8bce89d5dc | |||
![]() |
aa40128965 | ||
![]() |
a03780718e | ||
bd1a125154 | |||
ffe7728966 | |||
b69e053bb4 | |||
daec0dc389 | |||
c8bb70f876 | |||
9a08ecc5a5 | |||
9738cb7d74 | |||
4f4125a3b2 | |||
51412f40cf | |||
ce7270e8a2 | |||
d72c9e29a4 | |||
![]() |
62dc0e1a34 | ||
![]() |
d7aa3305d1 | ||
96ed74c47c | |||
4198db8365 | |||
![]() |
e2d7af28dc | ||
66d57c1852 | |||
aa4bf6e7f9 | |||
7f0868f344 | |||
e57cf49c49 | |||
66baaf1ebd | |||
7d7ac26c30 | |||
1a7c74fe4e | |||
01e4bcb47e | |||
397e846509 | |||
314a8a0daa | |||
ebb352b13a | |||
9b5d44f0b3 | |||
1892963fcb | |||
62f45b15d2 | |||
82ac45873c | |||
2b2e50916c | |||
d34f396ef8 | |||
f9c4405da6 |
@ -1,4 +1,4 @@
|
||||
name: CMake
|
||||
name: Native CMake Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@ -14,10 +14,16 @@ 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
|
||||
packages: libhdf5-dev qtbase5-dev qt5-qmake libqt5svg5-dev libpng-dev libtiff-dev
|
||||
version: 1.0
|
||||
|
||||
- name: Configure CMake
|
||||
@ -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 +0,0 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
@ -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)
|
||||
@ -249,8 +274,8 @@ endif()
|
||||
if(SLS_USE_SANITIZER)
|
||||
target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
|
||||
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
|
||||
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
#target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread -fno-omit-frame-pointer)
|
||||
#target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
endif()
|
||||
|
||||
|
||||
@ -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)
|
||||
|
290
RELEASE.txt
290
RELEASE.txt
@ -1,284 +1,36 @@
|
||||
SLS Detector Package Major Release 9.0.0 released on 26.11.2024
|
||||
===============================================================
|
||||
SLS Detector Package Minor Release 9.2.0 released on 02.06.2025
|
||||
==================================================================
|
||||
|
||||
This document describes the differences between v9.0.0 and v8.0.2
|
||||
This document describes the differences between v9.2.0 and v9.1.1
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1 Compilation Changes
|
||||
2 New or Changed Features
|
||||
2.1 Breaking API
|
||||
2.2 Resolved or Changed Features
|
||||
2.3 New Features
|
||||
3 On-board Detector Server Compatibility
|
||||
4 Firmware Requirements
|
||||
5 Kernel Requirements
|
||||
6 Download, Documentation & Support
|
||||
1 New or Changed Features
|
||||
2 On-board Detector Server Compatibility
|
||||
3 Firmware Requirements
|
||||
4 Kernel Requirements
|
||||
5 Download, Documentation & Support
|
||||
|
||||
|
||||
|
||||
|
||||
2 Compilation Changes
|
||||
=====================
|
||||
1 New or Changed Features
|
||||
=========================
|
||||
|
||||
|
||||
* Python version
|
||||
Minimum python version is changed from 3.6 to 3.8
|
||||
|
||||
|
||||
* Pybind11 version
|
||||
In-built version and the one picked up from github
|
||||
updated from v2.11.0 to v2.13.6
|
||||
|
||||
|
||||
* Python lib versioning
|
||||
slsdet.__version__ now returns the package release version.
|
||||
|
||||
|
||||
* Python version in conda build
|
||||
Added python 3.13 also to conda build
|
||||
|
||||
|
||||
|
||||
2 New, Changed or Resolved Features
|
||||
=====================================
|
||||
|
||||
|
||||
|
||||
2.1 Breaking API
|
||||
==================
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* Receiver callbacks
|
||||
Brought much more metadata to receiver callbacks to construct the image.
|
||||
Update MultiReceiverApp to reflect this change.
|
||||
|
||||
|
||||
* File path
|
||||
At start of acquisition or at rx_start command, the file path is only
|
||||
then verified if it exists and created if it does not.
|
||||
|
||||
|
||||
Client
|
||||
Python
|
||||
------
|
||||
|
||||
|
||||
* Removed receiver/publisher ZMQ IP
|
||||
Command line: rx_zmqip gives a warning and does nothing
|
||||
Python : rx_zmqip removed
|
||||
C++ API: get/setRxZmqIP removed
|
||||
|
||||
Publisher zmq IP set to '0.0.0.0' or to listen on all interfaces.
|
||||
The publisher will determine which interface to stream out from based on
|
||||
the network route to the subscriber IP. Hence, receiver zmq IP is not
|
||||
required.
|
||||
|
||||
|
||||
* Write register, Set or Clear bit
|
||||
Validation for this advanced feature has been removed by default.
|
||||
One can force validation by using --validate in the command line or by
|
||||
setting the validate option in the API.
|
||||
|
||||
|
||||
ZMQ
|
||||
---
|
||||
|
||||
|
||||
* Publisher socket constructor does not take an IP anymore.
|
||||
The details are above under 'Removed receiver/publisher ZMQ IP'.
|
||||
|
||||
|
||||
GUI/ Client Callback
|
||||
--------------------
|
||||
|
||||
|
||||
* completeImage member in detectorData attribute now returns false only
|
||||
if any the sub images (from different udp ports) have completeImage
|
||||
set to false in the JSON header. This is set if therea are any missing
|
||||
packets for that udp port on slsReceiver/slsMultiReceiver.
|
||||
|
||||
The different subimages are anyway not synchronized. This errs when
|
||||
there are different missing images across multiple UDP ports.
|
||||
|
||||
The Gui does not show "complete image" in the status bar anymore.
|
||||
If any of the udp ports have missing packets for that current disaplayed
|
||||
image, then the "missing packets" will show in red in the status bar.
|
||||
|
||||
|
||||
Detector Server
|
||||
---------------
|
||||
|
||||
|
||||
* [Mythen3] Only run clock can be set
|
||||
Clock 0 is now the run clock and the only one that can be set.
|
||||
The others are be read only.
|
||||
This affects the following commands:
|
||||
Command line or python API: clkdiv, clkfreq, clkphase, maxclkphaseshift
|
||||
C++ API: get/setClockDivider, getClockFrequency, get/setClockPhase,
|
||||
getMaxClockPhaseShift
|
||||
|
||||
|
||||
* [Jungfrau] Temperature Control
|
||||
Temperature control is enabled by default at on-board detector server
|
||||
startup.
|
||||
As before, the default temperature threshold is 65°C and crossing this
|
||||
value will set a temperature event.
|
||||
|
||||
|
||||
|
||||
2.2 Resolved or Changed Features
|
||||
================================
|
||||
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
|
||||
|
||||
* cmake_source_dir
|
||||
Fixed compilation error when using python and adding the slsDetectorPackage
|
||||
as a subfolder due to cmake source directory changing.
|
||||
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
|
||||
* Command line Code Generation
|
||||
The command line parsing code is now generated from a yaml file. This is
|
||||
transparent to the user.
|
||||
|
||||
* Python module is now built using scikit-build-core
|
||||
|
||||
* Clearer error message about freeing shared memory.
|
||||
|
||||
* slsdet is available on PyPI from this release onwards
|
||||
|
||||
|
||||
Detector Server
|
||||
---------------
|
||||
|
||||
|
||||
* [Gotthard2] Chip reconfiguration
|
||||
|
||||
- Powering off/on the chip will now switch off chip configuration
|
||||
property/ configure the chip every time.
|
||||
|
||||
- Switching off high voltage from a non zero value will now wait
|
||||
10s to return for safety reasons.
|
||||
|
||||
- Powering off the chip requires high voltage to have been
|
||||
switched off prior.
|
||||
|
||||
- Acquisition requires chip to have been configured prior.
|
||||
|
||||
|
||||
* [Gotthard2] Burst mode options restricted
|
||||
Burst mode external and continuous mode internal are not allowed to be set
|
||||
anymore as they are anyway not implemented.
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* [Gotthard I] fixed header stripping fixing segfault.
|
||||
|
||||
|
||||
* Error or help message for invalid arguments to slsMultiReceiver.
|
||||
|
||||
|
||||
Simulator
|
||||
---------
|
||||
|
||||
|
||||
* Refactored stop server to have better start up.
|
||||
|
||||
|
||||
* Fixed possible memory leak when taking non blocking acquisitions.
|
||||
|
||||
|
||||
* [Jungfrau] Valid gain values in data sent out. Previously, 2 was also sent out.
|
||||
|
||||
|
||||
ZMQ
|
||||
---
|
||||
|
||||
|
||||
* Publiser socket constructor
|
||||
|
||||
- enables keep alive socket options to send heartbeat messages to prevent
|
||||
discarded TCP flows if there is no packet for a longer period.
|
||||
|
||||
- enables IPv6 interfaces
|
||||
|
||||
* Prints specific error for ENOENT (endpoint does not exist)
|
||||
|
||||
|
||||
|
||||
2.3 New Features
|
||||
================
|
||||
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
|
||||
* Auto completion
|
||||
bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the
|
||||
main package folder to enable auto completion of commands and arguments
|
||||
for the command line on that shell.
|
||||
|
||||
|
||||
* sls_detector
|
||||
New executable that can be used instead of 'sls_detector_get' and
|
||||
'sls_detector_put' for most commands. It will infer from the number of
|
||||
arguments, which executable (sls_detector_put or sls_detector_get) to use.
|
||||
For the rare commands that cannot be inferred from the number of arguments,
|
||||
it will complain accordingly.
|
||||
|
||||
|
||||
* [Jungfrau] Timing Info Decoder (Advanced configuration)
|
||||
Command line or python API: timing_info_decoder
|
||||
C++ API: get/setTimingInfoDecoder. Options: SWISSFEL (Default), SHINE
|
||||
|
||||
|
||||
* [Jungfrau] Collection Mode (Advanced configuration)
|
||||
Command line or python API: collectionmode
|
||||
C++ API: get/setCollectionMode. Options: ELECTRON, HOLE (Default)
|
||||
If chip v1.1, also configures the chip afterwards.
|
||||
|
||||
|
||||
* [Gotthard2] Next frame number
|
||||
'Stop' in G2 25um is not synchronous and hence might trigger an extra set
|
||||
of frames in the slave module, resulting in the next acquiistion starting
|
||||
with inconsistent frame numbers between master and slave. Solved by
|
||||
setting next frame number to the larger value (max + 1) after a stop command.
|
||||
Requires a firmware update.
|
||||
|
||||
Command line or python API: nextframenumber
|
||||
C++ API: get/setNextFrameNumber
|
||||
Can set/get the starting frame number for the next acquistion.
|
||||
|
||||
|
||||
* [Mythen3] Readout speed
|
||||
Command line, python API: readoutspeed. Options: full_speed (10MHz),
|
||||
half_speed (20MHz, default), quarter_speed (40MHz)
|
||||
C++ API: get/setReadoutSpeed
|
||||
Also affect:
|
||||
Command line, python API: readoutspeedlist
|
||||
C++ API: getReadoutSpeedList
|
||||
|
||||
|
||||
* Sleep
|
||||
Command line, python/ C++ API: sleep
|
||||
Client sleeps for required time. Advanced command mainly for firmware
|
||||
developers to use in config files.
|
||||
|
||||
|
||||
* Xilinx Chip Test Board added
|
||||
* Updated documentation on python module installation
|
||||
|
||||
|
||||
|
||||
@ -287,8 +39,8 @@ This document describes the differences between v9.0.0 and v8.0.2
|
||||
|
||||
|
||||
Eiger 9.0.0
|
||||
Jungfrau 9.0.0
|
||||
Mythen3 9.0.0
|
||||
Jungfrau 9.1.0
|
||||
Mythen3 9.1.1
|
||||
Gotthard2 9.0.0
|
||||
Gotthard 9.0.0
|
||||
Moench 9.0.0
|
||||
@ -317,8 +69,8 @@ This document describes the differences between v9.0.0 and v8.0.2
|
||||
|
||||
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
||||
|
||||
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)
|
||||
Jungfrau 09.02.2025 (v1.6, HW v1.0) (updated in 9.1.0)
|
||||
08.02.2025 (v2.6, HW v2.0) (updated in 9.1.0)
|
||||
|
||||
Mythen3 13.11.2024 (v2.0) (updated in 9.0.0)
|
||||
|
||||
@ -360,6 +112,7 @@ This document describes the differences between v9.0.0 and v8.0.2
|
||||
4 Kernel Requirements
|
||||
======================
|
||||
|
||||
|
||||
Blackfin
|
||||
--------
|
||||
Latest version: Fri Oct 29 00:00:00 2021
|
||||
@ -367,10 +120,12 @@ This document describes the differences between v9.0.0 and v8.0.2
|
||||
Older ones will work, but might have issues with programming firmware via
|
||||
the package.
|
||||
|
||||
|
||||
Nios
|
||||
-----
|
||||
Compatible version: Mon May 10 18:00:21 CEST 2021
|
||||
|
||||
|
||||
Kernel Upgrade
|
||||
---------------
|
||||
Eiger via bit files
|
||||
@ -460,3 +215,4 @@ This document describes the differences between v9.0.0 and v8.0.2
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
alice.mazzoleni@psi.ch
|
||||
|
@ -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,8 +0,0 @@
|
||||
python:
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
|
@ -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,125 +0,0 @@
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
|
||||
|
||||
|
||||
source:
|
||||
path: ..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
binary_relocation: True
|
||||
rpaths:
|
||||
- lib/
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- cmake
|
||||
- qt 5.*
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
- xorg-libxext
|
||||
- xorg-libsm
|
||||
- xorg-libxau
|
||||
- xorg-libxrender
|
||||
- xorg-libxfixes
|
||||
- {{ cdt('mesa-libgl-devel') }} # [linux]
|
||||
- {{ cdt('mesa-libegl-devel') }} # [linux]
|
||||
- {{ cdt('mesa-dri-drivers') }} # [linux]
|
||||
- {{ cdt('libselinux') }} # [linux]
|
||||
- {{ cdt('libxdamage') }} # [linux]
|
||||
- {{ cdt('libxxf86vm') }} # [linux]
|
||||
- expat
|
||||
|
||||
host:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
- xorg-libxext
|
||||
- xorg-libsm
|
||||
- xorg-libxau
|
||||
- xorg-libxrender
|
||||
- xorg-libxfixes
|
||||
- expat
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
|
||||
outputs:
|
||||
- name: slsdetlib
|
||||
script: copy_lib.sh
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
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
|
||||
script: copy_gui.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qt 5.*
|
||||
- expat
|
||||
|
||||
- name: moenchzmq
|
||||
script: copy_moench.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- expat
|
@ -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,18 +4,20 @@
|
||||
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/
|
||||
|
||||
#Binaries
|
||||
cp build/install/bin/sls_detector_acquire $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_acquire_zmq $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_get $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_put $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_help $PREFIX/bin/.
|
||||
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
|
78
conda-recipes/main-library/meta.yaml
Executable file
78
conda-recipes/main-library/meta.yaml
Executable file
@ -0,0 +1,78 @@
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ version }}
|
||||
|
||||
build:
|
||||
number: 0
|
||||
binary_relocation: True
|
||||
rpaths:
|
||||
- lib/
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
- git
|
||||
- cmake
|
||||
- ninja
|
||||
- qt 5.*
|
||||
|
||||
host:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- libgl-devel # [linux]
|
||||
- libtiff
|
||||
- zlib
|
||||
- expat
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
|
||||
outputs:
|
||||
- name: slsdetlib
|
||||
script: copy_lib.sh
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{ stdlib("c") }}
|
||||
- {{ compiler('cxx') }}
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
|
||||
- name: slsdetgui
|
||||
script: copy_gui.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qt 5.*
|
||||
|
||||
|
||||
- name: moenchzmq
|
||||
script: copy_moench.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
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 @@
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
|
||||
package:
|
||||
name: slsdet
|
||||
version: {{ version }}
|
||||
|
||||
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
|
@ -63,4 +63,4 @@ html_static_path = ['static']
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet('css/extra.css') # may also be an URL
|
||||
app.add_css_file('css/extra.css') # may also be an URL
|
||||
|
@ -4,11 +4,54 @@ Command line interface
|
||||
Usage
|
||||
-------------
|
||||
|
||||
Commands can be used either with sls_detector_get or sls_detector_put
|
||||
The syntax is *'[detector index]-[module index]:[command]'*, where the indices are by default '0', when not specified.
|
||||
|
||||
Module index
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Modules are indexed based on their order in the hostname command. They are used to configure a specific module within a detector and are followed by a ':' in syntax.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# Applies to all modules of detector 0
|
||||
sls_detector_put exptime 5s
|
||||
|
||||
# Applies to only the 4th module
|
||||
sls_detector_put 3:exptime 5s
|
||||
|
||||
|
||||
Detector index
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
This index is useful when configuring multiple detectors from a single host. Each detector uses a unique shared memory identified by a detector index, derived again from the hostname command. It is followed by a '-'.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# For detector with index 2 in shared memory
|
||||
sls_detector_put 2-hostname bchip133+bchip123+bchip456
|
||||
|
||||
# Without '-', the detector index defaults to 0
|
||||
sls_detector_put hostname bchip133+bchip123+bchip456
|
||||
|
||||
# Accessing all modules with detector index 2
|
||||
sls_detector_put 2-exptime
|
||||
|
||||
# Starting acquisition only for detector with index 2
|
||||
sls_detector_put 2-start
|
||||
|
||||
# Applies only to the 2nd detector, 4th module
|
||||
sls_detector_put 1-3:exptime 5s
|
||||
|
||||
|
||||
Command Execution
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Commands can be executed using:
|
||||
|
||||
* **sls_detector_put**: setting values
|
||||
* **sls_detector_get**: getting values
|
||||
* **sls_detector**: automatically infers based on the number of arguments.
|
||||
* **sls_detector_help**: gets help on the specific command
|
||||
* **sls_detector_acquire**: initiates acquisition with the detector. This command blocks until the entire acquisition process is completed.
|
||||
|
||||
.. code-block::
|
||||
|
||||
sls_detector_get exptime
|
||||
|
||||
Help
|
||||
--------
|
||||
@ -28,12 +71,15 @@ Help
|
||||
# list of deprecated commands
|
||||
list deprecated
|
||||
|
||||
# autocompletion
|
||||
# bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the
|
||||
# main package folder to enable auto completion of commands and arguments
|
||||
# for the command line on that shell.
|
||||
source bash_autocomplete.sh
|
||||
|
||||
Autocompletion
|
||||
---------------
|
||||
|
||||
bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the main package folder to enable auto completion of commands and arguments for the command line on that shell.
|
||||
|
||||
.. code-block::
|
||||
|
||||
source bash_autocomplete.sh
|
||||
|
||||
|
||||
Commands
|
||||
|
@ -13,7 +13,6 @@ containing results from all modules. (:ref:`Result class<Result Class>`)
|
||||
|
||||
Here are some :ref:`examples <Cplusplus Api Examples>` on how to use the API.
|
||||
|
||||
.. _Cplusplus Api Examples:
|
||||
.. doxygenclass:: sls::Detector
|
||||
:members:
|
||||
:undoc-members:
|
@ -39,7 +39,7 @@ Welcome to slsDetectorPackage's documentation!
|
||||
|
||||
.. toctree::
|
||||
:caption: Command line
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
|
||||
commandline
|
||||
quick_start_guide
|
||||
@ -79,8 +79,9 @@ Welcome to slsDetectorPackage's documentation!
|
||||
:caption: Receiver
|
||||
:maxdepth: 2
|
||||
|
||||
receivers
|
||||
slsreceiver
|
||||
receivers
|
||||
|
||||
|
||||
.. toctree::
|
||||
:caption: Receiver Files
|
||||
|
@ -6,28 +6,47 @@
|
||||
Installation
|
||||
===============
|
||||
|
||||
One can either install pre-built binaries using conda or build from source.
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
:backlinks: top
|
||||
|
||||
|
||||
Overview
|
||||
--------------
|
||||
|
||||
The ``slsDetectorPackage`` provides core detector software implemented in C++, along with Python bindings packaged as the ``slsdet`` Python extension module. Choose the option that best fits your environment and use case.
|
||||
|
||||
:ref:`conda pre-built binaries`:
|
||||
Install pre-built binaries for the C++ client, receiver, GUI and the Python API (``slsdet``), simplifying setup across platforms.
|
||||
|
||||
:ref:`pip`:
|
||||
Install only the Python extension module, either by downloading the pre-built library from PyPI or by building the extension locally from source. Available only from v9.2.0 onwards.
|
||||
|
||||
:ref:`build from source`:
|
||||
Compile the entire package yourself, including both the C++ core and the Python bindings, for maximum control and customization. However, make sure that you have the :doc:`dependencies <../dependencies>` installed. If installing using conda, conda will manage the dependencies. Avoid installing packages with pip and conda simultaneously.
|
||||
|
||||
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||
manage the dependencies. Avoid also installing packages with pip.
|
||||
|
||||
.. _conda pre-built binaries:
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
----------------------------------
|
||||
1. Install pre-built binaries using conda (Recommended)
|
||||
--------------------------------------------------------
|
||||
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||
are from the developer branch. Please use released tags for stability.
|
||||
|
||||
We have three different packages available:
|
||||
|
||||
* **slsdetlib** shared libraries and command line utilities
|
||||
* **slsdetgui** GUI
|
||||
* **slsdet** Python bindings
|
||||
We have four different packages available:
|
||||
============== =============================================
|
||||
Package Description
|
||||
============== =============================================
|
||||
slsdetlib shared libraries and command line utilities
|
||||
slsdetgui GUI
|
||||
slsdet Python bindings
|
||||
moenchzmq moench
|
||||
============== =============================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -43,7 +62,7 @@ We have three different packages available:
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
...
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
@ -55,14 +74,33 @@ We have three different packages available:
|
||||
conda search slsdet
|
||||
# gui
|
||||
conda search slsdetgui
|
||||
# moench
|
||||
conda search moenchzmq
|
||||
|
||||
|
||||
.. _pip:
|
||||
|
||||
2. Pip
|
||||
-------
|
||||
The Python extension module ``slsdet`` can be installed using pip. This is available from v9.2.0 onwards.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#Install the Python extension module from PyPI
|
||||
pip install slsdet
|
||||
|
||||
# or install the python extension locally from source
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 9.2.0
|
||||
cd slsDetectorPackage
|
||||
pip install .
|
||||
|
||||
|
||||
Build from source
|
||||
----------------------
|
||||
.. _build from source:
|
||||
|
||||
1. Download Source Code from github
|
||||
3. Build from source
|
||||
-------------------------
|
||||
|
||||
3.1. Download Source Code from github
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: bash
|
||||
@ -77,12 +115,12 @@ Build from source
|
||||
|
||||
|
||||
|
||||
2. Build from Source
|
||||
3.2. Build from Source
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
One can either build using cmake or use the in-built cmk.sh script.
|
||||
|
||||
Build using CMake
|
||||
3.2.1. Build using CMake
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: bash
|
||||
@ -129,7 +167,7 @@ Example cmake options Comment
|
||||
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmake option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
||||
|
||||
|
||||
Build using in-built cmk.sh script
|
||||
3.2.2. Build using in-built cmk.sh script
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -179,8 +217,8 @@ Build using in-built cmk.sh script
|
||||
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmk script option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
||||
|
||||
|
||||
Build on old distributions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3.3. Build on old distributions using conda
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
@ -204,7 +242,7 @@ using this compiler
|
||||
|
||||
|
||||
|
||||
Build slsDetectorGui (Qt5)
|
||||
3.4. Build slsDetectorGui (Qt5)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. Using pre-built binary on conda
|
||||
@ -265,7 +303,7 @@ Build slsDetectorGui (Qt5)
|
||||
|
||||
|
||||
|
||||
Build this documentation
|
||||
3.5. Build this documentation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
@ -288,8 +326,8 @@ is to use conda
|
||||
make rst # rst only, saves time in case the API did not change
|
||||
|
||||
|
||||
Pybind and Zeromq
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4. Pybind and Zeromq
|
||||
-------------------------
|
||||
|
||||
.. _pybind for different slsDetectorPackage versions:
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
.. _master file attributes:
|
||||
|
||||
Master File Attributes
|
||||
=======================
|
||||
|
||||
|
@ -128,6 +128,10 @@ For Multiple Modules
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
.. note ::
|
||||
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
|
||||
Gui
|
||||
----
|
||||
|
||||
|
@ -1,25 +1,25 @@
|
||||
Receivers
|
||||
Custom Receiver
|
||||
=================
|
||||
|
||||
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
||||
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
||||
The receiver essentially listens to UDP data packets sent out by the detector.
|
||||
|
||||
To know more about detector receiver setup in the config file, please check out :ref:`the detector-receiver UDP configuration in the config file<detector udp header config>` and the :ref:`detector udp format<detector udp header>`.
|
||||
|
||||
|
||||
To know more about detector receiver configuration, please check out :ref:`detector udp header and udp commands in the config file <detector udp header>`
|
||||
| Please note the following when using a custom receiver:
|
||||
|
||||
Custom Receiver
|
||||
----------------
|
||||
* **udp_dstmac** must be configured in the config file. This parameter is not required when using an in-built receiver.
|
||||
|
||||
| When using custom receiver with our package, ensure that **udp_dstmac** is also configured in the config file. This parameter is not required when using slsReceiver.
|
||||
* Cannot use "auto" for **udp_dstip**.
|
||||
|
||||
| Cannot use "auto" for **udp_dstip**.
|
||||
* No **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||
|
||||
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||
|
||||
|
||||
The main difference is the lack of **rx_** commands or file commands (eg. **f**write, **f**path) and the **udp_dstmac** is required in config file.
|
||||
|
||||
Example of a custom receiver config file
|
||||
|
||||
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# detector hostname
|
||||
|
@ -39,13 +39,13 @@ Arguments
|
||||
|
||||
|
||||
.. _Automatic start servers:
|
||||
|
||||
Automatic start
|
||||
------------------
|
||||
|
||||
One can start the on-board detector server automatically upon powering on the board.
|
||||
|
||||
#. Create a soft link to the binary on board
|
||||
:
|
||||
#. Create a soft link to the binary on board:
|
||||
.. code-block:: bash
|
||||
|
||||
ln -sf someDetectorServervx.x.x someDetectorServer
|
||||
@ -87,8 +87,7 @@ One can start the on-board detector server automatically upon powering on the bo
|
||||
/root/xxxDetectorServer >> /dev/null &
|
||||
|
||||
|
||||
#. Sync, reboot and verify
|
||||
:
|
||||
#. Sync, reboot and verify:
|
||||
.. code-block:: bash
|
||||
|
||||
sync
|
||||
|
@ -1,4 +1,5 @@
|
||||
.. _Detector Server Upgrade:
|
||||
|
||||
Upgrade
|
||||
========
|
||||
|
||||
|
@ -1,16 +1,55 @@
|
||||
slsReceiver/ slsMultiReceiver
|
||||
In-built Receiver
|
||||
================================
|
||||
|
||||
| One has to start the slsReceiver before loading config file or using any receiver commands (prefix: **rx_** )
|
||||
|
||||
|
||||
The receiver essentially listens to UDP data packets sent out by the detector. It's main features are:
|
||||
|
||||
- **Listening**: Receives UDP data from the detector.
|
||||
- **Writing to File**: Optionally writes received data to disk.
|
||||
- **Streaming via ZMQ**: Optionally streams out the data using ZeroMQ.
|
||||
|
||||
Each of these operations runs asynchronously and in parallel for each UDP port.
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
* Can be run on the same or different machine as the client.
|
||||
* Can be configured by the client. (set file name/ discard policy, get progress etc.)
|
||||
* Has to be started before the client runs any receiver specific command.
|
||||
|
||||
|
||||
Receiver Variants
|
||||
-----------------
|
||||
There are three main receiver types. How to start them is described :ref:`below<Starting up the Receiver>`.
|
||||
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
| Receiver Type | slsReceiver | slsMultiReceiver |slsFrameSynchronizer |
|
||||
+======================+====================+=========================================+================================+
|
||||
| Modules Supported | 1 | Multiple | Multiple |
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
| Internal Architecture| Threads per porttt | Multiple child processes of slsReceiver | Multi-threading of slsReceiver |
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
| ZMQ Streaming | Disabled by default| Disabled by default | Enabled, not optional |
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
| ZMQ Synchronization | No | No | Yes, across ports |
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
| Image Reconstruction | No | No | No |
|
||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
.. _Starting up the Receiver:
|
||||
|
||||
Starting up the Receiver
|
||||
-------------------------
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
slsReceiver # default port 1954
|
||||
|
||||
# default port 1954
|
||||
slsReceiver
|
||||
|
||||
# custom port 2012
|
||||
slsReceiver -t2012
|
||||
slsReceiver -t2012 # custom port 2012
|
||||
|
||||
|
||||
For Multiple Modules
|
||||
@ -18,57 +57,66 @@ For Multiple Modules
|
||||
|
||||
# each receiver (for each module) requires a unique tcp port (if all on same machine)
|
||||
|
||||
# using slsReceiver in multiple consoles
|
||||
# option 1 (one for each module)
|
||||
slsReceiver
|
||||
slsReceiver -t1955
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers]
|
||||
# option 2
|
||||
slsMultiReceiver 2012 2
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
||||
slsMultiReceiver 2012 2 1
|
||||
# option 3
|
||||
slsFrameSynchronizer 2012 2
|
||||
|
||||
|
||||
|
||||
Client Commands
|
||||
-----------------
|
||||
|
||||
| One can remove **udp_dstmac** from the config file, as the slsReceiver fetches this from the **udp_ip**.
|
||||
* Client commands to the receiver begin with **rx_** or **f_** (file commands).
|
||||
|
||||
| One can use "auto" for **udp_dstip** if one wants to use default ip of **rx_hostname**.
|
||||
* **rx_hostname** has to be the first command to the receiver so the client knows which receiver process to communicate with.
|
||||
|
||||
| The first command to the receiver (**rx_** commands) should be **rx_hostname**. The following are the different ways to establish contact.
|
||||
* Can use 'auto' for **udp_dstip** if using 1GbE interface or the :ref:`virtual simulators<Virtual Detector Servers>`.
|
||||
|
||||
|
||||
To know more about detector receiver setup in the config file, please check out :ref:`the detector-receiver UDP configuration in the config file<detector udp header config>` and the :ref:`detector udp format<detector udp header>`.
|
||||
|
||||
|
||||
The following are the different ways to establish contact using **rx_hostname** command.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# default receiver tcp port (1954)
|
||||
# ---single module---
|
||||
|
||||
# default receiver port at 1954
|
||||
rx_hostname xxx
|
||||
|
||||
# custom receiver port
|
||||
rx_hostname xxx:1957 # option 1
|
||||
|
||||
rx_tcpport 1957 # option 2
|
||||
rx_hostname xxx
|
||||
|
||||
# custom receiver port
|
||||
rx_hostname xxx:1957
|
||||
|
||||
# custom receiver port
|
||||
rx_tcpport 1954
|
||||
rx_hostname xxx
|
||||
# ---multi module---
|
||||
|
||||
# multi modules with custom ports
|
||||
rx_hostname xxx:1955+xxx:1956+
|
||||
|
||||
|
||||
# multi modules using increasing tcp ports when using multi detector command
|
||||
# using increasing tcp ports
|
||||
rx_tcpport 1955
|
||||
rx_hostname xxx
|
||||
|
||||
# or specify multi modules with custom ports on same rxr pc
|
||||
0:rx_tcpport 1954
|
||||
# custom ports
|
||||
rx_hostname xxx:1955+xxx:1958+ # option 1
|
||||
|
||||
0:rx_tcpport 1954 # option 2
|
||||
1:rx_tcpport 1955
|
||||
2:rx_tcpport 1956
|
||||
rx_hostname xxx
|
||||
|
||||
# multi modules with custom ports on different rxr pc
|
||||
# custom ports on different receiver machines
|
||||
0:rx_tcpport 1954
|
||||
0:rx_hostname xxx
|
||||
1:rx_tcpport 1955
|
||||
1:rx_hostname yyy
|
||||
1:rx_hostname yyyrxr
|
||||
|
||||
|
||||
| Example commands:
|
||||
@ -91,6 +139,32 @@ Client Commands
|
||||
sls_detector_get -h rx_framescaught
|
||||
|
||||
|
||||
Example of a config file using in-built receiver
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# detector hostname
|
||||
hostname bchip052+bchip053+
|
||||
|
||||
# udp destination port (receiver)
|
||||
# sets increasing destination udp ports starting at 50004
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
0:udp_dstip 10.0.1.100
|
||||
1:udp_dstip 10.0.2.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
0:udp_srcip 10.0.1.184
|
||||
1:udp_srcip 10.0.2.184
|
||||
|
||||
# udp destination mac - not required (picked up from udp_dstip)
|
||||
#udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
||||
# connects to receivers at increasing tcp port starting at 1954
|
||||
rx_hostname mpc3434
|
||||
# same as rx_hostname mpc3434:1954+mpc3434:1955+
|
||||
|
||||
|
||||
|
||||
Performance
|
||||
|
@ -1,4 +1,4 @@
|
||||
.. _detector udp header:
|
||||
.. _detector udp header config:
|
||||
|
||||
|
||||
Config file
|
||||
|
@ -73,9 +73,9 @@ Description
|
||||
|
||||
* **modId**: module ID picked up from det_id_[detector type].txt on the detector cpu.
|
||||
|
||||
* **row**: row position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||
* **row**: row position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
* **column**: column position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||
* **column**: column position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||
|
||||
* **detType**: detector type from enum of detectorType in the package.
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
.. _Virtual Detector Servers:
|
||||
|
||||
Simulators
|
||||
===========
|
||||
|
||||
|
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)
|
@ -11,4 +11,6 @@ slsDetectorPackage/8.0.1_rh7 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.1_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.2_rh7 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||
|
||||
|
||||
|
@ -14,6 +14,8 @@ from pyctbgui.utils.defines import Defines
|
||||
import pyctbgui.utils.pixelmap as pm
|
||||
from pyctbgui.utils.recordOrApplyPedestal import recordOrApplyPedestal
|
||||
|
||||
from slsdet import detectorType
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from pyctbgui.services import AcquisitionTab, PlotTab
|
||||
|
||||
@ -30,6 +32,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.acquisitionTab: AcquisitionTab | None = None
|
||||
self.legend: LegendItem | None = None
|
||||
self.logger = logging.getLogger('AdcTab')
|
||||
self.tengiga = True
|
||||
|
||||
def setup_ui(self):
|
||||
self.plotTab = self.mainWindow.plotTab
|
||||
@ -42,6 +45,12 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.legend.clear()
|
||||
# subscribe to toggle legend
|
||||
self.plotTab.subscribeToggleLegend(self.updateLegend)
|
||||
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.checkBoxADC0_15Inv.setDisabled(True)
|
||||
self.view.checkBoxADC16_31Inv.setDisabled(True)
|
||||
self.view.lineEditADCInversion.setDisabled(True)
|
||||
self.view.labelADCInversion.setDisabled(True)
|
||||
|
||||
def initializeAllAnalogPlots(self):
|
||||
self.mainWindow.plotAnalogWaveform = pg.plot()
|
||||
@ -67,7 +76,8 @@ class AdcTab(QtWidgets.QWidget):
|
||||
|
||||
def connect_ui(self):
|
||||
for i in range(Defines.adc.count):
|
||||
getattr(self.view, f"checkBoxADC{i}Inv").stateChanged.connect(partial(self.setADCInv, i))
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
getattr(self.view, f"checkBoxADC{i}Inv").stateChanged.connect(partial(self.setADCInv, i))
|
||||
getattr(self.view, f"checkBoxADC{i}En").stateChanged.connect(partial(self.setADCEnable, i))
|
||||
getattr(self.view, f"checkBoxADC{i}Plot").stateChanged.connect(partial(self.setADCEnablePlot, i))
|
||||
getattr(self.view, f"pushButtonADC{i}").clicked.connect(partial(self.selectADCColor, i))
|
||||
@ -77,15 +87,17 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.view.checkBoxADC0_15Plot.stateChanged.connect(partial(self.setADCEnablePlotRange, 0, Defines.adc.half))
|
||||
self.view.checkBoxADC16_31Plot.stateChanged.connect(
|
||||
partial(self.setADCEnablePlotRange, Defines.adc.half, Defines.adc.count))
|
||||
self.view.checkBoxADC0_15Inv.stateChanged.connect(partial(self.setADCInvRange, 0, Defines.adc.half))
|
||||
self.view.checkBoxADC16_31Inv.stateChanged.connect(
|
||||
partial(self.setADCInvRange, Defines.adc.half, Defines.adc.count))
|
||||
self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg)
|
||||
self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.view.checkBoxADC0_15Inv.stateChanged.connect(partial(self.setADCInvRange, 0, Defines.adc.half))
|
||||
self.view.checkBoxADC16_31Inv.stateChanged.connect(
|
||||
partial(self.setADCInvRange, Defines.adc.half, Defines.adc.count))
|
||||
self.view.lineEditADCInversion.editingFinished.connect(self.setADCInvReg)
|
||||
|
||||
def refresh(self):
|
||||
self.updateADCNames()
|
||||
self.updateADCInv()
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.updateADCInv()
|
||||
self.updateADCEnable()
|
||||
|
||||
# ADCs Tab functions
|
||||
@ -196,9 +208,11 @@ class AdcTab(QtWidgets.QWidget):
|
||||
return decoder.decode(analog_array, pm.moench04_analog())
|
||||
|
||||
def getADCEnableReg(self):
|
||||
retval = self.det.adcenable
|
||||
if self.det.tengiga:
|
||||
retval = self.det.adcenable10g
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.tengiga = self.det.tengiga
|
||||
retval = self.det.adcenable10g
|
||||
if not self.tengiga:
|
||||
retval = self.det.adcenable
|
||||
self.view.lineEditADCEnable.editingFinished.disconnect()
|
||||
self.view.lineEditADCEnable.setText("0x{:08x}".format(retval))
|
||||
self.view.lineEditADCEnable.editingFinished.connect(self.setADCEnableReg)
|
||||
@ -207,8 +221,8 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCEnableReg(self):
|
||||
self.view.lineEditADCEnable.editingFinished.disconnect()
|
||||
try:
|
||||
mask = int(self.mainWindow.lineEditADCEnable.text(), 16)
|
||||
if self.det.tengiga:
|
||||
mask = int(self.view.lineEditADCEnable.text(), 16)
|
||||
if self.tengiga:
|
||||
self.det.adcenable10g = mask
|
||||
else:
|
||||
self.det.adcenable = mask
|
||||
@ -239,7 +253,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCEnable(self, i):
|
||||
checkBox = getattr(self.view, f"checkBoxADC{i}En")
|
||||
try:
|
||||
if self.det.tengiga:
|
||||
if self.tengiga:
|
||||
enableMask = manipulate_bit(checkBox.isChecked(), self.det.adcenable10g, i)
|
||||
self.det.adcenable10g = enableMask
|
||||
else:
|
||||
@ -265,7 +279,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
for i in range(start_nr, end_nr):
|
||||
mask = manipulate_bit(checkBox.isChecked(), mask, i)
|
||||
try:
|
||||
if self.det.tengiga:
|
||||
if self.tengiga:
|
||||
self.det.adcenable10g = mask
|
||||
else:
|
||||
self.det.adcenable = mask
|
||||
@ -344,7 +358,7 @@ class AdcTab(QtWidgets.QWidget):
|
||||
def setADCInvReg(self):
|
||||
self.view.lineEditADCInversion.editingFinished.disconnect()
|
||||
try:
|
||||
self.det.adcinvert = int(self.mainWindow.lineEditADCInversion.text(), 16)
|
||||
self.det.adcinvert = int(self.view.lineEditADCInversion.text(), 16)
|
||||
except Exception as e:
|
||||
QtWidgets.QMessageBox.warning(self.mainWindow, "ADC Inversion Fail", str(e), QtWidgets.QMessageBox.Ok)
|
||||
pass
|
||||
@ -395,7 +409,12 @@ class AdcTab(QtWidgets.QWidget):
|
||||
self.updateADCInv()
|
||||
|
||||
def saveParameters(self) -> list[str]:
|
||||
return [
|
||||
f"adcenable {self.view.lineEditADCEnable.text()}",
|
||||
f"adcinvert {self.view.lineEditADCInversion.text()}",
|
||||
]
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
return [
|
||||
f"adcenable {self.view.lineEditADCEnable.text()}",
|
||||
f"adcinvert {self.view.lineEditADCInversion.text()}",
|
||||
]
|
||||
else:
|
||||
return [
|
||||
f"adcenable {self.view.lineEditADCEnable.text()}"
|
||||
]
|
||||
|
@ -7,7 +7,7 @@ import zmq
|
||||
from PyQt5 import QtWidgets, uic
|
||||
import logging
|
||||
|
||||
from slsdet import readoutMode, runStatus
|
||||
from slsdet import readoutMode, runStatus, detectorType
|
||||
from pyctbgui.utils.defines import Defines
|
||||
from pyctbgui.utils.numpyWriter.npy_writer import NumpyFileManager
|
||||
from pyctbgui.utils.numpyWriter.npz_writer import NpzFileWriter
|
||||
@ -49,20 +49,37 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
self.adcTab = self.mainWindow.adcTab
|
||||
self.plotTab = self.mainWindow.plotTab
|
||||
self.toggleStartButton(False)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.labelRunF.setDisabled(True)
|
||||
self.view.labelADCF.setDisabled(True)
|
||||
self.view.labelADCPhase.setDisabled(True)
|
||||
self.view.labelADCPipeline.setDisabled(True)
|
||||
self.view.labelDBITF.setDisabled(True)
|
||||
self.view.labelDBITPhase.setDisabled(True)
|
||||
self.view.labelDBITPipeline.setDisabled(True)
|
||||
self.view.spinBoxRunF.setDisabled(True)
|
||||
self.view.spinBoxADCF.setDisabled(True)
|
||||
self.view.spinBoxADCPhase.setDisabled(True)
|
||||
self.view.spinBoxADCPipeline.setDisabled(True)
|
||||
self.view.spinBoxDBITF.setDisabled(True)
|
||||
self.view.spinBoxDBITPhase.setDisabled(True)
|
||||
self.view.spinBoxDBITPipeline.setDisabled(True)
|
||||
|
||||
def connect_ui(self):
|
||||
# For Acquistions Tab
|
||||
self.view.comboBoxROMode.currentIndexChanged.connect(self.setReadOut)
|
||||
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
||||
self.view.spinBoxTransceiver.editingFinished.connect(self.setTransceiver)
|
||||
self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog)
|
||||
self.view.spinBoxDigital.editingFinished.connect(self.setDigital)
|
||||
self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency)
|
||||
self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase)
|
||||
self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline)
|
||||
self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency)
|
||||
self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase)
|
||||
self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline)
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
||||
self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency)
|
||||
self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase)
|
||||
self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline)
|
||||
self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency)
|
||||
self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase)
|
||||
self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline)
|
||||
|
||||
self.view.checkBoxFileWriteRaw.stateChanged.connect(self.setFileWrite)
|
||||
self.view.checkBoxFileWriteNumpy.stateChanged.connect(self.setFileWriteNumpy)
|
||||
@ -77,16 +94,19 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
|
||||
def refresh(self):
|
||||
self.getReadout()
|
||||
self.getRunFrequency()
|
||||
self.getTransceiver()
|
||||
self.getAnalog()
|
||||
self.getDigital()
|
||||
self.getADCFrequency()
|
||||
self.getADCPhase()
|
||||
self.getADCPipeline()
|
||||
self.getDBITFrequency()
|
||||
self.getDBITPhase()
|
||||
self.getDBITPipeline()
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getRunFrequency()
|
||||
self.getADCFrequency()
|
||||
self.getADCPhase()
|
||||
self.getADCPipeline()
|
||||
self.getDBITFrequency()
|
||||
self.getDBITPhase()
|
||||
self.getDBITPipeline()
|
||||
|
||||
self.getFileWrite()
|
||||
self.getFileName()
|
||||
self.getFilePath()
|
||||
@ -697,23 +717,39 @@ class AcquisitionTab(QtWidgets.QWidget):
|
||||
self.socket.subscribe("")
|
||||
|
||||
def saveParameters(self) -> list[str]:
|
||||
return [
|
||||
f'romode {self.view.comboBoxROMode.currentText().lower()}',
|
||||
f'runclk {self.view.spinBoxRunF.value()}',
|
||||
f'adcclk {self.view.spinBoxADCF.value()}',
|
||||
f'adcphase {self.view.spinBoxADCPhase.value()}',
|
||||
f'adcpipeline {self.view.spinBoxADCPipeline.value()}',
|
||||
f'dbitclk {self.view.spinBoxDBITF.value()}',
|
||||
f'dbitphase {self.view.spinBoxDBITPhase.value()}',
|
||||
f'dbitpipeline {self.view.spinBoxDBITPipeline.value()}',
|
||||
f'fwrite {int(self.view.checkBoxFileWriteRaw.isChecked())}',
|
||||
f'fname {self.view.lineEditFileName.text()}',
|
||||
f'fpath {self.view.lineEditFilePath.text()}',
|
||||
f'findex {self.view.spinBoxAcquisitionIndex.value()}',
|
||||
f'frames {self.view.spinBoxFrames.value()}',
|
||||
f'triggers {self.view.spinBoxTriggers.value()}',
|
||||
f'period {self.view.spinBoxPeriod.value()} {self.view.comboBoxPeriod.currentText().lower()}',
|
||||
f'asamples {self.view.spinBoxAnalog.value()}',
|
||||
f'dsamples {self.view.spinBoxDigital.value()}',
|
||||
f'tsamples {self.view.spinBoxTransceiver.value()}',
|
||||
]
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
return [
|
||||
f'romode {self.view.comboBoxROMode.currentText().lower()}',
|
||||
f'runclk {self.view.spinBoxRunF.value()}',
|
||||
f'adcclk {self.view.spinBoxADCF.value()}',
|
||||
f'adcphase {self.view.spinBoxADCPhase.value()}',
|
||||
f'adcpipeline {self.view.spinBoxADCPipeline.value()}',
|
||||
f'dbitclk {self.view.spinBoxDBITF.value()}',
|
||||
f'dbitphase {self.view.spinBoxDBITPhase.value()}',
|
||||
f'dbitpipeline {self.view.spinBoxDBITPipeline.value()}',
|
||||
f'fwrite {int(self.view.checkBoxFileWriteRaw.isChecked())}',
|
||||
f'fname {self.view.lineEditFileName.text()}',
|
||||
f'fpath {self.view.lineEditFilePath.text()}',
|
||||
f'findex {self.view.spinBoxAcquisitionIndex.value()}',
|
||||
f'frames {self.view.spinBoxFrames.value()}',
|
||||
f'triggers {self.view.spinBoxTriggers.value()}',
|
||||
f'period {self.view.spinBoxPeriod.value()} {self.view.comboBoxPeriod.currentText().lower()}',
|
||||
f'asamples {self.view.spinBoxAnalog.value()}',
|
||||
f'dsamples {self.view.spinBoxDigital.value()}',
|
||||
f'tsamples {self.view.spinBoxTransceiver.value()}',
|
||||
]
|
||||
else:
|
||||
return [
|
||||
f'romode {self.view.comboBoxROMode.currentText().lower()}',
|
||||
f'fwrite {int(self.view.checkBoxFileWriteRaw.isChecked())}',
|
||||
f'fname {self.view.lineEditFileName.text()}',
|
||||
f'fpath {self.view.lineEditFilePath.text()}',
|
||||
f'findex {self.view.spinBoxAcquisitionIndex.value()}',
|
||||
f'frames {self.view.spinBoxFrames.value()}',
|
||||
f'triggers {self.view.spinBoxTriggers.value()}',
|
||||
f'period {self.view.spinBoxPeriod.value()} {self.view.comboBoxPeriod.currentText().lower()}',
|
||||
f'asamples {self.view.spinBoxAnalog.value()}',
|
||||
f'dsamples {self.view.spinBoxDigital.value()}',
|
||||
f'tsamples {self.view.spinBoxTransceiver.value()}',
|
||||
]
|
||||
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import QtWidgets, uic
|
||||
from pyctbgui.utils.defines import Defines
|
||||
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class DacTab(QtWidgets.QWidget):
|
||||
@ -19,7 +19,14 @@ class DacTab(QtWidgets.QWidget):
|
||||
dac = getattr(dacIndex, f"DAC_{i}")
|
||||
getattr(self.view, f"spinBoxDAC{i}").setValue(self.det.getDAC(dac)[0])
|
||||
|
||||
if self.det.highvoltage == 0:
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.checkBoxHighVoltage.setDisabled(True)
|
||||
self.view.spinBoxHighVoltage.setDisabled(True)
|
||||
self.view.labelHighVoltage.setDisabled(True)
|
||||
self.view.labelADCVppDacName.setDisabled(True)
|
||||
self.view.labelADCVpp.setDisabled(True)
|
||||
self.view.comboBoxADCVpp.setDisabled(True)
|
||||
elif self.det.highvoltage == 0:
|
||||
self.view.spinBoxHighVoltage.setDisabled(True)
|
||||
self.view.checkBoxHighVoltage.setChecked(False)
|
||||
|
||||
@ -30,9 +37,11 @@ class DacTab(QtWidgets.QWidget):
|
||||
getattr(self.view, f"checkBoxDAC{i}").stateChanged.connect(partial(self.setDACTristate, i))
|
||||
getattr(self.view, f"checkBoxDAC{i}mV").stateChanged.connect(partial(self.getDAC, i))
|
||||
|
||||
self.view.comboBoxADCVpp.currentIndexChanged.connect(self.setADCVpp)
|
||||
self.view.spinBoxHighVoltage.editingFinished.connect(self.setHighVoltage)
|
||||
self.view.checkBoxHighVoltage.stateChanged.connect(self.setHighVoltage)
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
self.view.comboBoxADCVpp.currentIndexChanged.connect(self.setADCVpp)
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
self.view.spinBoxHighVoltage.editingFinished.connect(self.setHighVoltage)
|
||||
self.view.checkBoxHighVoltage.stateChanged.connect(self.setHighVoltage)
|
||||
|
||||
def refresh(self):
|
||||
self.updateDACNames()
|
||||
@ -40,8 +49,10 @@ class DacTab(QtWidgets.QWidget):
|
||||
self.getDACTristate(i)
|
||||
self.getDAC(i)
|
||||
|
||||
self.getADCVpp()
|
||||
self.getHighVoltage()
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
self.getADCVpp()
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
self.getHighVoltage()
|
||||
|
||||
def updateDACNames(self):
|
||||
for i, name in enumerate(self.det.getDacNames()):
|
||||
@ -165,6 +176,8 @@ class DacTab(QtWidgets.QWidget):
|
||||
unit = " mV" if inMV else ""
|
||||
commands.append(f"dac {i} {value}{unit}")
|
||||
|
||||
commands.append(f"adcvpp {self.view.comboBoxADCVpp.currentText()} mV")
|
||||
commands.append(f"highvoltage {self.view.spinBoxHighVoltage.value()}")
|
||||
if self.view.comboBoxADCVpp.isEnabled():
|
||||
commands.append(f"adcvpp {self.view.comboBoxADCVpp.currentText()} mV")
|
||||
if self.view.checkBoxHighVoltage.isEnabled():
|
||||
commands.append(f"highvoltage {self.view.spinBoxHighVoltage.value()}")
|
||||
return commands
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import QtWidgets, uic
|
||||
from pyctbgui.utils.defines import Defines
|
||||
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
@ -18,7 +18,8 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
self.updateVoltageNames()
|
||||
for i in Defines.powerSupplies:
|
||||
self.getVoltage(i)
|
||||
self.getCurrent(i)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getCurrent(i)
|
||||
|
||||
def connect_ui(self):
|
||||
for i in Defines.powerSupplies:
|
||||
@ -38,6 +39,12 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
if retval == 0:
|
||||
checkBox.setChecked(False)
|
||||
spinBox.setDisabled(True)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
label = getattr(self.view, f"labelI{i}")
|
||||
label.setDisabled(True)
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.spinBoxVChip.setDisabled(True)
|
||||
|
||||
|
||||
def updateVoltageNames(self):
|
||||
retval = self.det.getPowerNames()
|
||||
@ -56,7 +63,10 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
spinBox.editingFinished.disconnect()
|
||||
checkBox.stateChanged.disconnect()
|
||||
|
||||
retval = self.det.getMeasuredPower(voltageIndex)[0]
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
retval = self.det.getPower(voltageIndex)[0]
|
||||
else:
|
||||
retval = self.det.getMeasuredPower(voltageIndex)[0]
|
||||
# spinBox.setValue(retval)
|
||||
if retval > 1:
|
||||
checkBox.setChecked(True)
|
||||
@ -68,8 +78,9 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
|
||||
spinBox.editingFinished.connect(partial(self.setVoltage, i))
|
||||
checkBox.stateChanged.connect(partial(self.setVoltage, i))
|
||||
|
||||
self.getVChip()
|
||||
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getVChip()
|
||||
|
||||
# TODO: handle multiple events when pressing enter (twice)
|
||||
|
||||
@ -91,7 +102,8 @@ class PowerSuppliesTab(QtWidgets.QWidget):
|
||||
# TODO: (properly) disconnecting and connecting to handle multiple events (out of focus and pressing enter).
|
||||
spinBox.editingFinished.connect(partial(self.setVoltage, i))
|
||||
self.getVoltage(i)
|
||||
self.getCurrent(i)
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.getCurrent(i)
|
||||
|
||||
def getCurrent(self, i):
|
||||
label = getattr(self.view, f"labelI{i}")
|
||||
|
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from PyQt5 import uic, QtWidgets
|
||||
|
||||
from pyctbgui.utils.defines import Defines
|
||||
from slsdet import dacIndex
|
||||
from slsdet import dacIndex, detectorType
|
||||
|
||||
|
||||
class SlowAdcTab(QtWidgets.QWidget):
|
||||
@ -17,7 +17,8 @@ class SlowAdcTab(QtWidgets.QWidget):
|
||||
self.det = None
|
||||
|
||||
def setup_ui(self):
|
||||
pass
|
||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||
self.view.pushButtonTemp.setDisabled(True)
|
||||
|
||||
def connect_ui(self):
|
||||
for i in range(Defines.slowAdc.count):
|
||||
@ -28,7 +29,8 @@ class SlowAdcTab(QtWidgets.QWidget):
|
||||
self.updateSlowAdcNames()
|
||||
for i in range(Defines.slowAdc.count):
|
||||
self.updateSlowAdc(i)
|
||||
self.updateTemperature()
|
||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||
self.updateTemperature()
|
||||
|
||||
def updateSlowAdcNames(self):
|
||||
for i, name in enumerate(self.mainWindow.det.getSlowADCNames()):
|
||||
|
@ -817,7 +817,7 @@ Only pressing enter on spinbox will set DAC (with this condition).</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<widget class="QLabel" name="label_125">
|
||||
<widget class="QLabel" name="labelADCVppDacName">
|
||||
<property name="text">
|
||||
<string>ADC_VPP</string>
|
||||
</property>
|
||||
|
@ -118,7 +118,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_70">
|
||||
<widget class="QLabel" name="labelRunF">
|
||||
<property name="text">
|
||||
<string>Run Clock Frequency (MHz):</string>
|
||||
</property>
|
||||
@ -218,7 +218,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_74">
|
||||
<widget class="QLabel" name="labelDBITF">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
@ -231,7 +231,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_71">
|
||||
<widget class="QLabel" name="labelADCF">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -278,7 +278,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="label_76">
|
||||
<widget class="QLabel" name="labelDBITPipeline">
|
||||
<property name="text">
|
||||
<string>DBIT Pipeline:</string>
|
||||
</property>
|
||||
@ -338,21 +338,21 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_73">
|
||||
<widget class="QLabel" name="labelADCPipeline">
|
||||
<property name="text">
|
||||
<string>ADC Pipeline:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_72">
|
||||
<widget class="QLabel" name="labelADCPhase">
|
||||
<property name="text">
|
||||
<string>ADC Clock Phase (a.u.):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="label_75">
|
||||
<widget class="QLabel" name="labelDBITPhase">
|
||||
<property name="text">
|
||||
<string>DBIT Clock Phase (a.u.):</string>
|
||||
</property>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_7">
|
||||
<widget class="QFrame" name="frame_ADC">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -3142,7 +3142,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_20">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_67">
|
||||
<widget class="QLabel" name="labelADCInversion">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
@ -3188,7 +3188,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_68">
|
||||
<widget class="QLabel" name="labelADCEnable">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<widget class="QFrame" name="frame_slowadcs">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
37
pyproject.toml
Normal file
37
pyproject.toml
Normal file
@ -0,0 +1,37 @@
|
||||
[tool.scikit-build.metadata.version]
|
||||
provider = "scikit_build_core.metadata.regex"
|
||||
input = "VERSION"
|
||||
regex = '^(?P<version>\d+(?:\.\d+)*(?:[\.\+\w]+)?)$'
|
||||
result = "{version}"
|
||||
|
||||
[build-system]
|
||||
requires = [ "scikit-build-core>=0.10", "pybind11", "numpy",]
|
||||
build-backend = "scikit_build_core.build"
|
||||
|
||||
[project]
|
||||
name = "slsdet"
|
||||
dynamic = ["version"]
|
||||
dependencies = [
|
||||
"numpy",
|
||||
]
|
||||
|
||||
[tool.cibuildwheel]
|
||||
before-all = "uname -a"
|
||||
build = "cp{311,312,313}-manylinux_x86_64"
|
||||
|
||||
[tool.scikit-build.build]
|
||||
verbose = true
|
||||
|
||||
[tool.scikit-build.cmake]
|
||||
build-type = "Release"
|
||||
|
||||
[tool.scikit-build.install]
|
||||
components = [ "python",]
|
||||
|
||||
[tool.scikit-build.cmake.define]
|
||||
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,7 +20,7 @@ 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
|
||||
@ -64,6 +64,10 @@ configure_file( scripts/test_virtual.py
|
||||
${CMAKE_BINARY_DIR}/test_virtual.py
|
||||
)
|
||||
|
||||
configure_file(scripts/frameSynchronizerPullSocket.py
|
||||
${CMAKE_BINARY_DIR}/bin/frameSynchronizerPullSocket.py COPYONLY)
|
||||
|
||||
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
||||
${CMAKE_BINARY_DIR}/bin/slsdet/VERSION
|
||||
)
|
||||
@ -71,9 +75,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()
|
||||
endif()
|
||||
|
19
python/scripts/frameSynchronizerPullSocket.py
Normal file
19
python/scripts/frameSynchronizerPullSocket.py
Normal file
@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
# Script to get combined zmq packets from frame synchronizer using pull zmq sockets
|
||||
import json
|
||||
import zmq
|
||||
|
||||
c = zmq.Context()
|
||||
s = c.socket(zmq.PULL)
|
||||
s.connect("tcp://127.0.0.1:5555")
|
||||
|
||||
while True:
|
||||
m = s.recv_multipart()
|
||||
for p in m:
|
||||
if p.startswith(b"{"):
|
||||
print(p.decode().strip())
|
||||
else:
|
||||
print("binary")
|
||||
print("--------")
|
||||
|
@ -123,6 +123,9 @@ def visit(node):
|
||||
if node.kind == cindex.CursorKind.CLASS_DECL:
|
||||
if node.displayname == "Detector":
|
||||
for child in node.get_children():
|
||||
# Skip assignment operators
|
||||
if child.kind == cindex.CursorKind.CXX_METHOD and child.spelling == "operator=":
|
||||
continue
|
||||
if (
|
||||
child.kind == cindex.CursorKind.CXX_METHOD
|
||||
and child.access_specifier == cindex.AccessSpecifier.PUBLIC
|
||||
|
@ -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,
|
||||
)
|
@ -14,7 +14,7 @@ from .moench import Moench
|
||||
from .pattern import Pattern, patternParameters
|
||||
from .gaincaps import Mythen3GainCapsWrapper
|
||||
|
||||
import _slsdet
|
||||
from . import _slsdet
|
||||
xy = _slsdet.xy
|
||||
defs = _slsdet.slsDetectorDefs
|
||||
|
||||
@ -41,3 +41,6 @@ def read_version():
|
||||
|
||||
__version__ = read_version()
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
@ -151,6 +151,10 @@ class Detector(CppDetectorApi):
|
||||
def hostname(self):
|
||||
"""Frees shared memory and sets hostname (or IP address) of all modules concatenated by +
|
||||
Virtual servers can already use the port in hostname separated by ':' and ports incremented by 2 to accomodate the stop server as well.
|
||||
|
||||
Note
|
||||
-----
|
||||
The row and column values in the udp/zmq header are affected by the order in this command and the detsize command. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on. This only affects row and column in udp/zmq header.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -2566,7 +2570,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
By default, the on-chip gain switching is active during the entire exposure. This mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us). The % is only for chipv1.0, the duration can be set for chipv1.1.\n
|
||||
By default, the on-chip gain switching is active during the entire exposure. This mode disables the on-chip gain switching comparator automatically and the duration is set using compdisabletime.\n
|
||||
Default is 0 or this mode disabled (comparator enabled throughout). 1 enables mode. 0 disables mode.
|
||||
"""
|
||||
return self.getAutoComparatorDisable()
|
||||
@ -2580,10 +2584,6 @@ class Detector(CppDetectorApi):
|
||||
def compdisabletime(self):
|
||||
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
||||
|
||||
Note
|
||||
-----
|
||||
It is only possible for chipv1.1.
|
||||
|
||||
:getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime
|
||||
|
||||
Example
|
||||
@ -2913,7 +2913,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def timing_info_decoder(self):
|
||||
"""[Jungfrau] [Jungfrau] Advanced Command and only for SWISSFEL and SHINE. Sets the bunch id or timing info decoder. Default is SWISSFEL.
|
||||
"""[Jungfrau] [Jungfrau] Advanced Command and only for SWISSFEL and SHINE. Sets the bunch id or timing info decoder. Default is SWISSFEL. Only allowed for pcbv2.0.
|
||||
Enum: timingInfoDecoder
|
||||
"""
|
||||
return self.getTimingInfoDecoder()
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.0.0
|
1
serverBin/ctbDetectorServerv9.1.0
Symbolic link
1
serverBin/ctbDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv9.1.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.0.0
|
1
serverBin/jungfrauDetectorServerv9.1.0
Symbolic link
1
serverBin/jungfrauDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.0.0
|
1
serverBin/mythen3DetectorServerv9.1.1
Symbolic link
1
serverBin/mythen3DetectorServerv9.1.1
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv9.1.1
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.0.0
|
1
serverBin/xilinx_ctbDetectorServerv9.1.0
Symbolic link
1
serverBin/xilinx_ctbDetectorServerv9.1.0
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServerv9.1.0
|
@ -503,6 +503,7 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
}
|
||||
#endif
|
||||
if (ee == PHOTON && val[iy * nx + ix] == max) {
|
||||
good = 1;
|
||||
ee = PHOTON_MAX;
|
||||
// cout << "**" <<id<< " " << iframe << " " << nDark << " "
|
||||
// << ix << " " << iy << " " << rms << " " << max << " " <<
|
||||
@ -536,7 +537,6 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
||||
cout << max << " " << val[iy * nx + ix] << endl;
|
||||
}
|
||||
//else (clusters + nph)->print();
|
||||
good = 1;
|
||||
if (eMin > 0 && tot < eMin)
|
||||
good = 0;
|
||||
if (eMax > 0 && tot > eMax)
|
||||
|
@ -61,7 +61,9 @@ class qDefs : public QWidget {
|
||||
}
|
||||
}
|
||||
|
||||
template <class CT> struct NonDeduced { using type = CT; };
|
||||
template <class CT> struct NonDeduced {
|
||||
using type = CT;
|
||||
};
|
||||
template <class S, typename RT, typename... CT>
|
||||
static void HandleExceptions(const std::string emsg, const std::string src,
|
||||
S *s, RT (S::*somefunc)(CT...),
|
||||
|
28
slsDetectorServers/compileAllServers.sh
Normal file → Executable file
28
slsDetectorServers/compileAllServers.sh
Normal file → Executable file
@ -1,17 +1,20 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer
|
||||
gotthardDetectorServer
|
||||
gotthard2DetectorServer
|
||||
jungfrauDetectorServer
|
||||
mythen3DetectorServer
|
||||
moenchDetectorServer
|
||||
xilinx_ctbDetectorServer"
|
||||
xilinx_ctbDetectorServer"
|
||||
)
|
||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [update_api(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tupdate_api if true updates the api to version in VERSION file"
|
||||
|
||||
update_api=true
|
||||
target=version
|
||||
|
||||
|
||||
|
||||
# arguments
|
||||
if [ $# -eq 0 ]; then
|
||||
@ -35,15 +38,12 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
declare -a det=("${1}")
|
||||
#echo "Compiling only $1"
|
||||
fi
|
||||
# branch
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
# arg in list
|
||||
if [[ $det_list == *$2* ]]; then
|
||||
echo -e "Invalid argument 2: $2. $usage"
|
||||
return 1
|
||||
update_api=$2
|
||||
if not $update_api ; then
|
||||
target=clean
|
||||
fi
|
||||
branch+=$2
|
||||
#echo "with branch $branch"
|
||||
fi
|
||||
else
|
||||
echo -e "Too many arguments.$usage"
|
||||
@ -54,6 +54,9 @@ declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
||||
|
||||
echo -e "list is ${det[@]}"
|
||||
|
||||
if $update_api; then
|
||||
echo "updating api to $(cat ../VERSION)"
|
||||
fi
|
||||
# compile each server
|
||||
idet=0
|
||||
for i in ${det[@]}
|
||||
@ -63,14 +66,13 @@ do
|
||||
echo -e "Compiling $dir [$file]"
|
||||
cd $dir
|
||||
make clean
|
||||
if make version API_BRANCH=$branch; then
|
||||
if make $target; then
|
||||
deterror[$idet]="OK"
|
||||
else
|
||||
deterror[$idet]="FAIL"
|
||||
fi
|
||||
mv bin/$dir bin/$file
|
||||
git add -f bin/$file
|
||||
cp bin/$file /tftpboot/
|
||||
cd ..
|
||||
echo -e "\n\n"
|
||||
((++idet))
|
||||
|
@ -1,87 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
# empty branch = developer branch in updateAPIVersion.sh
|
||||
branch=""
|
||||
det_list=("ctbDetectorServer"
|
||||
"gotthardDetectorServer"
|
||||
"gotthard2DetectorServer"
|
||||
"jungfrauDetectorServer"
|
||||
"mythen3DetectorServer"
|
||||
"moenchDetectorServer"
|
||||
"xilinx_ctbDetectorServer"
|
||||
)
|
||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
||||
|
||||
# arguments
|
||||
if [ $# -eq 0 ]; then
|
||||
# no argument, all servers
|
||||
declare -a det=${det_list[@]}
|
||||
echo "Compiling all servers"
|
||||
elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
||||
# 'all' servers
|
||||
if [[ $1 == "all" ]]; then
|
||||
declare -a det=${det_list[@]}
|
||||
echo "Compiling all servers"
|
||||
else
|
||||
# only one server
|
||||
# arg not in list
|
||||
if [[ $det_list != *$1* ]]; then
|
||||
echo -e "Invalid argument 1: $1. $usage"
|
||||
return -1
|
||||
fi
|
||||
declare -a det=("${1}")
|
||||
#echo "Compiling only $1"
|
||||
fi
|
||||
# branch
|
||||
if [ $# -eq 2 ]; then
|
||||
# arg in list
|
||||
if [[ $det_list == *$2* ]]; then
|
||||
echo -e "Invalid argument 2: $2. $usage"
|
||||
return -1
|
||||
fi
|
||||
branch+=$2
|
||||
#echo "with branch $branch"
|
||||
fi
|
||||
else
|
||||
echo -e "Too many arguments.$usage"
|
||||
return -1
|
||||
fi
|
||||
|
||||
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
||||
|
||||
echo -e "list is ${det[@]}"
|
||||
|
||||
# compile each server
|
||||
idet=0
|
||||
for i in ${det[@]}
|
||||
do
|
||||
dir=$i
|
||||
file="${i}_developer"
|
||||
echo -e "Compiling $dir [$file]"
|
||||
cd $dir
|
||||
make clean
|
||||
if make API_BRANCH=$branch; then
|
||||
deterror[$idet]="OK"
|
||||
else
|
||||
deterror[$idet]="FAIL"
|
||||
fi
|
||||
mv bin/$dir bin/$file
|
||||
git add -f bin/$file
|
||||
cp bin/$file /tftpboot/
|
||||
cd ..
|
||||
echo -e "\n\n"
|
||||
((++idet))
|
||||
done
|
||||
|
||||
echo -e "Results:"
|
||||
idet=0
|
||||
for i in ${det[@]}
|
||||
do
|
||||
printf "%s\t\t= %s\n" "$i" "${deterror[$idet]}"
|
||||
((++idet))
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
23
slsDetectorServers/compileEigerServer.sh
Normal file → Executable file
23
slsDetectorServers/compileEigerServer.sh
Normal file → Executable file
@ -3,21 +3,31 @@
|
||||
deterror="OK"
|
||||
dir="eigerDetectorServer"
|
||||
file="${dir}_developer"
|
||||
branch=""
|
||||
|
||||
usage="\nUsage: compileAllServers.sh [update_api(opt)]. \n\t update_api if true updates the api to version in VERSION file"
|
||||
|
||||
update_api=true
|
||||
target=version
|
||||
|
||||
# arguments
|
||||
if [ $# -eq 1 ]; then
|
||||
branch+=$1
|
||||
#echo "with branch $branch"
|
||||
update_api=$1
|
||||
if not $update_api ; then
|
||||
target=clean
|
||||
|
||||
fi
|
||||
elif [ ! $# -eq 0 ]; then
|
||||
echo -e "Only one optional argument allowed for branch."
|
||||
echo -e "Only one optional argument allowed for update_api."
|
||||
return -1
|
||||
fi
|
||||
|
||||
if $update_api; then
|
||||
echo "updating api to $(cat ../VERSION)"
|
||||
fi
|
||||
|
||||
echo -e "Compiling $dir [$file]"
|
||||
cd $dir
|
||||
make clean
|
||||
if make version API_BRANCH=$branch; then
|
||||
if make $target; then
|
||||
deterror="OK"
|
||||
else
|
||||
deterror="FAIL"
|
||||
@ -25,7 +35,6 @@ fi
|
||||
|
||||
mv bin/$dir bin/$file
|
||||
git add -f bin/$file
|
||||
cp bin/$file /tftpboot/
|
||||
cd ..
|
||||
echo -e "\n\n"
|
||||
printf "Result:\t\t= %s\n" "${deterror}"
|
||||
|
@ -25,11 +25,10 @@ version: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APICTB
|
||||
version_path=slsDetectorServers/ctbDetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
Binary file not shown.
@ -17,7 +17,7 @@
|
||||
#define BUFFERSIZE 16
|
||||
#define I2C_DEVICE_FILE "/dev/i2c-0"
|
||||
#define I2C_DEVICE_ADDRESS 0x4C
|
||||
//#define I2C_DEVICE_ADDRESS 0x48
|
||||
// #define I2C_DEVICE_ADDRESS 0x48
|
||||
#define I2C_REGISTER_ADDRESS 0x40
|
||||
|
||||
int i2c_open(const char *file, unsigned int addr) {
|
||||
|
@ -98,8 +98,8 @@
|
||||
// everything at ~200 kHz (200 kHz MHz ddr readout)
|
||||
#define DAQ_CHIP_CONTROLLER_SUPER_SLOW_SPEED 0x000c0000
|
||||
|
||||
//#define DAQ_FIFO_ENABLE 0x00100000 commented out as it
|
||||
// is not used anywhere
|
||||
// #define DAQ_FIFO_ENABLE 0x00100000 commented out as it
|
||||
// is not used anywhere
|
||||
#define DAQ_REG_CHIP_CMDS_INT_TRIGGER 0x00100000
|
||||
|
||||
// direct chip commands to the DAQ_REG_CHIP_CMDS register
|
||||
@ -131,8 +131,9 @@
|
||||
#define DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING 0x20000000
|
||||
#define DAQ_NEXPOSURERS_ACTIVATE_RATE_CORRECTION 0x40000000
|
||||
|
||||
//#define DAQ_MASTER_HALF_MODULE 0x80000000 currently not
|
||||
// used
|
||||
// #define DAQ_MASTER_HALF_MODULE 0x80000000 currently
|
||||
// not
|
||||
// used
|
||||
|
||||
// chips static bits
|
||||
#define DAQ_STATIC_BIT_PROGRAM 0x00000001
|
||||
|
@ -25,11 +25,10 @@ version: clean versioning $(PROGS) #hv9m_blackfin_server
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APIEIGER
|
||||
version_path=slsDetectorServers/eigerDetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#pragma once
|
||||
|
||||
//#include "types.h"
|
||||
// #include "types.h"
|
||||
#include <stdint.h>
|
||||
/******************************************************************************/
|
||||
/* types */
|
||||
|
@ -92,7 +92,7 @@ XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_BASEADDR
|
||||
#define XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_HIGHADDR 0xC410FFFF
|
||||
|
||||
/* Definitions for a new memory */
|
||||
//#define XPAR_PLB_LL_NEW_MEMORY 0xD1000000//0xD1000084//0xC4200000
|
||||
// #define XPAR_PLB_LL_NEW_MEMORY 0xD1000000//0xD1000084//0xC4200000
|
||||
|
||||
/* Definitions for peripheral PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT */
|
||||
#define XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT_BASEADDR 0xC4110000
|
||||
|
@ -24,11 +24,10 @@ version: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APIGOTTHARD2
|
||||
version_path=slsDetectorServers/gotthard2DetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
@ -27,7 +27,7 @@ version_branch=$(API_BRANCH)
|
||||
version_name=APIGOTTHARD
|
||||
version_path=slsDetectorServers/gotthardDetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
@ -22,13 +22,13 @@
|
||||
((0x1 << GAIN_CONFGAIN_OFST) & GAIN_CONFGAIN_MSK)
|
||||
|
||||
/** Flow Control register */
|
||||
//#define FLOW_CONTROL_REG (0x11 << MEM_MAP_SHIFT)
|
||||
// #define FLOW_CONTROL_REG (0x11 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Flow Status register */
|
||||
//#define FLOW_STATUS_REG (0x12 << MEM_MAP_SHIFT)
|
||||
// #define FLOW_STATUS_REG (0x12 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Frame register */
|
||||
//#define FRAME_REG (0x13 << MEM_MAP_SHIFT)
|
||||
// #define FRAME_REG (0x13 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Multi Purpose register */
|
||||
#define MULTI_PURPOSE_REG (0x14 << MEM_MAP_SHIFT)
|
||||
@ -79,7 +79,7 @@
|
||||
((0x0007f << DAQ_PCKT_LNGTH_OFST) & DAQ_PCKT_LNGTH_MSK)
|
||||
|
||||
/** Time From Start register */
|
||||
//#define TIME_FROM_START_REG (0x16 << MEM_MAP_SHIFT)
|
||||
// #define TIME_FROM_START_REG (0x16 << MEM_MAP_SHIFT)
|
||||
|
||||
/** DAC Control register */
|
||||
#define SPI_REG (0x17 << MEM_MAP_SHIFT)
|
||||
@ -139,7 +139,7 @@
|
||||
((0x1b << ADC_SYNC_ENET_DELAY_OFST) & ADC_SYNC_ENET_DELAY_MSK)
|
||||
|
||||
/** Time From Start register */
|
||||
//#define MU_TIME_REG (0x1a << MEM_MAP_SHIFT)
|
||||
// #define MU_TIME_REG (0x1a << MEM_MAP_SHIFT)
|
||||
|
||||
/** Temperatre SPI In register */
|
||||
#define TEMP_SPI_IN_REG (0x1b << MEM_MAP_SHIFT)
|
||||
@ -171,7 +171,7 @@
|
||||
#define ENET_CONF_REG (0x1e << MEM_MAP_SHIFT)
|
||||
|
||||
/** Write TSE Shadow register */
|
||||
//#define WRITE_TSE_SHADOW_REG (0x1f << MEM_MAP_SHIFT)
|
||||
// #define WRITE_TSE_SHADOW_REG (0x1f << MEM_MAP_SHIFT)
|
||||
|
||||
/** High Voltage register */
|
||||
#define HV_REG (0x20 << MEM_MAP_SHIFT)
|
||||
@ -288,10 +288,10 @@
|
||||
((0x4 << EXT_SIGNAL_OFST) & EXT_SIGNAL_MSK)
|
||||
|
||||
/** Look at me register */
|
||||
//#define LOOK_AT_ME_REG (0x28 << MEM_MAP_SHIFT)
|
||||
// #define LOOK_AT_ME_REG (0x28 << MEM_MAP_SHIFT)
|
||||
|
||||
/** FPGA SVN register */
|
||||
//#define FPGA_SVN_REG (0x29 << MEM_MAP_SHIFT)
|
||||
// #define FPGA_SVN_REG (0x29 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Chip of Interest register */
|
||||
#define CHIP_OF_INTRST_REG (0x2a << MEM_MAP_SHIFT)
|
||||
@ -303,7 +303,7 @@
|
||||
(0x0000FFFF << CHIP_OF_INTRST_NUM_CHNNLS_OFST)
|
||||
|
||||
/** Out MUX register */
|
||||
//#define OUT_MUX_REG (0x2b << MEM_MAP_SHIFT)
|
||||
// #define OUT_MUX_REG (0x2b << MEM_MAP_SHIFT)
|
||||
|
||||
/** Board Version register */
|
||||
#define BOARD_REVISION_REG (0x2c << MEM_MAP_SHIFT)
|
||||
@ -312,29 +312,29 @@
|
||||
#define BOARD_REVISION_MSK (0x0000FFFF << BOARD_REVISION_OFST)
|
||||
#define DETECTOR_TYPE_OFST (16)
|
||||
#define DETECTOR_TYPE_MSK (0x0000000F << DETECTOR_TYPE_OFST)
|
||||
//#define DETECTOR_TYPE_GOTTHARD_VAL (??)
|
||||
// #define DETECTOR_TYPE_GOTTHARD_VAL (??)
|
||||
#define DETECTOR_TYPE_MOENCH_VAL (2)
|
||||
|
||||
/** Memory Test register */
|
||||
//#define MEMORY_TEST_REG (0x2d << MEM_MAP_SHIFT)
|
||||
// #define MEMORY_TEST_REG (0x2d << MEM_MAP_SHIFT)
|
||||
|
||||
/** Hit Threshold register */
|
||||
//#define HIT_THRESHOLD_REG (0x2e << MEM_MAP_SHIFT)
|
||||
// #define HIT_THRESHOLD_REG (0x2e << MEM_MAP_SHIFT)
|
||||
|
||||
/** Hit Count register */
|
||||
//#define HIT_COUNT_REG (0x2f << MEM_MAP_SHIFT)
|
||||
// #define HIT_COUNT_REG (0x2f << MEM_MAP_SHIFT)
|
||||
|
||||
/* 16 bit Fifo Data register */
|
||||
#define FIFO_DATA_REG (0x50 << MEM_MAP_SHIFT) // Not used in FW and SW (16bit)
|
||||
|
||||
/** Dacs Set 1 register */
|
||||
//#define DACS_SET_1_REG (0x65 << MEM_MAP_SHIFT)
|
||||
// #define DACS_SET_1_REG (0x65 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Dacs Set 2 register */
|
||||
//#define DACS_SET_2_REG (0x66 << MEM_MAP_SHIFT)
|
||||
// #define DACS_SET_2_REG (0x66 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Dacs Set 3 register */
|
||||
//#define DACS_SET_3_REG (0x67 << MEM_MAP_SHIFT)
|
||||
// #define DACS_SET_3_REG (0x67 << MEM_MAP_SHIFT)
|
||||
|
||||
/* Set Delay 64 bit register */
|
||||
#define SET_DELAY_LSB_REG (0x68 << MEM_MAP_SHIFT)
|
||||
@ -377,12 +377,12 @@
|
||||
#define GET_EXPTIME_MSB_REG (0x7b << MEM_MAP_SHIFT)
|
||||
|
||||
/* Set Gates 64 bit register */
|
||||
//#define SET_GATES_LSB_REG (0x7c << MEM_MAP_SHIFT)
|
||||
//#define SET_GATES_MSB_REG (0x7d << MEM_MAP_SHIFT)
|
||||
// #define SET_GATES_LSB_REG (0x7c << MEM_MAP_SHIFT)
|
||||
// #define SET_GATES_MSB_REG (0x7d << MEM_MAP_SHIFT)
|
||||
|
||||
/* Set Gates 64 bit register */
|
||||
//#define GET_GATES_LSB_REG (0x7e << MEM_MAP_SHIFT)
|
||||
//#define GET_GATES_MSB_REG (0x7f << MEM_MAP_SHIFT)
|
||||
// #define GET_GATES_LSB_REG (0x7e << MEM_MAP_SHIFT)
|
||||
// #define GET_GATES_MSB_REG (0x7f << MEM_MAP_SHIFT)
|
||||
|
||||
/* Dark Image starting address */
|
||||
#define DARK_IMAGE_REG (0x81 << MEM_MAP_SHIFT)
|
||||
|
@ -24,11 +24,10 @@ version: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APIJUNGFRAU
|
||||
version_path=slsDetectorServers/jungfrauDetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv9.1.0
Executable file
Binary file not shown.
@ -1974,9 +1974,6 @@ int autoCompDisable(int on) {
|
||||
}
|
||||
|
||||
int setComparatorDisableTime(int64_t val) {
|
||||
if (getChipVersion() != 11) {
|
||||
return FAIL;
|
||||
}
|
||||
if (val < 0) {
|
||||
LOG(logERROR,
|
||||
("Invalid comp disable time: %lld ns\n", (long long int)val));
|
||||
@ -2817,7 +2814,8 @@ void *start_timer(void *arg) {
|
||||
getNextFrameNumber(&frameNr);
|
||||
int iRxEntry = firstDest;
|
||||
for (int iframes = 0; iframes != numFrames; ++iframes) {
|
||||
usleep(transmissionDelayUs);
|
||||
if (transmissionDelayUs)
|
||||
usleep(transmissionDelayUs);
|
||||
|
||||
// check if manual stop
|
||||
if (sharedMemory_getStop() == 1) {
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define MIN_REQRD_VRSN_T_RD_API 0x171220
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x230920 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x230921 // 2.0 pcb (version = 011)
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x250209 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x250208 // 2.0 pcb (version = 011)
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
|
@ -24,11 +24,10 @@ version: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APIMOENCH
|
||||
version_path=slsDetectorServers/moenchDetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
@ -1927,7 +1927,8 @@ void *start_timer(void *arg) {
|
||||
getNextFrameNumber(&frameNr);
|
||||
int iRxEntry = firstDest;
|
||||
for (int iframes = 0; iframes != numFrames; ++iframes) {
|
||||
usleep(transmissionDelayUs);
|
||||
if (transmissionDelayUs)
|
||||
usleep(transmissionDelayUs);
|
||||
|
||||
// check if manual stop
|
||||
if (sharedMemory_getStop() == 1) {
|
||||
|
@ -25,11 +25,10 @@ version: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
version_branch=$(API_BRANCH)
|
||||
version_name=APIMYTHEN3
|
||||
version_path=slsDetectorServers/mythen3DetectorServer
|
||||
versioning:
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; python updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
|
||||
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user