mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
Compare commits
523 Commits
separateRx
...
2020.08.12
Author | SHA1 | Date | |
---|---|---|---|
16af67924e | |||
d822600c68 | |||
816e5200b2 | |||
9c58b4802c | |||
0c7759d7e4 | |||
690947ec3a | |||
45182283d1 | |||
03ac0910cd | |||
b6c94b2ab4 | |||
336dfcae60 | |||
d47f0feb17 | |||
784628589e | |||
21995b3d4a | |||
27b2a607c8 | |||
8e2bd17704 | |||
0e011a77b5 | |||
d56b2134ef | |||
8af1183220 | |||
78fdf5b60a | |||
132043a70d | |||
b51290d0fe | |||
0369413201 | |||
04d6644753 | |||
949c6a81ce | |||
aa0c36713c | |||
4aee113dda | |||
6c3f0d18ec | |||
7b6f4d0b5b | |||
6db5954d21 | |||
69d9680034 | |||
bbf8ab4b88 | |||
79f010a438 | |||
ab05da4d0e | |||
6e67ff9f90 | |||
321ed13659 | |||
de39310a9c | |||
e1de2f72ba | |||
f6172f9b9e | |||
5616d4aeeb | |||
857aa47ee7 | |||
bb3951c201 | |||
380b062216 | |||
a70d4e1e5d | |||
3301a80d99 | |||
ce25b3018c | |||
d25f9093d5 | |||
d24edd52e1 | |||
7b1ede32b1 | |||
4174d193b4 | |||
0514f00552 | |||
8631f5e2b0 | |||
540a203139 | |||
57c3cb0849 | |||
e82bcafb76 | |||
3cdf98b230 | |||
acc43842eb | |||
63a5b4d61f | |||
3083260b28 | |||
6e4b7f5bd7 | |||
ddd562f8b5 | |||
e2f1fd076a | |||
6a084e99b4 | |||
885b22eca8 | |||
bea4ba131a | |||
09fa8a3ba5 | |||
874092a9d0 | |||
5c4d355d57 | |||
4702a76235 | |||
fd503e84af | |||
1211d02428 | |||
ec27d35d6d | |||
ea2e7839d0 | |||
d5b893e452 | |||
68c0f76bd9 | |||
4eaa9588ba | |||
459a715b9c | |||
40d0430f2e | |||
0cb38a9c51 | |||
caef8c111c | |||
02d5cf14e4 | |||
bd221fefe5 | |||
c683f62452 | |||
1177e54602 | |||
85c958facf | |||
87c33c8e81 | |||
7492f7dbfa | |||
c2b586a333 | |||
d31839e80e | |||
b47f751d66 | |||
aa52028690 | |||
6f5635a402 | |||
5b9c7c4105 | |||
98ffe350f3 | |||
7dfeb987db | |||
7899c5faef | |||
17fb497774 | |||
e9c03c6eaf | |||
f497177022 | |||
984b43545e | |||
327218cb2b | |||
cdfd3934ee | |||
4cebefbc55 | |||
24c4cd8d84 | |||
f358492e09 | |||
86d3fc7e55 | |||
89da671ae2 | |||
24e44d56fe | |||
b13d04dd89 | |||
d19530b3d4 | |||
5ba3a414d6 | |||
54ad92a2bf | |||
74a7ca9b71 | |||
6846939f92 | |||
99ec7f0046 | |||
df3ae7f409 | |||
410f38c804 | |||
91652df5b1 | |||
02bda7c533 | |||
9204a56ff7 | |||
3ec637601d | |||
dc33f1a5da | |||
879b2c8864 | |||
b1a4723028 | |||
bad7fd3906 | |||
21c8b77e2c | |||
097acf8086 | |||
799f540d71 | |||
a412b465c6 | |||
bb2f70beb5 | |||
096e94562a | |||
9063a8d4ed | |||
b1d3cbb25e | |||
1fefc001f9 | |||
e8556abbe7 | |||
f8da057735 | |||
df0b52604f | |||
f792d59682 | |||
98d061a032 | |||
2bb9629f14 | |||
cf2e1c1dfc | |||
cb54bf6225 | |||
3b0f68c3c4 | |||
5faf3c7336 | |||
3ddb264875 | |||
1fb19aeae2 | |||
ad297e9c51 | |||
beb6afe101 | |||
78a6896ae9 | |||
9ea8882c05 | |||
4cf5e81971 | |||
2fa5e7d00c | |||
af17fb9f61 | |||
07869134d6 | |||
8b9a69e1f1 | |||
023924c4cc | |||
01d00164e5 | |||
e6c8ba0e88 | |||
37fc69b297 | |||
e1e265bd49 | |||
b46809e1c0 | |||
396d82bd62 | |||
e7ff96fe8d | |||
07a292af95 | |||
e4433a99a5 | |||
28fb1023fa | |||
c4374e623e | |||
da2f12072f | |||
918da2402f | |||
94e9591974 | |||
a76ed6d8db | |||
b7cb341ee3 | |||
546bef5e5a | |||
97ddfed819 | |||
2d68b61f00 | |||
3bdf02a23c | |||
f70d28b175 | |||
d076fda59a | |||
a3062a5e00 | |||
c6921bf954 | |||
ae9499047b | |||
8dd9bb6ea3 | |||
9a284f75c3 | |||
3e87cfa5c1 | |||
6136eabee2 | |||
67bb0dff1a | |||
ca298580f3 | |||
d7f490701b | |||
7752b86d97 | |||
35dbc3813d | |||
a096434864 | |||
ab4d89aa70 | |||
c67b7aab4d | |||
293fda0c7a | |||
bef35eb3d6 | |||
eea013d492 | |||
890a641304 | |||
1e0160d655 | |||
42b7f6fa7c | |||
4a1943216b | |||
a23504c9c4 | |||
4db3473e32 | |||
8c1c696f64 | |||
39bbc5c688 | |||
28b3fb4101 | |||
05059c1176 | |||
95089b5faa | |||
7c48ef8931 | |||
0dc062e6d3 | |||
9b1b878f95 | |||
e23a8e7da2 | |||
a228ae0773 | |||
9787c6a385 | |||
4d1fad04c3 | |||
c5a9ff3024 | |||
25ec47dfff | |||
93c5505285 | |||
a656668d73 | |||
3156e6f50e | |||
f224b7dadf | |||
ccf54f29b6 | |||
ef564e382c | |||
e571f7bb3e | |||
aacc61b058 | |||
7d128585e1 | |||
279986d77c | |||
ff729fb43f | |||
488e0230ba | |||
c04793a9d7 | |||
f1cbf49449 | |||
285ef30439 | |||
75e9d63341 | |||
21a79752e2 | |||
5780cabe8d | |||
cec26f81e1 | |||
0c045f0faa | |||
19e40cf0e6 | |||
902366fede | |||
ee67c28711 | |||
cfe9a431f9 | |||
524c86de49 | |||
05ef55b258 | |||
bcd217b6fe | |||
4ca46e4123 | |||
7333909f6b | |||
ba7f54744b | |||
cd677e4d97 | |||
4240ea57d4 | |||
692ade6c17 | |||
4cbe354396 | |||
39d5a7db26 | |||
ae88af2a72 | |||
f592d21570 | |||
35f95e603e | |||
5c42792580 | |||
301073e60b | |||
159b0a0367 | |||
f6911c4238 | |||
1d53dc65cd | |||
9d3bbc0a68 | |||
801f2c4559 | |||
da2ce03e1d | |||
f366e9ae6f | |||
5bf6b7a338 | |||
991acc7c07 | |||
b40e481da9 | |||
12b40a44a2 | |||
f14c2d06a5 | |||
0cc547c2de | |||
489fccb25c | |||
7c23f1e42c | |||
f66345d128 | |||
e7da4ae862 | |||
8adddfb083 | |||
7cc05ead89 | |||
ebc164aaa6 | |||
a57f7943ee | |||
db8616fcb3 | |||
55af974c4e | |||
1f3fd010a7 | |||
cf9ec3de0d | |||
b5781e1f9b | |||
e09fc8cd2b | |||
48b8116849 | |||
f5759921d2 | |||
b5b50a2061 | |||
a7d2a89c50 | |||
e80bc905d6 | |||
c6b664b25b | |||
f078e6147d | |||
7609a2bda4 | |||
d5ae9a22f4 | |||
ffb1a59df0 | |||
889e926479 | |||
19bd39eece | |||
f28b41b130 | |||
9a80975929 | |||
efc247f46f | |||
c0e8e44b41 | |||
82a6383466 | |||
0289f22a0d | |||
6a919ece02 | |||
d0baa4c7b9 | |||
6dccf48759 | |||
b128837538 | |||
3c46204b14 | |||
807a588c4b | |||
fb5b2133f5 | |||
6f2413fd5d | |||
5412569e77 | |||
0375e80b42 | |||
569d0464e7 | |||
cc8549e6cb | |||
bcb5b8047b | |||
8c9341836b | |||
ad36ee2ba2 | |||
afa71895e7 | |||
62449b81ad | |||
6794d58db1 | |||
3775ff302e | |||
e76da84c9f | |||
24af0ee578 | |||
e0b86799ae | |||
5a7451e29e | |||
e0c056be09 | |||
cf0681a23c | |||
24168d5e32 | |||
7c2949f372 | |||
5a7eeb3d76 | |||
64a94b962a | |||
ab72d342c9 | |||
200186ddde | |||
7388bb4aa7 | |||
9c26cd5552 | |||
5f91198328 | |||
265e96d675 | |||
f5160b0978 | |||
2a2bb5f63a | |||
e306c39e1d | |||
6c95bf171b | |||
fd948f1a00 | |||
ff9811895f | |||
7f6d57d6ba | |||
099805ba8b | |||
1e2a3f2767 | |||
9a8300ca08 | |||
40257fc82d | |||
3bdc8e95ce | |||
223e24f924 | |||
4053594c4d | |||
f07e722d26 | |||
2ef8f2f046 | |||
0e514a470d | |||
294612b03c | |||
f223415f94 | |||
c6ff50d753 | |||
f0a318777c | |||
8aa7144252 | |||
15eea51f12 | |||
e884836f5c | |||
104d91e8c6 | |||
9ddebc4c09 | |||
0525e374b2 | |||
e727b97d75 | |||
5ca987ecbb | |||
2a64a9f6e0 | |||
a708da5455 | |||
e2eb1598d3 | |||
d175ba0936 | |||
6189fd157a | |||
6c753f3b50 | |||
098d3e6d98 | |||
4300e95a8e | |||
46daa7e2de | |||
754536898a | |||
20bfe92573 | |||
9493ae3da9 | |||
0fca9fba79 | |||
b543708d9d | |||
e0ea08332f | |||
e229fee6ba | |||
44a88893ba | |||
f4ba46c19b | |||
37cb0bb1c0 | |||
f293ba8c56 | |||
e9ca17f860 | |||
30391a2faf | |||
7ba877446c | |||
6bdc506a34 | |||
9592d1760f | |||
8ffb27c300 | |||
0a66605111 | |||
02d8b1fb5f | |||
457f31ed61 | |||
be3f095b56 | |||
174bb32744 | |||
07d90d127f | |||
0debd6a457 | |||
8f0ef68029 | |||
d71e40729a | |||
9475e01062 | |||
dc8f67cd7b | |||
3ebb1fca02 | |||
8973ef1aaa | |||
5690914048 | |||
fa768e584e | |||
62e69b900b | |||
30fc346e22 | |||
761f93d753 | |||
6d71d6cf9f | |||
e208d3ebe8 | |||
cd90f09a30 | |||
4570ffc8ad | |||
a7ce30391c | |||
c33c479ada | |||
c8eda1a458 | |||
ecc692ad9a | |||
00c1211c56 | |||
599625e6ed | |||
3514b14bc9 | |||
395b9f1b72 | |||
26dfccf77e | |||
50d2d21018 | |||
2c83abcac7 | |||
ea7cc9db8c | |||
0dd5a099c8 | |||
e6deccc2c6 | |||
ad42a61bae | |||
cbc2856c1c | |||
e34fbb4350 | |||
eea67014b7 | |||
3962714b48 | |||
f0f97f265a | |||
e730c124e3 | |||
f51c4e1d7c | |||
a62b650e24 | |||
af4b5bbf50 | |||
d8ca9bb6b5 | |||
9a1fdc4104 | |||
b3ebce378d | |||
46afcfe694 | |||
d7563fdd1a | |||
ccf1889113 | |||
88f801061f | |||
e3d3c88d74 | |||
80f4f115f9 | |||
9a7d15bbf6 | |||
e148a584df | |||
5aaefc8e00 | |||
ed8d606eb2 | |||
eff664e790 | |||
1ed1b5da86 | |||
353b8d0057 | |||
bbe9108fb9 | |||
1998f9541e | |||
6620027439 | |||
30078d6c1f | |||
13c1f7c2d6 | |||
28bafb012a | |||
9c7ff84b73 | |||
ab5cad4fde | |||
dac9998161 | |||
1dfac6ae6a | |||
2e75f36fa0 | |||
c1902c713d | |||
61f5564bb7 | |||
ec2f7db729 | |||
676055837f | |||
cce028b825 | |||
d468641138 | |||
01d1c86403 | |||
2ac7451a99 | |||
15b57b29fb | |||
902616a09d | |||
eb3971fedc | |||
64f0aa98ab | |||
61b86962bd | |||
0e5a96e1ed | |||
2f11dbc2c9 | |||
9b21f44d94 | |||
e56b431dc3 | |||
1741c84406 | |||
1623448086 | |||
1a39f92f8f | |||
4ea1f2c7e3 | |||
66d30cb2f1 | |||
8f021fe4ac | |||
7f42f5cadb | |||
999c548aa1 | |||
6872f24037 | |||
1a75170eed | |||
a12d47da36 | |||
c16411ba00 | |||
379b9b53b4 | |||
d76f43f5fd | |||
7d94ad51ab | |||
671cf45fd7 | |||
31ec3c8cf7 | |||
8ff9b0cdac | |||
ea4044e4b1 | |||
e599bb7c24 | |||
3618f6e5d3 | |||
959fd562d3 | |||
32662baef8 | |||
4e4f06560c | |||
efcb6cf480 | |||
9ae933b177 | |||
f87e8d3c19 | |||
903ebb2679 | |||
f41083842f | |||
9a87ba610a | |||
7224ad989a | |||
64f5c0f34b | |||
3238ecfc8d | |||
395d7ba98a | |||
96ec3b2123 | |||
b7805ae0d4 | |||
1f6b0b5887 | |||
b1cdc79bd4 | |||
f626db454e | |||
86b39853a3 | |||
e3044689dd | |||
337e56d9bf | |||
eb257154c6 |
@ -3,4 +3,5 @@ IndentWidth: 4
|
||||
|
||||
UseTab: Never
|
||||
ColumnLimit: 80
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveMacros: true
|
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: New Bug Report
|
||||
labels: action - Bug, priority - Unclassified, status - Pending
|
||||
template: bug_report.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Distribution:
|
||||
<!-- RHEL7, RHEL6, Fedora, etc -->
|
||||
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *Describe the bug
|
||||
<!-- A clear and concise description of what the bug is -->
|
||||
|
||||
##### Expected behavior
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
##### To Reproduce
|
||||
<!-- Steps to reproduce the behavior: -->
|
||||
<!-- 1. Go to '...' -->
|
||||
<!-- 2. Click on '....' -->
|
||||
<!-- 3. Scroll down to '....' -->
|
||||
<!-- 4. See error -->
|
||||
|
||||
##### Screenshots
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
##### Additional context
|
||||
<!-- Add any other context about the problem here. -->
|
28
.github/ISSUE_TEMPLATE/change_request.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/change_request.md
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Change Request
|
||||
about: Suggest a change to an existing feature
|
||||
title: New Change Request
|
||||
labels: action - Change, priority - Unclassified, status - Pending
|
||||
template: change_request.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *State the change request:
|
||||
<!-- A clear and concise description of what the change is to an existing feature -->
|
||||
|
||||
##### Is your change request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
34
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
34
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest a feature, documentation or submit a question
|
||||
title: New Feature Request
|
||||
labels: action - Enhancement, priority - Unclassified, status - Pending
|
||||
template: feature_request.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *State the feature:
|
||||
<!-- A clear and concise description of what the feature is -->
|
||||
|
||||
##### Is your feature request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Describe the solution you'd like:
|
||||
<!-- A clear and concise description of what you want to happen -->
|
||||
|
||||
##### Describe alternatives you've considered:
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
@ -45,6 +45,23 @@ option(SLS_USE_CTBGUI "ctb GUI" OFF)
|
||||
option(SLS_BUILD_DOCS "docs" OFF)
|
||||
option(SLS_BUILD_EXAMPLES "examples" OFF)
|
||||
option(SLS_TUNE_LOCAL "tune to local machine" OFF)
|
||||
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
|
||||
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
|
||||
|
||||
# set(ClangFormat_BIN_NAME clang-format)
|
||||
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||
"libs/"
|
||||
"slsDetectorCalibration/"
|
||||
"ctbGui/"
|
||||
"manual/"
|
||||
"python/"
|
||||
"sample/"
|
||||
${CMAKE_BINARY_DIR})
|
||||
find_package(ClangFormat)
|
||||
|
||||
#Enable LTO if available
|
||||
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
||||
|
||||
|
||||
# Use ld.gold if it is available and isn't disabled explicitly
|
||||
option(SLS_USE_LD_GOLD "Use GNU gold linker" ON)
|
||||
@ -80,6 +97,7 @@ target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wformat=2
|
||||
-Wredundant-decls
|
||||
# -Wconversion
|
||||
-Wvla
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type
|
||||
|
||||
@ -213,6 +231,11 @@ if(SLS_BUILD_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif(SLS_BUILD_DOCS)
|
||||
|
||||
|
||||
if(SLS_USE_MOENCH)
|
||||
add_subdirectory(slsDetectorCalibration/moenchExecutables)
|
||||
endif(SLS_USE_MOENCH)
|
||||
|
||||
if(SLS_MASTER_PROJECT)
|
||||
# Set install dir CMake packages
|
||||
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
||||
|
39
cmake/FindClangFormat.cmake
Normal file
39
cmake/FindClangFormat.cmake
Normal file
@ -0,0 +1,39 @@
|
||||
# Find Clang format
|
||||
if(NOT ClangFormat_BIN_NAME)
|
||||
set(ClangFormat_BIN_NAME clang-format)
|
||||
endif()
|
||||
|
||||
# if custom path check there first
|
||||
if(ClangFormat_ROOT_DIR)
|
||||
find_program(ClangFormat_BIN
|
||||
NAMES
|
||||
${ClangFormat_BIN_NAME}
|
||||
PATHS
|
||||
"${ClangFormat_ROOT_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
find_program(ClangFormat_BIN NAMES ${ClangFormat_BIN_NAME})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
ClangFormat
|
||||
DEFAULT_MSG
|
||||
ClangFormat_BIN)
|
||||
|
||||
mark_as_advanced(
|
||||
ClangFormat_BIN)
|
||||
|
||||
if(ClangFormat_FOUND)
|
||||
exec_program(${ClangFormat_BIN} ${CMAKE_CURRENT_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE CLANG_VERSION_TEXT)
|
||||
string(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+" CLANG_VERSION ${CLANG_VERSION_TEXT})
|
||||
if((${CLANG_VERSION} GREATER "9") OR (${CLANG_VERSION} EQUAL "9"))
|
||||
# A CMake script to find all source files and setup clang-format targets for them
|
||||
message(STATUS "found clang-format \"${CLANG_VERSION}\" adding formatting targets")
|
||||
include(clang-format)
|
||||
else()
|
||||
message(STATUS "clang-format version \"${CLANG_VERSION}\" found but need at least 9. Not setting up format targets")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "clang-format not found. Not setting up format targets")
|
||||
endif()
|
47
cmake/clang-format.cmake
Normal file
47
cmake/clang-format.cmake
Normal file
@ -0,0 +1,47 @@
|
||||
# A CMake script to find all source files and setup clang-format targets for them
|
||||
|
||||
# Find all source files
|
||||
set(ClangFormat_CXX_FILE_EXTENSIONS ${ClangFormat_CXX_FILE_EXTENSIONS} *.cpp *.h *.cxx *.hxx *.hpp *.cc *.ipp *.c)
|
||||
file(GLOB_RECURSE ALL_SOURCE_FILES ${ClangFormat_CXX_FILE_EXTENSIONS})
|
||||
|
||||
# Don't include some common build folders
|
||||
set(ClangFormat_EXCLUDE_PATTERNS ${ClangFormat_EXCLUDE_PATTERNS} "/CMakeFiles/" "cmake")
|
||||
|
||||
# get all project files file
|
||||
foreach (SOURCE_FILE ${ALL_SOURCE_FILES})
|
||||
foreach (EXCLUDE_PATTERN ${ClangFormat_EXCLUDE_PATTERNS})
|
||||
string(FIND ${SOURCE_FILE} ${EXCLUDE_PATTERN} EXCLUDE_FOUND)
|
||||
if (NOT ${EXCLUDE_FOUND} EQUAL -1)
|
||||
list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
|
||||
#target for formatting soruce files
|
||||
add_custom_target(format
|
||||
COMMENT "Running clang-format to change files"
|
||||
COMMAND ${ClangFormat_BIN}
|
||||
-style=file
|
||||
-i
|
||||
${ALL_SOURCE_FILES}
|
||||
)
|
||||
|
||||
|
||||
#target to check format on source files
|
||||
add_custom_target(format-check
|
||||
COMMENT "Checking clang-format changes"
|
||||
# Use ! to negate the result for correct output
|
||||
COMMAND !
|
||||
${ClangFormat_BIN}
|
||||
-style=file
|
||||
-output-replacements-xml
|
||||
${ALL_SOURCE_FILES}
|
||||
| grep -q "replacement offset"
|
||||
)
|
||||
|
||||
# debug to check which file will be formatted
|
||||
add_custom_target(
|
||||
listformatfiles
|
||||
COMMAND
|
||||
echo ${ALL_SOURCE_FILES}
|
||||
)
|
56
cmk.sh
56
cmk.sh
@ -12,6 +12,8 @@ TESTS=0
|
||||
SIMULATOR=0
|
||||
CTBGUI=0
|
||||
MANUALS=0
|
||||
MANUALS_ONLY_RST=0
|
||||
MOENCHZMQ=0
|
||||
|
||||
|
||||
CLEAN=0
|
||||
@ -20,7 +22,7 @@ CMAKE_PRE=""
|
||||
CMAKE_POST=""
|
||||
|
||||
usage() { echo -e "
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
@ -36,6 +38,8 @@ Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d <HDF5 director
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
|
||||
Rebuild when you switch to a new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
@ -71,7 +75,7 @@ For rebuilding only certain sections
|
||||
|
||||
" ; exit 1; }
|
||||
|
||||
while getopts ":bpchd:j:trgeisum" opt ; do
|
||||
while getopts ":bpchd:j:trgeisumnz" opt ; do
|
||||
case $opt in
|
||||
b)
|
||||
echo "Building of CMake files Required"
|
||||
@ -130,6 +134,14 @@ while getopts ":bpchd:j:trgeisum" opt ; do
|
||||
echo "Compiling Manuals"
|
||||
MANUALS=1
|
||||
;;
|
||||
n)
|
||||
echo "Compiling Manuals (Only RST)"
|
||||
MANUALS_ONLY_RST=1
|
||||
;;
|
||||
z)
|
||||
echo "Compiling Moench Zmq Processor"
|
||||
MOENCHZMQ=1
|
||||
;;
|
||||
u)
|
||||
echo "Compiling Options: Chip Test Gui"
|
||||
CTBGUI=1
|
||||
@ -210,6 +222,12 @@ if [ $MANUALS -eq 1 ]; then
|
||||
echo "Manuals Option enabled"
|
||||
fi
|
||||
|
||||
#Moench zmq processor
|
||||
if [ $MOENCHZMQ -eq 1 ]; then
|
||||
CMAKE_POST+=" -DSLS_USE_MOENCH=ON "
|
||||
echo "Moench Zmq Processor Option enabled"
|
||||
fi
|
||||
|
||||
#Chip Test Gui
|
||||
if [ $CTBGUI -eq 1 ]; then
|
||||
CMAKE_POST+=" -DSLS_USE_CTBGUI=ON "
|
||||
@ -256,16 +274,36 @@ fi
|
||||
|
||||
#make
|
||||
if [ $COMPILERTHREADS -gt 0 ]; then
|
||||
BUILDCOMMAND="make -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
|
||||
BUILDCOMMAND="make -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
else
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
BUILDCOMMAND="make docs -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
else
|
||||
BUILDCOMMAND="make rst -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
fi
|
||||
fi
|
||||
else
|
||||
make
|
||||
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
|
||||
echo "make"
|
||||
make
|
||||
else
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
echo "make docs"
|
||||
make docs
|
||||
else
|
||||
echo "make rst"
|
||||
make rst
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
make docs
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
@ -21,6 +21,7 @@ if [ -f "$infile" ]
|
||||
then
|
||||
gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
||||
echo compiling
|
||||
echo gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
||||
$exe ;
|
||||
echo cleaning
|
||||
rm $exe
|
||||
|
@ -66,4 +66,10 @@ add_custom_target(docs
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx")
|
||||
|
||||
|
||||
add_custom_target(rst
|
||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||
-c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx")
|
||||
|
@ -21,7 +21,7 @@ print(sys.path)
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'slsDetectorPackage'
|
||||
copyright = '2019, PSD Detector Group'
|
||||
copyright = '2020, PSD Detector Group'
|
||||
author = 'PSD Detector Group'
|
||||
version = '@PROJECT_VERSION@'
|
||||
|
||||
|
@ -42,7 +42,7 @@ The documentation that you are reading now is built with
|
||||
|
||||
* Doxygen (to extract C++ classes etc.)
|
||||
* Breathe (Sphinx plugin to handle doxygen xml)
|
||||
* Sphinx
|
||||
* Sphinx with sphinx_rtd_theme
|
||||
|
||||
-----------------------
|
||||
Packaged in libs/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Utility program to generate input files for the command line
|
||||
/**
|
||||
* Utility program to generate input files for the command line
|
||||
* documentation. Uses the string returned from sls_detector_help cmd
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@ -9,7 +9,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include "CmdProxy.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
@ -52,5 +51,4 @@ int main() {
|
||||
auto help = replace_all(tmp, "\n\t", "\n\t\t");
|
||||
fs << '\t' << cmd << usage << help << "\n";
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,5 @@
|
||||
|
||||
Installation
|
||||
==============================================
|
||||
|
||||
Build from source using CMake
|
||||
---------------------------------
|
||||
|
||||
.. note ::
|
||||
|
||||
@ -13,17 +9,54 @@ Build from source using CMake
|
||||
without being communicated. If absolute stability of the API is needed please
|
||||
use one of the release versions.
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||
manage the dependencies.
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
==============================================
|
||||
|
||||
Build from source using CMake
|
||||
---------------------------------
|
||||
|
||||
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
|
||||
It is also required to clone with the option --recursive to get the git submodules used
|
||||
in the package.
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
make -j12
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
make install
|
||||
|
||||
The easiest way to configure options is to use the ccmake utility.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#from the build directory
|
||||
ccmake .
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
--------------------------------
|
||||
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager.
|
||||
|
||||
We have three different packages available:
|
||||
|
||||
* **slsdetlib**, shared libraries and command line utilities
|
||||
* **slsdetgui**, GUI
|
||||
* **slsdet**, Python bindings
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#Add channels for dependencies and our library
|
||||
@ -32,14 +65,19 @@ Install binaries using conda
|
||||
conda config --set channel_priority strict
|
||||
|
||||
#cerate an environment with our library, then activate
|
||||
conda create -n myenv slsdetlib=2020.03.18.dev2
|
||||
codna activate myenv
|
||||
conda create -n myenv slsdetlib=2020.07.23.dev0
|
||||
conda activate myenv
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#List available versions
|
||||
conda search slsdet
|
||||
|
||||
|
||||
Build from source on old distributions
|
||||
-----------------------------------------
|
||||
@ -66,4 +104,11 @@ is to use conda
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda create -n myenv python sphinx sphinx_rtd_theme
|
||||
conda create -n myenv python sphinx sphinx_rtd_theme
|
||||
|
||||
Then enable the option SLS_BUILD_DOCS to create the targets
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make docs # generate API docs and build Sphinx RST
|
||||
make rst # rst only, saves time in case the API did not change
|
@ -4,9 +4,55 @@ Enums
|
||||
These enums are defined in slsDetectorDefs in the C++ package and
|
||||
exposed to Python through pybind11.
|
||||
|
||||
.. py:currentmodule:: sls_detector
|
||||
.. py:currentmodule:: slsdet
|
||||
|
||||
.. autoclass:: runStatus
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
.. autoclass:: detectorType
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: frameDiscardPolicy
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: fileFormat
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: dimension
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: externalSignalFlag
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: timingMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: dacIndex
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: detectorSettings
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: clockIndex
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: speedLevel
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: readoutMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: masterFlags
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: frameModeType
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: detectorModeType
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: burstMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: timingSourceType
|
||||
:undoc-members:
|
@ -74,7 +74,7 @@ But lets start looking at the at the manual way:
|
||||
::
|
||||
|
||||
import time
|
||||
from sls_detector import Eiger
|
||||
from slsdet import Eiger
|
||||
d = Eiger()
|
||||
|
||||
n = 10
|
||||
@ -114,7 +114,7 @@ hang around until the main process exits.
|
||||
|
||||
import time
|
||||
from multiprocessing import Process
|
||||
from sls_detector import Eiger
|
||||
from slsdet import Eiger
|
||||
|
||||
def acquire():
|
||||
"""
|
||||
|
@ -1,6 +1,6 @@
|
||||
Receiver
|
||||
==============================================
|
||||
|
||||
.. doxygenclass:: slsReceiver
|
||||
.. doxygenclass:: Receiver
|
||||
:members:
|
||||
.. :undoc-members:
|
@ -12,7 +12,7 @@ hostname bchip007
|
||||
0:rx_udpip 129.129.202.98
|
||||
0:rx_hostname pc6898
|
||||
0:outdir /bigRAID/datadir_gotthard/rec_test_data
|
||||
0:vhighvoltage 120
|
||||
0:highvoltage 120
|
||||
master -1
|
||||
sync none
|
||||
outdir /bigRAID/datadir_gotthard/rec_test_data
|
||||
|
129
examples/gotthard2_veto_file.txt
Normal file
129
examples/gotthard2_veto_file.txt
Normal file
@ -0,0 +1,129 @@
|
||||
#Gain index ADU value (12 bit)
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
@ -1,132 +1,129 @@
|
||||
#G1 Energy #G2 Energy
|
||||
300 7000
|
||||
|
||||
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain (for every channel) ADU
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain #G1 Energy #G2 Energy
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
|
29
examples/gotthard_II.config
Normal file
29
examples/gotthard_II.config
Normal file
@ -0,0 +1,29 @@
|
||||
hostname strip3
|
||||
|
||||
udp_srcip 10.1.1.184
|
||||
udp_dstip 10.1.1.107
|
||||
|
||||
udp_dstport2 50084
|
||||
udp_srcip2 10.1.1.185
|
||||
udp_dstip2 10.1.1.107
|
||||
|
||||
rx_hostname pc12365:1954
|
||||
#udp_dstmac 3c:fd:fe:d2:a4:25
|
||||
fpath /tmp
|
||||
fname run
|
||||
fwrite 0
|
||||
|
||||
bursts 10
|
||||
frames 2700
|
||||
burstperiod 100ms
|
||||
|
||||
numinterfaces 2
|
||||
veto 1
|
||||
|
||||
#fixing data looks
|
||||
# Sampling pipeline 1 clk
|
||||
reg 0x120 0x00000010
|
||||
clkphase 1 135 deg
|
||||
|
||||
|
||||
|
@ -6,12 +6,12 @@ hostname bchip074+bchip075+
|
||||
0:extsig:0 trigger_in_rising_edge
|
||||
0:rx_tcpport 1954
|
||||
0:rx_udpport 50001
|
||||
0:vhighvoltage 0
|
||||
0:highvoltage 0
|
||||
|
||||
1:extsig:0 trigger_in_rising_edge
|
||||
1:rx_tcpport 1955
|
||||
1:rx_udpport 50002
|
||||
1:vhighvoltage 0
|
||||
1:highvoltage 0
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
@ -53,5 +53,5 @@ settings veryhighgain
|
||||
exptime 0.000005
|
||||
period 0.0001
|
||||
|
||||
vhighvoltage 90
|
||||
highvoltage 90
|
||||
|
||||
|
@ -498,4 +498,4 @@ rx_jsonpara detectorMode analog
|
||||
|
||||
reg 0x5e 0x00010000
|
||||
#powerchip 1
|
||||
vhighvoltage 90
|
||||
highvoltage 90
|
||||
|
@ -6,7 +6,7 @@ hostname localhost
|
||||
rx_hostname localhost
|
||||
|
||||
#powerchip 1
|
||||
#vhighvoltage 200
|
||||
#highvoltage 200
|
||||
|
||||
#extsig:0 trigger_in_rising_edge
|
||||
#timing trigger
|
||||
|
@ -17,7 +17,7 @@ hostname bchip048+bchip052+
|
||||
rx_hostname pcmoench01
|
||||
|
||||
powerchip 1
|
||||
vhighvoltage 200
|
||||
highvoltage 200
|
||||
#extsig:0 trigger_in_rising_edge
|
||||
#timing trigger
|
||||
|
||||
|
@ -56,7 +56,7 @@ rx_discardpolicy discardpartial
|
||||
adcpipeline 15
|
||||
|
||||
powerchip 1
|
||||
vhighvoltage 90
|
||||
highvoltage 90
|
||||
|
||||
#adcreg 0x14 0x40
|
||||
|
||||
|
@ -19,7 +19,7 @@ hostname bchip007+bchip009+
|
||||
0:rx_udpip 10.1.1.1
|
||||
0:rx_hostname 129.129.202.134
|
||||
0:outdir /data/speedt
|
||||
0:vhighvoltage 120
|
||||
0:highvoltage 120
|
||||
|
||||
|
||||
#1:hostname bchip009
|
||||
@ -37,7 +37,7 @@ hostname bchip007+bchip009+
|
||||
1:rx_udpip 10.1.2.1
|
||||
1:rx_hostname 129.129.202.134
|
||||
1:outdir /data/speedt
|
||||
1:vhighvoltage 120
|
||||
1:highvoltage 120
|
||||
|
||||
|
||||
master -1
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "catch.hpp"
|
||||
#include "DetectorImpl.h"
|
||||
#include "catch.hpp"
|
||||
#include "string_utils.h"
|
||||
#include "tests/globals.h"
|
||||
#include <iostream>
|
||||
|
52
integrationTests/test-integrationDectector.cpp
Executable file → Normal file
52
integrationTests/test-integrationDectector.cpp
Executable file → Normal file
@ -2,9 +2,9 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
#include "ClientSocket.h"
|
||||
#include "logger.h"
|
||||
#include "DetectorImpl.h"
|
||||
#include "Module.h"
|
||||
#include "logger.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#include "Timer.h"
|
||||
@ -79,7 +79,6 @@ TEST_CASE("Set control port then create a new object with this control port",
|
||||
d.freeSharedMemory();
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("single EIGER detector no receiver basic set and get",
|
||||
"[.integration][eiger]") {
|
||||
// TODO! this test should take command line arguments for config
|
||||
@ -130,8 +129,6 @@ TEST_CASE("single EIGER detector no receiver basic set and get",
|
||||
d.freeSharedMemory();
|
||||
}
|
||||
|
||||
|
||||
|
||||
TEST_CASE("Locking mechanism and last ip", "[.integration][.single]") {
|
||||
Module d(test::type);
|
||||
d.setHostname(test::hostname);
|
||||
@ -154,13 +151,12 @@ TEST_CASE("Locking mechanism and last ip", "[.integration][.single]") {
|
||||
d.freeSharedMemory();
|
||||
}
|
||||
|
||||
TEST_CASE("Set settings", "[.integration][.single]"){
|
||||
TEST_CASE("Set settings", "[.integration][.single]") {
|
||||
Module d(test::type);
|
||||
d.setHostname(test::hostname);
|
||||
CHECK(d.setSettings(defs::STANDARD) == defs::STANDARD);
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("Timer functions", "[.integration][cli]") {
|
||||
// FRAME_NUMBER, /**< number of real time frames: total number of
|
||||
// acquisitions is number or frames*number of triggers */ ACQUISITION_TIME,
|
||||
@ -204,8 +200,7 @@ TEST_CASE("Timer functions", "[.integration][cli]") {
|
||||
if (test::type != dt::EIGER) {
|
||||
auto delay = 10000;
|
||||
d.setDelayAfterTrigger(delay);
|
||||
CHECK(d.getDelayAfterTrigger() ==
|
||||
delay);
|
||||
CHECK(d.getDelayAfterTrigger() == delay);
|
||||
}
|
||||
|
||||
auto triggers = 2;
|
||||
@ -218,10 +213,9 @@ TEST_CASE("Timer functions", "[.integration][cli]") {
|
||||
CHECK(d.getSubExptime() == subtime);
|
||||
}
|
||||
// for (int i =0; i!=frames; ++i)
|
||||
d.startAndReadAll();
|
||||
d.startAndReadAll();
|
||||
|
||||
d.freeSharedMemory();
|
||||
|
||||
}
|
||||
|
||||
// TEST_CASE("Aquire", "[.integration][eiger]"){
|
||||
@ -382,8 +376,8 @@ TEST_CASE("Chiptestboard Loading Patterns", "[.ctbintegration]") {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegration][dbit]") {
|
||||
TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
|
||||
"[.ctbintegration][dbit]") {
|
||||
SingleDetectorConfig c;
|
||||
|
||||
// pick up multi detector from shm id 0
|
||||
@ -403,27 +397,27 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegrat
|
||||
|
||||
// dbit list
|
||||
|
||||
std::vector <int> list = m.getReceiverDbitList();
|
||||
std::vector<int> list = m.getReceiverDbitList();
|
||||
list.clear();
|
||||
for (int i = 0; i < 10; ++i)
|
||||
list.push_back(i);
|
||||
m.setReceiverDbitList(list);
|
||||
|
||||
|
||||
CHECK(m.getReceiverDbitList().size() == 10);
|
||||
|
||||
list.push_back(64);
|
||||
CHECK_THROWS_AS(m.setReceiverDbitList(list), sls::RuntimeError);
|
||||
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
|
||||
Catch::Matchers::Contains("be between 0 and 63"));
|
||||
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
|
||||
Catch::Matchers::Contains("be between 0 and 63"));
|
||||
|
||||
list.clear();
|
||||
for (int i = 0; i < 65; ++i)
|
||||
list.push_back(i);
|
||||
CHECK(list.size() == 65);
|
||||
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
|
||||
Catch::Matchers::Contains("be greater than 64"));
|
||||
CHECK_THROWS_WITH(m.setReceiverDbitList(list),
|
||||
Catch::Matchers::Contains("be greater than 64"));
|
||||
|
||||
list.clear();
|
||||
list.clear();
|
||||
m.setReceiverDbitList(list);
|
||||
CHECK(m.getReceiverDbitList().empty());
|
||||
|
||||
@ -441,8 +435,8 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegrat
|
||||
m.setExternalSamplingSource(62);
|
||||
CHECK(m.getExternalSamplingSource() == 62);
|
||||
CHECK_THROWS_WITH(m.setExternalSamplingSource(64),
|
||||
Catch::Matchers::Contains("be 0-63"));
|
||||
CHECK(m.getExternalSamplingSource() == 62);
|
||||
Catch::Matchers::Contains("be 0-63"));
|
||||
CHECK(m.getExternalSamplingSource() == 62);
|
||||
m.setExternalSampling(1);
|
||||
CHECK(m.getExternalSampling() == 1);
|
||||
m.setExternalSampling(0);
|
||||
@ -450,20 +444,23 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegrat
|
||||
m.setExternalSampling(1);
|
||||
CHECK(m.getExternalSampling() == 1);
|
||||
CHECK(m.readRegister(0x7b) == 0x1003E);
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("Eiger or Jungfrau startingfnum", "[.eigerintegration][.jungfrauintegration][startingfnum]") {
|
||||
TEST_CASE("Eiger or Jungfrau startingfnum",
|
||||
"[.eigerintegration][.jungfrauintegration][startingfnum]") {
|
||||
SingleDetectorConfig c;
|
||||
|
||||
// pick up multi detector from shm id 0
|
||||
DetectorImpl m(0);
|
||||
|
||||
// ensure ctb detector type, hostname and online
|
||||
REQUIRE(((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER) || (m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::JUNGFRAU)));
|
||||
REQUIRE(
|
||||
((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER) ||
|
||||
(m.getDetectorTypeAsEnum() ==
|
||||
slsDetectorDefs::detectorType::JUNGFRAU)));
|
||||
REQUIRE(m.getHostname() == c.hostname);
|
||||
|
||||
CHECK(m.setNumberOfFrames(1) == 1);
|
||||
CHECK(m.setNumberOfFrames(1) == 1);
|
||||
|
||||
// starting fnum
|
||||
uint64_t val = 8;
|
||||
@ -498,7 +495,8 @@ TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {
|
||||
DetectorImpl m(0);
|
||||
|
||||
// ensure detector type, hostname
|
||||
REQUIRE((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER));
|
||||
REQUIRE(
|
||||
(m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER));
|
||||
REQUIRE(m.getHostname() == c.hostname);
|
||||
|
||||
m.setDynamicRange(16);
|
||||
@ -507,7 +505,7 @@ TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {
|
||||
CHECK(m.getReadNLines() == 256);
|
||||
m.setReadNLines(1);
|
||||
CHECK(m.getReadNLines() == 1);
|
||||
|
||||
|
||||
m.setDynamicRange(8);
|
||||
m.setReadNLines(256);
|
||||
CHECK(m.getReadNLines() == 256);
|
||||
|
6
integrationTests/test-integrationMulti.cpp
Executable file → Normal file
6
integrationTests/test-integrationMulti.cpp
Executable file → Normal file
@ -1,5 +1,5 @@
|
||||
#include "catch.hpp"
|
||||
#include "DetectorImpl.h"
|
||||
#include "catch.hpp"
|
||||
#include "string_utils.h"
|
||||
#include "tests/globals.h"
|
||||
#include <iostream>
|
||||
@ -24,8 +24,6 @@ TEST_CASE("Initialize a multi detector", "[.integration][.multi]") {
|
||||
d.freeSharedMemory();
|
||||
}
|
||||
|
||||
|
||||
|
||||
TEST_CASE("Set and read timers", "[.integration][.multi]") {
|
||||
|
||||
DetectorImpl d(0, true, true);
|
||||
@ -57,7 +55,6 @@ TEST_CASE("Set and read timers", "[.integration][.multi]") {
|
||||
// PROGRESS, /**< fraction of measurement elapsed - only get! */
|
||||
// MEASUREMENTS_NUMBER,
|
||||
|
||||
|
||||
// FRAMES_FROM_START,
|
||||
// FRAMES_FROM_START_PG,
|
||||
// SAMPLES,
|
||||
@ -78,7 +75,6 @@ TEST_CASE("Set and read timers", "[.integration][.multi]") {
|
||||
CHECK(d.setSubFrameExposureDeadTime(-1) == Approx(subframe_deadtime));
|
||||
}
|
||||
|
||||
|
||||
if (test::type == dt::EIGER) {
|
||||
// 32bit is needed for subframe exposure
|
||||
d.setDynamicRange(32);
|
||||
|
@ -99,7 +99,7 @@ If one desires to set the zmqport manually, he offset has to be taken into accou
|
||||
|
||||
{\tt{slsMultiReceiver}} uses two or more receivers in one single terminal: {\tt{./slsMultiReceiver startTCPPort numReceivers withCallback}}, where startTCPPort assumes the other ports are consecutively increased.
|
||||
|
||||
The command {\tt{r\_framesperfile}} sets the number of frames written in the same file. By default now it is 10000. It can be changes. It needs to be lowered particularly if one wants to parallelize the following conversion of the files.
|
||||
The command {\tt{r\_framesperfile}} (\tt{\textcolor{red}{rx\_framesperfile}}) sets the number of frames written in the same file. By default now it is 10000. It can be changes. It needs to be lowered particularly if one wants to parallelize the following conversion of the files.
|
||||
|
||||
|
||||
\subsection{Mandatory setup - Client}
|
||||
@ -122,7 +122,23 @@ To do that:
|
||||
sls_detector_put 0-config mydetector.config
|
||||
\end{verbatim}
|
||||
|
||||
In the config file, if client, receiver and detector are using \textbf{1GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_1Gb.config):
|
||||
In the config file, if client, receiver and detector are using \textbf{1GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_1Gb.config). It has been adapted to the the new 5.0 major release change:
|
||||
\begin{verbatim}
|
||||
detsize 1024 512 #detector geometry, long side of the module first
|
||||
hostname beb059+beb058+ #1Gb detector hostname for controls
|
||||
#1Gb receiver pc hostname to be inserted immediately and tcp\_ports to be stated immediately
|
||||
rx_hostname x12sa-vcons:1991+pc1875:1992+
|
||||
0:udp_dstport 50011 #udp port first quadrant, first halfmodule
|
||||
0:udp_dstport2 50012 #udp port second quadrant, first halfmodule
|
||||
1:udp_dstport 50013 #udp port first quadrant, second halfmodule
|
||||
1:udp_dstport2 50014 #udp port second quadrant, second halfmodule
|
||||
0:udp_srcip 129.129.202.237
|
||||
0:udp_dstip auto
|
||||
1:udp_srcip 129.129.202.236
|
||||
1:udp_dstip auto
|
||||
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
\end{verbatim}
|
||||
In the old 3.x and 4.x release it was:
|
||||
\begin{verbatim}
|
||||
detsizechan 1024 512 #detector geometry, long side of the module first
|
||||
hostname beb059+beb058+ #1Gb detector hostname for controls
|
||||
@ -138,21 +154,39 @@ threaded 1
|
||||
\end{verbatim}
|
||||
|
||||
In the config file, if client, receiver and detector commands are on 1Gb, but detector data to receiver are sent using \textbf{10GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_10Gb.config):
|
||||
It has been adapted to the the new 5.0 major release change:
|
||||
\begin{verbatim}
|
||||
detsize 1024 512
|
||||
hostname beb059+beb058+
|
||||
rx_hostname pc1875:1955+pc1875:1956+
|
||||
0:udp_dstport 50011
|
||||
0:udp_dstport2 50012
|
||||
0:udp_dstip 10.0.30.210
|
||||
0:udp_srcip 10.0.30.100
|
||||
1:flippeddatax 1
|
||||
1:udp_dstport 50013
|
||||
1:udp_dstport2 50014
|
||||
1:udp_dstip 0.0.40.210
|
||||
1:udp_srcip 10.0.40.101
|
||||
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
\end{verbatim}
|
||||
In the old 3.x and 4.x release it was:
|
||||
\begin{verbatim}
|
||||
detsizechan 1024 512 #detector geometry, long side of the module first
|
||||
hostname beb059+beb058+ #1Gb detector hostname for controls
|
||||
0:rx_tcpport 1991 #tcpport for the first halfmodule
|
||||
0:rx_tcpport 1955 #tcpport for the first halfmodule
|
||||
0:rx_udpport 50011 #udp port first quadrant, first halfmodule
|
||||
0:rx_udpport2 50012 #udp port second quadrant, first halfmodule
|
||||
0:rx_udpip 10.0.30.210 #udp IP of the receiver over 10Gb
|
||||
0:detectorip 10.0.30.100 #first half module 10 Gb IP
|
||||
1:rx_tcpport 1992 #tcpport for the second halfmodule
|
||||
1:flippeddatax 1
|
||||
1:rx_tcpport 1956 #tcpport for the second halfmodule
|
||||
1:rx_udpport 50013 #udp port first quadrant, second halfmodule
|
||||
1:rx_udpport2 50014 #udp port second quadrant, second halfmodule
|
||||
1:rx_udpip 10.0.40.210 #udp IP of the receiver over 10Gb,
|
||||
can be the same or different from 0:rx_udpip
|
||||
1:detectorip 10.0.40.101 #second half module 10 Gb IP
|
||||
rx_hostname x12sa-vcons #1Gb receiver pc hostname
|
||||
rx_hostname pc1875 #1Gb receiver pc hostname
|
||||
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
threaded 1
|
||||
\end{verbatim}
|
||||
@ -172,24 +206,25 @@ configuremac 0
|
||||
rx_udpmac xx:xx:...
|
||||
\end{verbatim}
|
||||
|
||||
Now we will give general communication commands. Commands with a diffent name in the \textcolor{red}{5.x} realease will be highlighted in \textcolor{red}{red}.
|
||||
|
||||
One can configure all the detector settings in a parameter file {\tt{setup.det}}, which is loaded by doing:
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-parameters setup.det
|
||||
\end{verbatim}
|
||||
Note that the parameter file for any realease before 4.1.1 has not the possibility to understand parameters to be set differently for different half modules, i.e. {\tt{0:txndelay\_left xxxxx},\tt{1:txndelay\_left yyyyy}}.
|
||||
|
||||
In the case of \E, the proper bias voltage of the sensor has to be setup, i.e. the {\tt{setup.det}} file needs to contain the line {\tt{vhighvoltage 150}}. Other detector functionality, which are rarely changed can be setup here.
|
||||
In the case of \E, the proper bias voltage of the sensor has to be setup, i.e. the {\tt{setup.det}} file needs to contain the line {\tt{highvoltage 150}}. Other detector functionality, which are rarely changed can be setup here.
|
||||
Other important settings that are configured in the {\tt{setup.det}} file are:
|
||||
\begin{itemize}
|
||||
\item {\tt{tengiga 0/1}}, which sets whether the detector is enabled to send data through the 1~or the 10~Gb Ethernet.
|
||||
\item {\tt{flags parallel/nonparallel}}, which sets whether the detector is set in parallel acquisition and readout or in sequential mode. This changes the readout time of the chip and affects the frame rate capability (faster is {\tt{parallel}}, with higher noise but needed when the frame rate is $>2$~kHz.
|
||||
\item {\tt{flags parallel/nonparallel}} or {\tt{\textcolor{red}{parallel 1/0}}}, which sets whether the detector is set in parallel acquisition and readout or in sequential mode. This changes the readout time of the chip and affects the frame rate capability (faster is {\tt{parallel}}).
|
||||
\item {\tt{dr 32/16/8/4}} sets the detector in autosumming mode (32 bit counter or not autosumming, 12 bit out of the chip). This is strictly connected to what is required for the readout clock of chip. See next point.
|
||||
\item {\tt{clkdivider 0/1/2}}. Changes the readout clock: 200, 100, 50~MHz (also referred to as full, half, quarter speed). Note that autosumming mode ({\tt{dr 32}} only works at {clkdivider 2}=quarter speed). By selecting Refer to readout timing specifications in~section\ref{timing} for how to set the detector.
|
||||
\item {\tt{clkdivider 0/1/2}} or {\tt{\textcolor{red}{speed full\_speed/half\_speed/quart\_speed}}}. Changes the readout clock: 200, 100, 50~MHz (also referred to as full, half, quarter speed). Note that autosumming mode ({\tt{dr 32}} only works at \tt{clkdivider 2}=\tt{quart\_speed}). By selecting Refer to readout timing specifications in~section\ref{timing} for how to set the detector.
|
||||
\item {\tt{flags continuous/storeinram}}. Allows to take frame continuously or storing them on memory. Users should use the {\tt{continuous}} flags. Enabling the {\tt{stroreinram}} flag makes the data to be sent out all at the end of the acquisition. Refer to readout timing specifications in section~\ref{timing} for how to set the detector. Examples will be given in section~\ref{}.
|
||||
\end{itemize}
|
||||
|
||||
One should notice that, by default, by choosing the option {\tt{dr 32}}, then the software automatically sets the detector to {\tt{clkdivider 2}}. By choosing the option {\tt{dr 16}}, the software automatically sets the detector to {\tt{clkdivider 1}}. One needs to choose {\tt{clkdivider 0}} after setting the {\tt{dr 16}} option to have the fastest frame rate.
|
||||
We would recommend expert users (beamline people) to write their parameters file for the users.
|
||||
One should notice that, by default, by choosing the option {\tt{dr 32}}, then the software automatically sets the detector to {\tt{clkdivider 2}} ({\tt{\textcolor{red}{quart\_speed}}}). By choosing the option {\tt{dr 16}}, the software automatically sets the detector to {\tt{clkdivider 1}} ({\tt{\textcolor{red}{speed quart\_speed}}}). From release 5.x,
|
||||
|
||||
\section{API versioning} \label{api}
|
||||
The eigerDetectorServer running on the boards has a versioning API scheme that will make it crash if used with a wrong firmware.
|
||||
@ -210,10 +245,18 @@ Killing and starting the server on the boards allows you to check the firmware v
|
||||
|
||||
\section{Setting up the threshold}
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-settingsdir /path
|
||||
sls_detector_put 0-trimen N xxxx yyyy zzzz
|
||||
sls_detector_put 0-settings standard
|
||||
sls_detector_put 0-threshold energy_in_eV standard
|
||||
\end{verbatim}
|
||||
or in \textcolor{red}{5.x}:
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-settingspath /path}
|
||||
sls_detector_put 0-trimen N xxxx yyyy zzzz}
|
||||
sls_detector_put 0-threshold energy_in_eV standard
|
||||
\end{verbatim}
|
||||
|
||||
The first line requires to specify how many ({\tt{N}}) and at which energies in eV {\{tt{xxxx}}, {\tt{yyyy}}, {\tt{zzzz}} and so on) trimmed files were generated (to allow for an interpolation). This line should normally be included into the {\tt{mydetector.config}} file and should be set for you by one of the detector group.
|
||||
NORMALLY, in this new calibration scheme, only {\tt{settings standard}} will be provided to you, unless specific cases to be discussed.
|
||||
The threshold at 6000 eV , for example would be set as:{\tt{sls\_detector\_put 0-threshold 6000 standard}}.
|
||||
@ -244,11 +287,11 @@ In this acquisition 10 consecutive 1~s frames will be acquired. Note that {\tt{p
|
||||
|
||||
You need to setup where the files will be written to
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-outdir /scratch
|
||||
sls_detector_put 0-outdir /scratch (\textcolor{red}{0-fpath})
|
||||
sls_detector_put 0-fname run
|
||||
sls_detector_put 0-index 0
|
||||
sls_detector_put 0-index 0 (\textcolor{red}{0-findex})
|
||||
\end{verbatim}
|
||||
this way your files will all be named /scratch/run\_dj\_i.raw where $j$ is relative to each specific half module, $i$ in the {\tt{index}} starts from 0 when starting the detector the first time and is automatically incremented. The next acquisition {\tt{index}} will be 1. One can reset the {\tt{index}} to what wished.
|
||||
this way your files will all be named /scratch/run\_dj\_i.raw where $j$ is relative to each specific half module, $i$ in the {\tt{index}} starts from 0 when starting the detector the first time and is automatically incremented. The next acquisition {\tt{index}} will be 1. One can reset the {\tt{index}} (\tt{\textcolor{red}{findex}}) to what wished.
|
||||
|
||||
To acquire simply type:
|
||||
\begin{verbatim}
|
||||
@ -267,12 +310,13 @@ sls_detector_get receiver
|
||||
|
||||
There is a more complex way of performing an acquisition, that is useful for debugging and in case one wants a non blocking behavior:
|
||||
|
||||
You can then reset to zero the number of frames caught, then start the receiver and the detector:
|
||||
You can then reset to zero the number of frames caught (in releases<5.0), then start the receiver and the detector:
|
||||
\begin{enumerate}
|
||||
\item {\tt{sls\_detector\_put 0-resetframescaught 0}}
|
||||
\item {\tt{sls\_detector\_put 0-receiver start}}
|
||||
\item {\tt{sls\_detector\_put 0-status start}}
|
||||
\end{enumerate}
|
||||
In release \textcolor{red}{5.0} it is not needed to reset the frames caughts.
|
||||
|
||||
You can poll the detector status using:
|
||||
\begin{verbatim}
|
||||
@ -347,8 +391,11 @@ col : 257 pixels
|
||||
\end{verbatim}
|
||||
|
||||
\section{Readout timing- maximum frame rate}\label{timing}
|
||||
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the speed at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} and the dead time between frames through {\tt{flags parallel}}, i.e. acquire and read at the same time or acquire and then read out.
|
||||
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT.
|
||||
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the {\tt{textcolor}{red}{speed} at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} ({\tt{
|
||||
\textcolor{red}{speed full\_speed/half\_speed/quart\_speed}}) and the dead time between frames through {\tt{flags parallel}} or {\tt{\textcolor{red}{parallel 1}}}, i.e. acquire and read at the same time or acquire and then read out.
|
||||
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT. WE recconmmend using the detector in \tt{dr 4/8/16}, \tt{\textcolor{red}{speed full\_speed}}, \tt{parallel 1} or \tt{dr 32}, \tt{\textcolor{red}{speed quart\_speed}}, \tt{parallel 1. All those options are now the defaults options starting from version 5.x.
|
||||
|
||||
|
||||
|
||||
In the case of REAL CONTINUOUS readout, i.e. continuous acquire and readout from the boards (independent on how the chip is set), the continuous frame rates are listed in table~\ref{tcont}. The time to send out the frame out of the board
|
||||
\begin{table}
|
||||
@ -360,16 +407,16 @@ In the case of REAL CONTINUOUS readout, i.e. continuous acquire and readout from
|
||||
\hline
|
||||
1 & 32 & \textbf{128} & 7820 & \\
|
||||
\hline
|
||||
10 & 4 & \textbf{10240} & 98 & 105/128\\
|
||||
10 & 4 & \textbf{7813} & 98 & 105/128\\
|
||||
\hline
|
||||
10 & 8 & \textbf{5120} & 196 & 210/250\\
|
||||
10 & 8 & \textbf{4000} & 196 & 210/250\\
|
||||
\hline
|
||||
10 & 16 & \textbf{2560} & 391 & 420/490\\
|
||||
10 & 16 & \textbf{2000} & 391 & 420/490\\
|
||||
\hline
|
||||
10 & 32 & \textbf{1280} & 782 & 840/977\\
|
||||
10 & 32 & \textbf{1023} & 782 & 840/977\\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\caption{Frame rate limits for the CONTINUOS streaming out of images, i.e. the data rate out is just below 1Gb/s or 10Gb/s. 1280~Hz for 32-bit, 10GbE is obtained from the 10GbE limitation. The maximum achievable frame rate is 977~Hz.}
|
||||
\caption{Frame rate limits for the CONTINUOS streaming out of images, i.e. the data rate out is just below 1Gb/s or 10Gb/s. 1023~Hz for 32-bit, 10GbE is obtained from the 10GbE limitation. The maximum achievable frame rate is 977~Hz.}
|
||||
\label{tcont}\end{table}
|
||||
Note that in the {\tt{continuous}} flag mode, some buffering is still done on the memories, so a higher frame rate than the proper real continuous one can be achieved. Still, this extra buffering is possible till the memories are not saturated. The number of images that can be stored on the DDR2 on board memories are listed in table~\ref{timgs}.
|
||||
\begin{table}
|
||||
@ -384,11 +431,11 @@ dynamic range & images\\
|
||||
16 & 7600\\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\caption{Amount of images that can be stored on board. As while we store them, we start to send them out, the effective number of images could be larger than this, but it will depend on the network setup (how fats you stream out images).}
|
||||
\caption{Amount of images that can be stored on board. As while we store them, we start to send them out, the effective number of images could be larger than this, but it will depend on the network setup (how fast you stream out images).}
|
||||
\label{timgs}
|
||||
\end{table}
|
||||
|
||||
The maximum frame rate achievable with 10~GbE, {\tt{dr 16}}, {\tt{flags continuous}}, {\tt{flags parallel}},{\tt{clkdivider 0}}, \textbf{6.1~kHz}. This is currently limited by the connection between the Front End Board and the Backend board. We expect the 32 bit mode limit, internally, to be \textbf{2~kHz} ({\tt{clkdivider 2}}).
|
||||
The maximum frame rate achievable with 10~GbE, {\tt{dr 16}}, {\tt{flags continuous}}, {\tt{flags parallel}} ({\tt{\textcolor{red}{parallel 1}}}),{\tt{clkdivider 0}} ({\tt{\textcolor{red}{speed full\_speed}}}), \textbf{6.1~kHz}. This is currently limited by the connection between the Front End Board and the Backend board. We expect the 32 bit mode limit, internally, to be \textbf{2~kHz} ({\tt{clkdivider 2}}).
|
||||
In dynamic range {\tt{dr 8}} the frame rate is \textbf{11~kHz} and for{\tt{dr 4}} is \textbf{22~kHz}. For 4 and 8 bit mode the frame rate are directly limited by the speed of the detector chip and not by the readout boards.
|
||||
|
||||
\subsection{Minimum time between frames and Maximum frame rate}
|
||||
@ -459,6 +506,23 @@ where the 'minimum time between frames' and the minimum period will be discussed
|
||||
|
||||
\textbf{From software version 4.0.0, there is a very useful function {\tt{sls\_detector\_get measuredperiod}} which return the measured period AFTER the acquisition. This is important to check that the settings to obtain the targeted frame rate was correct.}
|
||||
|
||||
In release \textcolor{red}{5.0} in 4-bit modes one can set a sort of ROI in the detector such to read half of the module (the central part) or a quarter of it with almost double or four times the frame rate. By default the \tt{\textcolor{red}{readnlines}} is set to \tt{256} meaning the whole chip. With \tt{\textcolor{red}{readnlines 128}} or \tt{\textcolor{red}{readnlines 64}} one sets to read half/quarter rows from the chip. In table~\ref{table:hfrpartial} the maximum frame rates, exposure time and period for the partial readout.\\
|
||||
|
||||
|
||||
\begin{tabular}{|c|c|c|c|c|c|c|}
|
||||
\hline
|
||||
readnlines & \# pixels & Active area (cm$^2$) & Max frame rate (kHz) & Period ($\mu$s) & Dead time ($\mu$s) & \# buffered images\\
|
||||
\hline
|
||||
256 &1024 $\times$ 512 & 8 $\times$ 3.8 & 22.7 & 44.0 &4.1 & 30k\\
|
||||
\hline
|
||||
128 &1024 $\times$ 256 & 8 $\times$ 1.9 & 42.1 & 23.7 &4.2 & 60k\\
|
||||
\hline
|
||||
64 & 1024 $\times$ 128 & 8 $\times$ 0.95 & 73.5 & 13.6 &4.2 & 120k\\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\label{table:hfrpartial}
|
||||
|
||||
|
||||
\textbf{If you run too fast, the detector could become noisier (see problem shooting), it is important to match the detector settings to your frame rate. This can be done having more parameters files and load the one suitable with your experiment.} We experienced that with low energy settings could not reach 6~kHz and no noise.
|
||||
In 16 bit mode, it could make sense, in case of noise and low threshold to either reduce the frame rate:
|
||||
\begin{equation}
|
||||
@ -579,10 +643,10 @@ The number of subframes composing a single 32bit acquisition can be calculated a
|
||||
\end{equation}
|
||||
This also means that {\tt{exptime}}$<${\tt{subexptime}} will be rounded to{\tt{subexptime}}. If you want shorter acquisitions, either reduce the {\tt{subexptime}} or switch two 16-bit mode (you can always sum offline if needed).
|
||||
|
||||
From release 4.0.0, an extra {\tt{flag overflow/nooverflow}} is added, with {\tt{nooverflow}} default:
|
||||
From release 4.0.0, an extra {\tt{flag overflow/nooverflow}} is added (\tt{\textcolor{red}{overflow 0/1}}), with {\tt{nooverflow}} (\tt{\textcolor{red}{overflow 0}}) default:
|
||||
\begin{itemize}
|
||||
\item {\tt{nooverflow}}: the internal 12-bit result is summed, even if there was saturation of the 12-bit counter (4095) in any of the subframes. Note that if there is saturation for every subframe, you might get as a result a value of the counter equal to (4095$\times$~number~of~subframes), which you need to correctly identify. On the other hand if the saturation occurred only one time, you will get something "close'' to the real number.
|
||||
\item {\tt{overflow}}: In this case, even if a pixel saturate only 1 time in a subframe, you will be returned as a value of the counter for that pixel: $2^{32}-1$, i.e. 4294967295.
|
||||
\item {\tt{nooverflow}} (\tt{\textcolor{red}{overflow 0}}): the internal 12-bit result is summed, even if there was saturation of the 12-bit counter (4095) in any of the subframes. Note that if there is saturation for every subframe, you might get as a result a value of the counter equal to (4095$\times$~number~of~subframes), which you need to correctly identify. On the other hand if the saturation occurred only one time, you will get something "close'' to the real number.
|
||||
\item {\tt{overflow}} (\tt{\textcolor{red}{overflow 1}})): In this case, even if a pixel saturate only 1 time in a subframe, you will be returned as a value of the counter for that pixel: $2^{32}-1$, i.e. 4294967295.
|
||||
\end{itemize}
|
||||
|
||||
The UDP header will contain, after you receive the data, the effective number of subframe per image (see section~\ref{UDP}) as "SubFrame Num or Exp Time", i.e. the number of subframes recorded (32 bit eiger).
|
||||
@ -610,17 +674,17 @@ The detector can be setup such to receive external triggers. Connect a LEMO sign
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-timing [auto/trigger/burst_trigger/gating]
|
||||
sls_detector_put 0-frames x
|
||||
sls_detector_put 0-cycles y
|
||||
sls_detector_put 0-cycles y (\textcolor{red}{triggers})
|
||||
sls_detector_acquire 0-
|
||||
\end{verbatim}
|
||||
No timeout is expected between the start of the acquisition and the arrival of the first trigger.
|
||||
|
||||
Here are the implemented options so far:
|
||||
\begin{itemize}
|
||||
\item {\tt{auto}} is the software controlled acquisition (does not use triggers), where {\tt{exptime}} and {\tt{period}} have to be set. Set number of cycles (i.e. triggers) to 1 using {\tt{cycles}}. Set number of frames using {\tt{frames}}.
|
||||
\item {\tt{trigger}} 1 frame taken for 1 trigger. Your {\tt{frames}} needs to be 1 always, {\tt{cycles}} can be changed and defines how many triggers are considered. {\tt{exptime}} needs to be set. In the GUI this is called trigger exposure series.
|
||||
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
|
||||
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
|
||||
\item {\tt{auto}} is the software controlled acquisition (does not use triggers), where {\tt{exptime}} and {\tt{period}} have to be set. Set number of {\tt{cycles}} (\textcolor{red}{triggers}) to 1. Set number of frames using {\tt{frames}}.
|
||||
\item {\tt{trigger}} 1 frame taken for 1 trigger. Your {\tt{frames}} needs to be 1 always, {\tt{cycles}} ({\tt{\textcolor{red}{triggers}}}) can be changed and defines how many triggers are considered. {\tt{exptime}} needs to be set. In the GUI this is called trigger exposure series.
|
||||
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} ({\tt{\textcolor{red}{triggers}}}) needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
|
||||
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} (\tt{\textcolor{red}{triggers}}) allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
|
||||
|
||||
ATTENTION: From release 4.1.1 with the {\tt{trigger}} option it is possible to have software triggers as a debugging tool (instead of the hardware trigger signal. One should start the acquisition (with the blocking {\tt{sls\_detector\_acquire}} if wanted and with another client one can send the softare trigger {\tt{sls\_detector\_put status trigger}}. This option allows for example to perform a motor scan (moving a motor in between single images) and still writing all images to the same file.
|
||||
When using 32-bit mode, by default the acquisition ends the last complete subframe that was started when still the acquisition time was valid. This has been chosen as many people wants to know the exact acquisition time for when the detector was taking data and also, if {\tt{ratecorr}} are active, the last subframe will be correctly corrected, while otherwise it will be corrected with a wrong subdeadtime.
|
||||
@ -630,13 +694,13 @@ However, from 4.1.0, in gating mode, an option to immediately terminate the subf
|
||||
|
||||
Hardware-wise, the ENABLE OUT signal outputs when the chips are really acquiring. This means that the single subframes will be output in 32 bit mode. The TRIGGER OUT outputs the sum-up-signal at the moment (which is useless). This will be changed in the future to output the envelop of the enable signal.
|
||||
|
||||
We are planning to change some functionality, i.e. unify the {\tt{trigger}} and {\tt{burst\_trigger}} trigger modes and make both {\tt{frames}} and {\tt{cycles}} configurable at the same time.
|
||||
We are planning to change some functionality, i.e. unify the {\tt{trigger}} and {\tt{burst\_trigger}} trigger modes and make both {\tt{frames}} and {\tt{cycles}} (\tt{\textcolor{red}{triggers}}) configurable at the same time.
|
||||
|
||||
There is the possibility to use {\tt{timing trigger/burst\_trigger}} and send software single commands to fake the trigger. This is done with:
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-timing [trigger/burst_trigger]
|
||||
sls_detector_put 0-frames x
|
||||
sls_detector_put 0-cycles y
|
||||
sls_detector_put 0-cycles y (\textcolor{red}{triggers})
|
||||
sls_detector_status trigger
|
||||
\end{verbatim}
|
||||
Note that this functionality is very (!) useful if you need to do something between and acquisition and the next. This can be used to do a fast threshold scan for example. See section~\ref{sec:fastthresholdscan}.
|
||||
@ -716,8 +780,8 @@ If \textbf{dr} is 32 and \textbf{clkdivider} is not 2, whatever the detector get
|
||||
|
||||
Here is a list of parameters that should be reset:
|
||||
\begin{enumerate}
|
||||
\item \textbf{resetframescaught} should be reset to zero after every acquisition taken with {\tt{receiver start}},{\tt{status start}},{\tt{receiver stop}}. If the acquisition is taken with {\tt{sls\_detector\_acquire}}, there is no need to reset this.
|
||||
\item After changing the {\tt{timing}} mode of the detector, one should reset to '1' the unused value, in that specific timing mode, between \textbf{frames} and \textbf{cycles}. See section~\ref{triggering} for how to use the timing. At the present moment the detector will acquire more frames than planned if the variable not used between \textbf{frames} and \textbf{cycles} is not reset. In future releases, the unused variable will be ignored. Still resetting is a good practice.
|
||||
\item \textbf{resetframescaught} (only for releases < 5.x) should be reset to zero after every acquisition taken with {\tt{receiver start}},{\tt{status start}},{\tt{receiver stop}}. If the acquisition is taken with {\tt{sls\_detector\_acquire}}, there is no need to reset this.
|
||||
\item After changing the {\tt{timing}} mode of the detector, one should reset to '1' the unused value, in that specific timing mode, between \textbf{frames} and \textbf{cycles} (\tt{\textcolor{red}{triggers}}). See section~\ref{triggering} for how to use the timing. At the present moment the detector will acquire more frames than planned if the variable not used between \textbf{frames} and \textbf{cycles} (\tt{\textcolor{red}{trigger}}) is not reset. In future releases, the unused variable will be ignored. Still resetting is a good practice.
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
@ -746,7 +810,7 @@ Extremely advanced options allow to:
|
||||
\begin{itemize}
|
||||
\item Activate the flow control for 10~Gb/s~E (by default the 1~Gb/s~E is always active and cannot be switched off:
|
||||
\begin{verbatim}
|
||||
./sls_detector_put flowcontrol_10g 1
|
||||
./sls_detector_put flowcontrol_10g 1 (\textcolor{red}{flowcontrol10g})
|
||||
\end{verbatim}
|
||||
\item Delay the transmission of the left port. This delay option is useful in the case of many simultaneous receivers running, such that it reduces the throughput to the receivers all at the same time. To be used board by board (i.e {\tt{X:, Y:,etc..}} with different units:
|
||||
\begin{verbatim}
|
||||
@ -839,7 +903,7 @@ NOTE THAT THIS SETTINGS WILL BE LOST IF YOU REBOOT THE COMPUTER.
|
||||
|
||||
Very important is to activate the flow control in 10Gb (in 1Gb it is on by default and not configurable)
|
||||
\begin{verbatim}
|
||||
./sls_detector_put flowcontrol_10g 1
|
||||
./sls_detector_put flowcontrol_10g 1 (\textcolor{red}{flowcontrol10g 1})
|
||||
\end{verbatim}
|
||||
You ned to check that flow control is setup on the reeceiving interfaces. Check with:
|
||||
\begin{verbatim}
|
||||
@ -1128,10 +1192,10 @@ In 500k--2M pixel systems there is a hardware temperature safety switch, which w
|
||||
|
||||
The HV can also be set and read through the software:
|
||||
\begin{verbatim}
|
||||
./sls_detector_put vhighvoltage 150
|
||||
./sls_detector_get vhighvoltage
|
||||
./sls_detector_put vhighvoltage 150 (\textcolor{red}{highvoltage})
|
||||
./sls_detector_get vhighvoltage (\textcolor{red}{highvoltage})
|
||||
\end{verbatim}
|
||||
Note that the get {\tt{vhighvoltage}} would return the measured HV from the master module only. If getting the vhighvoltage for individual halfmodules, only the master will have a value different from -999.
|
||||
Note that the get {\tt{vhighvoltage}}(\tt{\textcolor{red}{highvoltage}}) would return the measured HV from the master module only. If getting the highvoltage for individual halfmodules, only the master will have a value different from -999.
|
||||
|
||||
\appendix
|
||||
|
||||
@ -1213,13 +1277,21 @@ do the same for the other boards. You can program in parallel many boards, but y
|
||||
There are two ways to pulse the detector:
|
||||
\begin{itemize}
|
||||
\item \textbf{Pulse digitally:} when you are interested to the output readout and do not care about the analog response from the pixels:
|
||||
\begin{verbatim}
|
||||
\begin{verbatim}
|
||||
sls_detector_put vthreshold 4000
|
||||
sls_detector_put vtr 4000
|
||||
sls_detector_put pulsechip N #to pulse N
|
||||
sls_detector_put pulsechip -1 #to get out of testing mode
|
||||
\end{verbatim}
|
||||
Note that the answer will be $2 \cdot \textrm{{\tt{N}}} +2$ in this case.
|
||||
Or in \textcolor{red}{5.x}:
|
||||
\begin{verbatim}
|
||||
sls_detector_put vthreshold 4000
|
||||
sls_detector_put vtrim 4000
|
||||
sls_detector_put pulsechip N #to pulse N
|
||||
sls_detector_put pulsechip -1 #to get out of testing mode
|
||||
\end{verbatim}
|
||||
Note that the answer will be $2 \cdot \textrm{{\tt{N}}} +4$ in this case.
|
||||
|
||||
\item \textbf{Pulse analogically:} You want to really check the analogical part of the detector, not just the readout.
|
||||
|
||||
@ -1238,8 +1310,25 @@ sls_detector_put resmat 0
|
||||
sls_detector_acquire
|
||||
\end{verbatim}
|
||||
You read {\tt{N}} in every pixel if you are setup correctly.
|
||||
or in realese \textcolor{red}{5.x}:
|
||||
\begin{verbatim}
|
||||
sls_detector_put vcal 3600
|
||||
sls_detector_put vthreshold 1700
|
||||
sls_detector_put vrpreamp 3100
|
||||
for i in $(seq 0 7) ;
|
||||
do px=$((-255+i));
|
||||
sls_detector_put pulse 0 $px 0;
|
||||
for j in $(seq 0 255) ; do
|
||||
sls_detector_put pulsenmove 100 0 1;
|
||||
done;
|
||||
done;
|
||||
sls_detector_put partialreset 1
|
||||
\end{verbatim}
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Load a noise pattern with shape}
|
||||
For debug purposes, we have created a noise pattern with a shape. If you reconstruct correctly your image, you should be able to read ".EIGER'' in the same direction for both the top and bottom in normal human readable orientation.
|
||||
To load the special noise file look at {\tt{settingsdir/eiger/standard/eigernoise.sn0xx}} in the package.
|
||||
@ -1262,10 +1351,10 @@ We have also been requested if we could speed up the threshold scan. At the mome
|
||||
\begin{verbatim}
|
||||
./sls_detector_put exptime 0.01
|
||||
./sls_detector_put timing trigger
|
||||
./sls_detector_put enablefwrite 0
|
||||
./sls_detector_put resetframescaught 0
|
||||
./sls_detector_put index 0
|
||||
./sls_detector_put cycles 21
|
||||
./sls_detector_put enablefwrite 0 (\textcolor{red}{fwrite} 0)
|
||||
./sls_detector_put resetframescaught 0 (\textcolor{red}{not needed anymore})
|
||||
./sls_detector_put index 0 (\textcolor{red}{findex} 0)
|
||||
./sls_detector_put cycles 21 (\textcolor{red}{triggers} 21)
|
||||
./sls_detector_put receiver start
|
||||
./sls_detector_put status start
|
||||
for i in $(seq 0 20);
|
||||
@ -1383,7 +1472,7 @@ Environment variable SLSDETNAME can be set for using 2 different detectors from
|
||||
\subsection{Measure the HV}
|
||||
For every system:
|
||||
\begin{itemize}
|
||||
\item Software-wise measure it (now the software returns the measured value), with {\tt{sls\_detector\_get vhighvoltage}}. The returned value is the HV (for proper Eiger setting is approximately 150~V) if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:vhighvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
|
||||
\item Software-wise measure it (now the software returns the measured value), with {\tt{sls\_detector\_get highvoltage}}. The returned value is the HV (for proper Eiger setting is approximately 150~V) if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:highvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
|
||||
\item Hardware-wise (opening the detector) measure value of HV on C14 on the power distribution board. Check also that the small HV connector cable is really connected.
|
||||
\end{itemize}
|
||||
|
||||
@ -1434,7 +1523,7 @@ Scroll up in the terminal till you find:\\
|
||||
There is also an easier way, that is that only the master module will return the real value of the HV. If you have more than 1 detector system, then you will have more than 1 physical master, as the HV needs to be applied to all the systems.
|
||||
|
||||
\begin{verbatim}
|
||||
for i in $(seq 0 36); do sls_detector_put $i:vhighvoltage; done
|
||||
for i in $(seq 0 36); do sls_detector_put $i:highvoltage; done
|
||||
\end{verbatim}
|
||||
Only the master will return to you a sensible number (150 normally). the others will return -999.
|
||||
|
||||
@ -1595,10 +1684,10 @@ ratecorr number
|
||||
where {\tt{number}} is a string that should be interpreted as a float in s. 0.000000 means correction off. Values above zero are the value of $\tau$ in ns.
|
||||
|
||||
\item \begin{verbatim}
|
||||
sls_detector_get vhighvoltage
|
||||
vhighvoltage number
|
||||
sls_detector_get highvoltage
|
||||
highvoltage number
|
||||
\end{verbatim}
|
||||
where {\tt{number}} is a string that should be interpreted as an int and for proper Eiger setting is approximately 150~V if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:vhighvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
|
||||
where {\tt{number}} is a string that should be interpreted as an int and for proper Eiger setting is approximately 150~V if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:highvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
|
||||
|
||||
\item \begin{verbatim}
|
||||
sls_detector_get busy
|
||||
|
@ -142,7 +142,7 @@
|
||||
"vpreamp"; // sets/get vpreamp value (advanced! Mythen)
|
||||
"vshaper1"; // sets/get vshaper1 value (advanced! Mythen)
|
||||
"vshaper2"; // sets/get vshaper2 value (advanced! Mythen)
|
||||
"vhighvoltage"; // sets/get vhighvoltage value (advanced! Chiptest board and Eiger)
|
||||
"highvoltage"; // sets/get highvoltage value (advanced! Chiptest board and Eiger)
|
||||
"vapower"; // sets/get vapower value (advanced! Chiptest board)
|
||||
"vddpower"; // sets/get vddpower value (advanced! Chiptest board)
|
||||
"vshpower"; // sets/get vshpower value (advanced! Chiptest board)
|
||||
|
@ -335,7 +335,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
|
||||
\item[vpreamp n] Sets the DAC value of the preamp feedback to n.
|
||||
\item[vshaper1 n] Sets the DAC value of the shaper1 feedback to n.
|
||||
\item[vshaper2 n] Sets the DAC value of the shaper2 feedback to n.
|
||||
\item[vhighvoltage n] Sets the DAC value of the high voltage to n (in V).
|
||||
\item[highvoltage n] Sets the DAC value of the high voltage to n (in V).
|
||||
\item[vapower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
|
||||
\item[vddpower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
|
||||
\item[vshpower n] CHIPTEST BOARD ONLY - Sets the comparator power supply in dac units (0-1024).
|
||||
@ -648,7 +648,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
|
||||
\item[vpreamp] Returns the DAC value of the preamp feedback to n.
|
||||
\item[vshaper1] Returns the DAC value of the shaper1 feedback to n.
|
||||
\item[vshaper2] Returns the DAC value of the shaper2 feedback to n.
|
||||
\item[vhighvoltage] Returns the DAC value of the high voltage to n.
|
||||
\item[highvoltage] Returns the DAC value of the high voltage to n.
|
||||
\item[vapower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
|
||||
\item[vddpower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
|
||||
\item[vshpower] CHIPTEST BOARD ONLY - Returns the comparator power supply in dac units (0-1024).
|
||||
@ -714,7 +714,7 @@ One can configure all the detector settings in a parameter file {\tt{setup.det}}
|
||||
sls_detector_put parameters setup.det
|
||||
\end{verbatim}
|
||||
|
||||
In the case of \E, the parameter file ({\tt{setup.det}} needs to setup the proper bias voltage of the sensor, i.e. needs to contain the line {\tt{vhighvoltage 150}}.
|
||||
In the case of \E, the parameter file ({\tt{setup.det}} needs to setup the proper bias voltage of the sensor, i.e. needs to contain the line {\tt{highvoltage 150}}.
|
||||
|
||||
\subsection{Standard acquisition}
|
||||
|
||||
|
@ -322,7 +322,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
|
||||
\item[vpreamp n] Sets the DAC value of the preamp feedback to n.
|
||||
\item[vshaper1 n] Sets the DAC value of the shaper1 feedback to n.
|
||||
\item[vshaper2 n] Sets the DAC value of the shaper2 feedback to n.
|
||||
\item[vhighvoltage n] CHIPTEST BOARD ONLY - Sets the DAC value of the high voltage to n.
|
||||
\item[highvoltage n] CHIPTEST BOARD ONLY - Sets the DAC value of the high voltage to n.
|
||||
\item[vapower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
|
||||
\item[vddpower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
|
||||
\item[vshpower n] CHIPTEST BOARD ONLY - Sets the comparator power supply in dac units (0-1024).
|
||||
@ -594,7 +594,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
|
||||
\item[vpreamp] Returns the DAC value of the preamp feedback to n.
|
||||
\item[vshaper1] Returns the DAC value of the shaper1 feedback to n.
|
||||
\item[vshaper2] Returns the DAC value of the shaper2 feedback to n.
|
||||
\item[vhighvoltage] CHIPTEST BOARD ONLY - Returns the DAC value of the high voltage to n.
|
||||
\item[highvoltage] CHIPTEST BOARD ONLY - Returns the DAC value of the high voltage to n.
|
||||
\item[vapower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
|
||||
\item[vddpower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
|
||||
\item[vshpower] CHIPTEST BOARD ONLY - Returns the comparator power supply in dac units (0-1024).
|
||||
|
@ -12,6 +12,7 @@ target_link_libraries(_slsdet PUBLIC
|
||||
slsDetectorShared
|
||||
slsReceiverShared
|
||||
slsSupportLib
|
||||
${ZeroMQ_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
|
82
python/api-tests/test_detector.py
Normal file
82
python/api-tests/test_detector.py
Normal file
@ -0,0 +1,82 @@
|
||||
import pytest
|
||||
import datetime as dt
|
||||
from slsdet import Detector, timingMode, detectorType
|
||||
|
||||
not_eiger = pytest.mark.skipif(
|
||||
Detector().type == detectorType.EIGER, reason="Does not work for eiger"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def det():
|
||||
from slsdet import Detector
|
||||
|
||||
return Detector()
|
||||
|
||||
|
||||
def test_frames(det):
|
||||
for n in [1, 100, 3245, 10000]:
|
||||
det.frames = n
|
||||
assert det.frames == n
|
||||
det.frames = 1
|
||||
|
||||
|
||||
def test_triggers(det):
|
||||
for n in [1, 100, 3245, 10000]:
|
||||
det.triggers = n
|
||||
assert det.triggers == n
|
||||
det.triggers = 1
|
||||
|
||||
|
||||
def test_exptime(det):
|
||||
det.exptime = 1
|
||||
assert det.exptime == 1
|
||||
det.exptime = dt.timedelta(milliseconds=10)
|
||||
assert det.exptime == 0.01
|
||||
det.exptime = 1
|
||||
|
||||
|
||||
def test_period(det):
|
||||
det.period = 3.2
|
||||
assert det.period == 3.2
|
||||
|
||||
p = dt.timedelta(microseconds=1020)
|
||||
det.period = p
|
||||
assert det.period == 0.001020
|
||||
r = det.getPeriod()
|
||||
assert r[0] == p
|
||||
det.period = 0
|
||||
assert det.period == 0
|
||||
|
||||
|
||||
def test_lock(det):
|
||||
for l in [True, False]:
|
||||
det.lock = l
|
||||
assert det.lock == l
|
||||
|
||||
|
||||
def test_timing(det):
|
||||
# auto and trigger is available for all det
|
||||
for m in [timingMode.TRIGGER_EXPOSURE, timingMode.AUTO_TIMING]:
|
||||
det.timing = m
|
||||
assert det.timing == m
|
||||
|
||||
@not_eiger
|
||||
def test_delay(det):
|
||||
det.delay = 1
|
||||
assert det.delay == 1
|
||||
|
||||
t = dt.timedelta(microseconds=1)
|
||||
det.delay = t
|
||||
assert det.delay == t.total_seconds()
|
||||
|
||||
r = det.getDelayAfterTrigger()[0]
|
||||
assert r == t
|
||||
|
||||
det.delay = 0
|
||||
assert det.delay == 0
|
||||
|
||||
|
||||
@not_eiger
|
||||
def test_delayl(det):
|
||||
assert det.delayl == 0
|
89
python/api-tests/test_jungfrau.py
Normal file
89
python/api-tests/test_jungfrau.py
Normal file
@ -0,0 +1,89 @@
|
||||
import pytest
|
||||
import datetime as dt
|
||||
from slsdet import Detector, detectorType
|
||||
|
||||
"""
|
||||
These tests are designed to work the API and catch
|
||||
any changes in behavior or naming. Tests are expected
|
||||
to pass with a virtual detector or a real one
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def jf():
|
||||
from slsdet import Jungfrau
|
||||
return Jungfrau()
|
||||
|
||||
|
||||
jungfrautest = pytest.mark.skipif(
|
||||
Detector().type != detectorType.JUNGFRAU, reason="Only valid for Jungfrau"
|
||||
)
|
||||
|
||||
|
||||
@jungfrautest
|
||||
def test_storagecells(jf):
|
||||
for i in range(16):
|
||||
jf.storagecells = i
|
||||
assert jf.storagecells == i
|
||||
jf.storagecells = 0 # default
|
||||
|
||||
@jungfrautest
|
||||
def test_storagecell_start(jf):
|
||||
for i in range(16):
|
||||
jf.storagecell_start = i
|
||||
assert jf.storagecell_start == i
|
||||
jf.storagecells = 15 # default
|
||||
|
||||
@jungfrautest
|
||||
def test_storagecell_delay(jf):
|
||||
for t in [0.001, 0.0002, 0.0013]:
|
||||
jf.storagecell_delay = t
|
||||
assert jf.storagecell_delay == t
|
||||
jf.storagecell_delay = 0 # default
|
||||
|
||||
@jungfrautest
|
||||
def test_temp_event(jf):
|
||||
# hard to test with virtual server
|
||||
assert jf.temp_event == 0
|
||||
|
||||
@jungfrautest
|
||||
def test_temp_threshold(jf):
|
||||
for th in [0, 10, 43, 72]:
|
||||
jf.temp_threshold = th
|
||||
assert jf.temp_threshold == th
|
||||
jf.temp_threshold = 0
|
||||
|
||||
@jungfrautest
|
||||
def test_auto_comp_disable(jf):
|
||||
for v in [True, False]:
|
||||
jf.auto_comp_disable = v
|
||||
assert jf.auto_comp_disable == v
|
||||
|
||||
@jungfrautest
|
||||
def test_numinterfaces(jf):
|
||||
for n in [2, 1]:
|
||||
jf.numinterfaces = n
|
||||
assert jf.numinterfaces == n
|
||||
|
||||
@jungfrautest
|
||||
def test_dr(jf):
|
||||
assert jf.dr == 16
|
||||
|
||||
@jungfrautest
|
||||
def test_temp_control(jf):
|
||||
for v in [True, False]:
|
||||
jf.temp_control = v
|
||||
assert jf.temp_control == v
|
||||
|
||||
@jungfrautest
|
||||
def test_startingfnum(jf):
|
||||
for n in [10, 127, 43321, 1]:
|
||||
jf.startingfnum = n
|
||||
assert jf.startingfnum == n
|
||||
|
||||
@jungfrautest
|
||||
def test_selinterface(jf):
|
||||
for i in [1, 0]:
|
||||
jf.selinterface = i
|
||||
assert jf.selinterface == i
|
@ -15,7 +15,7 @@ pycmd += ['vrf', 'vtr', 'vrs', 'vtgstv', 'vsvn', 'vtrim',
|
||||
'vpreamp', 'vref_comp', 'vref_comp_fe vref_ds', 'vref_h_adc',
|
||||
'vref_l_adc', 'iodelay', 'list', 'vref_ds', 'vis', 'vpl',
|
||||
'vref_comp_fe', 'vph', 'vout_cm', 'vcp', 'vcn', 'vcmp_ll', 'vcmp_lr'
|
||||
, 'vcmp_rl', 'vcmp_rr']
|
||||
, 'vcmp_rl', 'vcmp_rr', 'daclist', 'dacvalues', 'vcal', 'vcas']
|
||||
|
||||
missing = []
|
||||
for c in cmd:
|
||||
|
@ -11,6 +11,10 @@ import subprocess
|
||||
|
||||
from parse import remove_comments
|
||||
|
||||
def single_line_enum(line):
|
||||
sub = line[line.find('{')+1:line.find('}')]
|
||||
return sub.strip().split(',')
|
||||
|
||||
def extract_enums(lines):
|
||||
line_iter = iter(lines)
|
||||
enums = {}
|
||||
@ -18,19 +22,27 @@ def extract_enums(lines):
|
||||
m = re.search("(?<=enum )\w+(?= {)", line)
|
||||
if m:
|
||||
enum_name = m.group()
|
||||
# print(enum_name)
|
||||
print(enum_name)
|
||||
# print(line)
|
||||
fields = []
|
||||
while True:
|
||||
l = next(line_iter)
|
||||
if '};' in l:
|
||||
break
|
||||
m = re.search("\w+", l)
|
||||
try:
|
||||
# print('\t', m.group())
|
||||
fields.append(m.group())
|
||||
|
||||
except:
|
||||
pass
|
||||
#deal with single line enums
|
||||
if '};' in line:
|
||||
fields = single_line_enum(line)
|
||||
else:
|
||||
#deal with multi line enums
|
||||
while True:
|
||||
l = next(line_iter)
|
||||
if '};' in l:
|
||||
break
|
||||
m = re.search("\w+", l)
|
||||
try:
|
||||
# print('\t', m.group())
|
||||
fields.append(m.group())
|
||||
|
||||
except:
|
||||
pass
|
||||
fields = [f.strip() for f in fields]
|
||||
enums[enum_name] = fields
|
||||
return enums
|
||||
|
||||
|
@ -47,6 +47,8 @@ lines = []
|
||||
|
||||
ag2 = []
|
||||
|
||||
cn = []
|
||||
|
||||
def get_arguments(node):
|
||||
args = [a.type.spelling for a in node.get_arguments()]
|
||||
args = [
|
||||
@ -66,8 +68,12 @@ def get_fdec(node):
|
||||
else:
|
||||
return_type = 'void'
|
||||
|
||||
if node.is_const_method():
|
||||
const = 'const'
|
||||
else:
|
||||
const = ''
|
||||
args = ", ".join(args)
|
||||
args = f'({return_type}(Detector::*)({args}))'
|
||||
args = f'({return_type}(Detector::*)({args}){const})'
|
||||
return args
|
||||
|
||||
|
||||
@ -85,6 +91,7 @@ def visit(node):
|
||||
lines.append(
|
||||
f'.def("{child.spelling}",{fs} &Detector::{child.spelling}{args})'
|
||||
)
|
||||
cn.append(child)
|
||||
for child in node.get_children():
|
||||
visit(child)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
"""
|
||||
Setup file for sls_detector
|
||||
Setup file for slsdet
|
||||
Build upon the pybind11 example found here: https://github.com/pybind/python_example
|
||||
"""
|
||||
from setuptools import setup, Extension, find_packages
|
||||
|
@ -27,7 +27,7 @@ dr 32
|
||||
|
||||
threaded 1
|
||||
tengiga 0
|
||||
vhighvoltage 150
|
||||
highvoltage 150
|
||||
iodelay 660
|
||||
|
||||
#gappixels 1
|
||||
|
@ -1 +1 @@
|
||||
vhighvoltage 200
|
||||
highvoltage 200
|
@ -13,11 +13,25 @@ import _slsdet
|
||||
defs = _slsdet.slsDetectorDefs
|
||||
runStatus = _slsdet.slsDetectorDefs.runStatus
|
||||
speedLevel = _slsdet.slsDetectorDefs.speedLevel
|
||||
|
||||
|
||||
detectorType = _slsdet.slsDetectorDefs.detectorType
|
||||
frameDiscardPolicy = _slsdet.slsDetectorDefs.frameDiscardPolicy
|
||||
fileFormat = _slsdet.slsDetectorDefs.fileFormat
|
||||
dimension = _slsdet.slsDetectorDefs.dimension
|
||||
externalSignalFlag = _slsdet.slsDetectorDefs.externalSignalFlag
|
||||
timingMode = _slsdet.slsDetectorDefs.timingMode
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
detectorType = _slsdet.slsDetectorDefs.detectorType
|
||||
detectorSettings = _slsdet.slsDetectorDefs.detectorSettings
|
||||
clockIndex = _slsdet.slsDetectorDefs.clockIndex
|
||||
readoutMode = _slsdet.slsDetectorDefs.readoutMode
|
||||
masterFlags = _slsdet.slsDetectorDefs.masterFlags
|
||||
|
||||
frameModeType = _slsdet.slsDetectorDefs.frameModeType
|
||||
detectorModeType = _slsdet.slsDetectorDefs.detectorModeType
|
||||
burstMode = _slsdet.slsDetectorDefs.burstMode
|
||||
timingSourceType = _slsdet.slsDetectorDefs.timingSourceType
|
||||
|
||||
|
||||
IpAddr = _slsdet.IpAddr
|
||||
MacAddr = _slsdet.MacAddr
|
||||
|
@ -3,11 +3,14 @@ from _slsdet import slsDetectorDefs
|
||||
from _slsdet import IpAddr, MacAddr
|
||||
|
||||
runStatus = slsDetectorDefs.runStatus
|
||||
timingMode = slsDetectorDefs.timingMode
|
||||
speedLevel = slsDetectorDefs.speedLevel
|
||||
dacIndex = slsDetectorDefs.dacIndex
|
||||
detectorType = slsDetectorDefs.detectorType
|
||||
|
||||
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
||||
from .utils import Geometry, to_geo, element
|
||||
from .utils import Geometry, to_geo, element, reduce_time, is_iterable
|
||||
from . import utils as ut
|
||||
from .registers import Register, Adc_register
|
||||
import datetime as dt
|
||||
|
||||
@ -15,6 +18,7 @@ from functools import wraps
|
||||
from collections import namedtuple
|
||||
import socket
|
||||
|
||||
|
||||
def freeze(cls):
|
||||
cls._frozen = False
|
||||
|
||||
@ -59,15 +63,12 @@ class Detector(CppDetectorApi):
|
||||
self._register = Register(self)
|
||||
self._adc_register = Adc_register(self)
|
||||
|
||||
|
||||
# CONFIGURATION
|
||||
def __len__(self):
|
||||
return self.size()
|
||||
|
||||
def __repr__(self):
|
||||
return '{}(id = {})'.format(self.__class__.__name__,
|
||||
self.getShmId())
|
||||
|
||||
return "{}(id = {})".format(self.__class__.__name__, self.getShmId())
|
||||
|
||||
def free(self):
|
||||
self.freeSharedMemory()
|
||||
@ -90,7 +91,6 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
print('getting host!')
|
||||
return self.getHostname()
|
||||
|
||||
@hostname.setter
|
||||
@ -108,7 +108,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def server_version(self):
|
||||
#TODO! handle hex print
|
||||
# TODO! handle hex print
|
||||
return element_if_equal(self.getDetectorServerVersion())
|
||||
|
||||
@property
|
||||
@ -129,7 +129,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@dr.setter
|
||||
def dr(self, dr):
|
||||
self.setDynamicRange(dr)
|
||||
self.setDynamicRange(dr)
|
||||
|
||||
@property
|
||||
def module_geometry(self):
|
||||
@ -160,65 +160,54 @@ class Detector(CppDetectorApi):
|
||||
def frames(self, n_frames):
|
||||
self.setNumberOfFrames(n_frames)
|
||||
|
||||
@property
|
||||
def triggers(self):
|
||||
return element_if_equal(self.getNumberOfTriggers())
|
||||
|
||||
@triggers.setter
|
||||
def triggers(self, n_triggers):
|
||||
self.setNumberOfTriggers(n_triggers)
|
||||
|
||||
@property
|
||||
def exptime(self):
|
||||
res = self.getExptime()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
if self.type == detectorType.MYTHEN3:
|
||||
res = self.getExptimeForAllGates()
|
||||
else:
|
||||
res = self.getExptime()
|
||||
return reduce_time(res)
|
||||
|
||||
@exptime.setter
|
||||
def exptime(self, t):
|
||||
if isinstance(t, dt.timedelta):
|
||||
self.setExptime(t)
|
||||
else:
|
||||
self.setExptime(dt.timedelta(seconds=t))
|
||||
|
||||
@property
|
||||
def subexptime(self):
|
||||
res = self.getSubExptime()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
|
||||
@subexptime.setter
|
||||
def subexptime(self, t):
|
||||
if isinstance(t, dt.timedelta):
|
||||
self.setSubExptime(t)
|
||||
else:
|
||||
self.setSubExptime(dt.timedelta(seconds=t))
|
||||
|
||||
@property
|
||||
def subdeadtime(self):
|
||||
res = self.getSubDeadTime()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
|
||||
@subdeadtime.setter
|
||||
def subdeadtime(self, t):
|
||||
if isinstance(t, dt.timedelta):
|
||||
self.setSubDeadTime(t)
|
||||
else:
|
||||
self.setSubDeadTime(dt.timedelta(seconds=t))
|
||||
|
||||
self.setExptime(t)
|
||||
|
||||
@property
|
||||
def period(self):
|
||||
res = self.getPeriod()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
return reduce_time(res)
|
||||
|
||||
@period.setter
|
||||
def period(self, t):
|
||||
if isinstance(t, dt.timedelta):
|
||||
self.setPeriod(t)
|
||||
else:
|
||||
self.setPeriod(dt.timedelta(seconds=t))
|
||||
self.setPeriod(t)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def delay(self):
|
||||
return ut.reduce_time(self.getDelayAfterTrigger())
|
||||
|
||||
|
||||
|
||||
@delay.setter
|
||||
def delay(self, t):
|
||||
self.setDelayAfterTrigger(t)
|
||||
|
||||
@property
|
||||
@element
|
||||
def delayl(self):
|
||||
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
||||
|
||||
|
||||
# Time
|
||||
@property
|
||||
def rx_framescaught(self):
|
||||
return element_if_equal(self.getFramesCaught())
|
||||
|
||||
|
||||
@property
|
||||
def startingfnum(self):
|
||||
@ -227,10 +216,7 @@ class Detector(CppDetectorApi):
|
||||
@startingfnum.setter
|
||||
def startingfnum(self, value):
|
||||
self.setStartingFrameNumber(value)
|
||||
|
||||
|
||||
|
||||
#TODO! add txdelay
|
||||
# TODO! add txdelay
|
||||
|
||||
@property
|
||||
def use_receiver(self):
|
||||
@ -296,14 +282,21 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def rx_lastclient(self):
|
||||
return element_if_equal(self.getRxLastClientIP())
|
||||
# FILE
|
||||
|
||||
@property
|
||||
@element
|
||||
def numinterfaces(self):
|
||||
return self.getNumberofUDPInterfaces()
|
||||
|
||||
#FILE
|
||||
@numinterfaces.setter
|
||||
def numinterfaces(self, value):
|
||||
self.setNumberofUDPInterfaces(value)
|
||||
|
||||
@property
|
||||
def fformat(self):
|
||||
return element_if_equal(self.getFileFormat())
|
||||
|
||||
|
||||
@fformat.setter
|
||||
def fformat(self, format):
|
||||
self.setFileFormat(format)
|
||||
@ -414,14 +407,13 @@ class Detector(CppDetectorApi):
|
||||
def zmqip(self, ip):
|
||||
self.setClientZmqIp(ip)
|
||||
|
||||
|
||||
@property
|
||||
def udp_dstip(self):
|
||||
return element_if_equal(self.getDestinationUDPIP())
|
||||
|
||||
@udp_dstip.setter
|
||||
def udp_dstip(self, ip):
|
||||
if ip == 'auto':
|
||||
if ip == "auto":
|
||||
ip = socket.gethostbyname(self.rx_hostname)
|
||||
self.setDestinationUDPIP(IpAddr(ip))
|
||||
|
||||
@ -431,7 +423,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@udp_dstip2.setter
|
||||
def udp_dstip2(self, ip):
|
||||
if ip == 'auto':
|
||||
if ip == "auto":
|
||||
ip = socket.gethostbyname(self.rx_hostname)
|
||||
self.setDestinationUDPIP2(IpAddr(ip))
|
||||
|
||||
@ -451,7 +443,6 @@ class Detector(CppDetectorApi):
|
||||
def udp_dstmac2(self, mac):
|
||||
self.setDestinationUDPMAC2(MacAddr(mac))
|
||||
|
||||
|
||||
@property
|
||||
def udp_srcip(self):
|
||||
return element_if_equal(self.getSourceUDPIP())
|
||||
@ -508,7 +499,6 @@ class Detector(CppDetectorApi):
|
||||
def src_udpip(self, ip):
|
||||
self.setSourceUDPIP(IpAddr(ip))
|
||||
|
||||
|
||||
@property
|
||||
def src_udpmac2(self):
|
||||
return element_if_equal(self.getSourceUDPMAC2())
|
||||
@ -518,11 +508,11 @@ class Detector(CppDetectorApi):
|
||||
self.setSourceUDPMAC2(MacAddr(mac))
|
||||
|
||||
@property
|
||||
def vhighvoltage(self):
|
||||
def highvoltage(self):
|
||||
return element_if_equal(self.getHighVoltage())
|
||||
|
||||
@vhighvoltage.setter
|
||||
def vhighvoltage(self, v):
|
||||
@highvoltage.setter
|
||||
def highvoltage(self, v):
|
||||
self.setHighVoltage(v)
|
||||
|
||||
@property
|
||||
@ -545,8 +535,6 @@ class Detector(CppDetectorApi):
|
||||
def rx_status(self):
|
||||
return element_if_equal(self.getReceiverStatus())
|
||||
|
||||
|
||||
|
||||
@property
|
||||
def rx_udpsocksize(self):
|
||||
return element_if_equal(self.getRxUDPSocketBufferSize())
|
||||
@ -561,7 +549,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def trimbits(self):
|
||||
return NotImplementedError('trimbits are set only')
|
||||
return NotImplementedError("trimbits are set only")
|
||||
|
||||
@trimbits.setter
|
||||
def trimbits(self, fname):
|
||||
@ -595,7 +583,6 @@ class Detector(CppDetectorApi):
|
||||
def adcreg(self):
|
||||
return self._adc_register
|
||||
|
||||
|
||||
@property
|
||||
def led(self):
|
||||
return element_if_equal(self.getLEDEnable())
|
||||
@ -614,13 +601,12 @@ class Detector(CppDetectorApi):
|
||||
self.setRateCorrection(tau)
|
||||
|
||||
@property
|
||||
def clkdivider(self):
|
||||
res = [int(value) for value in self.getSpeed()]
|
||||
return element_if_equal(res)
|
||||
def speed(self):
|
||||
return element_if_equal(self.getSpeed())
|
||||
|
||||
@clkdivider.setter
|
||||
def clkdivider(self, value):
|
||||
self.setSpeed(speedLevel(value))
|
||||
@speed.setter
|
||||
def speed(self, value):
|
||||
self.setSpeed(value)
|
||||
|
||||
@property
|
||||
def frameindex(self):
|
||||
@ -636,11 +622,11 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def timing(self):
|
||||
return element_if_equal(self.getTimingMode())
|
||||
return element_if_equal(self.getTimingMode())
|
||||
|
||||
@timing.setter
|
||||
def timing(self, mode):
|
||||
self.setTimingMode(mode)
|
||||
self.setTimingMode(mode)
|
||||
|
||||
@property
|
||||
def trimen(self):
|
||||
@ -652,9 +638,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def vthreshold(self):
|
||||
return element_if_equal(self.getDAC(dacIndex.THRESHOLD))
|
||||
|
||||
|
||||
return element_if_equal(self.getDAC(dacIndex.VTHRESHOLD, False))
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
@ -668,10 +652,27 @@ class Detector(CppDetectorApi):
|
||||
def rx_missingpackets(self):
|
||||
return element_if_equal(self.getNumMissingPackets())
|
||||
|
||||
|
||||
"""
|
||||
Some Eiger stuff, does this have to be here or can we move it to subclass?
|
||||
"""
|
||||
@property
|
||||
def subexptime(self):
|
||||
res = self.getSubExptime()
|
||||
return reduce_time(res)
|
||||
|
||||
@subexptime.setter
|
||||
def subexptime(self, t):
|
||||
self.setSubExptime(t)
|
||||
|
||||
@property
|
||||
def subdeadtime(self):
|
||||
res = self.getSubDeadTime()
|
||||
reduce_time(res)
|
||||
|
||||
@subdeadtime.setter
|
||||
def subdeadtime(self, t):
|
||||
self.setSubDeadTime(t)
|
||||
|
||||
@property
|
||||
def partialreset(self):
|
||||
return element_if_equal(self.getPartialReset())
|
||||
@ -683,7 +684,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def tengiga(self):
|
||||
return element_if_equal(self.getTenGiga())
|
||||
|
||||
|
||||
@tengiga.setter
|
||||
def tengiga(self, value):
|
||||
self.setTenGiga(value)
|
||||
@ -731,19 +732,116 @@ class Detector(CppDetectorApi):
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
|
||||
|
||||
@property
|
||||
def storeinram(self):
|
||||
return element_if_equal(self.getStoreInRamMode())
|
||||
"""
|
||||
Jungfrau specific
|
||||
"""
|
||||
|
||||
@storeinram.setter
|
||||
def storeinram(self, value):
|
||||
self.setStoreInRamMode(value)
|
||||
@property
|
||||
@element
|
||||
def auto_comp_disable(self):
|
||||
return self.getAutoCompDisable()
|
||||
|
||||
@auto_comp_disable.setter
|
||||
def auto_comp_disable(self, value):
|
||||
self.setAutoCompDisable(value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def storagecells(self):
|
||||
return self.getNumberOfAdditionalStorageCells()
|
||||
|
||||
@storagecells.setter
|
||||
def storagecells(self, n_cells):
|
||||
self.setNumberOfAdditionalStorageCells(n_cells)
|
||||
|
||||
@property
|
||||
@element
|
||||
def storagecell_start(self):
|
||||
return self.getStorageCellStart()
|
||||
|
||||
@storagecell_start.setter
|
||||
def storagecell_start(self, value):
|
||||
self.setStorageCellStart(value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def storagecell_delay(self):
|
||||
return ut.reduce_time(self.getStorageCellDelay())
|
||||
|
||||
@storagecell_delay.setter
|
||||
def storagecell_delay(self, t):
|
||||
self.setStorageCellDelay(t)
|
||||
|
||||
@property
|
||||
@element
|
||||
def temp_threshold(self):
|
||||
return self.getThresholdTemperature()
|
||||
|
||||
@temp_threshold.setter
|
||||
def temp_threshold(self, value):
|
||||
self.setThresholdTemperature(value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def temp_event(self):
|
||||
return self.getTemperatureEvent()
|
||||
|
||||
@temp_event.setter
|
||||
def temp_event(self, value):
|
||||
if value != 0:
|
||||
raise ValueError("Value needs to be 0 for reset. Setting not allowed")
|
||||
self.resetTemperatureEvent()
|
||||
|
||||
@property
|
||||
@element
|
||||
def temp_control(self):
|
||||
return self.getTemperatureControl()
|
||||
|
||||
@temp_control.setter
|
||||
def temp_control(self, value):
|
||||
self.setTemperatureControl(value)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def selinterface(self):
|
||||
return self.getSelectedUDPInterface()
|
||||
|
||||
@selinterface.setter
|
||||
def selinterface(self, i):
|
||||
self.selectUDPInterface(i)
|
||||
|
||||
"""
|
||||
Gotthard2
|
||||
"""
|
||||
|
||||
@property
|
||||
@element
|
||||
def veto(self):
|
||||
return self.getVeto()
|
||||
|
||||
@veto.setter
|
||||
def veto(self, value):
|
||||
self.setVeto(value)
|
||||
|
||||
|
||||
"""
|
||||
Mythen3 specific
|
||||
"""
|
||||
|
||||
@property
|
||||
def gatedelay(self):
|
||||
return reduce_time(self.getGateDelayForAllGates())
|
||||
|
||||
@gatedelay.setter
|
||||
def gatedelay(self, value):
|
||||
if is_iterable(value):
|
||||
if len(value) == 3:
|
||||
for i, v in enumerate(value):
|
||||
self.setGateDelay(i, v)
|
||||
else:
|
||||
self.setGateDelay(-1, value)
|
||||
|
||||
@property
|
||||
def counters(self):
|
||||
mask = self.getCounterMask()
|
||||
@ -753,11 +851,10 @@ class Detector(CppDetectorApi):
|
||||
else:
|
||||
return [get_set_bits(m) for m in mask]
|
||||
|
||||
|
||||
@counters.setter
|
||||
def counters(self, values):
|
||||
self.setCounterMask(list_to_bitmask(values))
|
||||
|
||||
|
||||
"""
|
||||
CTB stuff
|
||||
"""
|
||||
@ -805,7 +902,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def dbitclk(self):
|
||||
return element_if_equal(self.getDBITClock())
|
||||
|
||||
|
||||
@dbitclk.setter
|
||||
def dbitclk(self, value):
|
||||
self.setDBITClock(value)
|
||||
@ -845,7 +942,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def adcphase(self):
|
||||
return element_if_equal(self.getADCPhase())
|
||||
|
||||
|
||||
@adcphase.setter
|
||||
def adcphase(self, value):
|
||||
self.setADCPhase(value)
|
||||
@ -869,21 +966,13 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def syncclk(self):
|
||||
return element_if_equal(self.getSYNCClock())
|
||||
|
||||
|
||||
@property
|
||||
def pattern(self):
|
||||
#TODO! Clean fix
|
||||
# TODO! Clean fix
|
||||
print("Set only")
|
||||
return 0
|
||||
|
||||
@property
|
||||
def patclkctrl(self):
|
||||
return element_if_equal(self.getPatternClockControl())
|
||||
|
||||
@patclkctrl.setter
|
||||
def patclkctrl(self, mask):
|
||||
self.setPatternClockControl(mask)
|
||||
|
||||
# patioctrl
|
||||
@property
|
||||
def patioctrl(self):
|
||||
@ -961,7 +1050,6 @@ class Detector(CppDetectorApi):
|
||||
def patwaittime2(self, nclk):
|
||||
self.setPatternWaitTime(2, nclk)
|
||||
|
||||
|
||||
@property
|
||||
def patloop0(self):
|
||||
return element_if_equal(self.getPatternLoopAddresses(0))
|
||||
@ -1010,7 +1098,6 @@ class Detector(CppDetectorApi):
|
||||
def patnloop2(self, n):
|
||||
self.setPatternLoopCycles(2, n)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def v_a(self):
|
||||
@ -1088,4 +1175,4 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def im_io(self):
|
||||
return self.getMeasuredCurrent(dacIndex.I_POWER_IO)
|
||||
return self.getMeasuredCurrent(dacIndex.I_POWER_IO)
|
||||
|
@ -60,23 +60,23 @@ class EigerDacs(DetectorDacs):
|
||||
"""
|
||||
Eiger specific dacs
|
||||
"""
|
||||
_dacs = [('vsvp', dacIndex.SVP,0, 4000, 0),
|
||||
('vtr', dacIndex.VTR,0, 4000, 2500),
|
||||
('vrf', dacIndex.VRF,0, 4000, 3300),
|
||||
('vrs', dacIndex.VRS,0, 4000, 1400),
|
||||
('vsvn', dacIndex.SVN,0, 4000, 4000),
|
||||
('vtgstv', dacIndex.VTGSTV,0, 4000, 2556),
|
||||
('vcmp_ll', dacIndex.VCMP_LL,0, 4000, 1500),
|
||||
('vcmp_lr', dacIndex.VCMP_LR,0, 4000, 1500),
|
||||
('vcall', dacIndex.CAL,0, 4000, 4000),
|
||||
('vcmp_rl', dacIndex.VCMP_RL,0, 4000, 1500),
|
||||
('rxb_rb', dacIndex.RXB_RB,0, 4000, 1100),
|
||||
('rxb_lb', dacIndex.RXB_LB,0, 4000, 1100),
|
||||
('vcmp_rr', dacIndex.VCMP_RR,0, 4000, 1500),
|
||||
('vcp', dacIndex.VCP,0, 4000, 200),
|
||||
('vcn', dacIndex.VCN,0, 4000, 2000),
|
||||
('vis', dacIndex.VIS,0, 4000, 1550),
|
||||
('iodelay', dacIndex.IO_DELAY,0, 4000, 660)]
|
||||
_dacs = [('vsvp', dacIndex.VSVP,0, 4000, 0),
|
||||
('vtrim', dacIndex.VTRIM,0, 4000, 2500),
|
||||
('vrpreamp', dacIndex.VRPREAMP,0, 4000, 3300),
|
||||
('vrshaper', dacIndex.VRSHAPER,0, 4000, 1400),
|
||||
('vsvn', dacIndex.VSVN,0, 4000, 4000),
|
||||
('vtgstv', dacIndex.VTGSTV,0, 4000, 2556),
|
||||
('vcmp_ll', dacIndex.VCMP_LL,0, 4000, 1500),
|
||||
('vcmp_lr', dacIndex.VCMP_LR,0, 4000, 1500),
|
||||
('vcal', dacIndex.VCAL,0, 4000, 4000),
|
||||
('vcmp_rl', dacIndex.VCMP_RL,0, 4000, 1500),
|
||||
('rxb_rb', dacIndex.RXB_RB,0, 4000, 1100),
|
||||
('rxb_lb', dacIndex.RXB_LB,0, 4000, 1100),
|
||||
('vcmp_rr', dacIndex.VCMP_RR,0, 4000, 1500),
|
||||
('vcp', dacIndex.VCP,0, 4000, 200),
|
||||
('vcn', dacIndex.VCN,0, 4000, 2000),
|
||||
('vishaper', dacIndex.VISHAPER,0, 4000, 1550),
|
||||
('iodelay', dacIndex.IO_DELAY,0, 4000, 660)]
|
||||
_dacnames = [_d[0] for _d in _dacs]
|
||||
|
||||
# # noinspection PyProtectedMember
|
||||
|
@ -13,49 +13,32 @@ import _slsdet
|
||||
dacIndex = _slsdet.slsDetectorDefs.dacIndex
|
||||
from .detector_property import DetectorProperty
|
||||
|
||||
# vcassh 1200,
|
||||
# vth2 2800,
|
||||
# vshaper 1280,
|
||||
# vshaperneg 2800,
|
||||
# vipre_out 1220,
|
||||
# vth3 2800,
|
||||
# vth1 2800,
|
||||
# vicin 1708,
|
||||
# vcas 1800,
|
||||
# vpreamp 1100,
|
||||
# vpl 1100,
|
||||
# vipre 2624,
|
||||
# viinsh 1708,
|
||||
# vph 1712,
|
||||
# vtrim 2800,
|
||||
# vdcsh 800
|
||||
|
||||
|
||||
# @freeze
|
||||
class Mythen3Dacs(DetectorDacs):
|
||||
"""
|
||||
Jungfrau specific DACs
|
||||
"""
|
||||
_dacs = [('vcassh', dacIndex.CASSH, 0, 4000, 1220),
|
||||
_dacs = [('vcassh', dacIndex.VCASSH, 0, 4000, 1220),
|
||||
('vth2', dacIndex.VTH2, 0, 4000, 2800),
|
||||
('vshaper', dacIndex.SHAPER1, 0, 4000, 1280),
|
||||
('vshaperneg', dacIndex.SHAPER2, 0, 4000, 2800),
|
||||
('vrshaper', dacIndex.VRSHAPER, 0, 4000, 1280),
|
||||
('vrshaper_n', dacIndex.VRSHAPER_N, 0, 4000, 2800),
|
||||
('vipre_out', dacIndex.VIPRE_OUT, 0, 4000, 1220),
|
||||
('vth3', dacIndex.VTH3, 0, 4000, 2800),
|
||||
('vth1', dacIndex.THRESHOLD, 0, 4000, 2800),
|
||||
('vth1', dacIndex.VTH1, 0, 4000, 2800),
|
||||
('vicin', dacIndex.VICIN, 0, 4000, 1708),
|
||||
('vcas', dacIndex.CAS, 0, 4000, 1800),
|
||||
('vpreamp', dacIndex.PREAMP, 0, 4000, 1100),
|
||||
('vpl', dacIndex.VPL, 0, 4000, 1100),
|
||||
('vcas', dacIndex.VCAS, 0, 4000, 1800),
|
||||
('vrpreamp', dacIndex.VRPREAMP, 0, 4000, 1100),
|
||||
('vcal_n', dacIndex.VCAL_N, 0, 4000, 1100),
|
||||
('vipre', dacIndex.VIPRE, 0, 4000, 2624),
|
||||
('viinsh', dacIndex.VIINSH, 0, 4000, 1708),
|
||||
('vph', dacIndex.CALIBRATION_PULSE, 0, 4000, 1712),
|
||||
('vtrim', dacIndex.TRIMBIT_SIZE, 0, 4000, 2800),
|
||||
('vdcsh', dacIndex.VDCSH, 0, 4000, 800),
|
||||
('vishaper', dacIndex.VISHAPER, 0, 4000, 1708),
|
||||
('vcal_p', dacIndex.VCAL_P, 0, 4000, 1712),
|
||||
('vtrim', dacIndex.VTRIM, 0, 4000, 2800),
|
||||
('vdcsh', dacIndex.VDCSH, 0, 4000, 800),
|
||||
]
|
||||
_dacnames = [_d[0] for _d in _dacs]
|
||||
|
||||
|
||||
#vthreshold??
|
||||
|
||||
|
||||
@freeze
|
||||
|
@ -7,10 +7,17 @@ but not directly used in controlling the detector
|
||||
from collections import namedtuple
|
||||
import _slsdet #C++ lib
|
||||
import functools
|
||||
|
||||
import datetime as dt
|
||||
|
||||
Geometry = namedtuple('Geometry', ['x', 'y'])
|
||||
|
||||
def is_iterable(item):
|
||||
try:
|
||||
iter(item)
|
||||
except TypeError:
|
||||
return False
|
||||
return True
|
||||
|
||||
def get_set_bits(mask):
|
||||
"""
|
||||
Return a list of the set bits in a python integer
|
||||
@ -41,6 +48,9 @@ def all_equal(mylist):
|
||||
|
||||
def element_if_equal(mylist):
|
||||
"""If all elements are equal return only one element"""
|
||||
if not is_iterable(mylist):
|
||||
return mylist
|
||||
|
||||
if all_equal(mylist):
|
||||
if len(mylist) == 0:
|
||||
return None
|
||||
@ -49,6 +59,15 @@ def element_if_equal(mylist):
|
||||
else:
|
||||
return mylist
|
||||
|
||||
def reduce_time(mylist):
|
||||
res = element_if_equal(element_if_equal(mylist))
|
||||
if isinstance(res, dt.timedelta):
|
||||
return res.total_seconds()
|
||||
elif isinstance(res[0], list):
|
||||
return [[item.total_seconds() for item in subl] for subl in res]
|
||||
else:
|
||||
return [r.total_seconds() for r in res]
|
||||
|
||||
def element(func):
|
||||
"""
|
||||
Wrapper to return either list or element
|
||||
@ -69,3 +88,8 @@ def eiger_register_to_time(register):
|
||||
exponent = register & 0b111
|
||||
return clocks*10**exponent / 100e6
|
||||
|
||||
def make_timedelta(t):
|
||||
if isinstance(t, dt.timedelta):
|
||||
return t
|
||||
else:
|
||||
return dt.timedelta(seconds=t)
|
||||
|
@ -1,20 +0,0 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = python -msphinx
|
||||
SPHINXPROJ = sls_detector_tools
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 MiB |
@ -1,134 +0,0 @@
|
||||
Code quality
|
||||
=============================
|
||||
|
||||
For usability and reliability of the software the code needs to be high quality. For this
|
||||
project it means meeting the four criteria described below. Any addition should pass all of
|
||||
them.
|
||||
|
||||
|
||||
--------------------------------
|
||||
Look, read and feel like Python
|
||||
--------------------------------
|
||||
|
||||
When using classes and functions from the
|
||||
package it should feel like you are using Python tools and be forces
|
||||
to write C++ style code with Python syntax.
|
||||
|
||||
::
|
||||
|
||||
with xray_box.shutter_open():
|
||||
for th in threshold:
|
||||
d.vthreshold = th
|
||||
d.acq()
|
||||
|
||||
should be preferred over
|
||||
|
||||
::
|
||||
|
||||
N = len(threshold)
|
||||
xray_box.open_shutter()
|
||||
for i in range(N):
|
||||
d.dacs.set_dac('vthreshold', threshold[i])
|
||||
d.acq()
|
||||
xray_box.close_shutter()
|
||||
|
||||
even if the difference might seem small.
|
||||
|
||||
--------------------
|
||||
Have documentation
|
||||
--------------------
|
||||
|
||||
Classes and functions should be documented with doc-strings
|
||||
in the source code. Preferably with examples. The syntax to be used
|
||||
is numpy-sphinx.
|
||||
|
||||
::
|
||||
|
||||
def function(arg):
|
||||
"""
|
||||
This is a function that does something
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg: int
|
||||
An argument
|
||||
|
||||
Returns
|
||||
--------
|
||||
value: double
|
||||
Returns a value
|
||||
|
||||
"""
|
||||
return np.sin(arg+np.pi)
|
||||
|
||||
---------------------------------
|
||||
Pass static analysis with pylint
|
||||
---------------------------------
|
||||
|
||||
Yes, anything less than 9/10 just means that you are lazy. If
|
||||
there is a good reason why to diverge, then we can always
|
||||
add an exception.
|
||||
|
||||
Currently the following additions are made:
|
||||
|
||||
* good-names: x, y, ax, im etc.
|
||||
* function arguments 10
|
||||
* Whitelist: numpy, _sls
|
||||
|
||||
|
||||
|
||||
-----------------------
|
||||
Tested code
|
||||
-----------------------
|
||||
|
||||
Last but not least... *actually last just because of the long list included.*
|
||||
All code that goes in should have adequate tests. If a new function does not
|
||||
have a minimum of one test it does not get added.
|
||||
|
||||
**Unit-tests with pytest and mocker**
|
||||
|
||||
::
|
||||
|
||||
----------- coverage: platform linux, python 3.6.4-final-0 -----------
|
||||
Name Stmts Miss Cover
|
||||
------------------------------------------------
|
||||
sls_detector/__init__.py 4 0 100%
|
||||
sls_detector/decorators.py 14 3 79%
|
||||
sls_detector/detector.py 461 115 75%
|
||||
sls_detector/eiger.py 150 64 57%
|
||||
sls_detector/errors.py 7 0 100%
|
||||
sls_detector/jungfrau.py 59 26 56%
|
||||
------------------------------------------------
|
||||
TOTAL 695 208 70%
|
||||
|
||||
|
||||
========= 78 passed in 0.60 seconds =========
|
||||
|
||||
|
||||
|
||||
**Simple integration tests**
|
||||
|
||||
These tests require a detector connected. Performs simple tasks like setting
|
||||
exposure time and reading back to double check the value
|
||||
|
||||
::
|
||||
|
||||
----------- coverage: platform linux, python 3.6.4-final-0 -----------
|
||||
Name Stmts Miss Cover
|
||||
------------------------------------------------
|
||||
sls_detector/__init__.py 4 0 100%
|
||||
sls_detector/decorators.py 14 0 100%
|
||||
sls_detector/detector.py 461 103 78%
|
||||
sls_detector/eiger.py 150 20 87%
|
||||
sls_detector/errors.py 7 0 100%
|
||||
sls_detector/jungfrau.py 59 26 56%
|
||||
------------------------------------------------
|
||||
TOTAL 695 149 79%
|
||||
|
||||
|
||||
========= 67 passed, 1 skipped in 16.66 seconds =========
|
||||
|
||||
**Complex integration test**
|
||||
|
||||
Typical measurements. Might require X-rays. Tests are usually evaluated from
|
||||
plots
|
@ -1,370 +0,0 @@
|
||||
Command line to Python
|
||||
=========================
|
||||
|
||||
If you are already familiar with the command line interface to the
|
||||
slsDetectorSoftware here is a quick reference translating to Python commands
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
Commands labeled Mythen only or Gotthard only are currently not implemented in the
|
||||
Python class. If you need this functionallity please contact the SLS Detector Group
|
||||
|
||||
.. py:currentmodule:: sls_detector
|
||||
|
||||
.. |ro| replace:: *(read only)*
|
||||
.. |free| replace:: :py:func:`Detector.free_shared_memory`
|
||||
.. |sub| replace:: :py:attr:`Detector.sub_exposure_time`
|
||||
.. |mg| replace:: Mythen and Gotthard only
|
||||
.. |g| replace:: Gotthard only
|
||||
.. |m| replace:: Mythen only
|
||||
.. |msp| replace:: :py:attr:`Detector.measured_subperiod`
|
||||
.. |new_chiptest| replace:: New chip test board only
|
||||
.. |chiptest| replace:: Chip test board only
|
||||
.. |dr| replace:: :py:attr:`Detector.dynamic_range`
|
||||
.. |j| replace:: Jungfrau only
|
||||
.. |te| replace:: :py:attr:`Detector.trimmed_energies`
|
||||
.. |temp_fpgaext| replace:: :py:attr:`Detector.temp`.fpgaext
|
||||
.. |epa| replace:: :py:func:`Eiger.pulse_all_pixels`
|
||||
.. |rfc| replace:: :py:func:`Detector.reset_frames_caught`
|
||||
.. |rfi| replace:: :py:attr:`Detector.receiver_frame_index`
|
||||
.. |ron| replace:: :py:attr:`Detector.receiver_online`
|
||||
.. |flipy| replace:: :py:attr:`Detector.flipped_data_y`
|
||||
.. |flipx| replace:: :py:attr:`Detector.flipped_data_x`
|
||||
.. |adcr| replace:: :py:func:`DetectorApi.writeAdcRegister`
|
||||
.. |sb| replace:: :py:func:`DetectorApi.setBitInRegister`
|
||||
.. |cb| replace:: :py:func:`DetectorApi.clearBitInRegister`
|
||||
.. |tempth| replace:: :py:attr:`Jungfrau.temperature_threshold`
|
||||
.. |tempev| replace:: :py:attr:`Jungfrau.temperature_event`
|
||||
.. |tempco| replace:: :py:attr:`Jungfrau.temperature_control`
|
||||
.. |depr| replace:: *Deprecated/Internal*
|
||||
.. |nimp| replace:: *Not implemented*
|
||||
.. |rudp| replace:: :py:attr:`Detector.rx_realudpsocksize`
|
||||
.. |lci| replace:: :py:attr:`Detector.last_client_ip`
|
||||
.. |rlci| replace:: :py:attr:`Detector.receiver_last_client_ip`
|
||||
.. |fdp| replace:: :py:attr:`Detector.frame_discard_policy`
|
||||
.. |apic| replace:: :py:attr:`Detector.api_compatibility`
|
||||
|
||||
|
||||
------------------------
|
||||
Commands
|
||||
------------------------
|
||||
|
||||
===================== ===================================== ================== =========
|
||||
Command Python Implementation Tests
|
||||
===================== ===================================== ================== =========
|
||||
sls_detector_acquire :py:func:`Detector.acq` OK OK
|
||||
test |depr| \- \-
|
||||
help help(Detector.acq) \- \-
|
||||
exitserver |depr| \- \-
|
||||
exitreceiver |depr| \- \-
|
||||
flippeddatay |flipy| OK \-
|
||||
digitest |depr| \- \-
|
||||
bustest |depr| \- \-
|
||||
digibittest Which detector? \- \-
|
||||
reg :py:attr:`Detector.register` OK \-
|
||||
adcreg |adcr| OK \-
|
||||
setbit |sb| OK \-
|
||||
clearbit |cb| OK \-
|
||||
getbit |nimp| \- \-
|
||||
r_compression Not implemented in receiver \- \-
|
||||
acquire :py:func:`Detector.acq` OK \-
|
||||
busy :py:attr:`Detector.busy` OK Partial
|
||||
status :py:attr:`Detector.status` OK |ro| \-
|
||||
status start :py:func:`Detector.start_detector` OK \-
|
||||
status stop :py:func:`Detector.stop_detector` OK \-
|
||||
data |depr| \- \-
|
||||
frame |depr| \- \-
|
||||
readctr |g| \- \-
|
||||
resetctr |g| \- \-
|
||||
resmat :py:attr:`Eiger.eiger_matrix_reset` OK OK
|
||||
free |free| OK \-
|
||||
hostname :py:attr:`Detector.hostname` OK OK
|
||||
add |nimp| \- \-
|
||||
replace |nimp| \- \-
|
||||
user |nimp| \- \-
|
||||
master |nimp| \- \-
|
||||
sync Which detector? \- \-
|
||||
online :py:attr:`Detector.online` OK \-
|
||||
checkonline |nimp| \- \-
|
||||
activate :py:attr:`Eiger.active` \- \-
|
||||
nmod :py:attr:`Detector.n_modules` OK \-
|
||||
maxmod |depr| \- \-
|
||||
dr |dr| OK OK
|
||||
roi |g| \- \-
|
||||
detsizechan :py:attr:`Detector.image_size` OK \-
|
||||
roimask |nimp| \- \-
|
||||
flippeddatax |flipx| OK \-
|
||||
tengiga :py:attr:`Eiger.tengiga` OK \-
|
||||
gappixels :py:attr:`Eiger.add_gappixels` OK \-
|
||||
flags :py:attr:`Detector.flags` OK \-
|
||||
extsig |mg| \- \-
|
||||
programfpga |j| \- \-
|
||||
resetfpga |j| \- \-
|
||||
powerchip :py:attr:`Jungfrau.powerchip` \- \-
|
||||
led |nimp| \- \-
|
||||
auto_comp_disable |j| \- \-
|
||||
pulse Used in |epa| OK \-
|
||||
pulsenmove Used in |epa| OK \-
|
||||
pulsechip :py:func:`Eiger.pulse_chip` OK \-
|
||||
checkdetversion |apic| \- \-
|
||||
checkrecversion |apic| \- \-
|
||||
moduleversion |m| \- \-
|
||||
detectornumber :py:attr:`Detector.detector_number` OK \-
|
||||
modulenumber |m| \- \-
|
||||
detectorversion :py:attr:`Detector.firmware_version` OK OK
|
||||
softwareversion :py:attr:`Detector.server_version` \- \-
|
||||
thisversion :py:attr:`Detector.client_version` Reads date \-
|
||||
receiverversion :py:attr:`Detector.receiver_version` Reads date \-
|
||||
timing :py:attr:`Detector.timing_mode` OK \-
|
||||
exptime :py:attr:`Detector.exposure_time` OK OK
|
||||
subexptime |sub| OK OK
|
||||
period :py:attr:`Detector.period` OK OK
|
||||
subdeadtime :py:attr:`Eiger.sub_deadtime` OK OK
|
||||
delay :py:attr:`Jungfrau.delay` OK \-
|
||||
gates :py:attr:`Jungfrau.n_gates` OK \-
|
||||
frames :py:attr:`Detector.n_frames` OK OK
|
||||
cycles :py:attr:`Detector.n_cycles` OK \-
|
||||
probes :py:attr:`Jungfrau.n_probes` OK \-
|
||||
measurements :py:attr:`Detector.n_measurements` OK \-
|
||||
samples Chip test board only (new?) \- \-
|
||||
storagecells :py:attr:`Jungfrau.n_storagecells` OK \-
|
||||
storagecell_start :py:attr:`Jungfrau.storagecell_start` OK \-
|
||||
exptimel |mg| \- \-
|
||||
periodl |mg| \- \-
|
||||
delayl |mg| \- \-
|
||||
gatesl |mg| \- \-
|
||||
framesl |mg| \- \-
|
||||
cyclesl |mg| \- \-
|
||||
probesl |mg| \- \-
|
||||
now |nimp| \- \-
|
||||
timestamp |m| \- \-
|
||||
nframes |nimp| \- \-
|
||||
measuredperiod :py:attr:`Detector.measured_period` OK \-
|
||||
measuredsubperiod |msp| \- \-
|
||||
clkdivider :py:attr:`Detector.readout_clock` OK OK
|
||||
setlength |m| \- \-
|
||||
waitstates |m| \- \-
|
||||
totdivider |m| \- \-
|
||||
totdutycycle |m| \- \-
|
||||
phasestep |g| \- \-
|
||||
oversampling |new_chiptest| \- \-
|
||||
adcclk |new_chiptest| \- \-
|
||||
adcphase |new_chiptest| \- \-
|
||||
adcpipeline |new_chiptest| \- \-
|
||||
dbitclk |new_chiptest| \- \-
|
||||
dbitphase |new_chiptest| \- \-
|
||||
dbitpipeline |new_chiptest| \- \-
|
||||
config :py:func:`Detector.load_config` OK \-
|
||||
rx_printconfig |nimp| \- \-
|
||||
parameters :py:func:`Detector.load_parameters` OK \-
|
||||
setup |nimp| \- \-
|
||||
flatfield |nimp| \- \-
|
||||
ffdir |nimp| \- \-
|
||||
ratecorr :py:attr:`Detector.rate_correction` OK \-
|
||||
badchannels |nimp| \- \-
|
||||
angconv |m| \- \-
|
||||
globaloff |nimp| \- \-
|
||||
fineoff |nimp| \- \-
|
||||
binsize |nimp| \- \-
|
||||
angdir |nimp| \- \-
|
||||
moveflag |nimp| \- \-
|
||||
samplex |nimp| \- \-
|
||||
sampley |nimp| \- \-
|
||||
threaded :py:attr:`Detector.threaded` OK \-
|
||||
darkimage |nimp| \- \-
|
||||
gainimage |nimp| \- \-
|
||||
settingsdir :py:attr:`Detector.settings_path` OK \-
|
||||
trimdir |nimp| \- \-
|
||||
caldir |nimp| \- \-
|
||||
trimen :py:attr:`Detector.trimmed_energies` OK \-
|
||||
settings :py:attr:`Detector.settings` OK \-
|
||||
threshold :py:attr:`Detector.threshold` OK \-
|
||||
thresholdnotb |nimp| \- \-
|
||||
trimbits :py:func:`Detector.load_trimbits` OK \-
|
||||
trim |nimp| \- \-
|
||||
trimval :py:attr:`Detector.trimbits` OK OK
|
||||
pedestal |nimp| \- \-
|
||||
vthreshold :py:attr:`Detector.vthreshold` OK \-
|
||||
vcalibration |nimp| \- \-
|
||||
vtrimbit |nimp| \- \-
|
||||
vpreamp |nimp| \- \-
|
||||
vshaper1 |nimp| \- \-
|
||||
vshaper2 |nimp| \- \-
|
||||
vhighvoltage :py:attr:`Detector.high_voltage` OK \-
|
||||
vapower |nimp| \- \-
|
||||
vddpower |nimp| \- \-
|
||||
vshpower |nimp| \- \-
|
||||
viopower |nimp| \- \-
|
||||
vref_ds :py:attr:`Jungfrau.dacs.vref_ds` OK \-
|
||||
vcascn_pb |nimp| \- \-
|
||||
vcascp_pb |nimp| \- \-
|
||||
vout_cm |nimp| \- \-
|
||||
vcasc_out |nimp| \- \-
|
||||
vin_cm |nimp| \- \-
|
||||
vref_comp |nimp| \- \-
|
||||
ib_test_c |nimp| \- \-
|
||||
dac0 |nimp| \- \-
|
||||
dac1 |nimp| \- \-
|
||||
dac2 |nimp| \- \-
|
||||
dac3 |nimp| \- \-
|
||||
dac4 |nimp| \- \-
|
||||
dac5 |nimp| \- \-
|
||||
dac6 |nimp| \- \-
|
||||
dac7 |nimp| \- \-
|
||||
vsvp :py:attr:`Eiger.dacs.vsvp` OK \-
|
||||
vsvn :py:attr:`Eiger.dacs.vsvn` OK \-
|
||||
vtr :py:attr:`Eiger.dacs.vtr` OK \-
|
||||
vrf :py:attr:`Eiger.dacs.vrf` OK \-
|
||||
vrs :py:attr:`Eiger.dacs.vrs` OK \-
|
||||
vtgstv :py:attr:`Eiger.dacs.vtgstv` OK \-
|
||||
vcmp_ll :py:attr:`Eiger.dacs.vcmp_ll` OK \-
|
||||
vcmp_ll :py:attr:`Eiger.dacs.vcmp_ll` OK \-
|
||||
vcall :py:attr:`Eiger.dacs.vcall` OK \-
|
||||
vcmp_rl :py:attr:`Eiger.dacs.vcmp_rl` OK \-
|
||||
vcmp_rr :py:attr:`Eiger.dacs.vcmp_rr` OK \-
|
||||
rxb_rb :py:attr:`Eiger.dacs.rxb_rb` OK \-
|
||||
rxb_lb :py:attr:`Eiger.dacs.rxb_lb` OK \-
|
||||
vcp :py:attr:`Eiger.dacs.vcp` OK \-
|
||||
vcn :py:attr:`Eiger.dacs.vcn` OK \-
|
||||
vis :py:attr:`Eiger.dacs.vis` OK \-
|
||||
iodelay :py:attr:`Eiger.dacs.iodelay` OK \-
|
||||
dac |nimp| \- \-
|
||||
adcvpp |nimp| \- \-
|
||||
v_a |nimp| \- \-
|
||||
v_b |nimp| \- \-
|
||||
v_c |nimp| \- \-
|
||||
v_d |nimp| \- \-
|
||||
v_io |nimp| \- \-
|
||||
v_chip |nimp| \- \-
|
||||
v_limit |nimp| \- \-
|
||||
vIpre |nimp| \- \-
|
||||
VcdSh |nimp| \- \-
|
||||
Vth1 |nimp| \- \-
|
||||
Vth2 |nimp| \- \-
|
||||
Vth3 |nimp| \- \-
|
||||
VPL |nimp| \- \-
|
||||
Vtrim |nimp| \- \-
|
||||
vIbias |nimp| \- \-
|
||||
vIinSh |nimp| \- \-
|
||||
cas |nimp| \- \-
|
||||
casSh |nimp| \- \-
|
||||
vIbiasSh |nimp| \- \-
|
||||
vIcin |nimp| \- \-
|
||||
vIpreOut |nimp| \- \-
|
||||
temp_adc |nimp| \- \-
|
||||
temp_fpga :py:attr:`Detector.temp`.fpga OK \-
|
||||
temp_fpgaext |temp_fpgaext| OK \-
|
||||
temp_10ge :py:attr:`Detector.temp`.t10ge OK \-
|
||||
temp_dcdc :py:attr:`Detector.temp`.dcdc OK \-
|
||||
temp_sodl :py:attr:`Detector.temp`.sodl OK \-
|
||||
temp_sodr :py:attr:`Detector.temp`.sodr OK \-
|
||||
adc |nimp| \- \-
|
||||
temp_fpgafl :py:attr:`Detector.temp`.fpgafl OK \-
|
||||
temp_fpgafr :py:attr:`Detector.temp`.fpgafr OK \-
|
||||
i_a |nimp| \- \-
|
||||
i_b |nimp| \- \-
|
||||
i_c |nimp| \- \-
|
||||
i_d |nimp| \- \-
|
||||
i_io |nimp| \- \-
|
||||
vm_a |nimp| \- \-
|
||||
vm_b |nimp| \- \-
|
||||
vm_c |nimp| \- \-
|
||||
vm_d |nimp| \- \-
|
||||
vm_io |nimp| \- \-
|
||||
temp_threshold |tempth| \- \-
|
||||
temp_control |tempco| \- \-
|
||||
temp_event |tempev| \- \-
|
||||
outdir :py:attr:`Detector.file_path` OK OK
|
||||
fname :py:attr:`Detector.file_name` OK OK
|
||||
index :py:attr:`Detector.file_index` OK OK
|
||||
enablefwrite :py:attr:`Detector.file_write` OK OK
|
||||
overwrite :py:attr:`Detector.file_overwrite` OK \-
|
||||
currentfname |nimp| \- \-
|
||||
fileformat :py:attr:`Detector.file_format` OK \-
|
||||
positions |depr| \- \-
|
||||
startscript |depr| \- \-
|
||||
startscriptpar |depr| \- \-
|
||||
stopscript |depr| \- \-
|
||||
stopscriptpar |depr| \- \-
|
||||
scriptbefore |depr| \- \-
|
||||
scriptbeforepar |depr| \- \-
|
||||
scriptafter |depr| \- \-
|
||||
scriptafterpar |depr| \- \-
|
||||
headerafter |depr| \- \-
|
||||
headerbefore |depr| \- \-
|
||||
headerbeforepar |depr| \- \-
|
||||
headerafterpar |depr| \- \-
|
||||
encallog |depr| \- \-
|
||||
angcallog |depr| \- \-
|
||||
scan0script |depr| \- \-
|
||||
scan0par |depr| \- \-
|
||||
scan0prec |depr| \- \-
|
||||
scan0steps |depr| \- \-
|
||||
scan0range |depr| \- \-
|
||||
scan1script |depr| \- \-
|
||||
scan1par |depr| \- \-
|
||||
scan1prec |depr| \- \-
|
||||
scan1steps |depr| \- \-
|
||||
scan1range |depr| \- \-
|
||||
rx_hostname :py:attr:`Detector.rx_hostname` OK \-
|
||||
rx_udpip :py:attr:`Detector.rx_udpip` OK \-
|
||||
rx_udpmac :py:attr:`Detector.rx_udpmac` OK \-
|
||||
rx_udpport :py:attr:`Detector.rx_udpport` OK \-
|
||||
rx_udpport2 :py:attr:`Detector.rx_udpport` OK \-
|
||||
rx_udpsocksize :py:attr:`Detector.rx_udpsocksize` OK \-
|
||||
rx_realudpsocksize |rudp| OK
|
||||
detectormac :py:attr:`Detector.detector_mac` OK \-
|
||||
detectorip :py:attr:`Detector.detector_ip` OK \-
|
||||
txndelay_left :py:attr:`Eiger.delay`.left OK \-
|
||||
txndelay_right :py:attr:`Eiger.delay`.right OK \-
|
||||
txndelay_frame :py:attr:`Eiger.delay`.frame OK \-
|
||||
flowcontrol_10g :py:attr:`Eiger.flowcontrol_10g` OK \-
|
||||
zmqport :py:attr:`Detector.client_zmqport` Read \-
|
||||
rx_zmqport :py:attr:`Detector.rx_zmqport` Read \-
|
||||
rx_datastream :py:attr:`Detector.rx_datastream` OK \-
|
||||
zmqip :py:attr:`Detector.client_zmqip` OK \-
|
||||
rx_zmqip :py:attr:`Detector.rx_zmqip` Read \-
|
||||
rx_jsonaddheader :py:attr:`Detector.rx_jsonaddheader` OK \-
|
||||
configuremac :py:attr:`Detector.config_network` OK \-
|
||||
rx_tcpport :py:attr:`Detector.rx_tcpport`
|
||||
port |nimp| \- \-
|
||||
stopport |nimp| \- \-
|
||||
lock :py:attr:`Detector.lock` OK \-
|
||||
lastclient :py:attr:`Detector.last_client_ip` OK \-
|
||||
receiver start :py:func:`Detector.start_receiver` OK \-
|
||||
receiver stop :py:func:`Detector.stop_receiver` \- \-
|
||||
r_online |ron| OK \-
|
||||
r_checkonline |nimp| \- \-
|
||||
framescaught :py:attr:`Detector.frames_caught` OK \-
|
||||
resetframescaught |rfc| OK \-
|
||||
frameindex |rfi| OK \-
|
||||
r_lock :py:attr:`Detector.lock_receiver` OK \-
|
||||
r_lastclient |rlci| OK \-
|
||||
r_readfreq |nimp| \- \-
|
||||
rx_fifodepth :py:attr:`Detector.rx_fifodepth` OK \-
|
||||
r_silent |nimp| \- \-
|
||||
r_framesperfile :py:attr:`Detector.n_frames_per_file` OK \-
|
||||
r_discardpolicy |fdp| OK \-
|
||||
r_padding :py:attr:`Detector.file_padding` OK \-
|
||||
adcinvert |chiptest| \- \-
|
||||
adcdisable |chiptest| \- \-
|
||||
pattern |chiptest| \- \-
|
||||
patword |chiptest| \- \-
|
||||
patioctrl |chiptest| \- \-
|
||||
patclkctrl |chiptest| \- \-
|
||||
patlimits |chiptest| \- \-
|
||||
patloop0 |chiptest| \- \-
|
||||
patnloop0 |chiptest| \- \-
|
||||
patwait0 |chiptest| \- \-
|
||||
patwaittime0 |chiptest| \- \-
|
||||
patloop1 |chiptest| \- \-
|
||||
patnloop1 |chiptest| \- \-
|
||||
patwait1 |chiptest| \- \-
|
||||
patwaittime1 |chiptest| \- \-
|
||||
patloop2 |chiptest| \- \-
|
||||
patnloop2 |chiptest| \- \-
|
||||
patwait2 |chiptest| \- \-
|
||||
patwaittime2 |chiptest| \- \-
|
||||
dut_clk |chiptest| \- \-
|
||||
===================== ===================================== ================== =========
|
@ -1,178 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# sls_detector_tools documentation build configuration file, created by
|
||||
# sphinx-quickstart on Wed Nov 1 10:17:29 2017.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.coverage',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.autosummary']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'sls_detector'
|
||||
copyright = '2019, Sls Detector Group'
|
||||
author = 'Erik Frojdh'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.0.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.0.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = True
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# This is required for the alabaster theme
|
||||
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
|
||||
html_sidebars = {
|
||||
'**': [
|
||||
'about.html',
|
||||
'navigation.html',
|
||||
'relations.html', # needs 'show_related': True theme option to display
|
||||
'searchbox.html',
|
||||
'donate.html',
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
# -- Options for HTMLHelp output ------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'sls_detector_doc'
|
||||
napoleon_use_ivar = True
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'sls_detector.tex', 'sls_detector Documentation',
|
||||
'Erik Frojdh', 'manual'),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'sls_detector_tools', 'sls_detector_tools Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'py_sls', 'py_sls Documentation',
|
||||
author, 'py_sls', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
C++ API
|
||||
=====================================================
|
||||
|
||||
|
||||
.. py:currentmodule:: _slsdet
|
||||
|
||||
.. autoclass:: DetectorApi
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
|
||||
|
@ -1,67 +0,0 @@
|
||||
Error handling
|
||||
=========================
|
||||
|
||||
|
||||
Check input in Python
|
||||
----------------------
|
||||
|
||||
As far as possible we try to check the input on the Python side
|
||||
before calling the slsDeteectorsSoftware. Errors should not pass
|
||||
silently but raise an exception
|
||||
|
||||
::
|
||||
|
||||
#Trimbit range for Eiger is 0-63
|
||||
detector.trimbits = 98
|
||||
(...)
|
||||
ValueError: Trimbit setting 98 is outside of range:0-63
|
||||
|
||||
Errors in slsDetectorsSoftware
|
||||
-------------------------------
|
||||
|
||||
The slsDetectorsSoftware uses a mask to record errors from the different
|
||||
detectors. If an error is found we raise a RuntimeError at the end of the
|
||||
call using the error message from slsDetectorsSoftware
|
||||
|
||||
.. todo ::
|
||||
|
||||
Implement this for all functions
|
||||
|
||||
::
|
||||
|
||||
detector.settings = 'bananas'
|
||||
(...)
|
||||
RuntimeError: Detector 0:
|
||||
Could not set settings.
|
||||
Detector 1:
|
||||
Could not set settings.
|
||||
Detector 2:
|
||||
Could not set settings.
|
||||
|
||||
|
||||
Using decorators
|
||||
-------------------
|
||||
|
||||
Using decorators we can reset the error mask before the command and then
|
||||
check it after the command
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
#add decorator to check the error mask
|
||||
@error_handling
|
||||
def some_function():
|
||||
a = 1+1
|
||||
return a
|
||||
|
||||
Communication with the detector is usually the biggest overhead so
|
||||
this does not impact performance.
|
||||
|
||||
::
|
||||
|
||||
%timeit d.exposure_time
|
||||
>> 1.52 ms ± 5.42 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
|
||||
|
||||
%timeit d.decorated_exposure_time
|
||||
>> 1.53 ms ± 3.18 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
|
||||
|
||||
|
@ -1,122 +0,0 @@
|
||||
Getting started
|
||||
================
|
||||
|
||||
|
||||
------------------------
|
||||
Setting up the detector
|
||||
------------------------
|
||||
|
||||
All configuration of the detector can either be done from the Python
|
||||
API (including loading config file) or externally. The detector setup is
|
||||
discovered from the shared memory when launching a new script. Because the
|
||||
detector usually should remain online longer than a specific script it is
|
||||
recommended to run the receivers seperate.
|
||||
|
||||
---------------------------------
|
||||
Setting and getting attributes
|
||||
---------------------------------
|
||||
|
||||
Most of the detector and software setting are implemented as attributes
|
||||
in the Detector class. When something is assigned it is also set
|
||||
in the detector and when the attribute is called using dot notation it
|
||||
it looked up from the detector.
|
||||
|
||||
::
|
||||
|
||||
#Currently Eiger and Jungfrau but Detector should work for all
|
||||
from sls_detector import Eiger()
|
||||
d = Eiger()
|
||||
|
||||
d.file_write = True
|
||||
d.vthreshold = 1500
|
||||
|
||||
d.frame_index
|
||||
>> 12
|
||||
|
||||
d.file_name
|
||||
>> 'run'
|
||||
|
||||
---------------------------------
|
||||
Working with DACs
|
||||
---------------------------------
|
||||
|
||||
The following examples assumes an Eiger500k detector. But the same syntax
|
||||
works for other detector sizes and models.
|
||||
|
||||
::
|
||||
|
||||
d.dacs
|
||||
>>
|
||||
========== DACS =========
|
||||
vsvp : 0, 0
|
||||
vtr : 4000, 4000
|
||||
vrf : 2000, 2300
|
||||
vrs : 1400, 1400
|
||||
vsvn : 4000, 4000
|
||||
vtgstv : 2556, 2556
|
||||
vcmp_ll : 1500, 1500
|
||||
vcmp_lr : 1500, 1500
|
||||
vcall : 3500, 3600
|
||||
vcmp_rl : 1500, 1500
|
||||
rxb_rb : 1100, 1100
|
||||
rxb_lb : 1100, 1100
|
||||
vcmp_rr : 1500, 1500
|
||||
vcp : 1500, 1500
|
||||
vcn : 2000, 2000
|
||||
vis : 1550, 1550
|
||||
iodelay : 660, 660
|
||||
|
||||
#Read dac values to a variable
|
||||
vrf = d.dacs.vrf[:]
|
||||
|
||||
#Set a dac in a module
|
||||
d.dacs.vrf[0] = 1500
|
||||
d.dacs.vrf[0]
|
||||
>> 1500
|
||||
|
||||
#Set vrf to the same value in all moduels
|
||||
d.dacs.vrf = 1500
|
||||
|
||||
#Set a dac using an iterable
|
||||
d.dacs.vrf = [1500, 1600]
|
||||
d.dacs.vrf
|
||||
>> vrf : 1500, 1600
|
||||
|
||||
#Set dacs iterating on index and values
|
||||
d.dacs.vrf[0,1] = 1300,1400
|
||||
|
||||
|
||||
---------------------------------
|
||||
Operating multiple detectors
|
||||
---------------------------------
|
||||
|
||||
Operating multiple detectors is supported by assigning an id when creating the object. If no id is
|
||||
set it defaults to 0.
|
||||
|
||||
::
|
||||
|
||||
d0 = Eiger() #id is now 0
|
||||
d1 = Jungfrau(1)
|
||||
|
||||
#Or explicitly
|
||||
d1 = Jungfrau(id = 0)
|
||||
|
||||
The detectors now operate independently of each other but can be synchronized using a hardware trigger.
|
||||
|
||||
::
|
||||
|
||||
from sls_detector import Eiger
|
||||
|
||||
d0 = Eiger(0)
|
||||
d1 = Eiger(1)
|
||||
|
||||
d0.load_config('/some/path/T45.config')
|
||||
d1.load_config('/some/path/T62.config')
|
||||
|
||||
d0.n_frames = 1
|
||||
d0.exposure_time = 1
|
||||
d0.timing_mode = 'trigger'
|
||||
|
||||
d1.n_frames = 5
|
||||
d1.exposure_time = 0.2
|
||||
d1.timing_mode = 'trigger'
|
@ -1,30 +0,0 @@
|
||||
sls_detector - Python interface for the slsDetectorsPackage
|
||||
==============================================================
|
||||
|
||||
sls_detector provide Python bindings to the slsDetectorsPackage using mainly the
|
||||
DetectorImpl API. This module contains two parts, a compiled C module to
|
||||
expose the API and a Python class to offer a more Pythonic interface.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Contents:
|
||||
|
||||
installation
|
||||
getting_started
|
||||
code_quality
|
||||
command_line
|
||||
examples
|
||||
error-handling
|
||||
|
||||
sls_detector
|
||||
cpp_api
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
@ -1,90 +0,0 @@
|
||||
Installation
|
||||
=========================
|
||||
|
||||
The easiest way to install the Python API and the slsDetectorPackage is using conda. But other
|
||||
methods are also available.
|
||||
|
||||
---------------------
|
||||
Install using conda
|
||||
---------------------
|
||||
If you don't have it installed get the latest version of `Miniconda`_
|
||||
|
||||
.. _Miniconda: https://conda.io/miniconda.html
|
||||
|
||||
::
|
||||
|
||||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||
sh Miniconda3-latest-Linux-x86_64.sh
|
||||
|
||||
|
||||
Install sls_detector and sls_detector_lib using:
|
||||
|
||||
::
|
||||
|
||||
#Add conda channels
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
|
||||
#Install latest version
|
||||
conda install sls_detector
|
||||
|
||||
#Install specific version
|
||||
conda install sls_detector=3.0.1
|
||||
|
||||
------------------------------
|
||||
Local build using conda-build
|
||||
------------------------------
|
||||
|
||||
Needs the `sls_detector_lib`_ installed in order to automatically find headers
|
||||
and shared libraries. Make sure that the branch of sls_detector matches the lib
|
||||
version installed.
|
||||
|
||||
.. _sls_detector_lib: https://github.com/slsdetectorgroup/sls_detector_lib
|
||||
|
||||
::
|
||||
|
||||
#Clone source code
|
||||
git clone https://github.com/slsdetectorgroup/sls_detector.git
|
||||
|
||||
#Checkout the branch needed
|
||||
git checkout 3.0.1
|
||||
|
||||
#Build and install the local version
|
||||
conda-build sls_detector
|
||||
conda install --use-local sls_detector
|
||||
|
||||
|
||||
-----------------------
|
||||
Developer build
|
||||
-----------------------
|
||||
|
||||
IF you if you are developing and are making constant changes to the code it's a bit cumbersome
|
||||
to build with conda and install. Then an easier way is to build the C/C++ parts in the package
|
||||
directory and temporary add this to the path
|
||||
|
||||
::
|
||||
|
||||
#in path/to/sls_detector
|
||||
python setup.py build_ext --inplace
|
||||
|
||||
Then in your Python script
|
||||
|
||||
::
|
||||
|
||||
import sys
|
||||
sys.path.append('/path/to/sls_detector')
|
||||
from sls_detector import Detector
|
||||
|
||||
|
||||
|
||||
--------------
|
||||
Prerequisites
|
||||
--------------
|
||||
|
||||
All dependencies are manged trough conda but for a stand alone build you would need
|
||||
|
||||
* gcc 4.8+
|
||||
* Qwt 6
|
||||
* Qt 4.8
|
||||
* numpy
|
||||
* slsDetectorPackage
|
@ -1,6 +0,0 @@
|
||||
make clean
|
||||
make html
|
||||
rm -rf ../docs/
|
||||
mv _build/html/ ../docs/
|
||||
touch ../docs/.nojekyll
|
||||
rm -rf _build
|
@ -1,8 +0,0 @@
|
||||
sls_detector
|
||||
==================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
sls_detector
|
||||
|
@ -1,33 +0,0 @@
|
||||
Python classes
|
||||
=====================================================
|
||||
|
||||
|
||||
.. py:currentmodule:: sls_detector
|
||||
|
||||
Detector
|
||||
----------
|
||||
|
||||
.. autoclass:: Detector
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
|
||||
Eiger
|
||||
-------
|
||||
|
||||
.. autoclass:: Eiger
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
|
||||
Jungfrau
|
||||
----------
|
||||
|
||||
.. autoclass:: Jungfrau
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
File diff suppressed because it is too large
Load Diff
@ -8,12 +8,17 @@
|
||||
#include "network_utils.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "typecaster.h"
|
||||
|
||||
#include "TimeHelper.h"
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
namespace py = pybind11;
|
||||
void init_det(py::module &m) {
|
||||
using sls::Detector;
|
||||
using sls::Positions;
|
||||
using sls::Result;
|
||||
using sls::defs;
|
||||
using sls::ns;
|
||||
|
||||
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
||||
CppDetectorApi
|
||||
|
@ -17,8 +17,6 @@ void init_enums(py::module &m) {
|
||||
xy.def_readwrite("y", &slsDetectorDefs::xy::y);
|
||||
|
||||
py::enum_<slsDetectorDefs::detectorType>(Defs, "detectorType")
|
||||
.value("GET_DETECTOR_TYPE",
|
||||
slsDetectorDefs::detectorType::GET_DETECTOR_TYPE)
|
||||
.value("GENERIC", slsDetectorDefs::detectorType::GENERIC)
|
||||
.value("EIGER", slsDetectorDefs::detectorType::EIGER)
|
||||
.value("GOTTHARD", slsDetectorDefs::detectorType::GOTTHARD)
|
||||
@ -40,8 +38,6 @@ void init_enums(py::module &m) {
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::frameDiscardPolicy>(Defs, "frameDiscardPolicy")
|
||||
.value("GET_FRAME_DISCARD_POLICY",
|
||||
slsDetectorDefs::frameDiscardPolicy::GET_FRAME_DISCARD_POLICY)
|
||||
.value("NO_DISCARD", slsDetectorDefs::frameDiscardPolicy::NO_DISCARD)
|
||||
.value("DISCARD_EMPTY_FRAMES",
|
||||
slsDetectorDefs::frameDiscardPolicy::DISCARD_EMPTY_FRAMES)
|
||||
@ -52,7 +48,6 @@ void init_enums(py::module &m) {
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::fileFormat>(Defs, "fileFormat")
|
||||
.value("GET_FILE_FORMAT", slsDetectorDefs::fileFormat::GET_FILE_FORMAT)
|
||||
.value("BINARY", slsDetectorDefs::fileFormat::BINARY)
|
||||
.value("HDF5", slsDetectorDefs::fileFormat::HDF5)
|
||||
.value("NUM_FILE_FORMATS",
|
||||
@ -65,59 +60,64 @@ void init_enums(py::module &m) {
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::externalSignalFlag>(Defs, "externalSignalFlag")
|
||||
.value("GET_EXTERNAL_SIGNAL_FLAG",
|
||||
slsDetectorDefs::externalSignalFlag::GET_EXTERNAL_SIGNAL_FLAG)
|
||||
.value("SIGNAL_OFF", slsDetectorDefs::externalSignalFlag::SIGNAL_OFF)
|
||||
.value("GATE_IN_ACTIVE_HIGH",
|
||||
slsDetectorDefs::externalSignalFlag::GATE_IN_ACTIVE_HIGH)
|
||||
.value("GATE_IN_ACTIVE_LOW",
|
||||
slsDetectorDefs::externalSignalFlag::GATE_IN_ACTIVE_LOW)
|
||||
.value("TRIGGER_IN_RISING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::TRIGGER_IN_RISING_EDGE)
|
||||
.value("TRIGGER_IN_FALLING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::TRIGGER_IN_FALLING_EDGE)
|
||||
.value("RO_TRIGGER_IN_RISING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::RO_TRIGGER_IN_RISING_EDGE)
|
||||
.value("RO_TRIGGER_IN_FALLING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::RO_TRIGGER_IN_FALLING_EDGE)
|
||||
.value("GATE_OUT_ACTIVE_HIGH",
|
||||
slsDetectorDefs::externalSignalFlag::GATE_OUT_ACTIVE_HIGH)
|
||||
.value("GATE_OUT_ACTIVE_LOW",
|
||||
slsDetectorDefs::externalSignalFlag::GATE_OUT_ACTIVE_LOW)
|
||||
.value("TRIGGER_OUT_RISING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::TRIGGER_OUT_RISING_EDGE)
|
||||
.value("TRIGGER_OUT_FALLING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::TRIGGER_OUT_FALLING_EDGE)
|
||||
.value("RO_TRIGGER_OUT_RISING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::RO_TRIGGER_OUT_RISING_EDGE)
|
||||
.value("RO_TRIGGER_OUT_FALLING_EDGE",
|
||||
slsDetectorDefs::externalSignalFlag::RO_TRIGGER_OUT_FALLING_EDGE)
|
||||
.value("OUTPUT_LOW", slsDetectorDefs::externalSignalFlag::OUTPUT_LOW)
|
||||
.value("OUTPUT_HIGH", slsDetectorDefs::externalSignalFlag::OUTPUT_HIGH)
|
||||
.value(
|
||||
"MASTER_SLAVE_SYNCHRONIZATION",
|
||||
slsDetectorDefs::externalSignalFlag::MASTER_SLAVE_SYNCHRONIZATION)
|
||||
.value("INVERSION_ON",
|
||||
slsDetectorDefs::externalSignalFlag::INVERSION_ON)
|
||||
.value("INVERSION_OFF",
|
||||
slsDetectorDefs::externalSignalFlag::INVERSION_OFF)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::timingMode>(Defs, "timingMode")
|
||||
.value("GET_TIMING_MODE", slsDetectorDefs::timingMode::GET_TIMING_MODE)
|
||||
.value("AUTO_TIMING", slsDetectorDefs::timingMode::AUTO_TIMING)
|
||||
.value("TRIGGER_EXPOSURE",
|
||||
slsDetectorDefs::timingMode::TRIGGER_EXPOSURE)
|
||||
.value("GATED", slsDetectorDefs::timingMode::GATED)
|
||||
.value("BURST_TRIGGER", slsDetectorDefs::timingMode::BURST_TRIGGER)
|
||||
.value("TRIGGER_GATED", slsDetectorDefs::timingMode::TRIGGER_GATED)
|
||||
.value("NUM_TIMING_MODES",
|
||||
slsDetectorDefs::timingMode::NUM_TIMING_MODES)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::dacIndex>(Defs, "dacIndex")
|
||||
.value("THRESHOLD", slsDetectorDefs::dacIndex::THRESHOLD)
|
||||
.value("CALIBRATION_PULSE",
|
||||
slsDetectorDefs::dacIndex::CALIBRATION_PULSE)
|
||||
.value("TRIMBIT_SIZE", slsDetectorDefs::dacIndex::TRIMBIT_SIZE)
|
||||
.value("PREAMP", slsDetectorDefs::dacIndex::PREAMP)
|
||||
.value("SHAPER1", slsDetectorDefs::dacIndex::SHAPER1)
|
||||
.value("SHAPER2", slsDetectorDefs::dacIndex::SHAPER2)
|
||||
.value("TEMPERATURE_ADC", slsDetectorDefs::dacIndex::TEMPERATURE_ADC)
|
||||
.value("TEMPERATURE_FPGA", slsDetectorDefs::dacIndex::TEMPERATURE_FPGA)
|
||||
.value("DAC_0", slsDetectorDefs::dacIndex::DAC_0)
|
||||
.value("DAC_1", slsDetectorDefs::dacIndex::DAC_1)
|
||||
.value("DAC_2", slsDetectorDefs::dacIndex::DAC_2)
|
||||
.value("DAC_3", slsDetectorDefs::dacIndex::DAC_3)
|
||||
.value("DAC_4", slsDetectorDefs::dacIndex::DAC_4)
|
||||
.value("DAC_5", slsDetectorDefs::dacIndex::DAC_5)
|
||||
.value("DAC_6", slsDetectorDefs::dacIndex::DAC_6)
|
||||
.value("DAC_7", slsDetectorDefs::dacIndex::DAC_7)
|
||||
.value("DAC_8", slsDetectorDefs::dacIndex::DAC_8)
|
||||
.value("DAC_9", slsDetectorDefs::dacIndex::DAC_9)
|
||||
.value("DAC_10", slsDetectorDefs::dacIndex::DAC_10)
|
||||
.value("DAC_11", slsDetectorDefs::dacIndex::DAC_11)
|
||||
.value("DAC_12", slsDetectorDefs::dacIndex::DAC_12)
|
||||
.value("DAC_13", slsDetectorDefs::dacIndex::DAC_13)
|
||||
.value("DAC_14", slsDetectorDefs::dacIndex::DAC_14)
|
||||
.value("DAC_15", slsDetectorDefs::dacIndex::DAC_15)
|
||||
.value("DAC_16", slsDetectorDefs::dacIndex::DAC_16)
|
||||
.value("DAC_17", slsDetectorDefs::dacIndex::DAC_17)
|
||||
.value("VSVP", slsDetectorDefs::dacIndex::VSVP)
|
||||
.value("VTRIM", slsDetectorDefs::dacIndex::VTRIM)
|
||||
.value("VRPREAMP", slsDetectorDefs::dacIndex::VRPREAMP)
|
||||
.value("VRSHAPER", slsDetectorDefs::dacIndex::VRSHAPER)
|
||||
.value("VSVN", slsDetectorDefs::dacIndex::VSVN)
|
||||
.value("VTGSTV", slsDetectorDefs::dacIndex::VTGSTV)
|
||||
.value("VCMP_LL", slsDetectorDefs::dacIndex::VCMP_LL)
|
||||
.value("VCMP_LR", slsDetectorDefs::dacIndex::VCMP_LR)
|
||||
.value("VCAL", slsDetectorDefs::dacIndex::VCAL)
|
||||
.value("VCMP_RL", slsDetectorDefs::dacIndex::VCMP_RL)
|
||||
.value("RXB_RB", slsDetectorDefs::dacIndex::RXB_RB)
|
||||
.value("RXB_LB", slsDetectorDefs::dacIndex::RXB_LB)
|
||||
.value("VCMP_RR", slsDetectorDefs::dacIndex::VCMP_RR)
|
||||
.value("VCP", slsDetectorDefs::dacIndex::VCP)
|
||||
.value("VCN", slsDetectorDefs::dacIndex::VCN)
|
||||
.value("VISHAPER", slsDetectorDefs::dacIndex::VISHAPER)
|
||||
.value("VTHRESHOLD", slsDetectorDefs::dacIndex::VTHRESHOLD)
|
||||
.value("IO_DELAY", slsDetectorDefs::dacIndex::IO_DELAY)
|
||||
.value("VREF_DS", slsDetectorDefs::dacIndex::VREF_DS)
|
||||
.value("VCASCN_PB", slsDetectorDefs::dacIndex::VCASCN_PB)
|
||||
.value("VCASCP_PB", slsDetectorDefs::dacIndex::VCASCP_PB)
|
||||
@ -126,25 +126,46 @@ void init_enums(py::module &m) {
|
||||
.value("VIN_CM", slsDetectorDefs::dacIndex::VIN_CM)
|
||||
.value("VREF_COMP", slsDetectorDefs::dacIndex::VREF_COMP)
|
||||
.value("IB_TESTC", slsDetectorDefs::dacIndex::IB_TESTC)
|
||||
.value("SVP", slsDetectorDefs::dacIndex::SVP)
|
||||
.value("SVN", slsDetectorDefs::dacIndex::SVN)
|
||||
.value("VTR", slsDetectorDefs::dacIndex::VTR)
|
||||
.value("VRF", slsDetectorDefs::dacIndex::VRF)
|
||||
.value("VRS", slsDetectorDefs::dacIndex::VRS)
|
||||
.value("VTGSTV", slsDetectorDefs::dacIndex::VTGSTV)
|
||||
.value("VCMP_LL", slsDetectorDefs::dacIndex::VCMP_LL)
|
||||
.value("VCMP_LR", slsDetectorDefs::dacIndex::VCMP_LR)
|
||||
.value("CAL", slsDetectorDefs::dacIndex::CAL)
|
||||
.value("VCMP_RL", slsDetectorDefs::dacIndex::VCMP_RL)
|
||||
.value("VCMP_RR", slsDetectorDefs::dacIndex::VCMP_RR)
|
||||
.value("RXB_RB", slsDetectorDefs::dacIndex::RXB_RB)
|
||||
.value("RXB_LB", slsDetectorDefs::dacIndex::RXB_LB)
|
||||
.value("VCP", slsDetectorDefs::dacIndex::VCP)
|
||||
.value("VCN", slsDetectorDefs::dacIndex::VCN)
|
||||
.value("VIS", slsDetectorDefs::dacIndex::VIS)
|
||||
.value("IO_DELAY", slsDetectorDefs::dacIndex::IO_DELAY)
|
||||
.value("VB_COMP", slsDetectorDefs::dacIndex::VB_COMP)
|
||||
.value("VDD_PROT", slsDetectorDefs::dacIndex::VDD_PROT)
|
||||
.value("VIN_COM", slsDetectorDefs::dacIndex::VIN_COM)
|
||||
.value("VREF_PRECH", slsDetectorDefs::dacIndex::VREF_PRECH)
|
||||
.value("VB_PIXBUF", slsDetectorDefs::dacIndex::VB_PIXBUF)
|
||||
.value("VB_DS", slsDetectorDefs::dacIndex::VB_DS)
|
||||
.value("VREF_H_ADC", slsDetectorDefs::dacIndex::VREF_H_ADC)
|
||||
.value("VB_COMP_FE", slsDetectorDefs::dacIndex::VB_COMP_FE)
|
||||
.value("VB_COMP_ADC", slsDetectorDefs::dacIndex::VB_COMP_ADC)
|
||||
.value("VCOM_CDS", slsDetectorDefs::dacIndex::VCOM_CDS)
|
||||
.value("VREF_RSTORE", slsDetectorDefs::dacIndex::VREF_RSTORE)
|
||||
.value("VB_OPA_1ST", slsDetectorDefs::dacIndex::VB_OPA_1ST)
|
||||
.value("VREF_COMP_FE", slsDetectorDefs::dacIndex::VREF_COMP_FE)
|
||||
.value("VCOM_ADC1", slsDetectorDefs::dacIndex::VCOM_ADC1)
|
||||
.value("VREF_L_ADC", slsDetectorDefs::dacIndex::VREF_L_ADC)
|
||||
.value("VREF_CDS", slsDetectorDefs::dacIndex::VREF_CDS)
|
||||
.value("VB_CS", slsDetectorDefs::dacIndex::VB_CS)
|
||||
.value("VB_OPA_FD", slsDetectorDefs::dacIndex::VB_OPA_FD)
|
||||
.value("VCOM_ADC2", slsDetectorDefs::dacIndex::VCOM_ADC2)
|
||||
.value("VCASSH", slsDetectorDefs::dacIndex::VCASSH)
|
||||
.value("VTH2", slsDetectorDefs::dacIndex::VTH2)
|
||||
.value("VRSHAPER_N", slsDetectorDefs::dacIndex::VRSHAPER_N)
|
||||
.value("VIPRE_OUT", slsDetectorDefs::dacIndex::VIPRE_OUT)
|
||||
.value("VTH3", slsDetectorDefs::dacIndex::VTH3)
|
||||
.value("VTH1", slsDetectorDefs::dacIndex::VTH1)
|
||||
.value("VICIN", slsDetectorDefs::dacIndex::VICIN)
|
||||
.value("VCAS", slsDetectorDefs::dacIndex::VCAS)
|
||||
.value("VCAL_N", slsDetectorDefs::dacIndex::VCAL_N)
|
||||
.value("VIPRE", slsDetectorDefs::dacIndex::VIPRE)
|
||||
.value("VCAL_P", slsDetectorDefs::dacIndex::VCAL_P)
|
||||
.value("VDCSH", slsDetectorDefs::dacIndex::VDCSH)
|
||||
.value("VBP_COLBUF", slsDetectorDefs::dacIndex::VBP_COLBUF)
|
||||
.value("VB_SDA", slsDetectorDefs::dacIndex::VB_SDA)
|
||||
.value("VCASC_SFP", slsDetectorDefs::dacIndex::VCASC_SFP)
|
||||
.value("VIPRE_CDS", slsDetectorDefs::dacIndex::VIPRE_CDS)
|
||||
.value("IBIAS_SFP", slsDetectorDefs::dacIndex::IBIAS_SFP)
|
||||
.value("ADC_VPP", slsDetectorDefs::dacIndex::ADC_VPP)
|
||||
.value("HIGH_VOLTAGE", slsDetectorDefs::dacIndex::HIGH_VOLTAGE)
|
||||
.value("TEMPERATURE_ADC", slsDetectorDefs::dacIndex::TEMPERATURE_ADC)
|
||||
.value("TEMPERATURE_FPGA", slsDetectorDefs::dacIndex::TEMPERATURE_FPGA)
|
||||
.value("TEMPERATURE_FPGAEXT",
|
||||
slsDetectorDefs::dacIndex::TEMPERATURE_FPGAEXT)
|
||||
.value("TEMPERATURE_10GE", slsDetectorDefs::dacIndex::TEMPERATURE_10GE)
|
||||
@ -155,40 +176,7 @@ void init_enums(py::module &m) {
|
||||
slsDetectorDefs::dacIndex::TEMPERATURE_FPGA2)
|
||||
.value("TEMPERATURE_FPGA3",
|
||||
slsDetectorDefs::dacIndex::TEMPERATURE_FPGA3)
|
||||
.value("VIPRE", slsDetectorDefs::dacIndex::VIPRE)
|
||||
.value("VIINSH", slsDetectorDefs::dacIndex::VIINSH)
|
||||
.value("VDCSH", slsDetectorDefs::dacIndex::VDCSH)
|
||||
.value("VTH2", slsDetectorDefs::dacIndex::VTH2)
|
||||
.value("VPL", slsDetectorDefs::dacIndex::VPL)
|
||||
.value("VTH3", slsDetectorDefs::dacIndex::VTH3)
|
||||
.value("CASSH", slsDetectorDefs::dacIndex::CASSH)
|
||||
.value("CAS", slsDetectorDefs::dacIndex::CAS)
|
||||
.value("VICIN", slsDetectorDefs::dacIndex::VICIN)
|
||||
.value("VIPRE_OUT", slsDetectorDefs::dacIndex::VIPRE_OUT)
|
||||
.value("VREF_H_ADC", slsDetectorDefs::dacIndex::VREF_H_ADC)
|
||||
.value("VB_COMP_FE", slsDetectorDefs::dacIndex::VB_COMP_FE)
|
||||
.value("VB_COMP_ADC", slsDetectorDefs::dacIndex::VB_COMP_ADC)
|
||||
.value("VCOM_CDS", slsDetectorDefs::dacIndex::VCOM_CDS)
|
||||
.value("VREF_RSTORE", slsDetectorDefs::dacIndex::VREF_RSTORE)
|
||||
.value("VB_OPA_1ST", slsDetectorDefs::dacIndex::VB_OPA_1ST)
|
||||
.value("VREF_COMP_FE", slsDetectorDefs::dacIndex::VREF_COMP_FE)
|
||||
.value("VCOM_ADC1", slsDetectorDefs::dacIndex::VCOM_ADC1)
|
||||
.value("VREF_PRECH", slsDetectorDefs::dacIndex::VREF_PRECH)
|
||||
.value("VREF_L_ADC", slsDetectorDefs::dacIndex::VREF_L_ADC)
|
||||
.value("VREF_CDS", slsDetectorDefs::dacIndex::VREF_CDS)
|
||||
.value("VB_CS", slsDetectorDefs::dacIndex::VB_CS)
|
||||
.value("VB_OPA_FD", slsDetectorDefs::dacIndex::VB_OPA_FD)
|
||||
.value("VCOM_ADC2", slsDetectorDefs::dacIndex::VCOM_ADC2)
|
||||
.value("VB_DS", slsDetectorDefs::dacIndex::VB_DS)
|
||||
.value("VB_COMP", slsDetectorDefs::dacIndex::VB_COMP)
|
||||
.value("VB_PIXBUF", slsDetectorDefs::dacIndex::VB_PIXBUF)
|
||||
.value("VIN_COM", slsDetectorDefs::dacIndex::VIN_COM)
|
||||
.value("VDD_PROT", slsDetectorDefs::dacIndex::VDD_PROT)
|
||||
.value("VBP_COLBUF", slsDetectorDefs::dacIndex::VBP_COLBUF)
|
||||
.value("VB_SDA", slsDetectorDefs::dacIndex::VB_SDA)
|
||||
.value("VCASC_SFP", slsDetectorDefs::dacIndex::VCASC_SFP)
|
||||
.value("VIPRE_CDS", slsDetectorDefs::dacIndex::VIPRE_CDS)
|
||||
.value("IBIAS_SFP", slsDetectorDefs::dacIndex::IBIAS_SFP)
|
||||
.value("TRIMBIT_SCAN", slsDetectorDefs::dacIndex::TRIMBIT_SCAN)
|
||||
.value("V_POWER_A", slsDetectorDefs::dacIndex::V_POWER_A)
|
||||
.value("V_POWER_B", slsDetectorDefs::dacIndex::V_POWER_B)
|
||||
.value("V_POWER_C", slsDetectorDefs::dacIndex::V_POWER_C)
|
||||
@ -213,7 +201,6 @@ void init_enums(py::module &m) {
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::detectorSettings>(Defs, "detectorSettings")
|
||||
.value("GET_SETTINGS", slsDetectorDefs::detectorSettings::GET_SETTINGS)
|
||||
.value("STANDARD", slsDetectorDefs::detectorSettings::STANDARD)
|
||||
.value("FAST", slsDetectorDefs::detectorSettings::FAST)
|
||||
.value("HIGHGAIN", slsDetectorDefs::detectorSettings::HIGHGAIN)
|
||||
@ -266,21 +253,13 @@ void init_enums(py::module &m) {
|
||||
.value("QUARTER_SPEED", slsDetectorDefs::speedLevel::QUARTER_SPEED)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::portType>(Defs, "portType")
|
||||
.value("CONTROL_PORT", slsDetectorDefs::portType::CONTROL_PORT)
|
||||
.value("STOP_PORT", slsDetectorDefs::portType::STOP_PORT)
|
||||
.value("DATA_PORT", slsDetectorDefs::portType::DATA_PORT)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::masterFlags>(Defs, "masterFlags")
|
||||
.value("GET_MASTER", slsDetectorDefs::masterFlags::GET_MASTER)
|
||||
.value("NO_MASTER", slsDetectorDefs::masterFlags::NO_MASTER)
|
||||
.value("IS_MASTER", slsDetectorDefs::masterFlags::IS_MASTER)
|
||||
.value("IS_SLAVE", slsDetectorDefs::masterFlags::IS_SLAVE)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::frameModeType>(Defs, "frameModeType")
|
||||
.value("GET_FRAME_MODE", slsDetectorDefs::frameModeType::GET_FRAME_MODE)
|
||||
.value("PEDESTAL", slsDetectorDefs::frameModeType::PEDESTAL)
|
||||
.value("NEW_PEDESTAL", slsDetectorDefs::frameModeType::NEW_PEDESTAL)
|
||||
.value("FLATFIELD", slsDetectorDefs::frameModeType::FLATFIELD)
|
||||
@ -288,8 +267,6 @@ void init_enums(py::module &m) {
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::detectorModeType>(Defs, "detectorModeType")
|
||||
.value("GET_DETECTOR_MODE",
|
||||
slsDetectorDefs::detectorModeType::GET_DETECTOR_MODE)
|
||||
.value("COUNTING", slsDetectorDefs::detectorModeType::COUNTING)
|
||||
.value("INTERPOLATING",
|
||||
slsDetectorDefs::detectorModeType::INTERPOLATING)
|
||||
@ -300,6 +277,7 @@ void init_enums(py::module &m) {
|
||||
.value("BURST_OFF", slsDetectorDefs::burstMode::BURST_OFF)
|
||||
.value("BURST_INTERNAL", slsDetectorDefs::burstMode::BURST_INTERNAL)
|
||||
.value("BURST_EXTERNAL", slsDetectorDefs::burstMode::BURST_EXTERNAL)
|
||||
.value("NUM_BURST_MODES", slsDetectorDefs::burstMode::NUM_BURST_MODES)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::timingSourceType>(Defs, "timingSourceType")
|
||||
|
@ -164,18 +164,18 @@ def test_cannot_set_fw_version(d):
|
||||
def test_get_high_voltage_call_signature(d, mocker):
|
||||
m = mocker.patch('_slsdet.DetectorApi.getDac')
|
||||
d.high_voltage
|
||||
m.assert_called_once_with('vhighvoltage', -1)
|
||||
m.assert_called_once_with('highvoltage', -1)
|
||||
|
||||
def test_get_high_voltage(d, mocker):
|
||||
m = mocker.patch('_slsdet.DetectorApi.getDac')
|
||||
m.return_value = 80
|
||||
assert d.high_voltage == 80
|
||||
|
||||
#self._api.setDac('vhighvoltage', -1, voltage)
|
||||
#self._api.setDac('highvoltage', -1, voltage)
|
||||
def test_set_high_voltage(d, mocker):
|
||||
m = mocker.patch('_slsdet.DetectorApi.setDac')
|
||||
d.high_voltage = 80
|
||||
m.assert_called_once_with('vhighvoltage', -1, 80)
|
||||
m.assert_called_once_with('highvoltage', -1, 80)
|
||||
|
||||
def test_decode_hostname_two_names(d, mocker):
|
||||
m = mocker.patch('_slsdet.DetectorApi.getHostname')
|
||||
|
@ -170,18 +170,18 @@ def test_set_counters_single(d, mocker):
|
||||
# def test_get_high_voltage_call_signature(d, mocker):
|
||||
# m = mocker.patch('_slsdet.DetectorApi.getDac')
|
||||
# d.high_voltage
|
||||
# m.assert_called_once_with('vhighvoltage', -1)
|
||||
# m.assert_called_once_with('highvoltage', -1)
|
||||
|
||||
# def test_get_high_voltage(d, mocker):
|
||||
# m = mocker.patch('_slsdet.DetectorApi.getDac')
|
||||
# m.return_value = 80
|
||||
# assert d.high_voltage == 80
|
||||
|
||||
# #self._api.setDac('vhighvoltage', -1, voltage)
|
||||
# #self._api.setDac('highvoltage', -1, voltage)
|
||||
# def test_set_high_voltage(d, mocker):
|
||||
# m = mocker.patch('_slsdet.DetectorApi.setDac')
|
||||
# d.high_voltage = 80
|
||||
# m.assert_called_once_with('vhighvoltage', -1, 80)
|
||||
# m.assert_called_once_with('highvoltage', -1, 80)
|
||||
|
||||
# def test_decode_hostname_two_names(d, mocker):
|
||||
# m = mocker.patch('_slsdet.DetectorApi.getHostname')
|
||||
|
@ -5,7 +5,28 @@ Testing functions from utils.py
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from sls_detector.utils import *
|
||||
from slsdet.utils import *
|
||||
import datetime as dt
|
||||
|
||||
def test_iterable():
|
||||
assert is_iterable(5) == False
|
||||
assert is_iterable('abc') == True
|
||||
assert is_iterable([]) == True
|
||||
assert is_iterable(5.9) == False
|
||||
|
||||
def test_reduce_time_to_single_value_from_list():
|
||||
t = 3*[dt.timedelta(seconds = 1)]
|
||||
assert reduce_time(t) == 1
|
||||
|
||||
def test_reduce_time_to_single_value_from_list_of_lists():
|
||||
t = 3*[dt.timedelta(seconds = 3.3)]
|
||||
tt = 5*t
|
||||
assert reduce_time(tt) == 3.3
|
||||
|
||||
def test_reduce_time_when_sublist_is_different():
|
||||
t = [dt.timedelta(seconds = 1), dt.timedelta(seconds = 2), dt.timedelta(seconds = 1)]
|
||||
tt = [t for i in range(4)]
|
||||
assert reduce_time(tt) == [1,2,1]
|
||||
|
||||
|
||||
def test_convert_zero():
|
||||
@ -59,4 +80,17 @@ def test_list_to_mask():
|
||||
assert(list_to_bitmask([0]) == 1)
|
||||
assert(list_to_bitmask([1]) == 2)
|
||||
assert(list_to_bitmask([3]) == 8)
|
||||
assert(list_to_bitmask([1,1,1]) == 2)
|
||||
assert(list_to_bitmask([1,1,1]) == 2)
|
||||
|
||||
|
||||
def test_make_timedelta_from_double():
|
||||
t = 1.7
|
||||
r = make_timedelta(t)
|
||||
assert t == r.total_seconds()
|
||||
assert r == dt.timedelta(seconds=t)
|
||||
|
||||
def test_make_timedelta_from_timedelta():
|
||||
t = dt.timedelta(minutes=1)
|
||||
r = make_timedelta(t)
|
||||
assert 60 == r.total_seconds()
|
||||
assert r == dt.timedelta(minutes=1)
|
BIN
settingsdir/eiger/standard/4500eV/noise.sn000
Executable file
BIN
settingsdir/eiger/standard/4500eV/noise.sn000
Executable file
Binary file not shown.
@ -156,7 +156,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||
if (dSamples>isample) {
|
||||
ptr=data+32*(isample+1)+8*isample;
|
||||
sample=*((uint64_t*)ptr);
|
||||
cout << isc << " " << ibit[isc] << " " << isample << hex << sample << dec << endl;
|
||||
// cout << isc << " " << ibit[isc] << " " << isample << hex << sample << dec << endl;
|
||||
if (sample & (1<<ibit[isc]))
|
||||
return 1;
|
||||
else
|
||||
|
@ -120,7 +120,7 @@ class moench04CtbZmqData : public slsDetectorData<uint16_t> {
|
||||
if (dSamples>isample) {
|
||||
ptr=data+aoff+8*isample;
|
||||
sample=*((uint64_t*)ptr);
|
||||
cout << isc << " " << ibit[isc] << " " << isample << hex << sample << dec << endl;
|
||||
// cout << isc << " " << ibit[isc] << " " << isample << hex << sample << dec << endl;
|
||||
if (sample & (1<<ibit[isc]))
|
||||
return 1;
|
||||
else
|
||||
|
@ -10,5 +10,5 @@ sls_detector_put exptime 0.000005
|
||||
sls_detector_put period 0.01
|
||||
|
||||
|
||||
sls_detector_put vhighvoltage 90
|
||||
sls_detector_put highvoltage 90
|
||||
|
||||
|
39
slsDetectorCalibration/moenchExecutables/CMakeLists.txt
Normal file
39
slsDetectorCalibration/moenchExecutables/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
|
||||
#Moench ZMQ
|
||||
add_executable(moenchZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp)
|
||||
add_compile_definitions(moenchZmqProcess NEWZMQ INTERP)
|
||||
|
||||
#Moench04 ZMQ
|
||||
add_executable(moench04ZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp)
|
||||
add_compile_definitions(moenchZmqProcess NEWZMQ INTERP MOENCH04)
|
||||
|
||||
|
||||
#Both executables should have the same includes and output dirs
|
||||
set(MOENCH_EXECUTABLES "moenchZmqProcess" "moench04ZmqProcess")
|
||||
|
||||
foreach(exe ${MOENCH_EXECUTABLES})
|
||||
#TODO! At a later stage clean up include dirs and have a proper lib
|
||||
target_include_directories(${exe} PRIVATE
|
||||
../
|
||||
../dataStructures
|
||||
../interpolations
|
||||
../../slsReceiverSoftware/include/
|
||||
)
|
||||
|
||||
target_link_libraries(${exe}
|
||||
PUBLIC
|
||||
slsSupportLib
|
||||
${ZeroMQ_LIBRARIES}
|
||||
pthread
|
||||
tiff
|
||||
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
)
|
||||
|
||||
|
||||
set_target_properties(${exe} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
endforeach(exe ${MOENCH_EXECUTABLES})
|
@ -5,12 +5,15 @@ LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3
|
||||
|
||||
#DESTDIR?=../bin
|
||||
|
||||
all: moenchZmqProcess
|
||||
all: moenchZmqProcess moenchZmq04Process
|
||||
#moenchZmqProcessCtbGui
|
||||
|
||||
moenchZmqProcess: moenchZmqProcess.cpp clean
|
||||
g++ -o moenchZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
|
||||
|
||||
moenchZmq04Process: moenchZmqProcess.cpp clean
|
||||
g++ -o moench04ZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DMOENCH04
|
||||
|
||||
#moenchZmqProcessCtbGui: moenchZmqProcess.cpp clean
|
||||
# g++ -o moenchZmqProcessCtbGui moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DCTBGUI
|
||||
|
||||
|
@ -8,7 +8,13 @@
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ZmqSocket.h"
|
||||
#ifndef RECT
|
||||
#ifndef MOENCH04
|
||||
#include "moench03T1ZmqDataNew.h"
|
||||
#endif
|
||||
#ifdef MOENCH04
|
||||
#include "moench04CtbZmq10GbData.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifdef RECT
|
||||
#include "moench03T1ZmqDataNewRect.h"
|
||||
@ -73,6 +79,10 @@ int main(int argc, char *argv[]) {
|
||||
char* socketip2 = 0;
|
||||
uint32_t portnum2 = 0;
|
||||
|
||||
zmqHeader zHeader, outHeader;
|
||||
zHeader.jsonversion = SLS_DETECTOR_JSON_HEADER_VERSION;
|
||||
outHeader.jsonversion = SLS_DETECTOR_JSON_HEADER_VERSION;
|
||||
|
||||
uint32_t nSigma=5;
|
||||
|
||||
int ok;
|
||||
@ -124,7 +134,12 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
//slsDetectorData *det=new moench03T1ZmqDataNew();
|
||||
#ifndef MOENCH04
|
||||
moench03T1ZmqDataNew *det=new moench03T1ZmqDataNew();
|
||||
#endif
|
||||
#ifdef MOENCH04
|
||||
moench04CtbZmq10GbData *det=new moench04CtbZmq10GbData();
|
||||
#endif
|
||||
cout << endl << " det" <<endl;
|
||||
int npx, npy;
|
||||
det->getDetectorSize(npx, npy);
|
||||
@ -140,13 +155,15 @@ int main(int argc, char *argv[]) {
|
||||
char dummybuff[size];
|
||||
|
||||
|
||||
int ncol_cm=CM_ROWS;
|
||||
double xt_ghost=C_GHOST;
|
||||
moench03CommonMode *cm=NULL;
|
||||
moench03GhostSummation *gs=NULL;
|
||||
#ifdef CORR
|
||||
cm=new moench03CommonMode(ncol_cm);
|
||||
gs=new moench03GhostSummation(det, xt_ghost);
|
||||
|
||||
//int ncol_cm=CM_ROWS;
|
||||
//double xt_ghost=C_GHOST;
|
||||
|
||||
cm=new moench03CommonMode(CM_ROWS);
|
||||
gs=new moench03GhostSummation(det, C_GHOST);
|
||||
#endif
|
||||
double *gainmap=NULL;
|
||||
float *gm;
|
||||
@ -228,7 +245,7 @@ int main(int argc, char *argv[]) {
|
||||
delete zmqsocket;
|
||||
return EXIT_FAILURE;
|
||||
} else
|
||||
printf("Zmq Client at %s\n", zmqsocket->GetZmqServerAddress());
|
||||
printf("Zmq Client at %s\n", zmqsocket->GetZmqServerAddress().c_str());
|
||||
|
||||
// send socket
|
||||
ZmqSocket* zmqsocket2 = 0;
|
||||
@ -308,9 +325,10 @@ int main(int argc, char *argv[]) {
|
||||
uint64_t bunchId = 0;
|
||||
uint64_t timestamp = 0;
|
||||
int16_t modId = 0;
|
||||
uint32_t expLength=0;
|
||||
uint16_t xCoord = 0;
|
||||
uint16_t yCoord = 0;
|
||||
uint16_t zCoord = 0;
|
||||
//uint16_t zCoord = 0;
|
||||
uint32_t debug = 0;
|
||||
//uint32_t dr = 16;
|
||||
//int16_t *dout;//=new int16_t [nnx*nny];
|
||||
@ -341,6 +359,7 @@ int main(int argc, char *argv[]) {
|
||||
filter->getImageSize(nnx, nny,nnsx, nnsy);
|
||||
|
||||
|
||||
std::map<std::string, std::string> addJsonHeader;
|
||||
|
||||
|
||||
|
||||
@ -350,16 +369,13 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// cout << "+++++++++++++++++++++++++++++++LOOP" << endl;
|
||||
// get header, (if dummy, fail is on parse error or end of acquisition)
|
||||
#ifndef NEWZMQ
|
||||
if (!zmqsocket->ReceiveHeader(0, acqIndex, frameIndex, subframeIndex, filename, fileindex)){
|
||||
#endif
|
||||
|
||||
#ifdef NEWZMQ
|
||||
rapidjson::Document doc;
|
||||
if (!zmqsocket->ReceiveHeader(0, doc, SLS_DETECTOR_JSON_HEADER_VERSION)) {
|
||||
|
||||
|
||||
// rapidjson::Document doc;
|
||||
if (!zmqsocket->ReceiveHeader(0, zHeader, SLS_DETECTOR_JSON_HEADER_VERSION)) {
|
||||
/* zmqsocket->CloseHeaderMessage();*/
|
||||
|
||||
#endif
|
||||
// if (!zmqsocket->ReceiveHeader(0, acqIndex, frameIndex, subframeIndex, filename, fileindex)) {
|
||||
cprintf(RED, "Got Dummy\n");
|
||||
// t1=high_resolution_clock::now();
|
||||
@ -378,7 +394,11 @@ int main(int argc, char *argv[]) {
|
||||
if (newFrame>0) {
|
||||
cprintf(RED,"DIDn't receive any data!\n");
|
||||
if (send) {
|
||||
zmqsocket2->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
|
||||
//zHeader.data = false;
|
||||
outHeader.data=false;
|
||||
// zmqsocket2->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
zmqsocket2->SendHeader(0,outHeader);
|
||||
cprintf(RED, "Sent Dummy\n");
|
||||
}
|
||||
} else {
|
||||
@ -510,14 +530,39 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if(send_something) {
|
||||
|
||||
zmqsocket2->SendHeaderData (0, false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0 , packetNumber,bunchId, timestamp, modId,xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, 0,0, 0,&additionalJsonHeader);
|
||||
|
||||
// zmqsocket2->SendHeaderData (0, false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0 , packetNumber,bunchId, timestamp, modId,xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, 0,0, 0,&additionalJsonHeader);
|
||||
|
||||
outHeader.data=true;
|
||||
outHeader.dynamicRange=dr;
|
||||
outHeader.fileIndex=fileindex;
|
||||
outHeader.ndetx=1;
|
||||
outHeader.ndety=1;
|
||||
outHeader.npixelsx=nnx;
|
||||
outHeader.npixelsy=nny;
|
||||
outHeader.imageSize=nnx*nny*dr/8;
|
||||
outHeader.acqIndex=acqIndex;
|
||||
outHeader.frameIndex=frameIndex;
|
||||
outHeader.fname=fname;
|
||||
outHeader.frameNumber=acqIndex;
|
||||
outHeader.expLength=expLength;
|
||||
outHeader.packetNumber=packetNumber;
|
||||
outHeader.bunchId=bunchId;
|
||||
outHeader.timestamp=timestamp;
|
||||
outHeader.modId=modId;
|
||||
outHeader.row=xCoord;
|
||||
outHeader.column=yCoord;
|
||||
outHeader.debug=debug;
|
||||
outHeader.roundRNumber=roundRNumber;
|
||||
outHeader.detType=detType;
|
||||
outHeader.version=version;
|
||||
|
||||
zmqsocket2->SendHeader(0,outHeader);
|
||||
zmqsocket2->SendData((char*)dout,nnx*nny*dr/8);
|
||||
cprintf(GREEN, "Sent Data\n");
|
||||
}
|
||||
|
||||
zmqsocket2->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
outHeader.data=false;
|
||||
zmqsocket2->SendHeader(0,outHeader);
|
||||
// zmqsocket2->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
cprintf(RED, "Sent Dummy\n");
|
||||
if (dout)
|
||||
delete [] dout;
|
||||
@ -544,33 +589,84 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef NEWZMQ
|
||||
//#ifdef NEWZMQ
|
||||
if (newFrame) {
|
||||
begin = std::chrono::steady_clock::now();
|
||||
//time(&begin);
|
||||
// t0 = high_resolution_clock::now();
|
||||
//cout <<"new frame" << endl;
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
size = zHeader.imageSize;//doc["size"].GetUint();
|
||||
|
||||
// dynamicRange = zheader.dynamicRange; //doc["bitmode"].GetUint();
|
||||
// nPixelsX = zHeader.npixelsx; //doc["shape"][0].GetUint();
|
||||
// nPixelsY = zHeader.npixelsy;// doc["shape"][1].GetUint();
|
||||
filename = zHeader.fname;//doc["fname"].GetString();
|
||||
acqIndex = zHeader.acqIndex; //doc["acqIndex"].GetUint64();
|
||||
// frameIndex = zHeader.frameIndex;//doc["fIndex"].GetUint64();
|
||||
fileindex = zHeader.fileIndex;//doc["fileIndex"].GetUint64();
|
||||
expLength = zHeader.expLength;//doc["expLength"].GetUint();
|
||||
packetNumber=zHeader.packetNumber;//doc["packetNumber"].GetUint();
|
||||
bunchId=zHeader.bunchId;//doc["bunchId"].GetUint();
|
||||
timestamp=zHeader.timestamp;//doc["timestamp"].GetUint();
|
||||
modId=zHeader.modId;//doc["modId"].GetUint();
|
||||
debug=zHeader.debug;//doc["debug"].GetUint();
|
||||
// roundRNumber=r.roundRNumber;//doc["roundRNumber"].GetUint();
|
||||
detType=zHeader.detType;//doc["detType"].GetUint();
|
||||
version=zHeader.version;//doc["version"].GetUint();
|
||||
/*document["bitmode"].GetUint(); zHeader.dynamicRange
|
||||
|
||||
// acqIndex, frameIndex, subframeIndex, filename, fileindex
|
||||
size = doc["size"].GetUint();
|
||||
// multisize = size;// * zmqsocket->size();
|
||||
// dynamicRange = doc["bitmode"].GetUint();
|
||||
// nPixelsX = doc["shape"][0].GetUint();
|
||||
// nPixelsY = doc["shape"][1].GetUint();
|
||||
filename = doc["fname"].GetString();
|
||||
//acqIndex = doc["acqIndex"].GetUint64();
|
||||
//frameIndex = doc["fIndex"].GetUint64();
|
||||
fileindex = doc["fileIndex"].GetUint64();
|
||||
//subFrameIndex = doc["expLength"].GetUint();
|
||||
//packetNumber=doc["packetNumber"].GetUint();
|
||||
//bunchId=doc["bunchId"].GetUint();
|
||||
//timestamp=doc["timestamp"].GetUint();
|
||||
//modId=doc["modId"].GetUint();
|
||||
//debug=doc["debug"].GetUint();
|
||||
//roundRNumber=doc["roundRNumber"].GetUint();
|
||||
//detType=doc["detType"].GetUint();
|
||||
//version=doc["version"].GetUint();
|
||||
document["fileIndex"].GetUint64(); zHeader.fileIndex
|
||||
|
||||
document["detshape"][0].GetUint();
|
||||
zHeader.ndetx
|
||||
|
||||
document["detshape"][1].GetUint();
|
||||
zHeader.ndety
|
||||
|
||||
document["shape"][0].GetUint();
|
||||
zHeader.npixelsx
|
||||
|
||||
document["shape"][1].GetUint();
|
||||
zHeader.npixelsy
|
||||
|
||||
document["size"].GetUint(); zHeader.imageSize
|
||||
|
||||
document["acqIndex"].GetUint64(); zHeader.acqIndex
|
||||
|
||||
document["frameIndex"].GetUint64(); zHeader.frameIndex
|
||||
|
||||
document["fname"].GetString(); zHeader.fname
|
||||
|
||||
document["frameNumber"].GetUint64(); zHeader.frameNumber
|
||||
|
||||
document["expLength"].GetUint(); zHeader.expLength
|
||||
|
||||
document["packetNumber"].GetUint(); zHeader.packetNumber
|
||||
|
||||
document["bunchId"].GetUint64(); zHeader.bunchId
|
||||
|
||||
document["timestamp"].GetUint64(); zHeader.timestamp
|
||||
|
||||
document["modId"].GetUint(); zHeader.modId
|
||||
|
||||
document["row"].GetUint(); zHeader.row
|
||||
|
||||
document["column"].GetUint(); zHeader.column
|
||||
|
||||
document["reserved"].GetUint(); zHeader.reserved
|
||||
|
||||
document["debug"].GetUint(); zHeader.debug
|
||||
|
||||
document["roundRNumber"].GetUint(); zHeader.roundRNumber
|
||||
|
||||
document["detType"].GetUint(); zHeader.detType
|
||||
|
||||
document["version"].GetUint(); zHeader.version
|
||||
|
||||
document["flippedDataX"].GetUint(); zHeader.flippedDataX
|
||||
|
||||
document["quad"].GetUint(); zHeader.quad
|
||||
|
||||
document["completeImage"].GetUint(); zHeader.completeImage
|
||||
*/
|
||||
//dataSize=size;
|
||||
|
||||
//strcpy(fname,filename.c_str());
|
||||
@ -604,6 +700,8 @@ int main(int argc, char *argv[]) {
|
||||
// xCoord, yCoord,zCoord,
|
||||
// flippedDataX, packetNumber, bunchId, timestamp, modId, debug, roundRNumber, detType, version);
|
||||
|
||||
addJsonHeader=zHeader.addJsonHeader;
|
||||
|
||||
/* Analog detector commands */
|
||||
//isPedestal=0;
|
||||
//isFlat=0;
|
||||
@ -611,9 +709,10 @@ int main(int argc, char *argv[]) {
|
||||
fMode=eFrame;
|
||||
frameMode_s="frame";
|
||||
cprintf(MAGENTA, "Frame mode: ");
|
||||
if (doc.HasMember("frameMode")) {
|
||||
if (doc["frameMode"].IsString()) {
|
||||
frameMode_s=doc["frameMode"].GetString();
|
||||
// if (doc.HasMember("frameMode")) {
|
||||
if (addJsonHeader.find("frameMode")!= addJsonHeader.end()) {
|
||||
// if (doc["frameMode"].IsString()) {
|
||||
frameMode_s=addJsonHeader.at("frameMode");//doc["frameMode"].GetString();
|
||||
if (frameMode_s == "pedestal"){
|
||||
fMode=ePedestal;
|
||||
//isPedestal=1;
|
||||
@ -639,7 +738,7 @@ int main(int argc, char *argv[]) {
|
||||
cprintf(MAGENTA, "Resetting flatfield\n");
|
||||
fMode=eFlat;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
else {
|
||||
fMode=eFrame;
|
||||
//isPedestal=0;
|
||||
@ -647,19 +746,23 @@ int main(int argc, char *argv[]) {
|
||||
fMode=eFrame;
|
||||
frameMode_s="frame";
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
cprintf(MAGENTA, "%s\n" , frameMode_s.c_str());
|
||||
mt->setFrameMode(fMode);
|
||||
|
||||
// threshold=0;
|
||||
cprintf(MAGENTA, "Threshold: ");
|
||||
if (doc.HasMember("threshold")) {
|
||||
if (doc["threshold"].IsInt()) {
|
||||
threshold=doc["threshold"].GetInt();
|
||||
mt->setThreshold(threshold);
|
||||
}
|
||||
}
|
||||
cprintf(MAGENTA, "Threshold: ");
|
||||
if (addJsonHeader.find("threshold")!= addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("threshold")) >>threshold;
|
||||
// threshold=atoi(addJsonHeader.at("threshold").c_str());//doc["frameMode"].GetString();
|
||||
}
|
||||
//if (doc.HasMember("threshold")) {
|
||||
//if (doc["threshold"].IsInt()) {
|
||||
// threshold=doc["threshold"].GetInt();
|
||||
mt->setThreshold(threshold);
|
||||
// }
|
||||
// }
|
||||
cprintf(MAGENTA, "%d\n", threshold);
|
||||
|
||||
xmin=0;
|
||||
@ -667,40 +770,47 @@ int main(int argc, char *argv[]) {
|
||||
ymin=0;
|
||||
ymax=npy;
|
||||
cprintf(MAGENTA, "ROI: ");
|
||||
if (doc.HasMember("roi")) {
|
||||
if (doc["roi"].IsArray()) {
|
||||
if (doc["roi"].Size() > 0 )
|
||||
if (doc["roi"][0].IsInt())
|
||||
xmin=doc["roi"][0].GetInt();
|
||||
|
||||
if (addJsonHeader.find("roi")!= addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("roi")) >> xmin >> xmax >> ymin >> ymax ;
|
||||
// if (doc.HasMember("roi")) {
|
||||
//if (doc["roi"].IsArray()) {
|
||||
// if (doc["roi"].Size() > 0 )
|
||||
// if (doc["roi"][0].IsInt())
|
||||
// xmin=doc["roi"][0].GetInt();
|
||||
|
||||
if (doc["roi"].Size() > 1 )
|
||||
if (doc["roi"][1].IsInt())
|
||||
xmax=doc["roi"][1].GetInt();
|
||||
// if (doc["roi"].Size() > 1 )
|
||||
// if (doc["roi"][1].IsInt())
|
||||
// xmax=doc["roi"][1].GetInt();
|
||||
|
||||
if (doc["roi"].Size() > 2 )
|
||||
if (doc["roi"][2].IsInt())
|
||||
ymin=doc["roi"][2].GetInt();
|
||||
// if (doc["roi"].Size() > 2 )
|
||||
// if (doc["roi"][2].IsInt())
|
||||
// ymin=doc["roi"][2].GetInt();
|
||||
|
||||
if (doc["roi"].Size() > 3 )
|
||||
if (doc["roi"][3].IsInt())
|
||||
ymax=doc["roi"][3].GetInt();
|
||||
}
|
||||
// if (doc["roi"].Size() > 3 )
|
||||
// if (doc["roi"][3].IsInt())
|
||||
// ymax=doc["roi"][3].GetInt();
|
||||
// }
|
||||
}
|
||||
|
||||
cprintf(MAGENTA, "%d %d %d %d\n", xmin, xmax, ymin, ymax);
|
||||
mt->setROI(xmin, xmax, ymin, ymax);
|
||||
|
||||
if (doc.HasMember("dynamicRange")) {
|
||||
dr=doc["dynamicRange"].GetUint();
|
||||
if (addJsonHeader.find("dynamicRange")!= addJsonHeader.end()) {
|
||||
istringstream(addJsonHeader.at("dynamicRange")) >> dr ;
|
||||
dr=32;
|
||||
}
|
||||
// if (doc.HasMember("dynamicRange")) {
|
||||
// dr=doc["dynamicRange"].GetUint();
|
||||
// dr=32;
|
||||
// }
|
||||
|
||||
dMode=eAnalog;
|
||||
detectorMode_s="analog";
|
||||
cprintf(MAGENTA, "Detector mode: ");
|
||||
if (doc.HasMember("detectorMode")) {
|
||||
if (doc["detectorMode"].IsString()) {
|
||||
detectorMode_s=doc["detectorMode"].GetString();
|
||||
cprintf(MAGENTA, "Detector mode: ");
|
||||
if (addJsonHeader.find("detectorMode")!= addJsonHeader.end()) {;
|
||||
//if (doc.HasMember("detectorMode")) {
|
||||
//if (doc["detectorMode"].IsString()) {
|
||||
detectorMode_s=addJsonHeader.at("detectorMode");//=doc["detectorMode"].GetString();
|
||||
#ifdef INTERP
|
||||
if (detectorMode_s == "interpolating"){
|
||||
dMode=eInterpolating;
|
||||
@ -718,7 +828,7 @@ int main(int argc, char *argv[]) {
|
||||
mt->setInterpolation(NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -767,19 +877,19 @@ int main(int argc, char *argv[]) {
|
||||
// }
|
||||
|
||||
// threshold=0;
|
||||
cprintf(MAGENTA, "Subframes: ");
|
||||
subframes=0;
|
||||
//isubframe=0;
|
||||
insubframe=0;
|
||||
subnorm=1;
|
||||
f0=0;
|
||||
nnsubframe=0;
|
||||
if (doc.HasMember("subframes")) {
|
||||
if (doc["subframes"].IsInt()) {
|
||||
subframes=doc["subframes"].GetInt();
|
||||
}
|
||||
}
|
||||
cprintf(MAGENTA, "%ld\n", subframes);
|
||||
// cprintf(MAGENTA, "Subframes: ");
|
||||
// subframes=0;
|
||||
// //isubframe=0;
|
||||
// insubframe=0;
|
||||
// subnorm=1;
|
||||
// f0=0;
|
||||
// nnsubframe=0;
|
||||
// if (doc.HasMember("subframes")) {
|
||||
// if (doc["subframes"].IsInt()) {
|
||||
// subframes=doc["subframes"].GetInt();
|
||||
// }
|
||||
// }
|
||||
// cprintf(MAGENTA, "%ld\n", subframes);
|
||||
|
||||
|
||||
newFrame=0;
|
||||
@ -811,13 +921,13 @@ int main(int argc, char *argv[]) {
|
||||
// get data
|
||||
// acqIndex = doc["acqIndex"].GetUint64();
|
||||
|
||||
frameIndex = doc["fIndex"].GetUint64();
|
||||
frameIndex = zHeader.frameIndex;////doc["fIndex"].GetUint64();
|
||||
|
||||
// subFrameIndex = doc["expLength"].GetUint();
|
||||
|
||||
// bunchId=doc["bunchId"].GetUint();
|
||||
// timestamp=doc["timestamp"].GetUint();
|
||||
packetNumber=doc["packetNumber"].GetUint();
|
||||
packetNumber=zHeader.packetNumber; //doc["packetNumber"].GetUint();
|
||||
// cout << acqIndex << " " << frameIndex << " " << subFrameIndex << " "<< bunchId << " " << timestamp << " " << packetNumber << endl;
|
||||
//cprintf(GREEN, "frame\n");
|
||||
if (packetNumber>=40) {
|
||||
@ -866,8 +976,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
|
||||
|
||||
zmqsocket2->SendHeaderData (0, false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0 , packetNumber,bunchId, timestamp, modId,xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, 0,0, 0,&additionalJsonHeader);
|
||||
|
||||
// zmqsocket2->SendHeaderData (0, false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0 , packetNumber,bunchId, timestamp, modId,xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, 0,0, 0,&additionalJsonHeader);
|
||||
zHeader.data = true;
|
||||
zmqsocket2->SendHeader(0,zHeader);
|
||||
zmqsocket2->SendData((char*)dout,nnx*nny*dr/8);
|
||||
cprintf(GREEN, "Sent subdata\n");
|
||||
|
||||
|
@ -490,7 +490,7 @@ int *getClusters(char *data, int *ph=NULL) {
|
||||
// (clusters+nph)->ped=getPedestal(ix,iy,0);
|
||||
for (ir=-(clusterSizeY/2); ir<(clusterSizeY/2)+1; ir++) {
|
||||
for (ic=-(clusterSize/2); ic<(clusterSize/2)+1; ic++) {
|
||||
if ((iy+ir)>=iy && (iy+ir)<ny && (ix+ic)>=ix && (ix+ic)<nx)
|
||||
if ((iy+ir)>=0 && (iy+ir)<ny && (ix+ic)>=0 && (ix+ic)<nx)
|
||||
(clusters+nph)->set_data(val[iy+ir][ix+ic],ic,ir);
|
||||
}
|
||||
}
|
||||
|
@ -36,19 +36,17 @@ class single_photon_hit {
|
||||
\param myFile file descriptor
|
||||
*/
|
||||
size_t write(FILE *myFile) {
|
||||
//fwrite((void*)this, 1, 3*sizeof(int)+4*sizeof(double)+sizeof(quad), myFile);
|
||||
|
||||
// if (fwrite((void*)this, 1, sizeof(int)+2*sizeof(int16_t), myFile))
|
||||
//fwrite((void*)this, 1, 3*sizeof(int)+4*sizeof(double)+sizeof(quad), myFile); // if (fwrite((void*)this, 1, sizeof(int)+2*sizeof(int16_t), myFile))
|
||||
#ifdef OLDFORMAT
|
||||
if (fwrite((void*)&iframe, 1, sizeof(int), myFile)) {};
|
||||
#endif
|
||||
#ifndef WRITE_QUAD
|
||||
//printf("no quad ");
|
||||
//if (fwrite((void*)&x, 2, sizeof(int16_t), myFile))
|
||||
return fwrite((void*)&x, 1, dx*dy*sizeof(int)+2*sizeof(int16_t), myFile);
|
||||
if (fwrite((void*)&x, sizeof(int16_t), 2, myFile))
|
||||
return fwrite((void*)data, sizeof(int), dx*dy, myFile);
|
||||
#endif
|
||||
#ifdef WRITE_QUAD
|
||||
// printf("quad ");
|
||||
// printf("quad ");
|
||||
int qq[4];
|
||||
switch(quad) {
|
||||
case TOP_LEFT:
|
||||
@ -91,8 +89,8 @@ class single_photon_hit {
|
||||
default:
|
||||
;
|
||||
}
|
||||
if (fwrite((void*)&x, 2, sizeof(int16_t), myFile))
|
||||
return fwrite((void*)qq, 1, 4*sizeof(int), myFile);
|
||||
if (fwrite((void*)&x, sizeof(int16_t), 2, myFile))
|
||||
return fwrite((void*)qq, sizeof(int), 4, myFile);
|
||||
#endif
|
||||
return 0;
|
||||
};
|
||||
@ -109,14 +107,14 @@ class single_photon_hit {
|
||||
#endif
|
||||
#ifndef WRITE_QUAD
|
||||
// printf( "no quad \n");
|
||||
if (fread((void*)&x, 2, sizeof(int16_t), myFile))
|
||||
return fread((void*)data, 1, dx*dy*sizeof(int), myFile);
|
||||
if (fread((void*)&x, sizeof(int16_t),2, myFile))
|
||||
return fread((void*)data, sizeof(int), dx*dy,myFile);
|
||||
#endif
|
||||
#ifdef WRITE_QUAD
|
||||
int qq[4];
|
||||
// printf( "quad \n");
|
||||
if (fread((void*)&x, 2, sizeof(int16_t), myFile))
|
||||
if (fread((void*)qq, 1, 4*sizeof(int), myFile)) {
|
||||
printf( "quad \n");
|
||||
if (fread((void*)&x, sizeof(int16_t), 2, myFile))
|
||||
if (fread((void*)qq, sizeof(int), 4, myFile)) {
|
||||
|
||||
quad=TOP_RIGHT;
|
||||
/* int mm=qq[0]; */
|
||||
@ -216,7 +214,6 @@ class single_photon_hit {
|
||||
for (int iy=0; iy<dy; iy++) {
|
||||
for (int ix=0; ix<dx; ix++) {
|
||||
printf("%d \t",data[ix+iy*dx]);
|
||||
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -88,6 +88,7 @@ target_include_directories(slsDetectorGui PUBLIC
|
||||
)
|
||||
|
||||
target_link_libraries(slsDetectorGui PUBLIC
|
||||
slsProjectWarnings
|
||||
slsDetectorShared
|
||||
${QT_QTCORE_LIBRARIES}
|
||||
${QT_QTGUI_LIBRARIES}
|
||||
|
@ -1066,239 +1066,6 @@
|
||||
<string>Acquisition</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="1" column="4">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumStoragecells">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Storage cells:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumStoragecells">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinSubExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</nobr><br><nobr>
|
||||
#subexptime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblSubDeadTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Dead time between sub frames. Only for Eiger in 32 bit mode.
|
||||
</nobr><br><nobr>
|
||||
Default value is 0. A value less than the required minimum is ignored.
|
||||
</nobr><br><nobr>
|
||||
#subdeadtime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sub Frame Dead Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinSubDeadTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Period between sub frames. Only for Eiger in 32 bit mode.
|
||||
</nobr><br><nobr>
|
||||
Default value is 0. A value less than the required minimum is ignored.
|
||||
</nobr><br><nobr>
|
||||
#subperiod#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblSubExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</nobr><br><nobr>
|
||||
#subexptime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sub Frame Exposure Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="comboSubDeadTimeUnit">
|
||||
<property name="enabled">
|
||||
@ -1425,6 +1192,98 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumStoragecells">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Storage cells:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinSubDeadTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Period between sub frames. Only for Eiger in 32 bit mode.
|
||||
</nobr><br><nobr>
|
||||
Default value is 0. A value less than the required minimum is ignored.
|
||||
</nobr><br><nobr>
|
||||
#subperiod#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblSubExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</nobr><br><nobr>
|
||||
#subexptime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sub Frame Exposure Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblDiscardBits">
|
||||
<property name="enabled">
|
||||
@ -1490,6 +1349,428 @@ Default value is 0. A value less than the required minimum is ignored.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumStoragecells">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinSubExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||
</nobr><br><nobr>
|
||||
#subexptime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblSubDeadTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Dead time between sub frames. Only for Eiger in 32 bit mode.
|
||||
</nobr><br><nobr>
|
||||
Default value is 0. A value less than the required minimum is ignored.
|
||||
</nobr><br><nobr>
|
||||
#subdeadtime#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sub Frame Dead Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QComboBox" name="comboExpTimeUnit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Exposure Time of a corresonding gate signal index. <br/>#exptime1# </p><p>#exptime2#</p><p>#exptime3# </p></body></html></string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>hr</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Exposure Time of a corresonding gate signal index. <br/>#exptime1# </p><p>#exptime2#</p><p>#exptime3# </p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSpinBox" name="spinGateIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Gate index. It will get exposure time and gate delay for corresponding gate signal.</p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lblGateDelay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gate Delay:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinGateDelay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Gate Delay of a corresonding gate signal index. <br/>#gatedelay1# </p><p>#gatedelay2#</p><p>#gatedelay3# </p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QComboBox" name="comboGateDelayUnit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Gate Delay of a corresonding gate signal index. <br/>#gatedelay1# </p><p>#gatedelay2#</p><p>#gatedelay3# </p></body></html></string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>hr</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lblExpTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Expososure Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblGateIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of additional storage cells. For Jungfrau only. </p><p>Default: 0. </p><p>Number of Images received: #frames * #triggers * (#storagecells+1) </p><p> #storagecells#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gate Index:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -86,7 +86,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage</p><p> #vhighvoltage#</p></body></html></string>
|
||||
<string><html><head/><body><p>High Voltage</p><p> #highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Voltage: </string>
|
||||
@ -108,7 +108,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage</p><p> #vhighvoltage#</p></body></html></string>
|
||||
<string><html><head/><body><p>High Voltage</p><p> #highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
@ -156,7 +156,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#vhighvoltage#</p></body></html></string>
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Voltage: </string>
|
||||
@ -178,7 +178,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#vhighvoltage#</p></body></html></string>
|
||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
|
@ -409,7 +409,7 @@
|
||||
<widget class="QFrame" name="frameTimeResolved">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<width>410</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -432,6 +432,77 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="5" column="0">
|
||||
<widget class="QStackedWidget" name="stackedLblTriggerBurst">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageLblTrigger">
|
||||
<layout class="QGridLayout" name="gridLblTrigger">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumTriggers">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Triggers:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageLblBurst">
|
||||
<layout class="QGridLayout" name="gridLblBurst">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumBursts">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Bursts:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QComboBox" name="comboPeriodUnit">
|
||||
<property name="enabled">
|
||||
@ -501,53 +572,6 @@ Frame period between exposures.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumSamples">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Number of Triggers to be expected.
|
||||
#triggers#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumMeasurements">
|
||||
<property name="sizePolicy">
|
||||
@ -594,25 +618,17 @@ Frame period between exposures.
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>175</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Measurements:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lblNumSamples">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Number of Triggers to be expected.
|
||||
#triggers#</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Samples:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="comboTimingMode">
|
||||
<property name="sizePolicy">
|
||||
@ -651,6 +667,11 @@ Frame period between exposures.
|
||||
<string>Burst Trigger</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Trigger Gated</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
@ -910,77 +931,6 @@ Frame period between exposures.
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QStackedWidget" name="stackedLblTriggerBurst">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageLblTrigger">
|
||||
<layout class="QGridLayout" name="gridLblTrigger">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumTriggers">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Triggers:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageLblBurst">
|
||||
<layout class="QGridLayout" name="gridLblBurst">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumBursts">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Bursts:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QStackedWidget" name="stackedSpinTriggerBurst">
|
||||
<property name="sizePolicy">
|
||||
@ -1481,6 +1431,214 @@ Frame period between exposures.
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QStackedWidget" name="stackedLblSamplesGates">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageLblSamples">
|
||||
<layout class="QGridLayout" name="gridLblTrigger_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumSamples">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of analog samples.</p><p>#asamples#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Samples:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageLblGates">
|
||||
<layout class="QGridLayout" name="gridLblBurst_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumGates">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of external gates.</p><p>#gates#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Gates:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QStackedWidget" name="stackedSpinSamplesGates">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>208</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>208</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageSpinSamples">
|
||||
<layout class="QGridLayout" name="gridSpinTrigger_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinNumSamples">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of analog samples.</p><p>#asamples#</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageSpinGates">
|
||||
<layout class="QGridLayout" name="gridSpinBurst_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinNumGates">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of external gates.</p><p>#gates#</p></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1513,7 +1671,6 @@ Frame period between exposures.
|
||||
<tabstop>comboExpUnit</tabstop>
|
||||
<tabstop>spinPeriod</tabstop>
|
||||
<tabstop>comboPeriodUnit</tabstop>
|
||||
<tabstop>spinNumSamples</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
|
@ -14,7 +14,8 @@ class qCloneWidget : public QMainWindow, private Ui::ClonePlotObject {
|
||||
qCloneWidget(QWidget *parent, SlsQt1DPlot *p1, SlsQt2DPlot *p2,
|
||||
SlsQt1DPlot *gp1, SlsQt2DPlot *gp, QString title,
|
||||
QString filePath, QString fileName, int64_t aIndex,
|
||||
bool displayStats, QString min, QString max, QString sum, bool completeImage);
|
||||
bool displayStats, QString min, QString max, QString sum,
|
||||
bool completeImage);
|
||||
|
||||
~qCloneWidget();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_dac.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ui_form_dac.h"
|
||||
#include <string>
|
||||
|
||||
class qDacWidget : public QWidget, private Ui::WidgetDacObject {
|
||||
|
@ -1,14 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
using std::chrono::duration;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_detectormain.h"
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "ui_form_detectormain.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
class qDrawPlot;
|
||||
@ -29,7 +29,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
qDetectorMain(int multiId, const std::string& fname, bool isDevel);
|
||||
qDetectorMain(int multiId, const std::string &fname, bool isDevel);
|
||||
~qDetectorMain();
|
||||
|
||||
private slots:
|
||||
@ -51,9 +51,9 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
|
||||
private:
|
||||
void SetUpWidgetWindow();
|
||||
void SetUpDetector(const std::string& config_file, int multiID);
|
||||
void SetUpDetector(const std::string &config_file, int multiID);
|
||||
void Initialization();
|
||||
void LoadConfigFile(const std::string& config_file);
|
||||
void LoadConfigFile(const std::string &config_file);
|
||||
|
||||
/** enumeration of the tabs */
|
||||
enum {
|
||||
@ -70,7 +70,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
slsDetectorDefs::detectorType detType;
|
||||
std::unique_ptr<sls::Detector> det;
|
||||
qDrawPlot *plot;
|
||||
MyTabWidget* tabs;
|
||||
MyTabWidget *tabs;
|
||||
std::unique_ptr<QScrollArea> scroll[NumberOfTabs];
|
||||
qTabMeasurement *tabMeasurement;
|
||||
qTabDataOutput *tabDataOutput;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_plot.h"
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "ui_form_plot.h"
|
||||
#include <mutex>
|
||||
|
||||
class SlsQt1DPlot;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_advanced.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_advanced.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
@ -36,6 +36,9 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
|
||||
void SetNumStoragecells(int value);
|
||||
void SetSubExposureTime();
|
||||
void SetSubDeadTime();
|
||||
void SetGateIndex(int value);
|
||||
void SetExposureTime();
|
||||
void SetGateDelay();
|
||||
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
@ -59,6 +62,8 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
|
||||
void GetNumStoragecells();
|
||||
void GetSubExposureTime();
|
||||
void GetSubDeadTime();
|
||||
void GetExposureTime();
|
||||
void GetGateDelay();
|
||||
|
||||
sls::Detector *det;
|
||||
qDrawPlot *plot;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
|
||||
class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
||||
Q_OBJECT
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_debugging.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_debugging.h"
|
||||
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_developer.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ui_form_tab_developer.h"
|
||||
#include <vector>
|
||||
|
||||
class qDacWidget;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_measurement.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_measurement.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QStandardItemModel;
|
||||
@ -25,6 +25,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void SetNumTriggers(int val);
|
||||
void SetNumBursts(int val);
|
||||
void SetNumSamples(int val);
|
||||
void SetNumGates(int val);
|
||||
void SetExposureTime();
|
||||
void SetAcquisitionPeriod();
|
||||
void SetDelay();
|
||||
@ -45,6 +46,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
* show bursts and burst period
|
||||
*/
|
||||
void ShowTriggerDelay();
|
||||
void ShowGates();
|
||||
void SetupTimingMode();
|
||||
void EnableWidgetsforTimingMode();
|
||||
|
||||
@ -53,6 +55,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
void GetNumTriggers();
|
||||
void GetNumBursts();
|
||||
void GetNumSamples();
|
||||
void GetNumGates();
|
||||
void GetExposureTime();
|
||||
void GetAcquisitionPeriod();
|
||||
void CheckAcqPeriodGreaterThanExp();
|
||||
@ -76,7 +79,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
sls::Detector *det;
|
||||
qDrawPlot *plot;
|
||||
// enum for the timing mode
|
||||
enum { AUTO, TRIGGER, GATED, BURST_TRIGGER, NUMTIMINGMODES };
|
||||
enum { AUTO, TRIGGER, GATED, BURST_TRIGGER, TRIGGER_GATED, NUMTIMINGMODES };
|
||||
QTimer *progressTimer;
|
||||
// tool tip variables
|
||||
QString acqPeriodTip;
|
||||
@ -84,6 +87,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
QPalette red;
|
||||
bool delayImplemented;
|
||||
bool sampleImplemented;
|
||||
bool gateImplemented;
|
||||
bool startingFnumImplemented;
|
||||
bool isAcquisitionStopped{false};
|
||||
int numMeasurements{1};
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_plot.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_plot.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QButtonGroup;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_settings.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_settings.h"
|
||||
|
||||
class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
Q_OBJECT
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef SLSQT1DPLOT_H
|
||||
#define SLSQT1DPLOT_H
|
||||
|
||||
#include "ansi.h"
|
||||
#include "SlsQt1DZoomer.h"
|
||||
#include "ansi.h"
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef SLSQT2DZOOMER_H
|
||||
#define SLSQT2DZOOMER_H
|
||||
#include "SlsQt2DHist.h"
|
||||
#include <cstdio>
|
||||
#include <qwt_plot_panner.h>
|
||||
#include <qwt_plot_zoomer.h>
|
||||
#include <cstdio>
|
||||
|
||||
class SlsQt2DZoomer : public QwtPlotZoomer {
|
||||
private:
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* TODO! short description */
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include <qwt_symbol.h>
|
||||
#include <iostream>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_math.h>
|
||||
#include <qwt_painter.h>
|
||||
@ -10,8 +10,8 @@
|
||||
#include <qwt_scale_draw.h>
|
||||
#include <qwt_scale_engine.h>
|
||||
#include <qwt_scale_widget.h>
|
||||
#include <qwt_symbol.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
|
||||
|
||||
@ -314,7 +314,8 @@ void SlsQtH1DList::Remove(SlsQtH1D *hist) {
|
||||
hl = hl->the_next;
|
||||
else { // match
|
||||
if (!hl->the_next)
|
||||
hl->the_hist = nullptr; // first the_hist is zero when there's no next
|
||||
hl->the_hist =
|
||||
nullptr; // first the_hist is zero when there's no next
|
||||
else {
|
||||
SlsQtH1DList *t = hl->the_next;
|
||||
hl->the_hist = t->the_hist;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* TODO! short description */
|
||||
#include "SlsQt1DZoomer.h"
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include <iostream>
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_scale_div.h>
|
||||
#include <iostream>
|
||||
|
||||
void SlsQt1DZoomer::ResetZoomBase() {
|
||||
SetZoomBase(x0, y0, x1 - x0,
|
||||
|
@ -216,7 +216,7 @@ QwtLinearColorMap *SlsQt2DPlot::myColourMap(QVector<double> colourStops) {
|
||||
}
|
||||
|
||||
QwtLinearColorMap *SlsQt2DPlot::myColourMap(int log) {
|
||||
QVector<double> cs{0.0, 0.34, 0.61 ,0.84, 1.0};
|
||||
QVector<double> cs{0.0, 0.34, 0.61, 0.84, 1.0};
|
||||
if (log) {
|
||||
for (int i = 0; i < cs.size(); ++i)
|
||||
cs[i] = (pow(10, 2 * cs[i]) - 1) / 99.0;
|
||||
@ -224,7 +224,6 @@ QwtLinearColorMap *SlsQt2DPlot::myColourMap(int log) {
|
||||
return myColourMap(cs);
|
||||
}
|
||||
|
||||
|
||||
void SlsQt2DPlot::Update() {
|
||||
if (isLog)
|
||||
hist->SetMinimumToFirstGreaterThanZero();
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "qDacWidget.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
qDacWidget::qDacWidget(QWidget *parent, sls::Detector *detector, bool d,
|
||||
std::string n, slsDetectorDefs::dacIndex i)
|
||||
: QWidget(parent), det(detector), isDac(d), index(i) {
|
||||
@ -46,7 +45,9 @@ void qDacWidget::GetDac() {
|
||||
spinDac->setValue(retval);
|
||||
// mv
|
||||
retval = det->getDAC(index, 1, {detectorIndex}).squash(-1);
|
||||
lblDacmV->setText(QString("%1mV").arg(retval - 10));
|
||||
// -6 is the minimum amt of space it occupies, if more needed, its
|
||||
// padded with ' ', negative value for left aligned text
|
||||
lblDacmV->setText(QString("%1mV").arg(retval, -6));
|
||||
}
|
||||
CATCH_DISPLAY(std::string("Could not get dac ") + std::to_string(index),
|
||||
"qDacWidget::GetDac")
|
||||
@ -56,8 +57,8 @@ void qDacWidget::GetDac() {
|
||||
|
||||
void qDacWidget::SetDac() {
|
||||
int val = (int)spinDac->value();
|
||||
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data()
|
||||
<< " : " << val;
|
||||
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data() << " : "
|
||||
<< val;
|
||||
|
||||
try {
|
||||
det->setDAC(index, val, 0, {detectorIndex});
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user