Merge branch '2410-new-fpga-release' into 'main'

version 1.0.0-rc.24

See merge request jungfraujoch/nextgendcu!97
This commit is contained in:
2024-11-17 14:55:09 +01:00
361 changed files with 12513 additions and 3314 deletions

View File

@@ -1,329 +0,0 @@
stages:
- build
- test
- synthesis
- release
build:x86:gcc:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j48
build:x86:gcc_writer:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_WRITER_ONLY=ON ..
- make -j48
build:x86:driver:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- cd fpga/pcie_driver
- make
build:x86:python_client:
stage: build
needs: []
tags:
- python
script:
- cd python-client
- python3 setup.py sdist bdist_wheel
- mv dist/* ..
artifacts:
paths:
- jfjoch_client-*whl
- jfjoch_client-*tar.gz
expire_in: 1 week
build:x86:vitis_hls:
stage: build
tags:
- x86
needs: []
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- fpga/hls/*
- fpga/hdl/*
- fpga/scripts/*
- fpga/xdc/*
- fpga/microblaze/*
- fpga/include/jfjoch_fpga.h
script:
- source /opt/Xilinx/Vitis_HLS/2022.1/settings64.sh
- mkdir build
- cd build
- /usr/bin/cmake ..
- make hls
build:x86:frontend:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- /usr/bin/cmake ..
- make frontend
- cd ../frontend/dist
- tar czf ../../jfjoch_frontend.tar.gz *
artifacts:
paths:
- jfjoch_frontend.tar.gz
expire_in: 1 week
build:x86:rpm:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "*.rpm"
expire_in: 1 week
test:x86:gcc:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
dependencies: []
tags:
- gcc
- x86
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j48 jfjoch_test HDF5DatasetWriteTest
- cd tests
- ./jfjoch_test -r junit -o report.xml
- cd ../tools
- ./HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5
artifacts:
expire_in: 1 week
reports:
junit: build/tests/report.xml
test:x86:crystfel:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
dependencies: []
tags:
- gcc
- x86
- crystfel
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- cd ../tests/crystfel
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 10
- indexamajig -i writing_test.lst -g jf4m.geom -o x.stream --indexing=xgandalf
test:x86:xds_durin:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- cd ../tests/xds_durin
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xds_neggia:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- cd ../tests/xds_neggia
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xia2.ssx:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- mkdir -p dials_test
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- cd ../dials_test
- ../build/tools/HDF5DatasetWriteTest ../tests/test_data/compression_benchmark.h5 100
- source /usr/local/dials-v3-17-0/dials_env.sh
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
synthesis:vivado_pcie_100g:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- fpga/hls/*
- fpga/hdl/*
- fpga/scripts/*
- fpga/xdc/*
- fpga/pcie_driver/jfjoch_fpga.h
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
allow_failure: true
tags:
- vivado
retry: 2
artifacts:
paths:
- "jfjoch_fpga_pcie_100g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- touch jfjoch_fpga_pcie_100g.mcs
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_100g
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
needs: ["build:x86:gcc", "test:x86:gcc"]
synthesis:vivado_pcie_8x10g:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- fpga/hls/*
- fpga/hdl/*
- fpga/scripts/*
- fpga/xdc/*
- fpga/pcie_driver/jfjoch_fpga.h
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
allow_failure: true
tags:
- vivado
retry: 2
artifacts:
paths:
- "jfjoch_fpga_pcie_8x10g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- touch jfjoch_fpga_pcie_8x10g.mcs
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_8x10g
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
needs: [ "build:x86:gcc", "test:x86:gcc" ]
release:
stage: release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
tags:
- x86
dependencies:
- synthesis:vivado_pcie_8x10g
- synthesis:vivado_pcie_100g
- build:x86:python_client
- build:x86:frontend
- build:x86:rpm
script:
- bash gitlab_upload_release.sh

View File

@@ -1,6 +1,7 @@
stages:
- build
- test
- synthesis
- release
build:x86:gcc:
@@ -217,6 +218,78 @@ test:x86:xia2.ssx:
- source /usr/local/dials-v3-17-0/dials_env.sh
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
synthesis:hls:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^HLS/
tags:
- vivado
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make hls
needs: ["build:x86:gcc", "test:x86:gcc"]
synthesis:100g:
stage: synthesis
dependencies: []
retry: 2
variables:
CC: gcc
CXX: g++
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
tags:
- vivado
artifacts:
paths:
- "jfjoch_fpga_pcie_100g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_100g
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
needs: ["build:x86:gcc", "test:x86:gcc"]
synthesis:8x10g:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
retry: 2
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
tags:
- vivado
artifacts:
paths:
- "jfjoch_fpga_pcie_8x10g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_8x10g
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
needs: [ "build:x86:gcc", "test:x86:gcc" ]
release:
stage: release
rules:

View File

@@ -1,42 +0,0 @@
stages:
- mirror
- build
- publish
mirror-psi:
stage: mirror
tags:
- docker-shared
script:
- SOURCE_REPOSITORY=https://$PSI_PROJECT_GIT_USRNAME:$PSI_PROJECT_GIT_TOKEN@gitlab.psi.ch/jungfraujoch/nextgendcu.git
- DESTINATION_REPOSITORY=https://$MIV_PROJECT_GIT_USRNAME:$MIV_PROJECT_GIT_TOKEN@gitlab.maxiv.lu.se/jungfraujoch/nextgendcu.git
- GIT_USER_NAME=git
- GIT_USER_EMAIL=git@maxiv.lu.se
- rm -rf _mirror_repo_tmp
- git clone --mirror $SOURCE_REPOSITORY _mirror_repo_tmp
- cd _mirror_repo_tmp
- git config --local user.name "${GIT_USER_NAME}"
- git config --local user.email "${GIT_USER_EMAIL}"
- git remote remove origin
- git remote add origin $DESTINATION_REPOSITORY
- git push --prune --all
- git push --prune --tags
after_script:
- rm -rf _mirror_repo_tmp
rules:
- if: '$CI_PIPELINE_SOURCE != "schedule" && $CI_PIPELINE_SOURCE != "trigger"'
when: never
- if: '$MODE != "sync"'
when: never
- when: always
include:
- project: 'kits-maxiv/cfg-maxiv-gitlabci'
file: '/Docker.gitlab-ci.yml'
variables:
DOCKER_REGISTRY: "harbor.maxiv.lu.se/daq"
GIT_SUBMODULE_STRATEGY: recursive

6
LICENSE Normal file
View File

@@ -0,0 +1,6 @@
Operating Jungfraujoch requires license from the Paul Scherrer Institute.
Specifically, non-profit research facilities operating PSI JUNGFRAU and PSI EIGER detectors are granted the license to use the
code and binary images within their facilities, as well as to modify the code according to their needs.
Sharing the code requires explicit permission from the Paul Scherrer Institute.

108
README.md
View File

@@ -2,110 +2,4 @@
Application to receive data from the PSI JUNGFRAU and EIGER detectors.
Citation: F. Leonarski, M. Bruckner, C. Lopez-Cuenca, A. Mozzanica, H.-C. Stadler, Z. Matej, A. Castellane, B. Mesnet, J. Wojdyla, B. Schmitt and M. Wang "Jungfraujoch: hardware-accelerated data-acquisition system for kilohertz pixel-array X-ray detectors" (2023), J. Synchrotron Rad., 30, 227-234 [doi:10.1107/S1600577522010268](https://doi.org/10.1107/S1600577522010268).
The project is supported by :
* Innosuisse via Innovation Project "NextGenDCU high data rate acquisition system for X-ray detectors in structural biology applications" (101.535.1 IP-ENG; Apr 2023 - Sep 2025).
* ETH Domain via Open Research Data Contribute project (Jan - Dec 2023)
* AMD University Program with donation of licenses of Ethernet IP cores and Vivado software
## License
Operating Jungfraujoch requires license from the Paul Scherrer Institute.
Specifically, non-profit research facilities operating PSI JUNGFRAU and PSI EIGER detectors are granted the license to use the
code and binary images within their facilities, as well as to modify the code according to their needs.
Sharing the code requires explicit permission from the Paul Scherrer Institute.
## Compatible detectors
Currently, Jungfraujoch supports PSI JUNGFRAU and PSI EIGER detectors.
## Hardware requirements
See [hardware requirements](HARDWARE.md) documentation.
## FPGA bitstream
Instructions see [here](fpga/README.md)
## Detector
Jungfraujoch supports PSI JUNGFRAU and EIGER detectors. Jungfruajoch controls the detector via statically compiled `slsDetectorPackage` into its source code.
It is important that detector firmware has to match `slsDetectorPackage` version used in Jungfraujoch (8.0.2 at the moment).
See [PSI Detector group website](https://www.psi.ch/en/lxn/software-releases) for details.
## Operating system
Recommended operating system is Red Hat Enterprise Linux (RHEL) / Rocky Linux versions 8.
For this operating system we provide RPMs with pre-built binaries to simplify deployment.
We do also operate one of the systems with Rocky 9 without issues.
Running Jungfraujoch on Red Hat Enterprise Linux 7 is currently not tested and not recommended,
but likely possible with providing some packages from external repositories.
There are some limited tests with recent Ubuntu and Fedora distributions, though these are not systematic.
Other linux platforms should work, but no tests were done so far.
### Software dependencies
Required:
* C++20 compiler and C++20 standard library; recommended GCC 11+ or clang 14+ (Intel OneAPI, AMD AOCC)
* CMake version 3.21 or newer + GNU make tool
* zlib compression library
Optional:
* CUDA compiler version 11 or newer - required for MX fast feedback indexer
* NUMA library - to pin threads to nodes/CPUs
* Node.js - to make frontend
Automatically downloaded by CMake and statically linked:
* SLS Detector Package - see [github.com/slsdetectorgroup/slsDetectorPackage](https://github.com/slsdetectorgroup/slsDetectorPackage)
* Zstandard (Facebook) - see [github.com/facebook/zstd](https://github.com/facebook/zstd)
* Pistache webserver - see [github.com/pistacheio/pistache](https://github.com/pistacheio/pistache)
* Fast feedback indexer (Hans-Christian Stadler, PSI) - see [github.com/paulscherrerinstitute/fast-feedback-indexer](https://github.com/paulscherrerinstitute/fast-feedback-indexer)
* Catch2 testing library - see [github.com/catchorg/Catch2](https://github.com/catchorg/Catch2)
* HDF5 library - see [github.com/HDFGroup/hdf5](https://github.com/HDFGroup/hdf5)
* TIFF library - see [gitlab.com/libtiff/libtiff](https://gitlab.com/libtiff/libtiff)
Please follow the link provided above to check for LICENSE file. Building code with dependencies above requires access from the build system to github.com.
Directly included in the repository:
* JSON parser/writer from N. Lohmann - see [github.com/nlohmann/json](https://github.com/nlohmann/json)
* Xilinx arbitrary precision arithmetic headers - see [github.com/Xilinx/HLS_arbitrary_Precision_Types](https://github.com/Xilinx/HLS_arbitrary_Precision_Types)
* Bitshuffle filter from K. Masui - see [github.com/kiyo-masui/bitshuffle](https://github.com/kiyo-masui/bitshuffle)
* Fast replacement for Bitshuffle pre-compression filter (Kal Cutter, DECTRIS) - see [github.com/kalcutter/bitshuffle](https://github.com/kalcutter/bitshuffle)
* Tinycbor (Intel) - see [github.com/intel/tinycbor](https://github.com/intel/tinycbor)
* LZ4 compression by Y.Collet - see [github.com/lz4/lz4](https://github.com/lz4/lz4)
* Spdlog logging library - see [github.com/gabime/spdlog](https://github.com/gabime/spdlog)
* ZeroMQ library (through slsDetectorPackage) - see [github.com/zeromq/libzmq](https://github.com/zeromq/libzmq)
For license check LICENSE file in respective directory
## Installation guide
Follow [Installation guide](INSTALL.md).
### Software components
* `jfjoch_broker` in `broker` - main service running on the Jungfraujoch server, responsible for control of the detector and data acquisition;
Example configuration `jfjoch_broker` for the modules is given in configuration files present in `etc` directory. See [details](broker/README.md).
* `jfjoch_writer` in `writer` - HDF5 writer; HDF5 writer is designed to work on the same or separate server system. It has rather limited requirements in terms of performance and memory.
The goal is to separate data acquisition node with custom FPGA hardware and file system node with stronger security/stability requirements. See [details](writer/README.md).
## Web Frontend
Jungfraujoch is equipped with React-based web frontend for user-friendly experience. Frontend has the following options:
* Presenting current state of the detector
* Plotting results of online quality calculations
* Showing live view images from the detector
* JUNGFRAU calibration numbers
* Configuring the detector, as well as pedestal/initialization operations
Frontend is written in TypeScript. For details see [frontend/](frontend) directory.
## OpenAPI python client
Jungfraujoch is controlled with HTTP/REST interface defined with an OpenAPI specification. For convenience, we provide Python client in [python_client](python_client/) directory.
## Tests
Automated test routine is then accessible as `tests/jfjoch_test`. There are also benchmark routines:
* `HDF5DatasetWriteTest` to measure HDF5 dataset writing speed (single threaded)
* `jfjoch_spot_finding_test` to apply spot finding and indexing routines in Jungfraujoch to an example dataset - this is equivalent to FPGA spot finding algorithm, but NOT performance equivalent as it is particularly not-efficient
* `jfjoch_action_test` to test quality/performance of FPGA card(s) and software routines
In addition, tests are executed to verify that datasets written by Jungfraujoch are readable with XDS Durin plugin, XDS Neggia plygin and CrystFEL.
Input files for these programs are placed in `xds_durin`, `xds_neggia` and `crystfel` folders. See `.gitlab-ci.yml` for details.
All documentation is now placed in [docs/](docs/) subdirectory.

View File

@@ -1 +1 @@
1.0.0-rc.23
1.0.0-rc.24

View File

@@ -21,7 +21,7 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_
(experiment.GetDetectorMode() == DetectorMode::PedestalG2))
expected_frames = experiment.GetFrameNum();
else
expected_frames = experiment.GetImageNum();
expected_frames = experiment.GetFrameNum() / experiment.GetFPGASummation();
nmodules = experiment.GetModulesNum(data_stream);
if (nmodules > max_modules)
@@ -35,7 +35,14 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_
saved_completions = std::vector<Completion>(expected_frames * nmodules);
packets_per_module = std::vector<uint64_t>(nmodules);
total_packets = 0;
expected_packets_per_module = 256 * experiment.GetSummation();
expected_packets_per_module = 512 * experiment.GetFPGASummation();
if (experiment.GetByteDepthReadout() == 4)
bytes_per_packet = 4096LU;
else if (experiment.GetByteDepthReadout() == 1)
bytes_per_packet = 1024LU; // Need to seriously refactor, to have expected_packets_per_module specific for detector
else
bytes_per_packet = 2048LU;
}
void AcquisitionCounters::UpdateCounters(const Completion *c) {
@@ -134,6 +141,8 @@ uint64_t AcquisitionCounters::GetFastestFrameNumber() const {
void AcquisitionCounters::WaitForFrame(size_t curr_frame, uint16_t module_number) const {
uint64_t slowest_head_tmp = (module_number == UINT16_MAX) ? GetSlowestFrameNumber() : GetCurrFrameNumber(module_number);
if (curr_frame == 0)
curr_frame = 1; // Cannot wait for frame 0, as this is initial value of slowest frame number, so waiting for frame 1 in this case
while (!acquisition_finished && (slowest_head_tmp < curr_frame)) {
std::this_thread::sleep_for(std::chrono::microseconds(100));
slowest_head_tmp = (module_number == UINT16_MAX) ? GetSlowestFrameNumber() : GetCurrFrameNumber(module_number);
@@ -207,3 +216,7 @@ uint64_t AcquisitionCounters::GetExpectedPacketsPerModule() const {
uint64_t AcquisitionCounters::GetModuleNumber() const {
return nmodules;
}
uint64_t AcquisitionCounters::GetBytesReceived() const {
return GetTotalPackets() * bytes_per_packet;
}

View File

@@ -36,6 +36,7 @@ class AcquisitionCounters {
bool acquisition_finished;
uint64_t expected_frames;
uint64_t nmodules = max_modules;
uint64_t bytes_per_packet;
public:
static constexpr const uint64_t HandleNotFound = UINT64_MAX;
@@ -61,6 +62,7 @@ public:
uint64_t GetTotalPackets() const;
uint64_t GetTotalPackets(uint16_t module_number) const;
uint64_t GetBytesReceived() const;
uint64_t GetExpectedPackets() const;
uint64_t GetExpectedPacketsPerModule() const;

View File

@@ -52,7 +52,7 @@ void AcquisitionDevice::StartAction(const DiffractionExperiment &experiment, uin
"Number of modules exceeds max possible for FPGA"));
counters.Reset(experiment, data_stream);
expected_frames = experiment.GetFrameNum() / experiment.GetSummation();
expected_frames = experiment.GetFrameNum() / experiment.GetFPGASummation();
// Ensure internal WR queue is empty
work_request_queue.Clear();
@@ -131,7 +131,7 @@ void AcquisitionDevice::SendWorkRequest(uint32_t handle) {
}
uint64_t AcquisitionDevice::GetBytesReceived() const {
return counters.GetTotalPackets() * 4096LU;
return counters.GetBytesReceived();
}
const DeviceOutput *AcquisitionDevice::GetDeviceOutput(size_t frame_number, uint16_t module_number) const {
@@ -168,6 +168,8 @@ void AcquisitionDevice::InitializeSpotFinderResolutionMap(const float *data, siz
void AcquisitionDevice::InitializeROIMap(const uint16_t *map, size_t module_number) {}
void AcquisitionDevice::InitializePixelMask(const uint32_t *module_mask, size_t module_number) {}
void AcquisitionDevice::InitializeROIMap(const DiffractionExperiment& experiment) {
std::vector<uint16_t> tmp(RAW_MODULE_SIZE);
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
@@ -178,6 +180,13 @@ void AcquisitionDevice::InitializeROIMap(const DiffractionExperiment& experiment
}
}
void AcquisitionDevice::InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask) {
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
size_t modules = experiment.GetModulesNum(data_stream);
for (int m = 0; m < modules; m++)
InitializePixelMask(mask.GetMaskRaw().data() + RAW_MODULE_SIZE * (offset + m), m);
}
void AcquisitionDevice::MapBuffersStandard(size_t c2h_buffer_count, int16_t numa_node) {
try {
for (int i = 0; i < c2h_buffer_count; i++)
@@ -278,6 +287,7 @@ void AcquisitionDevice::RunInternalGenerator(const DiffractionExperiment &experi
break;
case DetectorType::EIGER:
config.detector_type = SLS_DETECTOR_TYPE_EIGER;
config.eiger_bit_depth = experiment.GetByteDepthReadout() * 8;
break;
}
HW_RunInternalGenerator(config);

View File

@@ -11,6 +11,7 @@
#include "../common/Definitions.h"
#include "../common/DiffractionExperiment.h"
#include "../common/Logger.h"
#include "../common/PixelMask.h"
#include "../common/ThreadSafeFIFO.h"
#include "../jungfrau/JFCalibration.h"
@@ -94,6 +95,8 @@ public:
virtual void InitializeIntegrationMap(const uint16_t *map, const float *weights, size_t module_number);
virtual void InitializeSpotFinderResolutionMap(const float *data, size_t module_number);
virtual void InitializeROIMap(const uint16_t *map, size_t module_number);
void InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask);
virtual void InitializePixelMask(const uint32_t *module_mask, size_t module_number);
void InitializeROIMap(const DiffractionExperiment &experiment);
const AcquisitionCounters& Counters() const;

View File

@@ -135,6 +135,14 @@ void FPGAAcquisitionDevice::InitializeROIMap(const uint16_t *map, size_t module_
LoadCalibration(0);
}
void FPGAAcquisitionDevice::InitializePixelMask(const uint32_t *module_mask, size_t module_number) {
memcpy(buffer_device[0]->pixels, module_mask, RAW_MODULE_SIZE * sizeof(uint32_t));
buffer_device[0]->module_statistics.module_number = module_number;
buffer_device[0]->module_statistics.load_calibration_destination = LOAD_CALIBRATION_DEST_PXL_MASK;
LoadCalibration(0);
}
void FPGAAcquisitionDevice::InitializeCalibration(const DiffractionExperiment &experiment, const JFCalibration &calib) {
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
@@ -215,7 +223,7 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D
job.energy_kev = x.GetPhotonEnergyForConversion_keV();
job.nstorage_cells = x.GetStorageCellNumber() - 1;
job.mode = data_collection_id << 16;
job.nsummation = x.GetSummation() - 1;
job.nsummation = x.GetFPGASummation() - 1;
expected_descriptors_per_module = DMA_DESCRIPTORS_PER_MODULE;
@@ -228,8 +236,18 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D
if (!x.IsPixelSigned())
job.mode |= MODE_UNSIGNED;
if (x.GetByteDepthImage() == 4)
job.mode |= MODE_32BIT;
if (x.GetEigerBitDepth() == 32)
job.mode |= MODE_EIGER_32BIT;
else if (x.GetEigerBitDepth() == 8)
job.mode |= MODE_EIGER_8BIT;
if (x.GetByteDepthFPGA() == 4)
job.mode |= MODE_32BIT_OUTPUT;
if (x.GetByteDepthFPGA() == 1)
job.mode |= MODE_8BIT_OUTPUT;
if (x.IsApplyPixelMask())
job.mode |= MODE_APPLY_PIXEL_MASK;
if (x.GetLossyCompressionPoisson()) {
job.mode |= MODE_SQROOT;
@@ -281,4 +299,4 @@ uint32_t FPGAAcquisitionDevice::GetExpectedDescriptorsPerModule() const {
void FPGAAcquisitionDevice::LoadCalibration(uint32_t handle) {
HW_LoadCalibration(LoadCalibrationConfig{.handle = handle});
}
}

View File

@@ -44,6 +44,7 @@ public:
void InitializeIntegrationMap(const uint16_t *map, const float *weights, size_t module_number) override;
void InitializeSpotFinderResolutionMap(const float *data, size_t module_number) override;
void InitializeROIMap(const uint16_t *map, size_t module_number) override;
void InitializePixelMask(const uint32_t *module_mask, size_t module_number) override;
void SetInternalGeneratorFrame(const uint16_t *input, size_t module_number) override;
uint32_t GetExpectedDescriptorsPerModule() const override;
};

View File

@@ -19,12 +19,12 @@ HLSSimulatedDevice::HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buf
}
void HLSSimulatedDevice::CreateFinalPacket(const DiffractionExperiment& experiment) {
device->CreateFinalPacket(experiment);
device->CreateFinalPacket();
}
void HLSSimulatedDevice::CreateJFPacket(const DiffractionExperiment& experiment, uint64_t frame_number, uint32_t eth_packet,
uint32_t module_number, const uint16_t *data, int8_t adjust_axis, uint8_t user) {
device->CreateJFPacket(experiment, frame_number, eth_packet, module_number, data, adjust_axis, user);
device->CreateJFPacket(frame_number, eth_packet, module_number, data, adjust_axis, user);
}
void HLSSimulatedDevice::CreateJFPackets(const DiffractionExperiment& experiment, uint64_t frame_number_0, uint64_t frames,
@@ -38,7 +38,7 @@ void HLSSimulatedDevice::CreateJFPackets(const DiffractionExperiment& experiment
void HLSSimulatedDevice::CreateEIGERPacket(const DiffractionExperiment &experiment, uint64_t frame_number,
uint32_t eth_packet, uint32_t module_number, uint32_t col, uint32_t row,
const uint16_t *data) {
device->CreateEIGERPacket(experiment, frame_number, eth_packet, module_number, col, row, data);
device->CreateEIGERPacket(frame_number, eth_packet, module_number, col, row, data);
}
void HLSSimulatedDevice::HW_ReadActionRegister(DataCollectionConfig *job) {
@@ -50,7 +50,7 @@ void HLSSimulatedDevice::HW_WriteActionRegister(const DataCollectionConfig *job)
}
void HLSSimulatedDevice::FPGA_StartAction(const DiffractionExperiment &experiment) {
device->FPGA_StartAction(experiment);
device->FPGA_StartAction();
}
void HLSSimulatedDevice::HW_RunInternalGenerator(const FrameGeneratorConfig &config) {

View File

@@ -6,7 +6,7 @@
#include <thread>
#include "../common/DiffractionExperiment.h"
#include "../fpga/hls/HLSDevice.h"
#include "../fpga/hls_simulation/HLSDevice.h"
#include "FPGAAcquisitionDevice.h"

View File

@@ -2,17 +2,19 @@
#include "PCIExpressDevice.h"
#include "../common/NetworkAddressConvert.h"
#define PCI_EXCEPT(x) try {x;} catch (const std::exception &e) { throw PCIeDeviceException(e.what()); }
PCIExpressDevice::PCIExpressDevice(uint16_t data_stream, uint16_t pci_slot) :
PCIExpressDevice(data_stream, "/dev/jfjoch" + std::to_string(pci_slot)) {}
PCIExpressDevice::PCIExpressDevice(uint16_t data_stream) :
PCIExpressDevice(data_stream, "/dev/jfjoch" + std::to_string(data_stream)) {}
PCIExpressDevice(data_stream, "/dev/jfjoch" + std::to_string(data_stream)) {}
PCIExpressDevice::PCIExpressDevice(uint16_t data_stream, const std::string &device_name)
: FPGAAcquisitionDevice(data_stream), dev(device_name, true) {
: FPGAAcquisitionDevice(data_stream), dev(device_name, true) {
DataCollectionStatus status = dev.GetDataCollectionStatus();
DataCollectionStatus status;
PCI_EXCEPT(status = dev.GetDataCollectionStatus())
max_modules = status.max_modules;
if (max_modules == 0)
@@ -31,78 +33,88 @@ PCIExpressDevice::PCIExpressDevice(uint16_t data_stream, const std::string &devi
}
bool PCIExpressDevice::HW_ReadMailbox(uint32_t *values) {
return dev.ReadWorkCompletion(values);
PCI_EXCEPT(return dev.ReadWorkCompletion(values);)
}
void PCIExpressDevice::Cancel() {
dev.Cancel();
PCI_EXCEPT(dev.Cancel();)
}
bool PCIExpressDevice::HW_SendWorkRequest(uint32_t handle) {
return dev.SendWorkRequest(handle);
PCI_EXCEPT(return dev.SendWorkRequest(handle);)
}
void PCIExpressDevice::FPGA_StartAction(const DiffractionExperiment &experiment) {
dev.Start();
PCI_EXCEPT(dev.Start();)
}
void PCIExpressDevice::HW_RunInternalGenerator(const FrameGeneratorConfig &config) {
dev.RunFrameGenerator(config);
PCI_EXCEPT(dev.RunFrameGenerator(config);)
}
void PCIExpressDevice::FPGA_EndAction() {
dev.End();
PCI_EXCEPT(dev.End();)
}
bool PCIExpressDevice::HW_IsIdle() const {
return dev.IsIdle();
PCI_EXCEPT(return dev.IsIdle();)
}
void PCIExpressDevice::HW_WriteActionRegister(const DataCollectionConfig *config) {
dev.SetConfig(*config);
PCI_EXCEPT(dev.SetConfig(*config);)
}
void PCIExpressDevice::HW_ReadActionRegister(DataCollectionConfig *config) {
*config = dev.GetConfig();
PCI_EXCEPT(*config = dev.GetConfig();)
}
std::string PCIExpressDevice::GetMACAddress() const {
return MacAddressToStr(dev.GetMACAddress());
PCI_EXCEPT(return MacAddressToStr(dev.GetMACAddress());)
}
uint32_t PCIExpressDevice::GetNumKernelBuffers() const {
return dev.GetBufferCount();
PCI_EXCEPT(return dev.GetBufferCount();)
}
int32_t PCIExpressDevice::GetNUMANode() const {
return dev.GetNumaNode();
PCI_EXCEPT(return dev.GetNumaNode();)
}
void PCIExpressDevice::SetIPv4Address(uint32_t ipv4_addr_network_order) {
PCI_EXCEPT(
// Configure all links with the same IPv4 address
auto dev_status = dev.GetDeviceStatus();
for (int i = 0; i < dev_status.eth_link_count; i++)
dev.SetIPv4Address(ipv4_addr_network_order, i);
dev.SetIPv4Address(ipv4_addr_network_order, NET_IF_FRAME_GENERATOR);
auto dev_status = dev.GetDeviceStatus();
for (int i = 0; i < dev_status.eth_link_count; i++)
dev.SetIPv4Address(ipv4_addr_network_order, i);
dev.SetIPv4Address(ipv4_addr_network_order, NET_IF_FRAME_GENERATOR);
)
}
std::string PCIExpressDevice::GetIPv4Address() const {
PCI_EXCEPT(
return IPv4AddressToStr(dev.GetIPv4Address());
)
}
void PCIExpressDevice::HW_SetSpotFinderParameters(const SpotFinderParameters &params) {
dev.SetSpotFinderParameters(params);
PCI_EXCEPT(
dev.SetSpotFinderParameters(params);
)
}
DeviceStatus PCIExpressDevice::GetDeviceStatus() const {
return dev.GetDeviceStatus();
PCI_EXCEPT(
return dev.GetDeviceStatus();
)
}
DataCollectionStatus PCIExpressDevice::GetDataCollectionStatus() const {
return dev.GetDataCollectionStatus();
PCI_EXCEPT(
return dev.GetDataCollectionStatus();
)
}
void PCIExpressDevice::HW_LoadCalibration(const LoadCalibrationConfig &config) {
dev.LoadCalibration(config);
PCI_EXCEPT(dev.LoadCalibration(config);)
}

View File

@@ -6,6 +6,7 @@
#include "gen/model/Error_message.h"
#include "../common/GitInfo.h"
#include "OpenAPIConvert.h"
#include "../preview/JFJochTIFF.h"
JFJochBrokerHttp::JFJochBrokerHttp(const DiffractionExperiment &experiment, std::shared_ptr<Pistache::Rest::Router> &rtr)
: DefaultApi(rtr) {
@@ -421,18 +422,54 @@ void JFJochBrokerHttp::plot_strong_pixel_get(const std::optional<int32_t> &binni
}
void JFJochBrokerHttp::config_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetFullPixelMaskTIFF();
auto s = state_machine.GetFullPixelMaskTIFF();
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
}
void JFJochBrokerHttp::config_user_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetUserPixelMaskTIFF();
auto s = state_machine.GetUserPixelMaskTIFF();
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
}
void JFJochBrokerHttp::config_user_mask_tiff_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) {
state_machine.SetUserPixelMask(request.body());
uint32_t cols, lines;
auto v = ReadTIFFFromString32(request.body(), cols, lines);
state_machine.SetUserPixelMask(v);
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::config_mask_get(Pistache::Http::ResponseWriter &response) {
const auto v = state_machine.GetFullPixelMask();
response.send(Pistache::Http::Code::Ok,
reinterpret_cast<const char *>(v.data()),
v.size() * sizeof(uint32_t),
Pistache::Http::Mime::MediaType::fromString("application/octet-stream"));
}
void JFJochBrokerHttp::config_user_mask_get(Pistache::Http::ResponseWriter &response) {
const auto v = state_machine.GetUserPixelMask();
response.send(Pistache::Http::Code::Ok,
reinterpret_cast<const char *>(v.data()),
v.size() * sizeof(uint32_t),
Pistache::Http::Mime::MediaType::fromString("application/octet-stream"));
}
void JFJochBrokerHttp::config_user_mask_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) {
if (request.body().empty()) {
response.send(Pistache::Http::Code::Bad_Request, "Request body cannot be empty");
return;
}
if (request.body().size() % 4 != 0) {
response.send(Pistache::Http::Code::Bad_Request, "Request has to be 32-bit");
return;
}
std::vector<uint32_t> v(request.body().size() / 4);
memcpy(v.data(), request.body().data(), request.body().size());
state_machine.SetUserPixelMask(v);
response.send(Pistache::Http::Code::Ok);
}
@@ -498,6 +535,7 @@ void JFJochBrokerHttp::statistics_get(const std::optional<bool> &compression, Pi
statistics.setDataProcessingSettings(Convert(state_machine.GetSpotFindingSettings()));
statistics.setInstrumentMetadata(Convert(state_machine.GetInstrumentMetadata()));
statistics.setImageFormatSettings(Convert(state_machine.GetImageFormatSettings()));
statistics.setPixelMask(Convert(state_machine.GetPixelMaskStatistics()));
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
if (!zeromq_prev.address.empty())
@@ -520,3 +558,5 @@ void JFJochBrokerHttp::config_zeromq_preview_put(
state_machine.SetPreviewSocketSettings(Convert(zeromqPreviewSettings));
response.send(Pistache::Http::Code::Ok);
}

View File

@@ -169,6 +169,13 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings,
Pistache::Http::ResponseWriter &response) override;
void config_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
public:
JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr<Pistache::Rest::Router> &rtr);
void AddDetectorSetup(const DetectorSetup &setup);

View File

@@ -10,7 +10,7 @@ JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_l
logger(in_logger),
data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()),
pixel_mask(experiment) {
SupressTIFFErrors();
}
bool JFJochStateMachine::ImportPedestalG0(const JFJochReceiverOutput &receiver_output) {
@@ -75,7 +75,8 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
}
}
services.ConfigureDetector(experiment);
pixel_mask.LoadDetectorBadPixelMask(calibration->CalculateMask());
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const std::exception &e) {
logger.Error("Pedestal sequence error {}", e.what());
state = JFJochState::Error;
@@ -281,6 +282,16 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) {
}
}
void JFJochStateMachine::UpdatePixelMaskStatistics(const PixelMaskStatistics &input) {
std::unique_lock ul(pixel_mask_statistics_mutex);
pixel_mask_statistics = input;
}
PixelMaskStatistics JFJochStateMachine::GetPixelMaskStatistics() const {
std::unique_lock ul(pixel_mask_statistics_mutex);
return pixel_mask_statistics;
}
void JFJochStateMachine::MeasurementThread() {
try {
auto tmp_output = services.Stop();
@@ -435,7 +446,7 @@ void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
experiment.Detector(setup);
gain_calibration = setup.GetGainCalibration();
current_detector_setup = 0;
pixel_mask = PixelMask(setup);
pixel_mask = PixelMask(experiment);
}
detector_setup.emplace_back(setup);
}
@@ -476,7 +487,7 @@ void JFJochStateMachine::SelectDetector(int64_t id) {
try {
experiment.Detector(detector_setup[id]);
gain_calibration = detector_setup[id].GetGainCalibration();
pixel_mask = PixelMask(detector_setup[id]);
pixel_mask = PixelMask(experiment);
state = JFJochState::Inactive;
current_detector_setup = id;
} catch (JFJochException &e) {
@@ -651,16 +662,25 @@ std::string JFJochStateMachine::GetUserPixelMaskTIFF() const {
sizeof(uint32_t), false);
}
void JFJochStateMachine::SetUserPixelMask(const std::string &s) {
std::vector<uint32_t> JFJochStateMachine::GetFullPixelMask() const {
std::unique_lock<std::mutex> ul(m);
return pixel_mask.GetMask(experiment);
}
std::vector<uint32_t> JFJochStateMachine::GetUserPixelMask() const {
std::unique_lock<std::mutex> ul(m);
return pixel_mask.GetUserMask(experiment);
}
void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
std::unique_lock<std::mutex> ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("User mask can be only modified in Idle state");
try {
uint32_t cols, lines;
auto v = ReadTIFFFromString32(s, cols, lines);
pixel_mask.LoadUserMask(experiment, v);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const JFJochException &e) {
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Problem handling user mask " + std::string(e.what()));
@@ -693,6 +713,8 @@ void JFJochStateMachine::LoadImageFormatSettings(const ImageFormatSettings &sett
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
experiment.ImportImageFormatSettings(settings);
pixel_mask.Update(settings);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
}
void JFJochStateMachine::RawImageFormatSettings() {

View File

@@ -93,6 +93,11 @@ class JFJochStateMachine {
mutable std::mutex data_processing_settings_mutex;
SpotFindingSettings data_processing_settings;
mutable std::mutex pixel_mask_statistics_mutex;
PixelMaskStatistics pixel_mask_statistics;
void UpdatePixelMaskStatistics(const PixelMaskStatistics &input);
// Private functions assume that lock m is acquired
void MeasurementThread();
void PedestalThread(std::unique_lock<std::mutex> ul);
@@ -177,11 +182,17 @@ public:
std::string GetFullPixelMaskTIFF() const;
std::string GetUserPixelMaskTIFF() const;
void SetUserPixelMask(const std::string &v);
std::vector<uint32_t> GetFullPixelMask() const;
std::vector<uint32_t> GetUserPixelMask() const;
void SetUserPixelMask(const std::vector<uint32_t> &v);
std::vector<DeviceStatus> GetDeviceStatus() const;
void SetPreviewSocketSettings(const ZMQPreviewSettings &input);
ZMQPreviewSettings GetPreviewSocketSettings();
PixelMaskStatistics GetPixelMaskStatistics() const;
};

View File

@@ -139,7 +139,9 @@ DetectorSettings Convert(const org::openapitools::server::model::Detector_settin
ret.PedestalG1Frames(input.getJungfrauPedestalG1Frames());
ret.PedestalG2Frames(input.getJungfrauPedestalG2Frames());
ret.PedestalMinImageCount(input.getJungfrauPedestalMinImageCount());
ret.PedestalG0RMSLimit(input.getJungfrauPedestalG0RmsLimit());
if (input.eigerBitDepthIsSet())
ret.EigerBitDepth(input.getEigerBitDepth());
if (input.eigerThresholdKeVIsSet())
ret.EigerThreshold_keV(input.getEigerThresholdKeV());
@@ -171,10 +173,11 @@ org::openapitools::server::model::Detector_settings Convert(const DetectorSettin
ret.setJungfrauPedestalMinImageCount(input.GetPedestalMinImageCount());
ret.setJungfrauStorageCellDelayNs(input.GetStorageCellDelay().count());
ret.setJungfrauPedestalG0RmsLimit(input.GetPedestalG0RMSLimit());
if (input.GetEIGERThreshold_keV().has_value())
ret.setEigerThresholdKeV(input.GetEIGERThreshold_keV().value());
if (input.GetEigerThreshold_keV().has_value())
ret.setEigerThresholdKeV(input.GetEigerThreshold_keV().value());
if (input.GetEigerBitDepth().has_value())
ret.setEigerBitDepth(input.GetEigerBitDepth().value());
ret.setTiming(Convert(input.GetTiming()));
return ret;
}
@@ -423,6 +426,9 @@ ImageFormatSettings Convert(const org::openapitools::server::model::Image_format
ret.JungfrauConversion(input.isJungfrauConversion());
ret.MaskChipEdges(input.isMaskChipEdges());
ret.MaskModuleEdges(input.isMaskModuleEdges());
ret.ApplyPixelMask(input.isApplyMask());
ret.PedestalG0RMSLimit(input.getJungfrauPedestalG0RmsLimit());
ret.MaskPixelsWithoutG0(input.isJungfrauMaskPixelsWithoutG0());
if (input.signedOutputIsSet())
ret.PixelSigned(input.isSignedOutput());
if (input.jungfrauConversionFactorKeVIsSet())
@@ -439,6 +445,9 @@ org::openapitools::server::model::Image_format_settings Convert(const ImageForma
ret.setJungfrauConversion(input.IsJungfrauConversion());
ret.setMaskChipEdges(input.IsMaskChipEdges());
ret.setMaskModuleEdges(input.IsMaskModuleEdges());
ret.setApplyMask(input.IsApplyPixelMask());
ret.setJungfrauMaskPixelsWithoutG0(input.IsMaskPixelsWithoutG0());
ret.setJungfrauPedestalG0RmsLimit(input.GetPedestalG0RMSLimit());
if (input.IsPixelSigned().has_value())
ret.setSignedOutput(input.IsPixelSigned().value());
if (input.GetJungfrauConvFactor_keV().has_value())
@@ -542,6 +551,7 @@ std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const s
org::openapitools::server::model::Fpga_status_inner tmp;
tmp.setPciDevId(d.device_number);
tmp.setSerialNumber(d.serial_number);
tmp.setFwVersion(d.fpga_firmware_version);
tmp.setBaseMacAddr(MacAddressToStr(d.fpga_default_mac_addr));
tmp.setPacketsSls(d.packets_sls);
tmp.setPacketsUdp(d.packets_udp);
@@ -563,6 +573,7 @@ ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_previe
ret.period = std::chrono::milliseconds(input.getPeriodMs());
else
ret.period = {};
ret.send_start_message = input.isSendStartMessage();
ret.address = "";
return ret;
}
@@ -573,5 +584,14 @@ org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPrevi
if (settings.period.has_value())
ret.setPeriodMs(settings.period.value().count() / 1000);
ret.setSocketAddress(settings.address);
ret.setSendStartMessage(settings.send_start_message);
return ret;
}
org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskStatistics& input) {
org::openapitools::server::model::Pixel_mask_statistics ret;
ret.setUserMask(input.user_mask);
ret.setWrongGain(input.wrong_gain);
ret.setTooHighPedestalRms(input.too_high_pedestal_rms);
return ret;
}

View File

@@ -20,6 +20,7 @@
#include "gen/model/Preview_settings.h"
#include "gen/model/Dataset_settings.h"
#include "gen/model/Fpga_status_inner.h"
#include "gen/model/Pixel_mask_statistics.h"
#include "../common/DatasetSettings.h"
#include "../common/ImageFormatSettings.h"
@@ -57,6 +58,7 @@ ImageFormatSettings Convert(const org::openapitools::server::model::Image_format
org::openapitools::server::model::Image_format_settings Convert(const ImageFormatSettings& input);
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input);
std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const std::vector<DeviceStatus> &input);
org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskStatistics& input);
org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPreviewSettings& settings);
ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_preview_settings& input);

View File

@@ -1,66 +0,0 @@
# Jungfraujoch service (jfjoch_broker)
'jfjoch_broker' is the main service for the Jungfraujoch application. It is responsible for:
* Providing user interface via HTTP and OpenAPI
* Configuring FPGA firmware
* Building images from FPGA output and forwarding the results over ZeroMQ
## External interfaces
Broker operates three external interfaces.
**Data interface** ZeroMQ PULL socket with CBOR serialization is used to send images, metadata and processing results for writing or downstream
processing. See [here](../frame_serialize/README.md) for description of the format.
**Preview interface** as above, but limited to subset of frames (1 image/s by default).
**Configuration, status and results** HTTP/REST interface described in the OpenAPI format.
Description of the API is presented in the `redoc-static.html` file.
Due to limitations of GitLab/GitHub the file cannot be viewed directly from the repository, but needs to be downloaded.
## Broker configuration
'jfjoch_broker' requires JSON configuration files. The file is described by OpenAPI structure `jfjoch_settings` defined in [jfjoch_api.yaml](jfjoch_api.yaml) file.
It is recommended to go through example files in the [etc/](../etc/).
## Setting up a local test for Jungfraujoch
For development, it is possible to setup a local installation of Jungfraujoch.
This will work without FPGA installed in the computer and allows to test Jungfraujoch software layer, including
ZeroMQ streaming and file writing.
The workflow simulates FPGA behavior, by running high-level synthesis code on the CPU - the performance is therefore
very low, as fixed-point calculations have large performance penalty on CPU. In the CPU simulation mode, one can simulate
using only a single FPGA device.
To run the test:
### Compile Jungfraujoch with frontend
```
mkdir build
cd build
cmake ..
make jfjoch
make frontend
```
### Start services
Start broker:
```
cd build/broker
./jfjoch_broker ../../etc/broker_local.json 5232
```
Start writer:
```
cd build/writer
./jfjoch_writer tcp://127.0.0.1:5500
```
### Run tests
To run test a Python script is provided:
```
cd tests/test_data
python jfjoch_broker_test.py
```
The script will initialize Jungfraujoch, import test image and start data collection.
### Expected result
You can observe online data analysis by opening the following web page: [http://localhost:5232](http://localhost:5232).
Also in the `build/writer` subdirectory a dataset with images should be written.

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,11 +46,14 @@ void DefaultApi::setupRoutes() {
Routes::Put(*router, base + "/config/instrument", Routes::bind(&DefaultApi::config_instrument_put_handler, this));
Routes::Put(*router, base + "/config/internal_generator_image", Routes::bind(&DefaultApi::config_internal_generator_image_put_handler, this));
Routes::Put(*router, base + "/config/internal_generator_image.tiff", Routes::bind(&DefaultApi::config_internal_generator_image_tiff_put_handler, this));
Routes::Get(*router, base + "/config/mask", Routes::bind(&DefaultApi::config_mask_get_handler, this));
Routes::Get(*router, base + "/config/mask.tiff", Routes::bind(&DefaultApi::config_mask_tiff_get_handler, this));
Routes::Get(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_get_handler, this));
Routes::Put(*router, base + "/config/select_detector", Routes::bind(&DefaultApi::config_select_detector_put_handler, this));
Routes::Get(*router, base + "/config/spot_finding", Routes::bind(&DefaultApi::config_spot_finding_get_handler, this));
Routes::Put(*router, base + "/config/spot_finding", Routes::bind(&DefaultApi::config_spot_finding_put_handler, this));
Routes::Get(*router, base + "/config/user_mask", Routes::bind(&DefaultApi::config_user_mask_get_handler, this));
Routes::Put(*router, base + "/config/user_mask", Routes::bind(&DefaultApi::config_user_mask_put_handler, this));
Routes::Get(*router, base + "/config/user_mask.tiff", Routes::bind(&DefaultApi::config_user_mask_tiff_get_handler, this));
Routes::Put(*router, base + "/config/user_mask.tiff", Routes::bind(&DefaultApi::config_user_mask_tiff_put_handler, this));
Routes::Get(*router, base + "/config/zeromq_preview", Routes::bind(&DefaultApi::config_zeromq_preview_get_handler, this));
@@ -418,6 +421,25 @@ void DefaultApi::config_internal_generator_image_tiff_put_handler(const Pistache
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::config_mask_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {
try {
this->config_mask_get(response);
} catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return;
} catch (std::exception &e) {
this->handleOperationException(e, response);
return;
}
} catch (std::exception &e) {
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::config_mask_tiff_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {
@@ -537,6 +559,43 @@ void DefaultApi::config_spot_finding_put_handler(const Pistache::Rest::Request &
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::config_user_mask_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {
try {
this->config_user_mask_get(response);
} catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return;
} catch (std::exception &e) {
this->handleOperationException(e, response);
return;
}
} catch (std::exception &e) {
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::config_user_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
try {
try {
this->config_user_mask_put(request, response);
} catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return;
} catch (std::exception &e) {
this->handleOperationException(e, response);
return;
}
} catch (std::exception &e) {
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::config_user_mask_tiff_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -78,11 +78,14 @@ private:
void config_instrument_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_internal_generator_image_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_select_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_spot_finding_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_spot_finding_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_zeromq_preview_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -249,7 +252,14 @@ private:
/// </remarks>
virtual void config_internal_generator_image_tiff_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get mask of the detector
/// Get mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// </remarks>
virtual void config_mask_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
@@ -286,7 +296,21 @@ private:
/// <param name="spotFindingSettings"> (optional)</param>
virtual void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector
/// Get user mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
/// </remarks>
virtual void config_user_mask_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Upload user mask of the detector (binary)
/// </summary>
/// <remarks>
/// Should be in &#x60;Idle&#x60; state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don&#39;t need to be assigned value. Mask is expected as binary array (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration.
/// </remarks>
virtual void config_user_mask_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
@@ -486,7 +510,7 @@ private:
/// </remarks>
virtual void preview_image_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get pedestal G0 in TIFF format
/// Get pedestal in TIFF format
/// </summary>
/// <remarks>
///
@@ -579,7 +603,7 @@ private:
/// Wait for acquisition done
/// </summary>
/// <remarks>
/// Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. To not block web server for a indefinite period of time, the procedure is provided with a timeout. Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection.
/// Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software. To not block web server for a indefinite period of time, the procedure is provided with a timeout. Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection.
/// </remarks>
/// <param name="timeout">Timeout in seconds (0 &#x3D;&#x3D; immediate response) (optional, default to 60)</param>
virtual void wait_till_done_post(const std::optional<int32_t> &timeout, Pistache::Http::ResponseWriter &response) = 0;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -117,7 +117,7 @@ public:
bool imagesPerFileIsSet() const;
void unsetImages_per_file();
/// <summary>
///
/// Number of space group for the crystal. Currently used solely as metadata, not relevant for image processing done in Jungfraujoch.
/// </summary>
int64_t getSpaceGroupNumber() const;
void setSpaceGroupNumber(int64_t const value);
@@ -131,7 +131,7 @@ public:
bool sampleNameIsSet() const;
void unsetSample_name();
/// <summary>
///
/// Compression type for the images transferred over ZeroMQ and saved to HDF5 file.
/// </summary>
std::string getCompression() const;
void setCompression(std::string const& value);
@@ -159,14 +159,14 @@ public:
bool goniometerIsSet() const;
void unsetGoniometer();
/// <summary>
/// Header appendix, added as user_data/user to start message (can be any valid JSON)
/// Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON) In general, it is not saved in HDF5 file. However, if values are placed in \&quot;hdf5\&quot; object, &#x60;jfjoch_writer&#x60; will write them in /entry/data of the HDF5 file. This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed. For example {\&quot;hdf5\&quot;: {\&quot;val1\&quot;:1, \&quot;val2\&quot;:\&quot;xyz\&quot;}}, will write /entry/user/val1 and /entry/user/val2.
/// </summary>
nlohmann::json getHeaderAppendix() const;
void setHeaderAppendix(nlohmann::json const& value);
bool headerAppendixIsSet() const;
void unsetHeader_appendix();
/// <summary>
/// Image appendix, added as user_data to image message (can be any valid JSON)
/// Image appendix, added as user_data to image ZeroMQ message (can be any valid JSON) Not saved in HDF5 file
/// </summary>
nlohmann::json getImageAppendix() const;
void setImageAppendix(nlohmann::json const& value);

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
/*
* Dataset_settings_unit_cell.h
*
* Units of angstrom and degree
* Unit cell parameters. Necessary to run indexing. Units of angstrom and degree
*/
#ifndef Dataset_settings_unit_cell_H_
@@ -25,7 +25,7 @@ namespace org::openapitools::server::model
{
/// <summary>
/// Units of angstrom and degree
/// Unit cell parameters. Necessary to run indexing. Units of angstrom and degree
/// </summary>
class Dataset_settings_unit_cell
{

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,14 +33,14 @@ Detector_settings::Detector_settings()
m_TimingIsSet = false;
m_Eiger_threshold_keV = 0.0f;
m_Eiger_threshold_keVIsSet = false;
m_Eiger_bit_depth = 0L;
m_Eiger_bit_depthIsSet = false;
m_Jungfrau_pedestal_g0_frames = 2000L;
m_Jungfrau_pedestal_g0_framesIsSet = false;
m_Jungfrau_pedestal_g1_frames = 300L;
m_Jungfrau_pedestal_g1_framesIsSet = false;
m_Jungfrau_pedestal_g2_frames = 300L;
m_Jungfrau_pedestal_g2_framesIsSet = false;
m_Jungfrau_pedestal_g0_rms_limit = 100L;
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
m_Jungfrau_pedestal_min_image_count = 128L;
m_Jungfrau_pedestal_min_image_countIsSet = false;
m_Jungfrau_storage_cell_count = 1L;
@@ -99,10 +99,10 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 128ll)
if (value > 64ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 128;";
msg << currentValuePath << ": must be less than or equal to 64;";
}
}
@@ -139,7 +139,7 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
}
}
if (jungfrauPedestalG0FramesIsSet())
{
const int64_t& value = m_Jungfrau_pedestal_g0_frames;
@@ -182,20 +182,6 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
}
if (jungfrauPedestalG0RmsLimitIsSet())
{
const int64_t& value = m_Jungfrau_pedestal_g0_rms_limit;
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG0RmsLimit";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (jungfrauPedestalMinImageCountIsSet())
{
const int64_t& value = m_Jungfrau_pedestal_min_image_count;
@@ -273,6 +259,9 @@ bool Detector_settings::operator==(const Detector_settings& rhs) const
((!eigerThresholdKeVIsSet() && !rhs.eigerThresholdKeVIsSet()) || (eigerThresholdKeVIsSet() && rhs.eigerThresholdKeVIsSet() && getEigerThresholdKeV() == rhs.getEigerThresholdKeV())) &&
((!eigerBitDepthIsSet() && !rhs.eigerBitDepthIsSet()) || (eigerBitDepthIsSet() && rhs.eigerBitDepthIsSet() && getEigerBitDepth() == rhs.getEigerBitDepth())) &&
((!jungfrauPedestalG0FramesIsSet() && !rhs.jungfrauPedestalG0FramesIsSet()) || (jungfrauPedestalG0FramesIsSet() && rhs.jungfrauPedestalG0FramesIsSet() && getJungfrauPedestalG0Frames() == rhs.getJungfrauPedestalG0Frames())) &&
@@ -282,9 +271,6 @@ bool Detector_settings::operator==(const Detector_settings& rhs) const
((!jungfrauPedestalG2FramesIsSet() && !rhs.jungfrauPedestalG2FramesIsSet()) || (jungfrauPedestalG2FramesIsSet() && rhs.jungfrauPedestalG2FramesIsSet() && getJungfrauPedestalG2Frames() == rhs.getJungfrauPedestalG2Frames())) &&
((!jungfrauPedestalG0RmsLimitIsSet() && !rhs.jungfrauPedestalG0RmsLimitIsSet()) || (jungfrauPedestalG0RmsLimitIsSet() && rhs.jungfrauPedestalG0RmsLimitIsSet() && getJungfrauPedestalG0RmsLimit() == rhs.getJungfrauPedestalG0RmsLimit())) &&
((!jungfrauPedestalMinImageCountIsSet() && !rhs.jungfrauPedestalMinImageCountIsSet()) || (jungfrauPedestalMinImageCountIsSet() && rhs.jungfrauPedestalMinImageCountIsSet() && getJungfrauPedestalMinImageCount() == rhs.getJungfrauPedestalMinImageCount())) &&
@@ -323,14 +309,14 @@ void to_json(nlohmann::json& j, const Detector_settings& o)
j["timing"] = o.m_Timing;
if(o.eigerThresholdKeVIsSet())
j["eiger_threshold_keV"] = o.m_Eiger_threshold_keV;
if(o.eigerBitDepthIsSet())
j["eiger_bit_depth"] = o.m_Eiger_bit_depth;
if(o.jungfrauPedestalG0FramesIsSet())
j["jungfrau_pedestal_g0_frames"] = o.m_Jungfrau_pedestal_g0_frames;
if(o.jungfrauPedestalG1FramesIsSet())
j["jungfrau_pedestal_g1_frames"] = o.m_Jungfrau_pedestal_g1_frames;
if(o.jungfrauPedestalG2FramesIsSet())
j["jungfrau_pedestal_g2_frames"] = o.m_Jungfrau_pedestal_g2_frames;
if(o.jungfrauPedestalG0RmsLimitIsSet())
j["jungfrau_pedestal_g0_rms_limit"] = o.m_Jungfrau_pedestal_g0_rms_limit;
if(o.jungfrauPedestalMinImageCountIsSet())
j["jungfrau_pedestal_min_image_count"] = o.m_Jungfrau_pedestal_min_image_count;
if(o.jungfrauStorageCellCountIsSet())
@@ -377,6 +363,11 @@ void from_json(const nlohmann::json& j, Detector_settings& o)
j.at("eiger_threshold_keV").get_to(o.m_Eiger_threshold_keV);
o.m_Eiger_threshold_keVIsSet = true;
}
if(j.find("eiger_bit_depth") != j.end())
{
j.at("eiger_bit_depth").get_to(o.m_Eiger_bit_depth);
o.m_Eiger_bit_depthIsSet = true;
}
if(j.find("jungfrau_pedestal_g0_frames") != j.end())
{
j.at("jungfrau_pedestal_g0_frames").get_to(o.m_Jungfrau_pedestal_g0_frames);
@@ -392,11 +383,6 @@ void from_json(const nlohmann::json& j, Detector_settings& o)
j.at("jungfrau_pedestal_g2_frames").get_to(o.m_Jungfrau_pedestal_g2_frames);
o.m_Jungfrau_pedestal_g2_framesIsSet = true;
}
if(j.find("jungfrau_pedestal_g0_rms_limit") != j.end())
{
j.at("jungfrau_pedestal_g0_rms_limit").get_to(o.m_Jungfrau_pedestal_g0_rms_limit);
o.m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
}
if(j.find("jungfrau_pedestal_min_image_count") != j.end())
{
j.at("jungfrau_pedestal_min_image_count").get_to(o.m_Jungfrau_pedestal_min_image_count);
@@ -535,6 +521,23 @@ void Detector_settings::unsetEiger_threshold_keV()
{
m_Eiger_threshold_keVIsSet = false;
}
int64_t Detector_settings::getEigerBitDepth() const
{
return m_Eiger_bit_depth;
}
void Detector_settings::setEigerBitDepth(int64_t const value)
{
m_Eiger_bit_depth = value;
m_Eiger_bit_depthIsSet = true;
}
bool Detector_settings::eigerBitDepthIsSet() const
{
return m_Eiger_bit_depthIsSet;
}
void Detector_settings::unsetEiger_bit_depth()
{
m_Eiger_bit_depthIsSet = false;
}
int64_t Detector_settings::getJungfrauPedestalG0Frames() const
{
return m_Jungfrau_pedestal_g0_frames;
@@ -586,23 +589,6 @@ void Detector_settings::unsetJungfrau_pedestal_g2_frames()
{
m_Jungfrau_pedestal_g2_framesIsSet = false;
}
int64_t Detector_settings::getJungfrauPedestalG0RmsLimit() const
{
return m_Jungfrau_pedestal_g0_rms_limit;
}
void Detector_settings::setJungfrauPedestalG0RmsLimit(int64_t const value)
{
m_Jungfrau_pedestal_g0_rms_limit = value;
m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
}
bool Detector_settings::jungfrauPedestalG0RmsLimitIsSet() const
{
return m_Jungfrau_pedestal_g0_rms_limitIsSet;
}
void Detector_settings::unsetJungfrau_pedestal_g0_rms_limit()
{
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
}
int64_t Detector_settings::getJungfrauPedestalMinImageCount() const
{
return m_Jungfrau_pedestal_min_image_count;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -59,12 +59,12 @@ public:
/// Detector_settings members
/// <summary>
/// Interval between consecutive frames.
/// Interval between consecutive frames. This is internal frame time for the JUNGFRAU detector, image time has to be integer multiply of this number. For EIGER detector this is default frame time, not used otherwise
/// </summary>
int64_t getFrameTimeUs() const;
void setFrameTimeUs(int64_t const value);
/// <summary>
/// Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.
/// Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.
/// </summary>
int64_t getCountTimeUs() const;
void setCountTimeUs(int64_t const value);
@@ -78,7 +78,7 @@ public:
bool internalFrameGeneratorIsSet() const;
void unsetInternal_frame_generator();
/// <summary>
///
/// Number of images stored in the internal frame generator.
/// </summary>
int64_t getInternalFrameGeneratorImages() const;
void setInternalFrameGeneratorImages(int64_t const value);
@@ -99,13 +99,20 @@ public:
bool timingIsSet() const;
void unsetTiming();
/// <summary>
///
/// Threshold for the EIGER detector. If value is provided, it will be used for all subsequent acquisitions, irrespective of beam energy. If value is not provided, threshold will be determined on start of acquisition as half of incident energy. This might lead to increased start time.
/// </summary>
float getEigerThresholdKeV() const;
void setEigerThresholdKeV(float const value);
bool eigerThresholdKeVIsSet() const;
void unsetEiger_threshold_keV();
/// <summary>
/// Bit depth of EIGER read-out. If value is not provided bit depth is adjusted automatically based on the image time.
/// </summary>
int64_t getEigerBitDepth() const;
void setEigerBitDepth(int64_t const value);
bool eigerBitDepthIsSet() const;
void unsetEiger_bit_depth();
/// <summary>
///
/// </summary>
int64_t getJungfrauPedestalG0Frames() const;
@@ -127,13 +134,6 @@ public:
bool jungfrauPedestalG2FramesIsSet() const;
void unsetJungfrau_pedestal_g2_frames();
/// <summary>
/// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
/// </summary>
int64_t getJungfrauPedestalG0RmsLimit() const;
void setJungfrauPedestalG0RmsLimit(int64_t const value);
bool jungfrauPedestalG0RmsLimitIsSet() const;
void unsetJungfrau_pedestal_g0_rms_limit();
/// <summary>
/// Minimum number of collected images for pedestal to consider it viable
/// </summary>
int64_t getJungfrauPedestalMinImageCount() const;
@@ -186,14 +186,14 @@ protected:
bool m_TimingIsSet;
float m_Eiger_threshold_keV;
bool m_Eiger_threshold_keVIsSet;
int64_t m_Eiger_bit_depth;
bool m_Eiger_bit_depthIsSet;
int64_t m_Jungfrau_pedestal_g0_frames;
bool m_Jungfrau_pedestal_g0_framesIsSet;
int64_t m_Jungfrau_pedestal_g1_frames;
bool m_Jungfrau_pedestal_g1_framesIsSet;
int64_t m_Jungfrau_pedestal_g2_frames;
bool m_Jungfrau_pedestal_g2_framesIsSet;
int64_t m_Jungfrau_pedestal_g0_rms_limit;
bool m_Jungfrau_pedestal_g0_rms_limitIsSet;
int64_t m_Jungfrau_pedestal_min_image_count;
bool m_Jungfrau_pedestal_min_image_countIsSet;
int64_t m_Jungfrau_storage_cell_count;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,6 +23,7 @@ Fpga_status_inner::Fpga_status_inner()
{
m_Pci_dev_id = "";
m_Serial_number = "";
m_Fw_version = "";
m_Base_mac_addr = "";
m_Eth_link_count = 0L;
m_Eth_link_status = 0L;
@@ -54,7 +55,7 @@ bool Fpga_status_inner::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Fpga_status_inner" : pathPrefix;
return success;
}
@@ -69,6 +70,9 @@ bool Fpga_status_inner::operator==(const Fpga_status_inner& rhs) const
(getSerialNumber() == rhs.getSerialNumber())
&&
(getFwVersion() == rhs.getFwVersion())
&&
(getBaseMacAddr() == rhs.getBaseMacAddr())
&&
@@ -109,6 +113,7 @@ void to_json(nlohmann::json& j, const Fpga_status_inner& o)
j = nlohmann::json::object();
j["pci_dev_id"] = o.m_Pci_dev_id;
j["serial_number"] = o.m_Serial_number;
j["fw_version"] = o.m_Fw_version;
j["base_mac_addr"] = o.m_Base_mac_addr;
j["eth_link_count"] = o.m_Eth_link_count;
j["eth_link_status"] = o.m_Eth_link_status;
@@ -125,6 +130,7 @@ void from_json(const nlohmann::json& j, Fpga_status_inner& o)
{
j.at("pci_dev_id").get_to(o.m_Pci_dev_id);
j.at("serial_number").get_to(o.m_Serial_number);
j.at("fw_version").get_to(o.m_Fw_version);
j.at("base_mac_addr").get_to(o.m_Base_mac_addr);
j.at("eth_link_count").get_to(o.m_Eth_link_count);
j.at("eth_link_status").get_to(o.m_Eth_link_status);
@@ -153,6 +159,14 @@ void Fpga_status_inner::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
}
std::string Fpga_status_inner::getFwVersion() const
{
return m_Fw_version;
}
void Fpga_status_inner::setFwVersion(std::string const& value)
{
m_Fw_version = value;
}
std::string Fpga_status_inner::getBaseMacAddr() const
{
return m_Base_mac_addr;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -71,6 +71,11 @@ public:
/// <summary>
///
/// </summary>
std::string getFwVersion() const;
void setFwVersion(std::string const& value);
/// <summary>
///
/// </summary>
std::string getBaseMacAddr() const;
void setBaseMacAddr(std::string const& value);
/// <summary>
@@ -121,6 +126,8 @@ protected:
std::string m_Serial_number;
std::string m_Fw_version;
std::string m_Base_mac_addr;
int64_t m_Eth_link_count;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,6 +32,11 @@ Image_format_settings::Image_format_settings()
m_Signed_outputIsSet = false;
m_Mask_module_edges = true;
m_Mask_chip_edges = true;
m_Jungfrau_mask_pixels_without_g0 = true;
m_Jungfrau_mask_pixels_without_g0IsSet = false;
m_Apply_mask = false;
m_Jungfrau_pedestal_g0_rms_limit = 100L;
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
}
@@ -73,7 +78,21 @@ bool Image_format_settings::validate(std::stringstream& msg, const std::string&
}
}
if (jungfrauPedestalG0RmsLimitIsSet())
{
const int64_t& value = m_Jungfrau_pedestal_g0_rms_limit;
const std::string currentValuePath = _pathPrefix + ".jungfrauPedestalG0RmsLimit";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
return success;
}
@@ -104,8 +123,17 @@ bool Image_format_settings::operator==(const Image_format_settings& rhs) const
&&
(isMaskChipEdges() == rhs.isMaskChipEdges())
&&
((!jungfrauMaskPixelsWithoutG0IsSet() && !rhs.jungfrauMaskPixelsWithoutG0IsSet()) || (jungfrauMaskPixelsWithoutG0IsSet() && rhs.jungfrauMaskPixelsWithoutG0IsSet() && isJungfrauMaskPixelsWithoutG0() == rhs.isJungfrauMaskPixelsWithoutG0())) &&
(isApplyMask() == rhs.isApplyMask())
&&
((!jungfrauPedestalG0RmsLimitIsSet() && !rhs.jungfrauPedestalG0RmsLimitIsSet()) || (jungfrauPedestalG0RmsLimitIsSet() && rhs.jungfrauPedestalG0RmsLimitIsSet() && getJungfrauPedestalG0RmsLimit() == rhs.getJungfrauPedestalG0RmsLimit()))
;
}
@@ -128,6 +156,11 @@ void to_json(nlohmann::json& j, const Image_format_settings& o)
j["signed_output"] = o.m_Signed_output;
j["mask_module_edges"] = o.m_Mask_module_edges;
j["mask_chip_edges"] = o.m_Mask_chip_edges;
if(o.jungfrauMaskPixelsWithoutG0IsSet())
j["jungfrau_mask_pixels_without_g0"] = o.m_Jungfrau_mask_pixels_without_g0;
j["apply_mask"] = o.m_Apply_mask;
if(o.jungfrauPedestalG0RmsLimitIsSet())
j["jungfrau_pedestal_g0_rms_limit"] = o.m_Jungfrau_pedestal_g0_rms_limit;
}
@@ -153,6 +186,17 @@ void from_json(const nlohmann::json& j, Image_format_settings& o)
}
j.at("mask_module_edges").get_to(o.m_Mask_module_edges);
j.at("mask_chip_edges").get_to(o.m_Mask_chip_edges);
if(j.find("jungfrau_mask_pixels_without_g0") != j.end())
{
j.at("jungfrau_mask_pixels_without_g0").get_to(o.m_Jungfrau_mask_pixels_without_g0);
o.m_Jungfrau_mask_pixels_without_g0IsSet = true;
}
j.at("apply_mask").get_to(o.m_Apply_mask);
if(j.find("jungfrau_pedestal_g0_rms_limit") != j.end())
{
j.at("jungfrau_pedestal_g0_rms_limit").get_to(o.m_Jungfrau_pedestal_g0_rms_limit);
o.m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
}
}
@@ -247,6 +291,48 @@ void Image_format_settings::setMaskChipEdges(bool const value)
{
m_Mask_chip_edges = value;
}
bool Image_format_settings::isJungfrauMaskPixelsWithoutG0() const
{
return m_Jungfrau_mask_pixels_without_g0;
}
void Image_format_settings::setJungfrauMaskPixelsWithoutG0(bool const value)
{
m_Jungfrau_mask_pixels_without_g0 = value;
m_Jungfrau_mask_pixels_without_g0IsSet = true;
}
bool Image_format_settings::jungfrauMaskPixelsWithoutG0IsSet() const
{
return m_Jungfrau_mask_pixels_without_g0IsSet;
}
void Image_format_settings::unsetJungfrau_mask_pixels_without_g0()
{
m_Jungfrau_mask_pixels_without_g0IsSet = false;
}
bool Image_format_settings::isApplyMask() const
{
return m_Apply_mask;
}
void Image_format_settings::setApplyMask(bool const value)
{
m_Apply_mask = value;
}
int64_t Image_format_settings::getJungfrauPedestalG0RmsLimit() const
{
return m_Jungfrau_pedestal_g0_rms_limit;
}
void Image_format_settings::setJungfrauPedestalG0RmsLimit(int64_t const value)
{
m_Jungfrau_pedestal_g0_rms_limit = value;
m_Jungfrau_pedestal_g0_rms_limitIsSet = true;
}
bool Image_format_settings::jungfrauPedestalG0RmsLimitIsSet() const
{
return m_Jungfrau_pedestal_g0_rms_limitIsSet;
}
void Image_format_settings::unsetJungfrau_pedestal_g0_rms_limit()
{
m_Jungfrau_pedestal_g0_rms_limitIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -80,7 +80,7 @@ public:
bool jungfrauConversionFactorKeVIsSet() const;
void unsetJungfrau_conversion_factor_keV();
/// <summary>
/// Bit depth of resulting image (it doesn&#39;t affect the original detector value) If not provided value is adjusted automatically
/// Bit depth of resulting image (it doesn&#39;t affect the detector read-out value) If not provided value is adjusted automatically
/// </summary>
int64_t getBitDepthImage() const;
void setBitDepthImage(int64_t const value);
@@ -103,6 +103,25 @@ public:
/// </summary>
bool isMaskChipEdges() const;
void setMaskChipEdges(bool const value);
/// <summary>
/// JUNGFRAU: mask pixels that don&#39;t operate in G0, but do operate in G1 and G1. This should be turned off for cases, where detector is operated at room temperature with long exposure time.
/// </summary>
bool isJungfrauMaskPixelsWithoutG0() const;
void setJungfrauMaskPixelsWithoutG0(bool const value);
bool jungfrauMaskPixelsWithoutG0IsSet() const;
void unsetJungfrau_mask_pixels_without_g0();
/// <summary>
/// Masked pixels are set to special value in the images produced by Jungfraujoch
/// </summary>
bool isApplyMask() const;
void setApplyMask(bool const value);
/// <summary>
/// Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
/// </summary>
int64_t getJungfrauPedestalG0RmsLimit() const;
void setJungfrauPedestalG0RmsLimit(int64_t const value);
bool jungfrauPedestalG0RmsLimitIsSet() const;
void unsetJungfrau_pedestal_g0_rms_limit();
friend void to_json(nlohmann::json& j, const Image_format_settings& o);
friend void from_json(const nlohmann::json& j, Image_format_settings& o);
@@ -123,6 +142,12 @@ protected:
bool m_Mask_chip_edges;
bool m_Jungfrau_mask_pixels_without_g0;
bool m_Jungfrau_mask_pixels_without_g0IsSet;
bool m_Apply_mask;
int64_t m_Jungfrau_pedestal_g0_rms_limit;
bool m_Jungfrau_pedestal_g0_rms_limitIsSet;
};

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,6 +32,7 @@ Jfjoch_statistics::Jfjoch_statistics()
m_FpgaIsSet = false;
m_CalibrationIsSet = false;
m_Zeromq_previewIsSet = false;
m_Pixel_maskIsSet = false;
}
@@ -96,7 +97,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
}
}
return success;
}
@@ -136,7 +137,10 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
((!calibrationIsSet() && !rhs.calibrationIsSet()) || (calibrationIsSet() && rhs.calibrationIsSet() && getCalibration() == rhs.getCalibration())) &&
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview()))
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview())) &&
((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask()))
;
}
@@ -171,6 +175,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
j["calibration"] = o.m_Calibration;
if(o.zeromqPreviewIsSet())
j["zeromq_preview"] = o.m_Zeromq_preview;
if(o.pixelMaskIsSet())
j["pixel_mask"] = o.m_Pixel_mask;
}
@@ -231,6 +237,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
j.at("zeromq_preview").get_to(o.m_Zeromq_preview);
o.m_Zeromq_previewIsSet = true;
}
if(j.find("pixel_mask") != j.end())
{
j.at("pixel_mask").get_to(o.m_Pixel_mask);
o.m_Pixel_maskIsSet = true;
}
}
@@ -421,6 +432,23 @@ void Jfjoch_statistics::unsetZeromq_preview()
{
m_Zeromq_previewIsSet = false;
}
org::openapitools::server::model::Pixel_mask_statistics Jfjoch_statistics::getPixelMask() const
{
return m_Pixel_mask;
}
void Jfjoch_statistics::setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value)
{
m_Pixel_mask = value;
m_Pixel_maskIsSet = true;
}
bool Jfjoch_statistics::pixelMaskIsSet() const
{
return m_Pixel_maskIsSet;
}
void Jfjoch_statistics::unsetPixel_mask()
{
m_Pixel_maskIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -20,17 +20,18 @@
#include "Calibration_statistics_inner.h"
#include "Detector_status.h"
#include "Broker_status.h"
#include "Pixel_mask_statistics.h"
#include "Measurement_statistics.h"
#include "Spot_finding_settings.h"
#include "Zeromq_preview_settings.h"
#include "Detector_list.h"
#include "Fpga_status_inner.h"
#include "Image_format_settings.h"
#include "Detector_settings.h"
#include "Instrument_metadata.h"
#include <vector>
#include "Detector_status.h"
#include "Fpga_status_inner.h"
#include "Instrument_metadata.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -146,6 +147,13 @@ public:
void setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value);
bool zeromqPreviewIsSet() const;
void unsetZeromq_preview();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Pixel_mask_statistics getPixelMask() const;
void setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value);
bool pixelMaskIsSet() const;
void unsetPixel_mask();
friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o);
friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o);
@@ -172,6 +180,8 @@ protected:
bool m_CalibrationIsSet;
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;
bool m_Zeromq_previewIsSet;
org::openapitools::server::model::Pixel_mask_statistics m_Pixel_mask;
bool m_Pixel_maskIsSet;
};

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,206 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Pixel_mask_statistics.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Pixel_mask_statistics::Pixel_mask_statistics()
{
m_User_mask = 0L;
m_User_maskIsSet = false;
m_Too_high_pedestal_rms = 0L;
m_Too_high_pedestal_rmsIsSet = false;
m_Wrong_gain = 0L;
m_Wrong_gainIsSet = false;
}
void Pixel_mask_statistics::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Pixel_mask_statistics::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Pixel_mask_statistics::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Pixel_mask_statistics" : pathPrefix;
if (userMaskIsSet())
{
const int64_t& value = m_User_mask;
const std::string currentValuePath = _pathPrefix + ".userMask";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (tooHighPedestalRmsIsSet())
{
const int64_t& value = m_Too_high_pedestal_rms;
const std::string currentValuePath = _pathPrefix + ".tooHighPedestalRms";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (wrongGainIsSet())
{
const int64_t& value = m_Wrong_gain;
const std::string currentValuePath = _pathPrefix + ".wrongGain";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
return success;
}
bool Pixel_mask_statistics::operator==(const Pixel_mask_statistics& rhs) const
{
return
((!userMaskIsSet() && !rhs.userMaskIsSet()) || (userMaskIsSet() && rhs.userMaskIsSet() && getUserMask() == rhs.getUserMask())) &&
((!tooHighPedestalRmsIsSet() && !rhs.tooHighPedestalRmsIsSet()) || (tooHighPedestalRmsIsSet() && rhs.tooHighPedestalRmsIsSet() && getTooHighPedestalRms() == rhs.getTooHighPedestalRms())) &&
((!wrongGainIsSet() && !rhs.wrongGainIsSet()) || (wrongGainIsSet() && rhs.wrongGainIsSet() && getWrongGain() == rhs.getWrongGain()))
;
}
bool Pixel_mask_statistics::operator!=(const Pixel_mask_statistics& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Pixel_mask_statistics& o)
{
j = nlohmann::json::object();
if(o.userMaskIsSet())
j["user_mask"] = o.m_User_mask;
if(o.tooHighPedestalRmsIsSet())
j["too_high_pedestal_rms"] = o.m_Too_high_pedestal_rms;
if(o.wrongGainIsSet())
j["wrong_gain"] = o.m_Wrong_gain;
}
void from_json(const nlohmann::json& j, Pixel_mask_statistics& o)
{
if(j.find("user_mask") != j.end())
{
j.at("user_mask").get_to(o.m_User_mask);
o.m_User_maskIsSet = true;
}
if(j.find("too_high_pedestal_rms") != j.end())
{
j.at("too_high_pedestal_rms").get_to(o.m_Too_high_pedestal_rms);
o.m_Too_high_pedestal_rmsIsSet = true;
}
if(j.find("wrong_gain") != j.end())
{
j.at("wrong_gain").get_to(o.m_Wrong_gain);
o.m_Wrong_gainIsSet = true;
}
}
int64_t Pixel_mask_statistics::getUserMask() const
{
return m_User_mask;
}
void Pixel_mask_statistics::setUserMask(int64_t const value)
{
m_User_mask = value;
m_User_maskIsSet = true;
}
bool Pixel_mask_statistics::userMaskIsSet() const
{
return m_User_maskIsSet;
}
void Pixel_mask_statistics::unsetUser_mask()
{
m_User_maskIsSet = false;
}
int64_t Pixel_mask_statistics::getTooHighPedestalRms() const
{
return m_Too_high_pedestal_rms;
}
void Pixel_mask_statistics::setTooHighPedestalRms(int64_t const value)
{
m_Too_high_pedestal_rms = value;
m_Too_high_pedestal_rmsIsSet = true;
}
bool Pixel_mask_statistics::tooHighPedestalRmsIsSet() const
{
return m_Too_high_pedestal_rmsIsSet;
}
void Pixel_mask_statistics::unsetToo_high_pedestal_rms()
{
m_Too_high_pedestal_rmsIsSet = false;
}
int64_t Pixel_mask_statistics::getWrongGain() const
{
return m_Wrong_gain;
}
void Pixel_mask_statistics::setWrongGain(int64_t const value)
{
m_Wrong_gain = value;
m_Wrong_gainIsSet = true;
}
bool Pixel_mask_statistics::wrongGainIsSet() const
{
return m_Wrong_gainIsSet;
}
void Pixel_mask_statistics::unsetWrong_gain()
{
m_Wrong_gainIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,96 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Pixel_mask_statistics.h
*
*
*/
#ifndef Pixel_mask_statistics_H_
#define Pixel_mask_statistics_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class Pixel_mask_statistics
{
public:
Pixel_mask_statistics();
virtual ~Pixel_mask_statistics() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Pixel_mask_statistics& rhs) const;
bool operator!=(const Pixel_mask_statistics& rhs) const;
/////////////////////////////////////////////
/// Pixel_mask_statistics members
/// <summary>
/// Number of pixels masked using the user mask
/// </summary>
int64_t getUserMask() const;
void setUserMask(int64_t const value);
bool userMaskIsSet() const;
void unsetUser_mask();
/// <summary>
/// Number of pixels with G0 pedestal RMS higher than provided threshold
/// </summary>
int64_t getTooHighPedestalRms() const;
void setTooHighPedestalRms(int64_t const value);
bool tooHighPedestalRmsIsSet() const;
void unsetToo_high_pedestal_rms();
/// <summary>
/// Number of pixels that show wrong gain level during the pedestal procedure
/// </summary>
int64_t getWrongGain() const;
void setWrongGain(int64_t const value);
bool wrongGainIsSet() const;
void unsetWrong_gain();
friend void to_json(nlohmann::json& j, const Pixel_mask_statistics& o);
friend void from_json(const nlohmann::json& j, Pixel_mask_statistics& o);
protected:
int64_t m_User_mask;
bool m_User_maskIsSet;
int64_t m_Too_high_pedestal_rms;
bool m_Too_high_pedestal_rmsIsSet;
int64_t m_Wrong_gain;
bool m_Wrong_gainIsSet;
};
} // namespace org::openapitools::server::model
#endif /* Pixel_mask_statistics_H_ */

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.23
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

Some files were not shown because too many files have changed in this diff Show More