Compare commits

...

350 Commits

Author SHA1 Message Date
7aeb394514 Pattern.h as a public header files (#229)
It is used in Detector.h.
2021-01-18 08:30:34 +01:00
f9f50f1d84 M3settings (#228)
* added temp m3 settings files

* renames settings noise to trim

* get threshold for M3

* some changes to compile on RH7 and in the server to load the default chip status register at startup

* Updated mythen3DeectorServer_developer executable with correct initialization at startup

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
2021-01-14 12:34:13 +01:00
a62e068a9a M3defaultpattern (#227)
* default pattern for m3 and moench including Python bindings

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2020-12-09 13:28:39 +01:00
85bc37f04d release updated 2020-12-04 17:01:57 +01:00
a3f5315015 updated RELEASE.txt 2020-12-04 16:49:49 +01:00
d63a182996 updated RELEASE.txt 2020-12-04 14:37:29 +01:00
f147c7bfcb updated RELEASE.txt 2020-12-04 14:36:08 +01:00
4218fe5f2f bugfix from 5.0.2: potentital memory leak in receiver if setDetectorType called directly from outside 2020-12-04 14:33:53 +01:00
511f5a7ca5 Update RELEASE.txt 2020-12-04 14:33:11 +01:00
a5ab5c1fa0 additional constructors for scanPrameters in python 2020-12-04 14:31:08 +01:00
8b7023d9a3 added scanParameters in Python 2020-12-04 14:27:57 +01:00
c8c7bca6e0 bugfix: avoid potentital memory leak in receiver if called outside constructor context 2020-12-04 14:18:16 +01:00
8ddc407e62 Merge pull request #226 from esrf-bliss/potential-generaldata-memory-leak
slsReceiver: avoid potential memory leak: Implementation::generalData
2020-12-04 14:15:12 +01:00
7a2827f693 additional constructors for scanPrameters in python 2020-12-04 13:50:08 +01:00
f4be0b8efa slsReceiver: avoid potential memory leak around Implementation::generalData 2020-12-04 13:20:50 +01:00
a6e23b0509 added scanParameters in Python 2020-12-01 18:40:45 +01:00
64de9f3ad0 Merge branch 'main-rc' into b5.0.1 2020-11-30 17:24:50 +01:00
390a842b97 Merge branch 'main-rc' into b5.0.0 2020-11-30 17:21:06 +01:00
040cc9c14f Merge branch 'main-rc' into b4.2.0 2020-11-30 17:14:08 +01:00
0a1c4992e2 Merge branch 'main-rc' into b4.1.1 2020-11-30 17:12:26 +01:00
59b56c764f Merge branch 'main-rc' into b4.1.0 2020-11-30 17:09:23 +01:00
ff7afd0de7 Merge branch 'main-rc' into b4.0.2 2020-11-30 17:05:39 +01:00
835e62425f Merge branch 'main-rc' into b4.0.1 2020-11-30 17:03:16 +01:00
c8cdbfc488 Merge branch 'main-rc' into b4.0.0 2020-11-30 17:00:57 +01:00
2f75143245 Merge branch 'main-rc' into b3.1.5 2020-11-30 16:58:53 +01:00
6f7c31b747 Merge branch 'main-rc' into b3.1.4 2020-11-30 16:57:17 +01:00
75c2d987c4 Merge branch 'main-rc' into b3.1.3 2020-11-30 16:56:01 +01:00
726f5eba29 Merge branch 'main-rc' into b3.1.2 2020-11-30 16:54:56 +01:00
4404ee717a Merge branch 'main-rc' into b3.1.1 2020-11-30 16:52:52 +01:00
54530ab103 Merge branch 'main-rc' into b3.1.0 2020-11-30 16:50:15 +01:00
6126780660 Merge branch 'main-rc' into b3.0.1 2020-11-30 16:45:00 +01:00
9b7f9b1be1 Merge branch 'main-rc' into b3.0.0 2020-11-30 16:42:35 +01:00
26c829d766 Merge branch 'main-rc' into b2.3.4 2020-11-30 16:38:04 +01:00
3fde5c5b55 Merge branch 'main-rc' into b2.3.3 2020-11-30 16:36:24 +01:00
3e5f546ebe Merge branch 'main-rc' into b2.3.2 2020-11-30 16:26:44 +01:00
9833a7d330 Merge branch 'main-rc' into b2.3.1 2020-11-30 16:25:23 +01:00
8f9155e578 Merge branch 'main-rc' into b2.3.0 2020-11-30 16:23:50 +01:00
9df1eac3c1 Merge branch 'main-rc' into b2.2.0 2020-11-30 15:46:45 +01:00
5ededf9be4 Merge branch 'main-rc' into b2.1.1 2020-11-30 15:16:57 +01:00
3e8774798a Merge branch 'main-rc' into b2.1.0 2020-11-30 15:13:43 +01:00
9048e7f6c4 Merge pull request #223 from slsdetectorgroup/savepatternbackup
Savepatternbackup
2020-11-30 14:00:31 +01:00
1ce56764fa binaries in 2020-11-30 13:59:55 +01:00
8c091eece2 WIP 2020-11-27 17:06:07 +01:00
d69e238e67 Python binding for Pattern 2020-11-27 17:05:39 +01:00
95fe1720c0 removed commented out lines 2020-11-27 14:44:15 +01:00
69f558c072 constexpr not compiling for rhel7 and warning left 2020-11-27 14:31:43 +01:00
e382df21b9 updated binaries, links in serverBin and deleted v5.0.0 binaries 2020-11-27 14:26:15 +01:00
8e773c97dd pattern load and save works 2020-11-27 14:19:38 +01:00
c043e74c07 wIP 2020-11-27 14:08:06 +01:00
d4518b2ca3 WIP 2020-11-27 13:56:57 +01:00
fd3108a61b WIP 2020-11-27 12:46:54 +01:00
e8fedfa55f uncommented WIP 2020-11-27 12:45:16 +01:00
0eb204bfd3 compile for servers too 2020-11-27 12:37:22 +01:00
d9b2a90651 Introduced pattern class 2020-11-27 10:03:15 +01:00
8ca1d9c50c python wrapper 2020-11-26 14:44:39 +01:00
baff0518bb WIP 2020-11-26 14:13:04 +01:00
2e669c585b WIP 2020-11-26 11:25:29 +01:00
ca0bc3e0f3 WIP 2020-11-26 10:29:09 +01:00
08ea179519 update client version to 5.0.1 2020-11-25 16:27:28 +01:00
557cab9c50 Merge branch '5.0.1-rc' into developer 2020-11-25 16:24:35 +01:00
8e6dfe9b0f update docs 2020-11-25 16:22:24 +01:00
6901368fd6 release update 2020-11-25 15:42:41 +01:00
3f1dbb7d67 release update 2020-11-25 15:32:57 +01:00
a12dd153ef WIP 2020-11-25 15:29:46 +01:00
f6126abe31 added cmake in release notes 2020-11-25 10:22:58 +01:00
8bf9f974a3 fixing typo 2020-11-24 20:39:36 +01:00
e63fa1d7c2 Setting pattern from memory (#218)
* ToString accepts c-style arrays

* added patternParameters to python

* fixed patwait time bug in validation

* moved load from file function to patterParameters

* server using patternparamters structure to get pattern

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2020-11-24 20:32:07 +01:00
1e8dacf9b8 update release 2020-11-24 20:01:37 +01:00
58fb5321f0 WIP 2020-11-23 15:33:10 +01:00
9e8c8f4bbc Merge branch '5.0.1-rc' into developer 2020-11-23 11:55:30 +01:00
faf885d2e0 python change from tiemstamp to frametime 2020-11-23 11:26:59 +01:00
c120c70678 Merge branch '5.0.1-rc' into developer 2020-11-23 09:20:22 +01:00
d5dcc8e138 runtime, zmqwhm rx_zmqhwm in python 2020-11-23 09:15:10 +01:00
90a9cea670 better cmake for python and pybind11 2.6.1 2020-11-23 08:57:00 +01:00
2eea1882d2 updated broken python bindings 2020-11-23 08:42:05 +01:00
c6eefac0eb Merge branch 'main' into test 2020-11-20 14:30:32 +01:00
46e0c0abed Merge branch 'main' into test 2020-11-20 14:29:21 +01:00
a5f0f6eb34 Merge branch 'main' into test 2020-11-20 14:28:29 +01:00
62c86f56b1 Merge branch 'main' into test 2020-11-20 14:27:25 +01:00
77080a524a Merge branch 'main' into test 2020-11-20 14:26:37 +01:00
3dce1e46f9 Merge branch 'main' into test 2020-11-20 14:25:45 +01:00
08ecc1e52d Merge branch 'main' into test 2020-11-20 14:24:14 +01:00
8c1974b34e Merge branch 'main' into test 2020-11-20 14:13:20 +01:00
d89d349247 Merge branch 'main' into test 2020-11-20 14:10:35 +01:00
910961cf41 Merge branch 'main' into test 2020-11-20 14:05:53 +01:00
595b7aa5e8 Merge branch 'main' into test 2020-11-20 14:03:36 +01:00
f72ad4326f Merge branch 'main' into test 2020-11-20 14:00:47 +01:00
2306e44ae3 Merge branch 'main' into test 2020-11-20 13:02:36 +01:00
10fa57ebb9 binaries updated to reflected developer branch 2020-11-19 16:44:40 +01:00
0ca9115cb8 updating client api branch back to developer 2020-11-19 16:43:58 +01:00
06dbf82e93 clang-format 2020-11-18 18:01:39 +01:00
8565ac6cf2 update doc 2020-11-18 17:44:04 +01:00
a26f22a052 update doc 2020-11-18 17:35:48 +01:00
30f9d53520 update doc 2020-11-18 17:32:07 +01:00
7b81532f54 update doc 2020-11-18 17:27:34 +01:00
dcf0b58a6d update doc 2020-11-18 17:27:05 +01:00
e39ea64560 update doc 2020-11-18 17:10:43 +01:00
77dacdf40d wip doc 2020-11-18 16:24:28 +01:00
5397a9a78b update doc 2020-11-18 16:12:29 +01:00
3fbafb3c1d update doc 2020-11-18 14:38:54 +01:00
e3721e89e0 update doc 2020-11-18 14:34:01 +01:00
ec75728941 update doc 2020-11-18 14:22:36 +01:00
9b6a10d7ce cmk install directory and cmake 2020-11-18 12:22:19 +01:00
57904446f0 known issues firmware eiger stop 8 byte packet 2020-11-18 11:40:14 +01:00
3d48501d30 update documentation on customer receiver config 2020-11-18 11:33:35 +01:00
d364e5e2ec added custom receiver example 2020-11-18 11:17:15 +01:00
aacd7c4bec update client version 2020-11-18 10:44:35 +01:00
abfc0dc266 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-11-18 10:12:35 +01:00
85a6d82d9f bugfix hdf5 threshold ev 2020-11-18 10:12:27 +01:00
56be47669f more cmake cleaning 2020-11-18 09:43:07 +01:00
b96b1849cd minor 2020-11-18 09:15:17 +01:00
902919f2df minor 2020-11-18 09:11:48 +01:00
1efdc90719 clean 2020-11-18 08:57:35 +01:00
e852158b83 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-11-17 19:23:36 +01:00
f48eff49e9 gotthard2 server config file modified 2020-11-17 19:23:28 +01:00
f7ecabdb51 update release.txt 2020-11-17 19:07:56 +01:00
cbf61ed05e binaries in serverbin 2020-11-17 18:43:45 +01:00
8be579ea53 binaries name changed 2020-11-17 18:41:18 +01:00
7fcac35549 gui exception thrown from acquire caught properly in gui 2020-11-17 17:39:34 +01:00
6563965787 binaries in 2020-11-17 16:52:49 +01:00
73d582744e updated binaries for 5.0.0 2020-11-17 16:49:03 +01:00
fa8fdced5f updating client versioning 2020-11-17 16:46:39 +01:00
5142603103 update doc 2020-11-17 16:45:19 +01:00
2fa3ebd8e6 Merge pull request #216 from slsdetectorgroup/callbacksafe
Callbacksafe
2020-11-17 16:26:07 +01:00
a534271aff back to normal receiver 2020-11-17 16:21:39 +01:00
d2eed6177c Merge branch 'callbacksafe' of github.com:slsdetectorgroup/slsDetectorPackage into callbacksafe 2020-11-17 16:12:39 +01:00
ddf43dbd24 fix for Eiger firmware sending bad packets of size 8 bytes when doing a stop 2020-11-17 16:12:30 +01:00
bfe8cb7020 Merge branch 'callbacksafe' of github.com:slsdetectorgroup/slsDetectorPackage into callbacksafe 2020-11-17 15:33:13 +01:00
40f6eb8ede WIP 2020-11-17 15:33:09 +01:00
5c71dd7246 handling acquisitionfinished callback 2020-11-17 15:28:39 +01:00
146d605d19 gui callback exception caught 2020-11-17 14:01:53 +01:00
918f3f3fde handling get data rxr callback exceptions 2020-11-17 13:53:54 +01:00
a36a294515 handling acquisition finished callback exception 2020-11-17 13:38:22 +01:00
f19bc8880a handling start acq call back exception 2020-11-17 13:34:51 +01:00
0cb7d62ad5 throw startacq callback exception 2020-11-17 12:57:14 +01:00
5ee95cf811 tests wip 2020-11-17 11:16:34 +01:00
980d76a15a binaries in 2020-11-17 11:03:16 +01:00
4385df18b7 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-11-17 11:02:32 +01:00
121450b8cc binaries in 2020-11-17 11:02:23 +01:00
e7ecb38b29 gotthard2 bug fix vetophoton server client api 2020-11-17 11:01:17 +01:00
59e12bbed8 tests wip 2020-11-17 10:51:40 +01:00
bd76a66770 tests rx_missingpackets not working 2020-11-17 08:52:30 +01:00
f592b98beb tests eiger wip 2020-11-16 19:51:15 +01:00
a6d696a0f8 Nextframenumber (#215) 2020-11-16 17:26:12 +01:00
4c4e2ccb6b Defaultdacs (#214) 2020-11-13 08:31:02 +01:00
b6b9a5d598 updated release notes and changed a few command names, now->runtime, timestamp->frametime, nframes->framecounter, startingfnum->startframenumber 2020-11-12 16:48:49 +01:00
eb221e083d minor change 2020-11-11 11:04:37 +01:00
8d9382c25b udpating docs 2020-11-10 15:42:44 +01:00
5017818fb4 verbose upload anaconda 2020-11-09 14:54:41 +01:00
2020407438 adding namespace sls to public receiver api 2020-11-09 11:23:11 +01:00
876207c8cd version 2020-04-14 16:49:51 +02:00
ec21624aeb updated git versions 2020-04-14 09:30:04 +02:00
1de5b85ce2 Merge branch '4.2.0-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.2.0-rc 2020-04-08 11:50:12 +02:00
b4e4033736 eiger: update tengiga instop server as well to fix transmitting for 10g 2020-04-08 11:49:28 +02:00
820bc01505 eiger: update tengiga instop server as well (no binaries yet) 2020-04-08 11:45:26 +02:00
4e54d1c318 eiger: default clkspeed full speed for dr 16 2020-04-07 09:35:43 +02:00
dec4183e0f updated release.txt 2020-04-07 09:25:30 +02:00
feed09f2f4 updated binaries 2020-04-07 09:18:50 +02:00
c6aa8d6072 eiger: default flag is parallel, updated release.txt, yet to update binaries 2020-04-07 09:12:25 +02:00
4ec38a071c eiger: removed print in server for addresstoall 2020-04-03 11:06:04 +02:00
0c4b721e13 eiger server: transmitting (data) status 2020-04-03 11:02:15 +02:00
fae884e658 change to release.txt 2020-04-03 10:03:10 +02:00
f20f084991 eiger receiver: changing dr changes rx_fifodepth to their defaults 2020-04-03 09:58:58 +02:00
20ce79872f updates release.txt 2020-04-03 09:41:04 +02:00
328375924f eiger client: clkdivider set to 0 for dr of 4, 8, 16 and to 2 for dr 32 2020-04-03 09:38:11 +02:00
a1d91e590e rx: fifodepth error will set fifodepth to 0 2020-04-02 18:24:18 +02:00
679db120b0 eiger server updated in serverbin 2020-04-02 17:49:46 +02:00
7a6797b23e zmq sockets client checked before creating them 2020-03-11 11:09:41 +01:00
93f8e8ecb3 updated release.txt, rxr optimization (no file buffering, write to every page at memory allocation, fix to fifo depth 2020-03-10 10:59:30 +01:00
d112956f79 eiger server: vcal=0, rx_fifodepth to greater than 32 bit, trimval argument range check, activate to both control and stop server, end of eiger server (if detectorip normal) set activate to 1 (for future eiger firmware), added setflippeddatax to users, removing warnings and check of detector size before accessing detector[0], updating subexptime also updated subperiod in master file, remove keeprunning in rxr that keeps it busy to semaphore 2020-03-10 09:25:41 +01:00
9649982932 sw trigger with acquire and parameter file understands submodules 2020-01-15 11:22:40 +01:00
eca2836703 Merge branch '4.1.1' of github.com:slsdetectorgroup/slsDetectorPackage into 4.1.1 2020-01-14 16:25:57 +01:00
d14c9600bb conda version 2020-01-14 16:24:10 +01:00
42971c94b7 updated versioning 2020-01-14 16:16:45 +01:00
b0fd4f4c44 updated release doc 2020-01-14 16:11:24 +01:00
06473cfcb2 bug fix: software trigger using control connect 2020-01-14 13:59:08 +01:00
6f2aad3836 updated temporary versioning 2020-01-06 19:01:44 +01:00
38aad40fef read/write of config/parameter file rewritten so that parameter file can take in slsdetector level commands 2020-01-06 18:16:41 +01:00
51c5520472 unregistering call back, detangling receiver streaming from callback 2020-01-06 11:51:19 +01:00
75838f77b3 unregistering call back, detangling receiver streaming from callback 2020-01-06 11:50:08 +01:00
54bedeaa0a software trigger via stop server instead of control server for sls_detector_acquire 2020-01-06 11:31:05 +01:00
b33b2edbd0 bug fix: locks in acquire 2020-01-06 11:29:11 +01:00
f7cb2b5dcd conda pkg 2019-10-08 12:48:51 +02:00
9ea3cbc8f1 Update RELEASE.txt 2019-10-04 10:56:14 +02:00
53bb677f8c eiger doc updated 2019-10-04 10:41:13 +02:00
663999a539 updated versions 2019-10-04 10:35:42 +02:00
98b45b32fd added jungfrau virtual binaries 2019-10-04 10:29:57 +02:00
74c08cd742 updated binaries in sererbin 2019-10-04 09:42:07 +02:00
696073b505 fixed eiger virtual software versions 2019-10-04 09:41:21 +02:00
e4645a8273 Update RELEASE.txt 2019-10-02 09:37:26 +02:00
c0cd25460d Update RELEASE.txt 2019-10-02 09:35:59 +02:00
e7e30693f0 transmission delays 2019-08-21 20:29:07 +02:00
dd96aac3cd build for conda 2019-08-20 12:24:39 +02:00
5697393a70 Merge branch '4.1.0-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.1.0-rc 2019-08-16 15:33:04 +02:00
052dd8058f updated eiger binary 2019-08-16 15:32:49 +02:00
4d99ce8c52 receiver master file includes quad, gap pixels enable, version updated for binary and hdf5 2019-08-14 20:33:40 +02:00
633c646239 eiger bug fix: 4 bit mode gap pixels, also added quad to shm 2019-08-14 15:31:18 +02:00
2a88bc6a1e Merge branch '4.1.0-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.1.0-rc 2019-08-14 10:43:15 +02:00
d8af2e594a eiger bug fix: quad mode, without gap pixels, data messed up 2019-08-14 10:42:54 +02:00
8da7c3e805 eiger manual 2019-08-13 16:57:22 +02:00
ddfbea76be eiger server bug fix: interrupt subframe wrong bit mapped, virtual compilation 2019-08-06 17:22:54 +02:00
c5f2275703 eiger serveR: minor fix for beb check quad fail 2019-07-31 15:20:25 +02:00
8c491f18fd quad enabled with gap pixels without the extra vertical pixel line 2019-07-31 13:00:12 +02:00
e07e2f2da0 eiger server bug fix: split quad and interruptframe into set and get to catch fails in set and when quad and interrupt subframe used together(different register values for tl and tr) 2019-07-31 10:58:49 +02:00
d981e1b8e5 eiger server: interrupt subframe, quad change flipping, registers set left and right separately 2019-07-29 15:19:46 +02:00
58e6338f9c eiger server for v24 2019-07-29 09:36:45 +02:00
27f3af5365 updated release text 2019-07-29 09:32:17 +02:00
350b4f0368 bug fix on quad: if no data streaming enabled in the beginning 2019-07-22 17:09:34 +02:00
445f3c66fd bug fix for previous commit to work for bottom module 2019-07-10 17:56:32 +02:00
1189b991e5 quad implemented 2019-07-10 17:39:43 +02:00
3e2b471ee1 client bug fix: framesl, cyclesl printed in float, fixed 2019-07-10 11:13:35 +02:00
8c76d5d52c updated release.txt 2019-06-14 09:19:34 +02:00
e7eee67fed Update RELEASE.txt 2019-06-13 11:44:43 +02:00
fade48dcfa updated release.rxt 2019-06-13 11:43:06 +02:00
8e58e7f8bf Updated release.txt : eiger firmware version 23 2019-06-13 11:41:50 +02:00
c8f56ee23c qwt 2019-06-13 10:44:45 +02:00
32d951e28a Merge branch '4.0.2' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.2 2019-06-13 09:01:47 +02:00
5c63c8fc8f gui bug fix: switching to tab plot while acquiring produced error messages 2019-06-13 09:01:39 +02:00
7b70274d4f checking online when refreshing (during acquire) is removed 2019-06-13 08:56:29 +02:00
1cd905c08b disable gui 2019-06-12 16:02:43 +02:00
13e809acd4 updated versions 2019-06-12 15:40:19 +02:00
46533b0411 updated server binaries 2019-06-12 15:37:17 +02:00
4f4de15d3a 1s sleep for large JF during powerchip 2019-06-12 14:53:52 +02:00
4f99aeabd2 bug fix: hdf5 printError still called once. replcaed with printErrorStack 2019-05-22 19:09:45 +02:00
f36a12e454 Release Notes typo: jungfrau min exptime is 50ns and not 50 us (#16) 2019-05-02 15:28:03 +02:00
5e246c0754 Merge branch '4.0.2-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.2-rc 2019-04-11 16:13:42 +02:00
518c6783cc Client (data call back API) and Gui (Eiger 4 bit mode with multiple images) bug fix: npixelsx and npixelsy was not updated to complete detector level when calling call back function to give complete image 2019-04-11 16:13:31 +02:00
0706564694 deploy only on specific branch 2019-04-11 09:31:27 +02:00
2108bbda66 Merge branch '4.0.2-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 4.0.2-rc 2019-04-08 18:06:19 +02:00
82feed1ab8 updated server binaries 2019-04-08 18:06:06 +02:00
4be0b5d436 jungfrau server bug fix: setting detector position gave error when switching between different sized detector configurations 2019-04-08 18:05:05 +02:00
f7eb256eb6 version 2019-03-15 14:45:44 +01:00
250fc26308 fixed deloyment 2019-03-15 14:40:12 +01:00
06a50520c1 gotthard server: bug fix get settings should not set default dacs 2019-03-11 14:54:53 +01:00
fc766055d4 receiver bug fix release text updated 2019-03-04 11:42:54 +01:00
828b1479c7 receiver bug fix jungfrau as root 2019-03-04 11:28:56 +01:00
22ed52605c receiverbug fixe affecting jungfrau receivers as root 2019-03-04 11:15:53 +01:00
a1a95ebb20 receiver bug fixaffecting Jungfrau receivers as root (optlen size as int), but setting buffer size is uint32_t size. setting it to uint64_t 2019-03-04 11:02:10 +01:00
d7ce5fedfd path 2019-02-12 15:06:15 +01:00
3a2682ffe7 missing headers updated build number 2019-02-12 14:46:56 +01:00
bf74a4135e travis 2019-02-11 10:25:58 +01:00
252ecf2769 travis 2019-02-11 10:15:57 +01:00
de01ab75e9 travis 2019-02-11 09:24:39 +01:00
5698da5f95 added conda recipe 2018-12-12 16:33:25 +01:00
7300d73675 udpate release 2018-11-30 15:34:15 +01:00
d4b467a641 update 2018-11-30 15:31:22 +01:00
7b71076180 update 2018-11-30 15:28:35 +01:00
9197d2b209 updated revisions 2018-11-30 15:27:39 +01:00
e094e41d89 updated releases.txt 2018-11-30 15:24:43 +01:00
512e1a3136 users bug fix:getting id(version) for single/multi detector, added resetframescaught in users 2018-11-30 14:39:01 +01:00
6d04c14bd6 users: added stopped to getrunstatus list 2018-11-30 11:35:31 +01:00
64183d8d6a gotthard server bug fix: updated a register for token timing for revision 2 boards 2018-11-30 11:27:06 +01:00
287efde54a Update RELEASE.txt 2018-08-17 18:01:13 +02:00
faa25b9e9f updated versioning 2018-08-17 17:57:53 +02:00
1b92b01a46 slsreceiver: removed warnings 2018-08-16 17:42:59 +02:00
4849063b6c client: unnecessary print while programming fpga 2018-08-16 12:21:26 +02:00
5cd020ae81 updated release.txt 2018-08-03 12:25:58 +02:00
160fabe02c slsDetectorSoftware: connect stop socket as well to confirm detector on line, also to prevent fclose closing socket 0 (if it never connected to stop socket). Future releases can use exception instead of using socketDescriptor 0 value to validate succesful constructor 2018-08-03 12:21:35 +02:00
90dd8e70e5 updated release.txt 2018-07-30 16:56:39 +02:00
08e121c71f slsDetectorSoftware: being able to get timer values individually from the users class since gotthard 25um master and slave will have different delay values 2018-07-30 16:49:15 +02:00
cb3b337a99 updated binary 2018-07-26 13:49:18 +02:00
5d9a952316 updated release.txt 2018-07-26 13:16:34 +02:00
8cc05c5848 gotthard server and slsDetectorSoftware: more accuracy when converting from double to int64_t by adding 0.5, improved clock precision of gotthard from 32.1 to 32.007729 2018-07-26 11:47:55 +02:00
d69d69e892 Merge branch '3.1.4-rc' of github.com:slsdetectorgroup/slsDetectorPackage into 3.1.4-rc 2018-07-23 14:57:56 +02:00
07a120fc4a slsDetectorSoftware: users class setsettings(-1) gave undefined settings from slsDetector::setSettings. It has been fixed. 2018-07-23 14:57:27 +02:00
11e8796847 slsReceiver: HDF5: printError obsolete since hdf51.10.2 and so using printErrorStack() 2018-07-18 12:53:52 +02:00
f79b009978 updated release txt 2018-07-17 14:42:49 +02:00
3259bfb008 slsReceiver: HDF5: absolute to relative linking 2018-07-17 14:23:32 +02:00
934bc5b9db slsReceiver HDF5: unlimited x dimension (#images) by extending by numImages if caught more images, fixed virtual mapping, fixed linking for jungfrau single module (removed virtual_ in all namings 2018-07-17 14:07:23 +02:00
6d11faed87 updated binaries 2018-06-28 15:32:53 +02:00
35fc52dae7 3.1.3: Bug fix: jungfrau server: delay after trigger always set to 5 seconds 2018-06-28 15:31:09 +02:00
e599bfe56f updating br versioning --version for binaries 2018-06-12 12:26:30 +02:00
764becc271 updated release.txt 2018-06-12 12:23:24 +02:00
7462d1002d bug fix for memory leak for every multi threading command when using API 2018-06-12 12:17:30 +02:00
834794ad98 gotthard renamed binaries 2017-12-19 18:04:44 +01:00
56c504abbb Merge remote branch 'slsDetectorCalibration/2.3.4' into 2.3.4 2017-12-12 11:14:19 +01:00
4d6346e678 Merge remote branch 'slsDetectorCalibration/2.3.3' into 2.3.3 2017-12-12 11:14:15 +01:00
dc7e448759 Merge remote branch 'slsDetectorCalibration/2.3.2' into 2.3.2 2017-12-12 11:14:12 +01:00
e658cbacda Merge remote branch 'slsDetectorCalibration/2.3.1' into 2.3.1 2017-12-12 11:14:08 +01:00
1e6c6dea71 Merge remote branch 'slsDetectorCalibration/2.3' into 2.3 2017-12-12 11:14:05 +01:00
0e5d4d1d8e Merge remote branch 'slsDetectorCalibration/2.2' into 2.2 2017-12-12 11:14:01 +01:00
a2986784d3 Merge remote branch 'slsDetectorCalibration/2.1.1' into 2.1.1 2017-12-12 11:13:34 +01:00
975cbb576e Merge remote branch 'slsDetectorCalibration/2.1' into 2.1 2017-12-12 11:06:15 +01:00
e48a92d9cd Merge remote branch 'slsDetectorCalibration/2.0.5' into 2.0.5 2017-12-12 11:02:57 +01:00
befdcf7f36 Merge remote branch 'slsDetectorGui/2.3.4' into 2.3.4 2017-12-04 16:48:01 +01:00
02f5c472a8 Merge remote branch 'slsReceiverSoftware/2.3.4' into 2.3.4 2017-12-04 16:48:00 +01:00
75ed2cd2e4 Merge remote branch 'slsDetectorSoftware/2.3.4' into 2.3.4 2017-12-04 16:47:59 +01:00
3be045f9b6 Merge remote branch 'slsDetectorGui/2.3.3' into 2.3.3 2017-12-04 16:47:54 +01:00
8fae982802 Merge remote branch 'slsReceiverSoftware/2.3.3' into 2.3.3 2017-12-04 16:47:54 +01:00
128ec88b5f Merge remote branch 'slsDetectorSoftware/2.3.3' into 2.3.3 2017-12-04 16:47:52 +01:00
d5fc158330 Merge remote branch 'slsDetectorGui/2.3.2' into 2.3.2 2017-12-04 16:47:47 +01:00
864e6e4c81 Merge remote branch 'slsReceiverSoftware/2.3.2' into 2.3.2 2017-12-04 16:47:47 +01:00
343d96ff16 Merge remote branch 'slsDetectorSoftware/2.3.2' into 2.3.2 2017-12-04 16:47:46 +01:00
4142328437 Merge remote branch 'slsDetectorGui/2.3.1' into 2.3.1 2017-12-04 16:47:41 +01:00
6c797988c7 Merge remote branch 'slsReceiverSoftware/2.3.1' into 2.3.1 2017-12-04 16:47:41 +01:00
215c262981 Merge remote branch 'slsDetectorSoftware/2.3.1' into 2.3.1 2017-12-04 16:47:39 +01:00
081b809078 Merge remote branch 'slsDetectorGui/2.3' into 2.3 2017-12-04 16:47:35 +01:00
9263567cd8 Merge remote branch 'slsReceiverSoftware/2.3' into 2.3 2017-12-04 16:47:34 +01:00
58e90a85be Merge remote branch 'slsDetectorSoftware/2.3' into 2.3 2017-12-04 16:47:33 +01:00
025c836e25 Merge remote branch 'slsDetectorGui/2.2' into 2.2 2017-12-04 16:47:28 +01:00
5d5abae3f4 Merge remote branch 'slsReceiverSoftware/2.2' into 2.2 2017-12-04 16:47:28 +01:00
e2ad46386e Merge remote branch 'slsDetectorSoftware/2.2' into 2.2 2017-12-04 16:47:26 +01:00
308d44e452 Merge remote branch 'slsDetectorGui/2.1.1' into 2.1.1 2017-12-04 16:47:22 +01:00
69da61b1fb Merge remote branch 'slsReceiverSoftware/2.1.1' into 2.1.1 2017-12-04 16:47:22 +01:00
460168ce04 Merge remote branch 'slsDetectorSoftware/2.1.1' into 2.1.1 2017-12-04 16:47:21 +01:00
4e429c0d77 Merge remote branch 'slsDetectorGui/2.1' into 2.1 2017-12-04 16:45:34 +01:00
bf4fab549d Merge remote branch 'slsReceiverSoftware/2.1' into 2.1 2017-12-04 16:45:34 +01:00
f7705eb1da Merge remote branch 'slsDetectorSoftware/2.1' into 2.1 2017-12-04 16:45:32 +01:00
a2217e2066 Merge remote branch 'slsReceiverSoftware/2.0.5' into 2.0.5 2017-12-04 15:33:33 +01:00
aaa02706fc Merge remote branch 'slsDetectorSoftware/2.0.5' into 2.0.5 2017-12-04 15:31:52 +01:00
6a80bc5b54 new feature, set threshold without uploading trimbits 2017-06-27 13:00:38 +02:00
b9275646ad crazy amount of changes, both necessary and unnecessary;need to narrow down the real change later 2017-04-27 14:05:04 +02:00
9e2f2697c7 crazy amount of changes, both necessary and unnecessary;need to narrow down the real change later 2017-04-27 13:58:25 +02:00
b6b0df62b6 updaterev 2017-04-20 08:26:29 +02:00
0ba537e479 removed headersize compile error 2017-04-20 08:26:16 +02:00
75ddf535dc updaterev 2017-04-19 17:59:53 +02:00
b1de501bef updaterev 2017-04-19 17:59:46 +02:00
0f3a63f101 changed zmq default port starting at 40001 to be able to view in wireshark and removed headersize for warning 2017-04-19 17:42:38 +02:00
3b4b2d707f changes without ostringstream done 2017-04-19 10:17:39 +02:00
f405aa1733 split zmq_msg_t so its not reused 2017-04-19 10:17:30 +02:00
df0fdb7ecb changes without ostringstream done 2017-04-19 10:16:45 +02:00
91b7a87557 just started changin frm ostringstream 2017-04-18 15:32:01 +02:00
9468b9ca1e updaterev 2017-04-11 13:39:59 +02:00
d7982e178e updaterev 2017-04-11 13:39:53 +02:00
9cf5714a5b removing warnings shown from esrf debian 2017-04-11 13:39:35 +02:00
0c9ac8911a removing warnings shown from esrf debian 2017-04-11 13:39:28 +02:00
4730c8c0a9 updaterev 2017-04-11 13:31:49 +02:00
43efb8acfd removing warnings shown from esrf debian 2017-04-11 13:31:32 +02:00
6ecca8fcb0 updaterev 2017-04-11 09:03:26 +02:00
17cb63a57f updaterev 2017-04-11 09:03:19 +02:00
4f83fcb001 updaterev 2017-04-11 09:02:10 +02:00
ab94af6d29 removed verbose etc 2017-04-07 15:08:40 +02:00
7c725cc69b .c_str() must not access global variables from thread 2017-04-07 14:57:19 +02:00
f0198d2d2e alejandro's changes from ESRF 2017-04-07 14:50:17 +02:00
5ddccbdee4 changed all -lpthread to -pthread 2017-04-07 14:28:00 +02:00
8fb39b8c7e changed all -lpthread to -pthread 2017-04-07 14:27:27 +02:00
bd5293f4b1 changed all -lpthread to -pthread 2017-04-07 14:26:09 +02:00
b91180f5b2 changed all -lpthread to -pthread 2017-04-07 14:26:03 +02:00
7c3b5065a5 changed all -lpthread to -pthread 2017-04-07 14:25:09 +02:00
9aef802bea changed all -lpthread to -pthread 2017-04-07 14:24:49 +02:00
f7d85231f2 solved warnings except sscanf for uint64_t 2017-04-07 14:12:21 +02:00
5b3a911e8d solved warnings except sscanf for uint64_t 2017-04-07 14:11:34 +02:00
65f5e1c1ab strtok is not thread safe..used to set receiver udp ip etc to detector, fixed 2017-04-06 15:04:33 +02:00
839896c7e6 fixed the print file packet loss progress bug 2016-10-19 15:53:26 +02:00
4a7e246604 removed asking only 1 for framescaugh 2016-10-19 10:21:29 +02:00
7f293115c4 moved f_activate to receiver funcs from detectors funcs 2016-10-10 08:43:18 +02:00
f59f40a659 ask only 1 for frames caught for 9m 2016-10-10 08:41:03 +02:00
64fd82f92c fixed bug in gui that overwrites the individual sls file path values with the multi value, included a febl and febr temp read 2016-10-10 08:39:46 +02:00
cd232fd732 fixed bug in gui that overwrites the individual sls file path values with the multi value 2016-10-10 08:17:34 +02:00
172fa66b1f hotfix for memory leak in server 2016-08-18 11:57:36 +02:00
196 changed files with 3852 additions and 9716 deletions

View File

@ -31,7 +31,7 @@ script:
deploy: deploy:
provider: script provider: script
script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -t $CONDA_TOKEN upload --force {} \; script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -v --show-traceback -t $CONDA_TOKEN upload --force {} \;
on: on:
branch: developer branch: developer
tags: true tags: true

View File

@ -49,7 +49,7 @@ option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF) option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
# set(ClangFormat_BIN_NAME clang-format) # set(ClangFormat_BIN_NAME clang-format)
set(ClangFormat_EXCLUDE_PATTERNS "build/" set(ClangFormat_EXCLUDE_PATTERNS "build/"
"libs/" "libs/"
"slsDetectorCalibration/" "slsDetectorCalibration/"
"ctbGui/" "ctbGui/"
@ -64,18 +64,6 @@ check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
message(STATUS "SLS_LTO_AVAILABLE:" ${SLS_LTO_AVAILABLE}) message(STATUS "SLS_LTO_AVAILABLE:" ${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)
# if (SLS_USE_LD_GOLD)
# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
# if ("${LD_VERSION}" MATCHES "GNU gold")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
# else ()
# message(WARNING "GNU gold linker isn't available, using the default system linker.")
# endif ()
# endif ()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
@ -187,20 +175,12 @@ if (SLS_USE_TEXTCLIENT)
add_subdirectory(slsDetectorSoftware) add_subdirectory(slsDetectorSoftware)
endif (SLS_USE_TEXTCLIENT) endif (SLS_USE_TEXTCLIENT)
if (SLS_USE_RECEIVER) if (SLS_USE_RECEIVER)
if (SLS_USE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
endif (SLS_USE_HDF5)
add_subdirectory(slsReceiverSoftware) add_subdirectory(slsReceiverSoftware)
endif (SLS_USE_RECEIVER) endif (SLS_USE_RECEIVER)
if (SLS_USE_GUI) if (SLS_USE_GUI)
find_package(Qt4 REQUIRED) add_subdirectory(slsDetectorGui)
find_package(Qwt 6.1 REQUIRED)
if (QT4_FOUND AND QWT_FOUND)
add_subdirectory(slsDetectorGui)
endif()
endif (SLS_USE_GUI) endif (SLS_USE_GUI)
if (SLS_USE_SIMULATOR) if (SLS_USE_SIMULATOR)
@ -212,7 +192,7 @@ if (SLS_USE_INTEGRATION_TESTS)
endif (SLS_USE_INTEGRATION_TESTS) endif (SLS_USE_INTEGRATION_TESTS)
if (SLS_USE_PYTHON) if (SLS_USE_PYTHON)
set(PYBIND11_CPP_STANDARD -std=c++11) find_package (Python 3.6 COMPONENTS Interpreter Development)
add_subdirectory(libs/pybind11) add_subdirectory(libs/pybind11)
add_subdirectory(python) add_subdirectory(python)
endif(SLS_USE_PYTHON) endif(SLS_USE_PYTHON)

View File

@ -4,7 +4,7 @@ Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tag
Use only releases with tags such as x.x.x or x.x.x-rcx. Use only releases with tags such as x.x.x or x.x.x-rcx.
### Documentation ### Documentation
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support) Detailed documentation on the latest release of 5.0.0 can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
### Binaries ### Binaries
Binaries for the slsDetectorPackage are available through conda. Binaries for the slsDetectorPackage are available through conda.
@ -12,6 +12,7 @@ Binaries for the slsDetectorPackage are available through conda.
#Add conda channels #Add conda channels
conda config --add channels conda-forge conda config --add channels conda-forge
conda config --add channels slsdetectorgroup conda config --add channels slsdetectorgroup
conda config --set channel_priority strict
conda install slsdetlib #only shared lib and command line conda install slsdetlib #only shared lib and command line
conda install slsdet #python bindings (includes slsdetlib) conda install slsdet #python bindings (includes slsdetlib)
@ -29,10 +30,8 @@ git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
``` ```
#### Dependencies #### Dependencies
* Lib: c++11 compiler (gcc=>4.8), ZeroMQ 4
* Gui: Qt 4.8 and Qwt 6.0 Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
* Calibration wizards and ctbGUI: ROOT
* Optional: HDF5
#### Compilation #### Compilation
@ -42,27 +41,38 @@ cmk.sh or directly with cmake for more control.
**1. Compile using script cmk.sh**<br> **1. Compile using script cmk.sh**<br>
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br> These are mainly aimed at those not familiar with using ccmake and cmake.
```
The binaries are generated in slsDetectorPackage/build/bin directory.
Usage: [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-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>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
-[no option]: only make -[no option]: only make
-c: Clean -c: Clean
-b: Builds/Rebuilds CMake files normal mode -b: Builds/Rebuilds CMake files normal mode
-p: Builds/Rebuilds Python API -p: Builds/Rebuilds Python API
-h: Builds/Rebuilds Cmake files with HDF5 package -h: Builds/Rebuilds Cmake files with HDF5 package
-d: HDF5 Custom Directory -d: HDF5 Custom Directory
-t: Build/Rebuilds only text client -k: CMake command
-r: Build/Rebuilds only receiver -l: Install directory
-g: Build/Rebuilds only gui -t: Build/Rebuilds only text client
-s: Simulator -r: Build/Rebuilds only receiver
-u: Chip Test Gui -g: Build/Rebuilds only gui
-j: Number of threads to compile through -s: Simulator
-e: Debug mode -u: Chip Test Gui
-i: Builds tests -j: Number of threads to compile through
-e: Debug mode
eg. Rebuild when you switch to a new build and compile in parallel: -i: Builds tests
./cmk.sh -bj5 -m: Manuals
-n: Manuals without compiling doxygen (only rst)
-z: Moench zmq processor
# get all options
./cmk.sh -?
# new build and compile in parallel:
./cmk.sh -bj5
```
**2. Compile without script**<br> **2. Compile without script**<br>
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers. Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
``` ```
@ -71,3 +81,12 @@ Use cmake to create out-of-source builds, by creating a build folder parallel to
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON $ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
$ make -j12 #or whatever number of threads wanted $ make -j12 #or whatever number of threads wanted
``` ```
To install binaries using CMake
```
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
mkdir build && cd build
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
make -j12 #or whatever number of cores you are using to build
make install
```

View File

@ -1,67 +1,75 @@
SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2) SLS Detector Package 5.1.0 released on xx.xx.2020 (Minor Release)
=========================================================================== ===================================================================
This document describes the differences between 5.1.0 and 5.x.x releases.
CONTENTS CONTENTS
-------- --------
1. Firmware Requirements 1. Topics Concerning
2. Download, Documentation & Support 2. New Features
2. Resolved Issues
3. Known Issues
4. Firmware Requirements
5. Download, Documentation & Support
1. Firmware Requirements
1. Topics Concerning
====================
- potentital memory leak in receiver
- scanParameters in Python
- cmk.sh refactored
- m3 settings and threshold
2. New Features
===============
Client
------
1. Aded settings and threshold features for Mythen3.
3. Resolved Issues
==================
Receiver
--------
1. Current code only calls Implementation::setDetectorType from constructor,
but potential memory leak if called out of constructor context. Fixed.
Client
------
1. Fixed missing scanParameters class in Python
2. cmk.sh refactored to have better option handling
4. Firmware Requirements
======================== ========================
Eiger No updates from 5.0.0
=====
Compatible version : 08.09.2020 (v27)
Jungfrau
========
Compatible version : 24.07.2020 (v1.1, PCB v1.0)
: 21.07.2020 (v2.1, PCB v2.0)
Gotthard
========
Compatible version : 08.02.2018 (50um and 25um Master)
: 09.02.2018 (25 um Slave)
Mythen3
=======
Compatible version : 25.09.2020 (development)
Gotthard2
=========
Compatible version : 25.09.2020 (development)
Moench
======
Compatible version : 10.05.2020 (v1.0)
Ctb
===
Compatible version : 10.05.2019 (v1.0)
Detector Upgrade
================
The following can be upgraded remotely: 5. Known Issues
Eiger via bit files ===============
Jungfrau via command <.pof>
Mythen3 via command <.rbf>
Gotthard2 via command <.rbf>
Moench via command <.pof>
Ctb via command <.pof>
The following cannot be upgraded remotely: No updates from 5.0.0
Gotthard
Instructions available at
https://slsdetectorgroup.github.io/devdoc/firmware.html
and
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
2. Download, Documentation & Support 6. Download, Documentation & Support
==================================== ====================================
Download Download
@ -88,6 +96,9 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
Consuming slsDetectorPackage: Consuming slsDetectorPackage:
https://slsdetectorgroup.github.io/devdoc/consuming.html https://slsdetectorgroup.github.io/devdoc/consuming.html
API Examples:
https://github.com/slsdetectorgroup/api-examples
Command Line Documentation: Command Line Documentation:
https://slsdetectorgroup.github.io/devdoc/commandline.html https://slsdetectorgroup.github.io/devdoc/commandline.html
@ -106,6 +117,10 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
Python API Example: Python API Example:
https://slsdetectorgroup.github.io/devdoc/pyexamples.html https://slsdetectorgroup.github.io/devdoc/pyexamples.html
Receivers (including custom receiver):
https://slsdetectorgroup.github.io/devdoc/receivers.html
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html
TroubleShooting: TroubleShooting:
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
@ -121,4 +136,4 @@ SLS Detector Package 5.0.0-rc2 released on 09.10.2020 (Release Candidate 2)
dhanya.thattil@psi.ch dhanya.thattil@psi.ch
erik.frojdh@psi.ch erik.frojdh@psi.ch
anna.bergamaschi@psi.ch

33
cmk.sh
View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
CMAKE="cmake3"
BUILDDIR="build" BUILDDIR="build"
INSTALLDIR=""
HDF5DIR="/opt/hdf5v1.10.0" HDF5DIR="/opt/hdf5v1.10.0"
HDF5=0 HDF5=0
COMPILERTHREADS=0 COMPILERTHREADS=0
@ -22,13 +24,15 @@ CMAKE_PRE=""
CMAKE_POST="" CMAKE_POST=""
usage() { echo -e " usage() { echo -e "
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-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>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
-[no option]: only make -[no option]: only make
-c: Clean -c: Clean
-b: Builds/Rebuilds CMake files normal mode -b: Builds/Rebuilds CMake files normal mode
-p: Builds/Rebuilds Python API -p: Builds/Rebuilds Python API
-h: Builds/Rebuilds Cmake files with HDF5 package -h: Builds/Rebuilds Cmake files with HDF5 package
-d: HDF5 Custom Directory -d: HDF5 Custom Directory
-k: CMake command
-l: Install directory
-t: Build/Rebuilds only text client -t: Build/Rebuilds only text client
-r: Build/Rebuilds only receiver -r: Build/Rebuilds only receiver
-g: Build/Rebuilds only gui -g: Build/Rebuilds only gui
@ -75,7 +79,7 @@ For rebuilding only certain sections
" ; exit 1; } " ; exit 1; }
while getopts ":bpchd:j:trgeisumnz" opt ; do while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
case $opt in case $opt in
b) b)
echo "Building of CMake files Required" echo "Building of CMake files Required"
@ -99,6 +103,14 @@ while getopts ":bpchd:j:trgeisumnz" opt ; do
echo "New HDF5 directory: $OPTARG" echo "New HDF5 directory: $OPTARG"
HDF5DIR=$OPTARG HDF5DIR=$OPTARG
;; ;;
l)
echo "CMake install directory: $OPTARG"
INSTALLDIR="$OPTARG"
;;
k)
echo "CMake command: $OPTARG"
CMAKE="$OPTARG"
;;
j) j)
echo "Number of compiler threads: $OPTARG" echo "Number of compiler threads: $OPTARG"
COMPILERTHREADS=$OPTARG COMPILERTHREADS=$OPTARG
@ -252,7 +264,15 @@ else
fi fi
#install
if [ -n "$INSTALLDIR" ]; then
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR"
CMAKE_POST+=" -DCMAKE_FIND_ROOT_PATH=$INSTALLDIR"
fi
#enter build dir #enter build dir
#pushd $BUILDDIR;
cd $BUILDDIR; cd $BUILDDIR;
echo "in "$PWD echo "in "$PWD
@ -261,7 +281,7 @@ echo "in "$PWD
#cmake #cmake
if [ $REBUILD -eq 1 ]; then if [ $REBUILD -eq 1 ]; then
rm -f CMakeCache.txt rm -f CMakeCache.txt
BUILDCOMMAND="$CMAKE_PRE cmake3 $CMAKE_POST .." BUILDCOMMAND="$CMAKE_PRE $CMAKE $CMAKE_POST .."
echo $BUILDCOMMAND echo $BUILDCOMMAND
eval $BUILDCOMMAND eval $BUILDCOMMAND
fi fi
@ -305,6 +325,13 @@ else
fi fi
#install
if [ -n "$INSTALLDIR" ]; then
make install
# popd
# $CMAKE --build $BUILDDIR --target install
fi

View File

@ -36,7 +36,7 @@ Depreciated commands
------------------------ ------------------------
.. note :: .. note ::
All dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector. All the dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
.. csv-table:: Depreciated commands .. csv-table:: Depreciated commands
:file: ../depreciated.csv :file: ../depreciated.csv

View File

@ -9,7 +9,7 @@ CMake approaches.
One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand. One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand.
CMake: slsDetectorPackage as submodule in your project CMake: slsDetectorPackage as submodule in your project
--------------------------------------- ---------------------------------------------------------------
If you are using CMake to build your integration and want to build everything If you are using CMake to build your integration and want to build everything
in one go, we support adding slsDetectorPackage as a subfolder in your cmake project. in one go, we support adding slsDetectorPackage as a subfolder in your cmake project.

View File

@ -12,32 +12,7 @@ Download
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- bit files - `bit files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
-
- 08.09.2020
- `v27 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v27/>`__
-
* - v4.0.0 - v4.2.0
-
- 30.07.2019
- `v24 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v24/>`__
-
* - v3.1.0 - v3.1.5
-
- 17.08.2017
- `v20 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/v20/>`__
-
Upgrade Upgrade
^^^^^^^^ ^^^^^^^^
@ -116,37 +91,7 @@ Download
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- pof files - `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
- 2.0
- 21.07.2020
- `v2.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v2_1/jungfrau_v2_1.pof>`__
-
* - v5.0.0-rcx
- 1.0
- 24.07.2020
- `v1.1 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v1_1/jungfrau_v1_1.pof>`__
-
* - v4.0.1 - v4.2.0
- 1.0
- 06.12.2018
- `v0.7 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_7/jungfrau_v0_7.pof>`__
-
* - v3.1.0 - v3.1.5
- 1.0
- 13.11.2017
- `v0.6 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/jungfrau/v0_6/jungfrau_v0_6.pof>`__
-
Upgrade (from v4.x.x) Upgrade (from v4.x.x)
@ -156,7 +101,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
#. Tftp must be installed on pc. #. Tftp must be installed on pc.
#. Update client package to the latest (5.0.0-rc1). #. Update client package to the latest (5.x.x).
#. Disable server respawning or kill old server #. Disable server respawning or kill old server
.. code-block:: bash .. code-block:: bash
@ -204,7 +149,7 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
jungfrauDetectorServervxxx --stop-server 1953 jungfrauDetectorServervxxx --stop-server 1953
Upgrade (from v5.0.0-rcx) Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware. Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
@ -230,31 +175,8 @@ Download
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- pof files - `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. list-table::
:widths: 15 15 15 15 5
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - All versions
- 50um
- 08.02.2018
- `50um <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/50um/gotthard_I_50um.pof>`__
-
* - All versions
- 25um (master)
- 08.02.2018
- `25um (master) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/master/gotthard_I_25um_master.pof>`__
-
* - All versions
- 25um (slave)
- 09.02.2018
- `25um (slave) <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/gotthard_I/25um/slave/gotthard_I_25um_slave.pof>`__
-
.. _firmware upgrade using blaster for blackfin: .. _firmware upgrade using blaster for blackfin:
@ -294,24 +216,10 @@ Download
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- rbf files - rbf files (in developement)
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
-
- 25.09.2020
-
- development
Upgrade (from v5.0.0-rcx) Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console #. Program from console
@ -337,23 +245,10 @@ Download
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- rbf files - rbf files (in development)
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
-
- 25.09.2020
-
- development
Upgrade (from v5.0.0-rcx) Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console #. Program from console
@ -375,28 +270,10 @@ Download
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- pof files - `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
- EPCQ128
- 05.10.2020
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCQ128/v1_0/moench_v1_0_201005.pof>`__
-
* - v5.0.0-rcx
- EPCS128
- 05.10.2020
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/moench/EPCS128/v1_0/moench_v1_0_201005.pof>`__
-
Upgrade (from v5.0.0-rcx) Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware. Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
@ -419,28 +296,10 @@ Download
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
- detector server corresponding to package in slsDetectorPackage/serverBin - detector server corresponding to package in slsDetectorPackage/serverBin
- pof files - `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
.. list-table::
:widths: 25 10 30 25 10
:header-rows: 1
* - Software
- Hardware
- Firmware Date
- Firmware Link
- Comments
* - v5.0.0-rcx
- EPCQ128
- 05.10.2020
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCQ128/v1_0/ctb_v1_0_201005.pof>`__
-
* - v5.0.0-rcx
- EPCS128
- 05.10.2020
- `v1.0 <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/ctb/EPCS128/v1_0/ctb_v1_0_201005.pof>`__
-
Upgrade (from v5.0.0-rcx) Upgrade (from v5.0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware. Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
@ -462,11 +321,12 @@ Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you
Firmware Troubleshooting with blackfin Firmware Troubleshooting with blackfin
---------------------------------------- ----------------------------------------
#. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error. 1. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
#. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred. 2. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
3. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
#. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
.. code-block:: bash .. code-block:: bash
# connect to the board # connect to the board
@ -482,7 +342,7 @@ Firmware Troubleshooting with blackfin
4. If one can see the mtd3 drive, one can already try to flash again using the **programfpga** command (without rebooting blackfin or detector). 4. If one can see the mtd3 drive, one can already try to flash again using the **programfpga** command (without rebooting blackfin or detector).
#. If one can't list it, read the next section to try to get the blackfin to list it. 5. If one can't list it, read the next section to try to get the blackfin to list it.
How to get back mtd3 drive remotely How to get back mtd3 drive remotely
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -53,9 +53,9 @@ int main() {
} }
std::ofstream fs2("depreciated.csv"); std::ofstream fs2("depreciated.csv");
fs2 << "Old, New\n"; fs2 << "Old, New\n";
auto cmds = proxy.GetDepreciatedCommands(); auto cmds = proxy.GetDepreciatedCommands();
for (auto it : cmds){ for (auto it : cmds) {
fs2 << it.first << ", " << it.second << '\n'; fs2 << it.first << ", " << it.second << '\n';
} }
} }

View File

@ -49,25 +49,39 @@ The easiest way to configure options is to use the ccmake utility.
Build using cmk.sh script Build using cmk.sh script
------------------------- -------------------------
These are mainly aimed at those not familiar with using ccmake and cmake.
.. code-block:: bash .. code-block:: bash
The binaries are generated in slsDetectorPackage/build/bin directory. The binaries are generated in slsDetectorPackage/build/bin directory.
# new build and make with 9 parallel threads Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
./cmk.sh -cbj9 -[no option]: only make
-c: Clean
# build with python -b: Builds/Rebuilds CMake files normal mode
./cmk.sh -bpj9 -p: Builds/Rebuilds Python API
-h: Builds/Rebuilds Cmake files with HDF5 package
# build with GUI -d: HDF5 Custom Directory
./cmk.sh -bgj9 -k: CMake command
-l: Install directory
# build with hdf5 -t: Build/Rebuilds only text client
./cmk.sh -hj9 -d [path of hdf5 dir] -r: Build/Rebuilds only receiver
-g: Build/Rebuilds only gui
-s: Simulator
-u: Chip Test Gui
-j: Number of threads to compile through
-e: Debug mode
-i: Builds tests
-m: Manuals
-n: Manuals without compiling doxygen (only rst)
-z: Moench zmq processor
# get all options # get all options
./cmk.sh -? ./cmk.sh -?
# new build and compile in parallel:
./cmk.sh -bj5
Install binaries using conda Install binaries using conda
-------------------------------- --------------------------------

View File

@ -1,6 +1,6 @@
Receiver Receiver
============================================== ==============================================
.. doxygenclass:: Receiver .. doxygenclass:: sls::Receiver
:members: :members:
.. :undoc-members: .. :undoc-members:

View File

@ -48,3 +48,24 @@ Custom Receiver
| Cannot use "auto" for **udp_dstip**. | Cannot use "auto" for **udp_dstip**.
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver. | Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
Example of a custom receiver config file
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
.. code-block:: bash
# detector hostname
hostname bchip052
# udp destination port (receiver)
udp_dstport 50004
# udp destination ip (receiver)
udp_dstip 10.0.1.100
# udp source ip (same subnet as udp_dstip)
udp_srcip 10.0.1.184
# udp destination mac
udp_dstmac 22:47:d5:48:ad:ef

View File

@ -1,6 +1,10 @@
Troubleshooting Troubleshooting
================= =================
If something is missing, don't hesitate to
open an issue at our `github repo issues
<https://github.com/slsdetectorgroup/slsDetectorPackage/issues>`_.
Common Common
------ ------

View File

@ -60,6 +60,7 @@ Client
sls_detector_put virtual 2 1912 sls_detector_put virtual 2 1912
Use the same in the config file. Use the same in the config file.
Detector API has a method 'isVirtualDetectorServer' to check if on-board detector server is virtual.
Sample Config file Sample Config file

View File

@ -0,0 +1,39 @@
# detector hostname
hostname bchip052
# do not use any rx_ or "file" (eg. fwrite, fpath) commands, which go to slsReceiver/slsMultiReceiver
# udp destination port (receiver)
udp_dstport 50004
# udp destination ip (receiver)
udp_dstip 10.0.1.100
# udp source ip (same subnet as udp_dstip)
udp_srcip 10.0.1.184
# udp destination mac
udp_dstmac 22:47:d5:48:ad:ef
# PCBv2.0 (using 2 interfaces, top)
udp_dstport2 50005
udp_dstip2 10.0.2.100
udp_srcip2 10.0.2.184
udp_dstmac2 22:47:d5:48:ad:ff
# enable two interfaces
numinterfaces 2
# select inner interface(effective only when numinterfaces is 1)
#selinterface 1
# power on chip
powerchip 1
# high voltage
highvoltage 200
# timing to trigger
timing trigger

View File

@ -1,9 +1,9 @@
#include "catch.hpp" #include "catch.hpp"
#include "sls/ClientSocket.h"
#include "DetectorImpl.h" #include "DetectorImpl.h"
#include "Module.h" #include "Module.h"
#include "sls/ClientSocket.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
@ -446,8 +446,8 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
CHECK(m.readRegister(0x7b) == 0x1003E); CHECK(m.readRegister(0x7b) == 0x1003E);
} }
TEST_CASE("Eiger or Jungfrau startingfnum", TEST_CASE("Eiger or Jungfrau nextframenumber",
"[.eigerintegration][.jungfrauintegration][startingfnum]") { "[.eigerintegration][.jungfrauintegration][nextframenumber]") {
SingleDetectorConfig c; SingleDetectorConfig c;
// pick up multi detector from shm id 0 // pick up multi detector from shm id 0
@ -465,8 +465,8 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
// starting fnum // starting fnum
uint64_t val = 8; uint64_t val = 8;
m.setStartingFrameNumber(val); m.setNextFrameNumber(val);
CHECK(m.getStartingFrameNumber() == val); CHECK(m.getNextFrameNumber() == val);
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
@ -474,18 +474,18 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
CHECK_THROWS_AS(m.setStartingFrameNumber(0), sls::RuntimeError); CHECK_THROWS_AS(m.setNextFrameNumber(0), sls::RuntimeError);
if (m.getDetectorTypeAsString() == "Eiger") { if (m.getDetectorTypeAsString() == "Eiger") {
val = 281474976710655; val = 281474976710655;
} else if (m.getDetectorTypeAsString() == "Jungfrau") { } else if (m.getDetectorTypeAsString() == "Jungfrau") {
val = 18446744073709551615; val = 18446744073709551615;
} }
m.setStartingFrameNumber(val); m.setNextFrameNumber(val);
CHECK(m.getStartingFrameNumber() == val); CHECK(m.getNextFrameNumber() == val);
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
CHECK(m.getStartingFrameNumber() == (val + 1)); CHECK(m.getNextFrameNumber() == (val + 1));
} }
TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") { TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {

View File

@ -1,19 +1,16 @@
# find_package (Python COMPONENTS Interpreter Development)
pybind11_add_module(_slsdet pybind11_add_module(_slsdet
src/main.cpp src/main.cpp
src/enums.cpp src/enums.cpp
src/detector.cpp src/detector.cpp
src/network.cpp src/network.cpp
src/pattern.cpp
src/scan.cpp
) )
target_link_libraries(_slsdet PUBLIC target_link_libraries(_slsdet PUBLIC
slsDetectorShared slsDetectorStatic
slsReceiverShared )
slsSupportShared
${ZeroMQ_LIBRARIES}
)
@ -33,6 +30,7 @@ set( PYTHON_FILES
enums.py enums.py
errors.py errors.py
gotthard.py gotthard.py
pattern.py
gotthard2.py gotthard2.py
moench.py moench.py
proxy.py proxy.py

View File

@ -0,0 +1,14 @@
from slsdet import Detector, patternParameters
d = Detector()
pat = patternParameters()
#Access to members of the structure using numpy arrays
pat.patlimits = 0x0, 0xa
d.setPattern(pat)
#Load pattern from file
pat.load("/some/dir/some.pat")

View File

@ -6,7 +6,7 @@ d = Detector()
d.fformat = fileFormat.BINARY d.fformat = fileFormat.BINARY
# Altough not recommended for convenience all enums # Altough not recommended for convenience all enums
# and some other things can be impored using * # and some other things can be imported using *
from slsdet import * from slsdet import *
d.speed = speedLevel.FULL_SPEED d.speed = speedLevel.FULL_SPEED
@ -15,6 +15,6 @@ d.speed = speedLevel.FULL_SPEED
import slsdet.enums import slsdet.enums
for enum in dir(slsdet.enums): for enum in dir(slsdet.enums):
# filter out special memebers # filter out special members
if not enum.startswith('_'): if not enum.startswith('_'):
print(enum) print(enum)

View File

@ -0,0 +1,19 @@
from slsdet import Mythen3, scanParameters, dacIndex
#Configure scan
sp = scanParameters()
sp.enable = 1
sp.dacInd = dacIndex.VTH1
sp.startOffset = 0
sp.stopOffset = 1000
sp.stepSize = 100
sp.dacSettleTime_ns = int(1e9)
# Send scan to detector
d = Mythen3()
d.setScan(sp)

View File

@ -10,6 +10,8 @@ from slsdet.lookup import view, find
import slsdet import slsdet
d = Detector() d = Detector()
e = Eiger() e = Eiger()
c = Ctb() c = Ctb()

View File

@ -55,7 +55,7 @@ def generate_enum_string(enums):
data.append('.export_values();\n\n') data.append('.export_values();\n\n')
return ''.join(data) return ''.join(data)
with open('../../slsSupportLib/include/sls_detector_defs.h') as f: with open('../../slsSupportLib/include/sls/sls_detector_defs.h') as f:
data = f.read() data = f.read()
data = remove_comments(data) data = remove_comments(data)

View File

@ -8,6 +8,8 @@ from .mythen3 import Mythen3
from .gotthard2 import Gotthard2 from .gotthard2 import Gotthard2
from .gotthard import Gotthard from .gotthard import Gotthard
from .moench import Moench from .moench import Moench
from .pattern import Pattern, patternParameters
import _slsdet import _slsdet
xy = _slsdet.xy xy = _slsdet.xy
@ -18,3 +20,4 @@ from .enums import *
IpAddr = _slsdet.IpAddr IpAddr = _slsdet.IpAddr
MacAddr = _slsdet.MacAddr MacAddr = _slsdet.MacAddr
scanParameters = _slsdet.scanParameters

View File

@ -349,7 +349,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def nframes(self): def framecounter(self):
""" """
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control. [Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
Note Note
@ -540,13 +540,13 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def startingfnum(self): def nextframenumber(self):
"""[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquisition might result in different frame numbers for different modules. """ """[Eiger][Jungfrau] Next frame number. Stopping acquisition might result in different frame numbers for different modules. """
return self.getStartingFrameNumber() return self.getNextFrameNumber()
@startingfnum.setter @nextframenumber.setter
def startingfnum(self, value): def nextframenumber(self, value):
ut.set_using_dict(self.setStartingFrameNumber, value) ut.set_using_dict(self.setNextFrameNumber, value)
@property @property
@element @element
@ -1009,6 +1009,32 @@ class Detector(CppDetectorApi):
ip = ut.make_ip(ip) #Convert from int or string to IpAddr ip = ut.make_ip(ip) #Convert from int or string to IpAddr
ut.set_using_dict(self.setClientZmqIp, ip) ut.set_using_dict(self.setClientZmqIp, ip)
@property
def zmqhwm(self):
"""
Client's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1.
This is a high number and can be set to 2 for gui purposes.
One must also set the receiver's send high water mark to similar value. Final effect is sum of them.
Setting it via command line is useful only before zmq enabled (before opening gui).
"""
return self.getClientZmqHwm()
@zmqhwm.setter
def zmqhwm(self, n_frames):
self.setClientZmqHwm(n_frames)
@property
def rx_zmqhwm(self):
"""
Receiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value.
"""
return self.getRxZmqHwm()
@rx_zmqhwm.setter
def rx_zmqhwm(self, n_frames):
self.setRxZmqHwm(n_frames)
@property @property
@element @element
def udp_dstip(self): def udp_dstip(self):
@ -1499,7 +1525,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def timestamp(self): def frametime(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start. """[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
Note Note
---- ----
@ -1670,6 +1696,8 @@ class Detector(CppDetectorApi):
To change settings as well or set threshold without trimbits, use setThresholdEnergy. To change settings as well or set threshold without trimbits, use setThresholdEnergy.
:setter: It loads trim files from settingspath. :setter: It loads trim files from settingspath.
""" """
if self.type == detectorType.MYTHEN3:
return self.getAllThresholdEnergy()
return self.getThresholdEnergy() return self.getThresholdEnergy()
@threshold.setter @threshold.setter
@ -1965,7 +1993,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def now(self): def runtime(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up. """[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
Note Note
----- -----
@ -3079,6 +3107,14 @@ class Detector(CppDetectorApi):
""" """
return ClkFreqProxy(self) return ClkFreqProxy(self)
def readout(self):
"""
Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout.
"""
self.startDetectorReadout()
""" """
---------------------------<<<Debug>>>--------------------------- ---------------------------<<<Debug>>>---------------------------
""" """

53
python/slsdet/pattern.py Normal file
View File

@ -0,0 +1,53 @@
import _slsdet
from _slsdet import Pattern
class patternParameters(_slsdet.patternParameters):
def __init__(self):
super().__init__()
self.view = self.numpy_view()
self.names = self.view.dtype.names
def __getattr__(self, name):
if name in self.names:
return self.view[name][0]
else:
raise KeyError(f"Key: {name} not found")
def __setattr__(self, name, value):
if name in ["view", "names"]:
self.__dict__[name] = value
elif name in self.names:
self.view[name] = value
else:
raise KeyError(f"Key: {name} not found")
# Provide custom dir for tab completion
def __dir__(self):
return self.names
class Pattern(_slsdet.Pattern):
def __init__(self):
super().__init__()
self.view = self.data().numpy_view()
self.names = self.view.dtype.names
def __getattr__(self, name):
if name in self.names:
return self.view[name][0]
else:
raise KeyError(f"Key: {name} not found")
def __setattr__(self, name, value):
if name in ["view", "names"]:
self.__dict__[name] = value
elif name in self.names:
self.view[name] = value
else:
raise KeyError(f"Key: {name} not found")
# Provide custom dir for tab completion
def __dir__(self):
return self.names

View File

@ -102,6 +102,34 @@ void init_det(py::module &m) {
(void (Detector::*)(defs::detectorSettings, sls::Positions)) & (void (Detector::*)(defs::detectorSettings, sls::Positions)) &
Detector::setSettings, Detector::setSettings,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getThresholdEnergy",
(Result<int>(Detector::*)(sls::Positions) const) &
Detector::getThresholdEnergy,
py::arg() = Positions{})
.def("getAllThresholdEnergy",
(Result<std::array<int, 3>>(Detector::*)(sls::Positions) const) &
Detector::getAllThresholdEnergy,
py::arg() = Positions{})
.def("setThresholdEnergy",
(void (Detector::*)(int, defs::detectorSettings, bool,
sls::Positions)) &
Detector::setThresholdEnergy,
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
py::arg() = Positions{})
.def("setThresholdEnergy",
(void (Detector::*)(std::array<int, 3>, defs::detectorSettings,
bool, sls::Positions)) &
Detector::setThresholdEnergy,
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
py::arg() = Positions{})
.def("getSettingsPath",
(Result<std::string>(Detector::*)(sls::Positions) const) &
Detector::getSettingsPath,
py::arg() = Positions{})
.def("setSettingsPath",
(void (Detector::*)(const std::string &, sls::Positions)) &
Detector::setSettingsPath,
py::arg(), py::arg() = Positions{})
.def("loadTrimbits", .def("loadTrimbits",
(void (Detector::*)(const std::string &, sls::Positions)) & (void (Detector::*)(const std::string &, sls::Positions)) &
Detector::loadTrimbits, Detector::loadTrimbits,
@ -114,12 +142,24 @@ void init_det(py::module &m) {
(void (Detector::*)(int, sls::Positions)) & (void (Detector::*)(int, sls::Positions)) &
Detector::setAllTrimbits, Detector::setAllTrimbits,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getTrimEnergies",
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
Detector::getTrimEnergies,
py::arg() = Positions{})
.def("setTrimEnergies",
(void (Detector::*)(std::vector<int>, sls::Positions)) &
Detector::setTrimEnergies,
py::arg(), py::arg() = Positions{})
.def("getGapPixelsinCallback", .def("getGapPixelsinCallback",
(bool (Detector::*)() const) & Detector::getGapPixelsinCallback) (bool (Detector::*)() const) & Detector::getGapPixelsinCallback)
.def("setGapPixelsinCallback", .def("setGapPixelsinCallback",
(void (Detector::*)(const bool)) & (void (Detector::*)(const bool)) &
Detector::setGapPixelsinCallback, Detector::setGapPixelsinCallback,
py::arg()) py::arg())
.def("isVirtualDetectorServer",
(Result<bool>(Detector::*)(sls::Positions) const) &
Detector::isVirtualDetectorServer,
py::arg() = Positions{})
.def("registerAcquisitionFinishedCallback", .def("registerAcquisitionFinishedCallback",
(void (Detector::*)(void (*)(double, int, void *), void *)) & (void (Detector::*)(void (*)(double, int, void *), void *)) &
Detector::registerAcquisitionFinishedCallback, Detector::registerAcquisitionFinishedCallback,
@ -314,6 +354,9 @@ void init_det(py::module &m) {
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getDacList", (std::vector<defs::dacIndex>(Detector::*)() const) & .def("getDacList", (std::vector<defs::dacIndex>(Detector::*)() const) &
Detector::getDacList) Detector::getDacList)
.def("setDefaultDacs",
(void (Detector::*)(sls::Positions)) & Detector::setDefaultDacs,
py::arg() = Positions{})
.def("getDAC", .def("getDAC",
(Result<int>(Detector::*)(defs::dacIndex, bool, sls::Positions) (Result<int>(Detector::*)(defs::dacIndex, bool, sls::Positions)
const) & const) &
@ -356,6 +399,8 @@ void init_det(py::module &m) {
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver) .def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver) .def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
.def("startDetector", (void (Detector::*)()) & Detector::startDetector) .def("startDetector", (void (Detector::*)()) & Detector::startDetector)
.def("startDetectorReadout",
(void (Detector::*)()) & Detector::startDetectorReadout)
.def("stopDetector", (void (Detector::*)()) & Detector::stopDetector) .def("stopDetector", (void (Detector::*)()) & Detector::stopDetector)
.def("getDetectorStatus", .def("getDetectorStatus",
(Result<defs::runStatus>(Detector::*)(sls::Positions) const) & (Result<defs::runStatus>(Detector::*)(sls::Positions) const) &
@ -374,13 +419,13 @@ void init_det(py::module &m) {
(Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) & (Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) &
Detector::getNumMissingPackets, Detector::getNumMissingPackets,
py::arg() = Positions{}) py::arg() = Positions{})
.def("getStartingFrameNumber", .def("getNextFrameNumber",
(Result<uint64_t>(Detector::*)(sls::Positions) const) & (Result<uint64_t>(Detector::*)(sls::Positions) const) &
Detector::getStartingFrameNumber, Detector::getNextFrameNumber,
py::arg() = Positions{}) py::arg() = Positions{})
.def("setStartingFrameNumber", .def("setNextFrameNumber",
(void (Detector::*)(uint64_t, sls::Positions)) & (void (Detector::*)(uint64_t, sls::Positions)) &
Detector::setStartingFrameNumber, Detector::setNextFrameNumber,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("sendSoftwareTrigger", .def("sendSoftwareTrigger",
(void (Detector::*)(sls::Positions)) & (void (Detector::*)(sls::Positions)) &
@ -599,15 +644,15 @@ void init_det(py::module &m) {
Detector::setPartialFramesPadding, Detector::setPartialFramesPadding,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getRxUDPSocketBufferSize", .def("getRxUDPSocketBufferSize",
(Result<int64_t>(Detector::*)(sls::Positions) const) & (Result<int>(Detector::*)(sls::Positions) const) &
Detector::getRxUDPSocketBufferSize, Detector::getRxUDPSocketBufferSize,
py::arg() = Positions{}) py::arg() = Positions{})
.def("setRxUDPSocketBufferSize", .def("setRxUDPSocketBufferSize",
(void (Detector::*)(int64_t, sls::Positions)) & (void (Detector::*)(int, sls::Positions)) &
Detector::setRxUDPSocketBufferSize, Detector::setRxUDPSocketBufferSize,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getRxRealUDPSocketBufferSize", .def("getRxRealUDPSocketBufferSize",
(Result<int64_t>(Detector::*)(sls::Positions) const) & (Result<int>(Detector::*)(sls::Positions) const) &
Detector::getRxRealUDPSocketBufferSize, Detector::getRxRealUDPSocketBufferSize,
py::arg() = Positions{}) py::arg() = Positions{})
.def("getRxLock", .def("getRxLock",
@ -747,6 +792,17 @@ void init_det(py::module &m) {
(void (Detector::*)(const sls::IpAddr, sls::Positions)) & (void (Detector::*)(const sls::IpAddr, sls::Positions)) &
Detector::setClientZmqIp, Detector::setClientZmqIp,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getClientZmqHwm",
(int (Detector::*)() const) & Detector::getClientZmqHwm)
.def("setClientZmqHwm",
(void (Detector::*)(const int)) & Detector::setClientZmqHwm,
py::arg())
.def("getRxZmqHwm",
(Result<int>(Detector::*)(sls::Positions) const) &
Detector::getRxZmqHwm,
py::arg() = Positions{})
.def("setRxZmqHwm",
(void (Detector::*)(const int)) & Detector::setRxZmqHwm, py::arg())
.def("getSubExptime", .def("getSubExptime",
(Result<sls::ns>(Detector::*)(sls::Positions) const) & (Result<sls::ns>(Detector::*)(sls::Positions) const) &
Detector::getSubExptime, Detector::getSubExptime,
@ -763,24 +819,6 @@ void init_det(py::module &m) {
(void (Detector::*)(sls::ns, sls::Positions)) & (void (Detector::*)(sls::ns, sls::Positions)) &
Detector::setSubDeadTime, Detector::setSubDeadTime,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getThresholdEnergy",
(Result<int>(Detector::*)(sls::Positions) const) &
Detector::getThresholdEnergy,
py::arg() = Positions{})
.def("setThresholdEnergy",
(void (Detector::*)(int, defs::detectorSettings, bool,
sls::Positions)) &
Detector::setThresholdEnergy,
py::arg(), py::arg() = defs::STANDARD, py::arg() = true,
py::arg() = Positions{})
.def("getSettingsPath",
(Result<std::string>(Detector::*)(sls::Positions) const) &
Detector::getSettingsPath,
py::arg() = Positions{})
.def("setSettingsPath",
(void (Detector::*)(const std::string &, sls::Positions)) &
Detector::setSettingsPath,
py::arg(), py::arg() = Positions{})
.def("getOverFlowMode", .def("getOverFlowMode",
(Result<bool>(Detector::*)(sls::Positions) const) & (Result<bool>(Detector::*)(sls::Positions) const) &
Detector::getOverFlowMode, Detector::getOverFlowMode,
@ -796,14 +834,6 @@ void init_det(py::module &m) {
.def("setBottom", .def("setBottom",
(void (Detector::*)(bool, sls::Positions)) & Detector::setBottom, (void (Detector::*)(bool, sls::Positions)) & Detector::setBottom,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getTrimEnergies",
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
Detector::getTrimEnergies,
py::arg() = Positions{})
.def("setTrimEnergies",
(void (Detector::*)(std::vector<int>, sls::Positions)) &
Detector::setTrimEnergies,
py::arg(), py::arg() = Positions{})
.def("getRateCorrection", .def("getRateCorrection",
(Result<sls::ns>(Detector::*)(sls::Positions) const) & (Result<sls::ns>(Detector::*)(sls::Positions) const) &
Detector::getRateCorrection, Detector::getRateCorrection,
@ -1251,9 +1281,17 @@ void init_det(py::module &m) {
(void (Detector::*)(const std::string &, sls::Positions)) & (void (Detector::*)(const std::string &, sls::Positions)) &
Detector::setPattern, Detector::setPattern,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("setPattern",
(void (Detector::*)(const sls::Pattern &, sls::Positions)) &
Detector::setPattern,
py::arg(), py::arg() = Positions{})
.def("savePattern", .def("savePattern",
(void (Detector::*)(const std::string &)) & Detector::savePattern, (void (Detector::*)(const std::string &)) & Detector::savePattern,
py::arg()) py::arg())
.def("loadDefaultPattern",
(void (Detector::*)(sls::Positions)) &
Detector::loadDefaultPattern,
py::arg() = Positions{})
.def("getPatternIOControl", .def("getPatternIOControl",
(Result<uint64_t>(Detector::*)(sls::Positions) const) & (Result<uint64_t>(Detector::*)(sls::Positions) const) &
Detector::getPatternIOControl, Detector::getPatternIOControl,

View File

@ -2,10 +2,12 @@
* warning */ * warning */
#include <pybind11/chrono.h> #include <pybind11/chrono.h>
#include <pybind11/numpy.h>
#include <pybind11/operators.h> #include <pybind11/operators.h>
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
#include <pybind11/stl.h> #include <pybind11/stl.h>
#include "sls/Pattern.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
namespace py = pybind11; namespace py = pybind11;
void init_enums(py::module &m) { void init_enums(py::module &m) {

View File

@ -1,18 +1,19 @@
#include <pybind11/chrono.h> #include <pybind11/chrono.h>
#include <pybind11/numpy.h>
#include <pybind11/operators.h> #include <pybind11/operators.h>
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
#include <pybind11/stl.h> #include <pybind11/stl.h>
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "sls/Pattern.h"
namespace py = pybind11; namespace py = pybind11;
void init_enums(py::module &m) { void init_enums(py::module &m) {
py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs"); py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs");
py::class_<slsDetectorDefs::xy> xy(m, "xy"); py::class_<slsDetectorDefs::xy> xy(m, "xy");
xy.def(py::init()); xy.def(py::init());
xy.def(py::init<int,int>()); xy.def(py::init<int, int>());
xy.def_readwrite("x", &slsDetectorDefs::xy::x); xy.def_readwrite("x", &slsDetectorDefs::xy::x);
xy.def_readwrite("y", &slsDetectorDefs::xy::y); xy.def_readwrite("y", &slsDetectorDefs::xy::y);
[[ENUMS]] [[ENUMS]]
} }

View File

@ -19,6 +19,8 @@ void init_enums(py::module &);
void init_experimental(py::module &); void init_experimental(py::module &);
void init_det(py::module &); void init_det(py::module &);
void init_network(py::module &); void init_network(py::module &);
void init_pattern(py::module &);
void init_scan(py::module &);
PYBIND11_MODULE(_slsdet, m) { PYBIND11_MODULE(_slsdet, m) {
m.doc() = R"pbdoc( m.doc() = R"pbdoc(
C/C++ API C/C++ API
@ -33,6 +35,8 @@ PYBIND11_MODULE(_slsdet, m) {
init_enums(m); init_enums(m);
init_det(m); init_det(m);
init_network(m); init_network(m);
init_pattern(m);
init_scan(m);
// init_experimental(m); // init_experimental(m);

29
python/src/pattern.cpp Normal file
View File

@ -0,0 +1,29 @@
#include <pybind11/chrono.h>
#include <pybind11/numpy.h>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "sls/Pattern.h"
#include "sls/sls_detector_defs.h"
namespace py = pybind11;
void init_pattern(py::module &m) {
using pat = sls::patternParameters;
py::class_<pat> patternParameters(m, "patternParameters");
PYBIND11_NUMPY_DTYPE(pat, word, ioctrl, limits, loop, nloop, wait,
waittime);
patternParameters.def(py::init());
patternParameters.def("numpy_view", [](py::object &obj) {
pat &o = obj.cast<pat &>();
return py::array_t<pat>(1, &o, obj);
});
py::class_<sls::Pattern> Pattern(m, "Pattern");
Pattern.def(py::init());
Pattern.def("load", &sls::Pattern::load);
Pattern.def("data", (pat * (sls::Pattern::*)()) & sls::Pattern::data,
py::return_value_policy::reference);
}

39
python/src/scan.cpp Normal file
View File

@ -0,0 +1,39 @@
#include <pybind11/chrono.h>
#include <pybind11/numpy.h>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <sstream>
#include "sls/sls_detector_defs.h"
namespace py = pybind11;
void init_scan(py::module &m) {
using sp = slsDetectorDefs::scanParameters;
py::class_<sp> scanParameters(m, "scanParameters");
scanParameters.def(py::init());
scanParameters.def(py::init<slsDetectorDefs::dacIndex, int, int, int>());
scanParameters.def(py::init<slsDetectorDefs::dacIndex, int, int, int, std::chrono::nanoseconds>());
scanParameters.def_readwrite("enable", &sp::enable);
scanParameters.def_readwrite("dacInd", &sp::dacInd);
scanParameters.def_readwrite("startOffset", &sp::startOffset);
scanParameters.def_readwrite("stopOffset", &sp::stopOffset);
scanParameters.def_readwrite("stepSize", &sp::stepSize);
scanParameters.def_readwrite("dacSettleTime_ns", &sp::dacSettleTime_ns);
scanParameters.def("__repr__", [](const sp &a){
std::ostringstream oss;
auto indent = " ";
oss << "<scanParameters>\n";
oss << indent << "enable: " << a.enable << '\n';
oss << indent << "dacInd: " << a.dacInd << '\n';
oss << indent << "startOffset: " << a.startOffset << '\n';
oss << indent << "stopOffset: " << a.stopOffset << '\n';
oss << indent << "stepSize: " << a.stepSize << '\n';
oss << indent << "dacSettleTime_ns: " << a.dacSettleTime_ns;
return oss.str();
});
}

View File

@ -1 +0,0 @@
800 10

View File

@ -1 +0,0 @@
829 9.3

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
800 10

View File

@ -1 +0,0 @@
804 15.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
800 10

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
817 11.6

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,7 @@
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
find_package(Qt4 REQUIRED)
find_package(Qwt 6.1 REQUIRED)
find_package(PNG REQUIRED) find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)

View File

@ -344,7 +344,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="spinStartingFrameNumber"> <widget class="QSpinBox" name="spinNextFrameNumber">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -361,7 +361,7 @@
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The starting frame number of next acquisition.&lt;/p&gt;&lt;p&gt;#startingfnum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The next frame number&lt;/p&gt;&lt;p&gt;#nextframenumber&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="statusTip"> <property name="statusTip">
<string/> <string/>
@ -390,12 +390,12 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lblStartingFrameNumber"> <widget class="QLabel" name="lblNextFrameNumber">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The starting frame number of next acquisition.&lt;/p&gt;&lt;p&gt;#startingfnum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The next frame number&lt;/p&gt;&lt;p&gt;#nextframenumber&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>Next Frame Number: </string> <string>Next Frame Number: </string>

View File

@ -32,17 +32,23 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="2"> <item row="1" column="4">
<widget class="QSpinBox" name="spinThreshold"> <widget class="QSpinBox" name="spinThreshold3">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>140</width>
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="keyboardTracking"> <property name="keyboardTracking">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -63,10 +69,69 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="2">
<spacer name="horizontalSpacer"> <widget class="QSpinBox" name="spinThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblDynamicRange">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Dynamic Range:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
@ -74,7 +139,7 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>190</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -86,10 +151,16 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>140</width>
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>1.67772e+07</string> <string>1.67772e+07</string>
@ -112,21 +183,102 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="1" column="6">
<spacer name="horizontalSpacer_2"> <widget class="QPushButton" name="btnSetThreshold">
<property name="orientation"> <property name="enabled">
<enum>Qt::Horizontal</enum> <bool>true</bool>
</property> </property>
<property name="sizeType"> <property name="sizePolicy">
<enum>QSizePolicy::Expanding</enum> <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="minimumSize">
<size> <size>
<width>20</width> <width>100</width>
<height>20</height> <height>30</height>
</size> </size>
</property> </property>
</spacer> <property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>20</red>
<green>20</green>
<blue>20</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>20</red>
<green>20</green>
<blue>20</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>20</red>
<green>20</green>
<blue>20</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="text">
<string>Set</string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/rightArrow.png</normaloff>:/icons/images/rightArrow.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Settings:</string>
</property>
</widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QComboBox" name="comboSettings"> <widget class="QComboBox" name="comboSettings">
@ -141,10 +293,16 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>140</width>
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Settings of the detector. <string>Settings of the detector.
#settings#</string> #settings#</string>
@ -266,40 +424,10 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="0" column="1">
<widget class="QLabel" name="lblThreshold"> <spacer name="horizontalSpacer">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Threshold:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblDynamicRange">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Dynamic Range:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Settings:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
@ -307,7 +435,82 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>190</height> <height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblThreshold">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Threshold:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="spinThreshold2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="suffix">
<string> eV</string>
</property>
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item row="1" column="7">
<spacer name="horizontalSpacer_2">
<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> </size>
</property> </property>
</spacer> </spacer>
@ -317,6 +520,9 @@
<tabstops> <tabstops>
<tabstop>comboSettings</tabstop> <tabstop>comboSettings</tabstop>
<tabstop>spinThreshold</tabstop> <tabstop>spinThreshold</tabstop>
<tabstop>spinThreshold2</tabstop>
<tabstop>spinThreshold3</tabstop>
<tabstop>btnSetThreshold</tabstop>
<tabstop>comboDynamicRange</tabstop> <tabstop>comboDynamicRange</tabstop>
</tabstops> </tabstops>
<resources> <resources>

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "sls/Detector.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/Detector.h"
#include "ui_form_detectormain.h" #include "ui_form_detectormain.h"
#include <QTabWidget> #include <QTabWidget>

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "sls/Detector.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/Detector.h"
#include "ui_form_plot.h" #include "ui_form_plot.h"
#include <mutex> #include <mutex>
@ -63,7 +63,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
signals: signals:
void AcquireFinishedSignal(); void AcquireFinishedSignal();
void AbortSignal(); void AbortSignal(QString);
void UpdateSignal(); void UpdateSignal();
private: private:

View File

@ -16,7 +16,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
public slots: public slots:
void AcquireFinished(); void AcquireFinished();
void AbortAcquire(); void AbortAcquire(QString exmsg);
private slots: private slots:
void SetTimingMode(int val); void SetTimingMode(int val);
@ -35,7 +35,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void SetFileName(bool force = false); void SetFileName(bool force = false);
void ForceSetFileName(); void ForceSetFileName();
void SetRunIndex(int val); void SetRunIndex(int val);
void SetStartingFrameNumber(int val); void SetNextFrameNumber(int val);
void UpdateProgress(); void UpdateProgress();
void StartAcquisition(); void StartAcquisition();
void StopAcquisition(); void StopAcquisition();
@ -67,7 +67,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void GetFileWrite(); void GetFileWrite();
void GetFileName(); void GetFileName();
void GetRunIndex(); void GetRunIndex();
void GetStartingFrameNumber(); void GetNextFrameNumber();
void ResetProgress(); void ResetProgress();

View File

@ -14,6 +14,7 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject {
void SetSettings(int index); void SetSettings(int index);
void SetDynamicRange(int index); void SetDynamicRange(int index);
void SetThresholdEnergy(int index); void SetThresholdEnergy(int index);
void SetThresholdEnergies();
private: private:
void SetupWidgetWindow(); void SetupWidgetWindow();
@ -23,6 +24,7 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject {
void GetSettings(); void GetSettings();
void GetDynamicRange(); void GetDynamicRange();
void GetThresholdEnergy(); void GetThresholdEnergy();
void GetThresholdEnergies();
sls::Detector *det; sls::Detector *det;
enum { enum {

View File

@ -270,7 +270,8 @@ void qDetectorMain::Initialization() {
// Plotting // Plotting
connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement, connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement,
SLOT(AcquireFinished())); SLOT(AcquireFinished()));
connect(plot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire())); connect(plot, SIGNAL(AbortSignal(QString)), tabMeasurement,
SLOT(AbortAcquire(QString)));
// menubar // menubar
// Modes Menu // Modes Menu

View File

@ -1,8 +1,8 @@
#include "qDrawPlot.h" #include "qDrawPlot.h"
#include "SlsQt1DPlot.h" #include "SlsQt1DPlot.h"
#include "SlsQt2DPlot.h" #include "SlsQt2DPlot.h"
#include "sls/detectorData.h"
#include "qCloneWidget.h" #include "qCloneWidget.h"
#include "sls/detectorData.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/detectorData.h" #include "sls/detectorData.h"
@ -672,18 +672,15 @@ void qDrawPlot::AcquireThread() {
// handle it // handle it
if (!mess.empty()) { if (!mess.empty()) {
LOG(logERROR) << "Acquisition Finished with an exception: " << mess; LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
qDefs::ExceptionMessage("Acquire unsuccessful.", mess, // qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
"qDrawPlot::AcquireFinished"); // "qDrawPlot::AcquireFinished");
try { try {
det->stopDetector(); det->stopDetector();
}
CATCH_DISPLAY("Could not stop detector acquisition.",
"qDrawPlot::AcquireFinished");
try {
det->stopReceiver(); det->stopReceiver();
} catch (...) {
;
} }
CATCH_DISPLAY("Could not stop receiver.", "qDrawPlot::AcquireFinished"); emit AbortSignal(QString(mess.c_str()));
emit AbortSignal();
} }
LOG(logDEBUG) << "End of Acquisition Finished"; LOG(logDEBUG) << "End of Acquisition Finished";
} }

View File

@ -1,7 +1,7 @@
#include "qTabAdvanced.h" #include "qTabAdvanced.h"
#include "sls/network_utils.h"
#include "qDefs.h" #include "qDefs.h"
#include "qDrawPlot.h" #include "qDrawPlot.h"
#include "sls/network_utils.h"
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector, qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
qDrawPlot *p) qDrawPlot *p)

View File

@ -1,6 +1,6 @@
#include "qTabDebugging.h" #include "qTabDebugging.h"
#include "sls/ToString.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/ToString.h"
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGridLayout> #include <QGridLayout>
#include <QTreeWidget> #include <QTreeWidget>

View File

@ -56,13 +56,13 @@ void qTabMeasurement::SetupWidgetWindow() {
break; break;
case slsDetectorDefs::EIGER: case slsDetectorDefs::EIGER:
delayImplemented = false; delayImplemented = false;
lblStartingFrameNumber->setEnabled(true); lblNextFrameNumber->setEnabled(true);
spinStartingFrameNumber->setEnabled(true); spinNextFrameNumber->setEnabled(true);
startingFnumImplemented = true; startingFnumImplemented = true;
break; break;
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
lblStartingFrameNumber->setEnabled(true); lblNextFrameNumber->setEnabled(true);
spinStartingFrameNumber->setEnabled(true); spinNextFrameNumber->setEnabled(true);
startingFnumImplemented = true; startingFnumImplemented = true;
break; break;
case slsDetectorDefs::GOTTHARD2: case slsDetectorDefs::GOTTHARD2:
@ -141,8 +141,8 @@ void qTabMeasurement::Initialization() {
SLOT(ForceSetFileName())); SLOT(ForceSetFileName()));
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int))); connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
if (startingFnumImplemented) { if (startingFnumImplemented) {
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
} }
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress())); connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition())); connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition()));
@ -825,29 +825,29 @@ void qTabMeasurement::SetRunIndex(int val) {
&qTabMeasurement::GetRunIndex) &qTabMeasurement::GetRunIndex)
} }
void qTabMeasurement::GetStartingFrameNumber() { void qTabMeasurement::GetNextFrameNumber() {
LOG(logDEBUG) << "Getting Starting Frame Number"; LOG(logDEBUG) << "Getting Starting Frame Number";
disconnect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, disconnect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
try { try {
auto retval = det->getStartingFrameNumber().tsquash( auto retval = det->getNextFrameNumber().tsquash(
"Inconsistent starting frame number for all detectors."); "Inconsistent starting frame number for all detectors.");
spinStartingFrameNumber->setValue(retval); spinNextFrameNumber->setValue(retval);
} }
CATCH_DISPLAY("Could not get starting frame number.", CATCH_DISPLAY("Could not get starting frame number.",
"qTabMeasurement::GetStartingFrameNumber") "qTabMeasurement::GetNextFrameNumber")
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
} }
void qTabMeasurement::SetStartingFrameNumber(int val) { void qTabMeasurement::SetNextFrameNumber(int val) {
LOG(logINFO) << "Setting Starting frame number to " << val; LOG(logINFO) << "Setting Starting frame number to " << val;
try { try {
det->setStartingFrameNumber(val); det->setNextFrameNumber(val);
} }
CATCH_HANDLE("Could not set starting frame number.", CATCH_HANDLE("Could not set starting frame number.",
"qTabMeasurement::SetStartingFrameNumber", this, "qTabMeasurement::SetNextFrameNumber", this,
&qTabMeasurement::GetStartingFrameNumber) &qTabMeasurement::GetNextFrameNumber)
} }
void qTabMeasurement::ResetProgress() { void qTabMeasurement::ResetProgress() {
@ -928,7 +928,7 @@ void qTabMeasurement::AcquireFinished() {
UpdateProgress(); UpdateProgress();
GetRunIndex(); GetRunIndex();
if (startingFnumImplemented) { if (startingFnumImplemented) {
GetStartingFrameNumber(); GetNextFrameNumber();
} }
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished"; LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
// next measurement if acq is not stopped // next measurement if acq is not stopped
@ -948,8 +948,11 @@ void qTabMeasurement::AcquireFinished() {
} }
} }
void qTabMeasurement::AbortAcquire() { void qTabMeasurement::AbortAcquire(QString exmsg) {
LOG(logINFORED) << "Abort Acquire"; LOG(logINFORED) << "Abort Acquire";
qDefs::ExceptionMessage("Acquire unsuccessful.",
exmsg.toAscii().constData(),
"qDrawPlot::AcquireFinished");
isAcquisitionStopped = true; isAcquisitionStopped = true;
AcquireFinished(); AcquireFinished();
} }
@ -995,7 +998,7 @@ void qTabMeasurement::Refresh() {
GetFileName(); GetFileName();
GetRunIndex(); GetRunIndex();
if (startingFnumImplemented) { if (startingFnumImplemented) {
GetStartingFrameNumber(); GetNextFrameNumber();
} }
ResetProgress(); ResetProgress();
} }

View File

@ -1,6 +1,6 @@
#include "qTabSettings.h" #include "qTabSettings.h"
#include "sls/ToString.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/ToString.h"
#include <QStandardItemModel> #include <QStandardItemModel>
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector) qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
@ -14,14 +14,24 @@ qTabSettings::~qTabSettings() {}
void qTabSettings::SetupWidgetWindow() { void qTabSettings::SetupWidgetWindow() {
spinThreshold2->hide();
spinThreshold3->hide();
btnSetThreshold->hide();
btnSetThreshold->setEnabled(false);
// enabling according to det type // enabling according to det type
slsDetectorDefs::detectorType detType = det->getDetectorType().squash(); slsDetectorDefs::detectorType detType = det->getDetectorType().squash();
if (detType == slsDetectorDefs::MYTHEN3) { if (detType == slsDetectorDefs::MYTHEN3) {
lblSettings->setEnabled(false);
comboSettings->setEnabled(false);
lblDynamicRange->setEnabled(true); lblDynamicRange->setEnabled(true);
comboDynamicRange->setEnabled(true); comboDynamicRange->setEnabled(true);
spinThreshold2->show();
spinThreshold3->show();
lblThreshold->setEnabled(true);
spinThreshold->setEnabled(true);
spinThreshold2->setEnabled(true);
spinThreshold3->setEnabled(true);
btnSetThreshold->setEnabled(true);
btnSetThreshold->show();
// disable dr // disable dr
QStandardItemModel *model = QStandardItemModel *model =
qobject_cast<QStandardItemModel *>(comboDynamicRange->model()); qobject_cast<QStandardItemModel *>(comboDynamicRange->model());
@ -34,7 +44,6 @@ void qTabSettings::SetupWidgetWindow() {
item = model->itemFromIndex(index); item = model->itemFromIndex(index);
item->setEnabled(false); item->setEnabled(false);
} }
} else if (detType == slsDetectorDefs::EIGER) { } else if (detType == slsDetectorDefs::EIGER) {
lblDynamicRange->setEnabled(true); lblDynamicRange->setEnabled(true);
comboDynamicRange->setEnabled(true); comboDynamicRange->setEnabled(true);
@ -48,6 +57,10 @@ void qTabSettings::SetupWidgetWindow() {
SetupDetectorSettings(); SetupDetectorSettings();
} }
spinThreshold->setValue(-1); spinThreshold->setValue(-1);
if (detType == slsDetectorDefs::MYTHEN3) {
spinThreshold2->setValue(-1);
spinThreshold3->setValue(-1);
}
Initialization(); Initialization();
// default for the disabled // default for the disabled
GetDynamicRange(); GetDynamicRange();
@ -104,6 +117,11 @@ void qTabSettings::SetupDetectorSettings() {
item[(int)G4_HIGHGAIN]->setEnabled(true); item[(int)G4_HIGHGAIN]->setEnabled(true);
item[(int)G4_LOWGAIN]->setEnabled(true); item[(int)G4_LOWGAIN]->setEnabled(true);
break; break;
case slsDetectorDefs::MYTHEN3:
item[(int)STANDARD]->setEnabled(true);
item[(int)FAST]->setEnabled(true);
item[(int)HIGHGAIN]->setEnabled(true);
break;
default: default:
LOG(logDEBUG) << "Unknown detector type. Exiting GUI."; LOG(logDEBUG) << "Unknown detector type. Exiting GUI.";
qDefs::Message(qDefs::CRITICAL, qDefs::Message(qDefs::CRITICAL,
@ -126,7 +144,13 @@ void qTabSettings::Initialization() {
SLOT(SetDynamicRange(int))); SLOT(SetDynamicRange(int)));
// Threshold // Threshold
if (spinThreshold->isEnabled()) // m3
if (btnSetThreshold->isEnabled()) {
connect(btnSetThreshold, SIGNAL(clicked()), this,
SLOT(SetThresholdEnergies()));
}
// eiger
else if (spinThreshold->isEnabled())
connect(spinThreshold, SIGNAL(valueChanged(int)), this, connect(spinThreshold, SIGNAL(valueChanged(int)), this,
SLOT(SetThresholdEnergy(int))); SLOT(SetThresholdEnergy(int)));
} }
@ -169,7 +193,7 @@ void qTabSettings::SetSettings(int index) {
CATCH_HANDLE("Could not set settings.", "qTabSettings::SetSettings", this, CATCH_HANDLE("Could not set settings.", "qTabSettings::SetSettings", this,
&qTabSettings::GetSettings) &qTabSettings::GetSettings)
// threshold // threshold
if (spinThreshold->isEnabled()) { if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
SetThresholdEnergy(spinThreshold->value()); SetThresholdEnergy(spinThreshold->value());
} }
} }
@ -233,6 +257,23 @@ void qTabSettings::SetDynamicRange(int index) {
&qTabSettings::GetDynamicRange) &qTabSettings::GetDynamicRange)
} }
void qTabSettings::GetThresholdEnergies() {
LOG(logDEBUG) << "Getting theshold energies";
disconnect(btnSetThreshold, SIGNAL(clicked()), this,
SLOT(SetThresholdEnergies()));
try {
auto retval = det->getAllThresholdEnergy().tsquash(
"Inconsistent threhsold energies for all detectors.");
spinThreshold->setValue(retval[0]);
spinThreshold2->setValue(retval[1]);
spinThreshold3->setValue(retval[2]);
}
CATCH_DISPLAY("Could not get threshold energy.",
"qTabDataOutput::GetThresholdEnergies")
connect(btnSetThreshold, SIGNAL(clicked()), this,
SLOT(SetThresholdEnergies()));
}
void qTabSettings::GetThresholdEnergy() { void qTabSettings::GetThresholdEnergy() {
LOG(logDEBUG) << "Getting theshold energy"; LOG(logDEBUG) << "Getting theshold energy";
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, disconnect(spinThreshold, SIGNAL(valueChanged(int)), this,
@ -248,6 +289,23 @@ void qTabSettings::GetThresholdEnergy() {
SLOT(SetThresholdEnergy(int))); SLOT(SetThresholdEnergy(int)));
} }
void qTabSettings::SetThresholdEnergies() {
std::array<int, 3> eV = {spinThreshold->value(), spinThreshold2->value(),
spinThreshold3->value()};
slsDetectorDefs::detectorSettings sett =
static_cast<slsDetectorDefs::detectorSettings>(
comboSettings->currentIndex());
LOG(logINFO) << "Setting Threshold Energies to " << sls::ToString(eV)
<< " (eV)";
try {
det->setThresholdEnergy(eV, sett);
}
CATCH_DISPLAY("Could not get threshold energies.",
"qTabSettings::SetThresholdEnergies")
// set the right value anyway (due to tolerance)
GetThresholdEnergies();
}
void qTabSettings::SetThresholdEnergy(int index) { void qTabSettings::SetThresholdEnergy(int index) {
LOG(logINFO) << "Setting Threshold Energy to " << index << " eV"; LOG(logINFO) << "Setting Threshold Energy to " << index << " eV";
try { try {
@ -270,8 +328,14 @@ void qTabSettings::Refresh() {
GetDynamicRange(); GetDynamicRange();
} }
if (spinThreshold->isEnabled()) // m3
if (btnSetThreshold->isEnabled())
GetThresholdEnergies();
// eiger
else if (spinThreshold->isEnabled()) {
LOG(logINFOBLUE) << "calling it!";
GetThresholdEnergy(); GetThresholdEnergy();
}
LOG(logDEBUG) << "**Updated Settings Tab"; LOG(logDEBUG) << "**Updated Settings Tab";
} }

View File

@ -22,6 +22,7 @@ add_executable(ctbDetectorServer_virtual
include_directories( include_directories(
../slsDetectorServer/include ../slsDetectorServer/include
../../slsSupportLib/include ../../slsSupportLib/include
../../slsDetectorSoftware/include/sls/
) )
target_include_directories(ctbDetectorServer_virtual target_include_directories(ctbDetectorServer_virtual

View File

@ -2,10 +2,11 @@ current_dir = $(shell pwd)
main_inc = ../slsDetectorServer/include/ main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/ main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/ support_lib = ../../slsSupportLib/include/
det_lib = ../../slsDetectorSoftware/include/sls/
CROSS = bfin-uclinux- CROSS = bfin-uclinux-
CC = $(CROSS)gcc CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread LDLIBS += -lm -lrt -pthread
PROGS = ctbDetectorServer PROGS = ctbDetectorServer
DESTDIR ?= bin DESTDIR ?= bin

View File

@ -35,7 +35,7 @@ int Beb_activated = 1;
uint32_t Beb_detid = 0; uint32_t Beb_detid = 0;
int Beb_top = 0; int Beb_top = 0;
uint64_t Beb_deactivatedStartFrameNumber = 0; uint64_t Beb_deactivatedNextFrameNumber = 0;
int Beb_quadEnable = 0; int Beb_quadEnable = 0;
int Beb_positions[2] = {0, 0}; int Beb_positions[2] = {0, 0};
int Beb_readNLines = MAX_ROWS_PER_READOUT; int Beb_readNLines = MAX_ROWS_PER_READOUT;
@ -1441,22 +1441,22 @@ int Beb_SetDetectorPosition(int pos[]) {
return ret; return ret;
} }
int Beb_SetStartingFrameNumber(uint64_t value) { int Beb_SetNextFrameNumber(uint64_t value) {
if (!Beb_activated) { if (!Beb_activated) {
Beb_deactivatedStartFrameNumber = value; Beb_deactivatedNextFrameNumber = value;
return OK; return OK;
} }
LOG(logINFO, LOG(logINFO,
("Setting start frame number: %llu\n", (long long unsigned int)value)); ("Setting next frame number: %llu\n", (long long unsigned int)value));
u_int32_t *csp0base = 0; u_int32_t *csp0base = 0;
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR); int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR);
if (fd < 0) { if (fd < 0) {
LOG(logERROR, ("Set Start Frame Number FAIL\n")); LOG(logERROR, ("Set next Frame Number FAIL\n"));
return FAIL; return FAIL;
} }
// since the read is not implemented in firmware yet // since the read is not implemented in firmware yet
Beb_deactivatedStartFrameNumber = value; Beb_deactivatedNextFrameNumber = value;
// decrement for firmware // decrement for firmware
uint64_t valueInFirmware = value - 1; uint64_t valueInFirmware = value - 1;
@ -1471,17 +1471,17 @@ int Beb_SetStartingFrameNumber(uint64_t value) {
return OK; return OK;
} }
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable) { int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable) {
if (!Beb_activated) { if (!Beb_activated) {
*retval = Beb_deactivatedStartFrameNumber; *retval = Beb_deactivatedNextFrameNumber;
return OK; return OK;
} }
LOG(logDEBUG1, ("Getting start frame number\n")); LOG(logDEBUG1, ("Getting next frame number\n"));
u_int32_t *csp0base = 0; u_int32_t *csp0base = 0;
int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR); int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR);
if (fd < 0) { if (fd < 0) {
LOG(logERROR, ("Get Start Frame Number FAIL\n")); LOG(logERROR, ("Get next Frame Number FAIL\n"));
return FAIL; return FAIL;
} }

View File

@ -103,8 +103,8 @@ int Beb_SetQuad(int value);
int Beb_GetQuad(); int Beb_GetQuad();
int *Beb_GetDetectorPosition(); int *Beb_GetDetectorPosition();
int Beb_SetDetectorPosition(int pos[]); int Beb_SetDetectorPosition(int pos[]);
int Beb_SetStartingFrameNumber(uint64_t value); int Beb_SetNextFrameNumber(uint64_t value);
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable); int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable);
void Beb_SetReadNLines(int value); void Beb_SetReadNLines(int value);

View File

@ -85,7 +85,7 @@ int eiger_virtual_transmission_delay_right = 0;
int eiger_virtual_transmission_delay_frame = 0; int eiger_virtual_transmission_delay_frame = 0;
int eiger_virtual_transmission_flowcontrol_10g = 0; int eiger_virtual_transmission_flowcontrol_10g = 0;
int eiger_virtual_activate = 1; int eiger_virtual_activate = 1;
uint64_t eiger_virtual_startingframenumber = 1; uint64_t eiger_virtual_nextframenumber = 1;
int eiger_virtual_detPos[2] = {0, 0}; int eiger_virtual_detPos[2] = {0, 0};
int eiger_virtual_test_mode = 0; int eiger_virtual_test_mode = 0;
int eiger_virtual_quad_mode = 0; int eiger_virtual_quad_mode = 0;
@ -669,7 +669,9 @@ void allocateDetectorStructureMemory() {
(detectorModules)->reg = 0; (detectorModules)->reg = 0;
(detectorModules)->iodelay = 0; (detectorModules)->iodelay = 0;
(detectorModules)->tau = 0; (detectorModules)->tau = 0;
(detectorModules)->eV = 0; (detectorModules)->eV[0] = 0;
(detectorModules)->eV[1] = 0;
(detectorModules)->eV[2] = 0;
thisSettings = UNINITIALIZED; thisSettings = UNINITIALIZED;
// if trimval requested, should return -1 to acknowledge unknown // if trimval requested, should return -1 to acknowledge unknown
@ -681,18 +683,7 @@ void allocateDetectorStructureMemory() {
void setupDetector() { void setupDetector() {
allocateDetectorStructureMemory(); allocateDetectorStructureMemory();
// set dacs setDefaultDacs();
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
{
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
for (int i = 0; i < NDAC; ++i) {
setDAC((enum DACINDEX)i, defaultvals[i], 0);
if ((detectorModules)->dacs[i] != defaultvals[i]) {
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
defaultvals[i], (detectorModules)->dacs[i]));
}
}
}
#ifdef VIRTUAL #ifdef VIRTUAL
sharedMemory_setStatus(IDLE); sharedMemory_setStatus(IDLE);
#endif #endif
@ -713,7 +704,7 @@ void setupDetector() {
setClockDivider(RUN_CLK, DEFAULT_CLK_SPEED); // clk_devider,half speed setClockDivider(RUN_CLK, DEFAULT_CLK_SPEED); // clk_devider,half speed
setIODelay(DEFAULT_IO_DELAY); setIODelay(DEFAULT_IO_DELAY);
setTiming(DEFAULT_TIMING_MODE); setTiming(DEFAULT_TIMING_MODE);
setStartingFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
setReadNLines(MAX_ROWS_PER_READOUT); setReadNLines(MAX_ROWS_PER_READOUT);
// SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15); // SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
eiger_tau_ns = DEFAULT_RATE_CORRECTION; eiger_tau_ns = DEFAULT_RATE_CORRECTION;
@ -754,6 +745,21 @@ void setupDetector() {
LOG(logDEBUG1, ("Setup detector done\n\n")); LOG(logDEBUG1, ("Setup detector done\n\n"));
} }
int setDefaultDacs() {
int ret = OK;
LOG(logINFOBLUE, ("Setting Default Dac values\n"));
const int defaultvals[NDAC] = DEFAULT_DAC_VALS;
for (int i = 0; i < NDAC; ++i) {
setDAC((enum DACINDEX)i, defaultvals[i], 0);
if ((detectorModules)->dacs[i] != defaultvals[i]) {
ret = FAIL;
LOG(logERROR, ("Setting dac %d failed, wrote %d, read %d\n", i,
defaultvals[i], (detectorModules)->dacs[i]));
}
}
return ret;
}
/* advanced read/write reg */ /* advanced read/write reg */
int writeRegister(uint32_t offset, uint32_t data) { int writeRegister(uint32_t offset, uint32_t data) {
#ifdef VIRTUAL #ifdef VIRTUAL
@ -847,21 +853,21 @@ int getOverFlowMode() { return eiger_overflow32; }
/* parameters - timer */ /* parameters - timer */
int setStartingFrameNumber(uint64_t value) { int setNextFrameNumber(uint64_t value) {
#ifdef VIRTUAL #ifdef VIRTUAL
eiger_virtual_startingframenumber = value; eiger_virtual_nextframenumber = value;
return OK; return OK;
#else #else
return Beb_SetStartingFrameNumber(value); return Beb_SetNextFrameNumber(value);
#endif #endif
} }
int getStartingFrameNumber(uint64_t *retval) { int getNextFrameNumber(uint64_t *retval) {
#ifdef VIRTUAL #ifdef VIRTUAL
*retval = eiger_virtual_startingframenumber; *retval = eiger_virtual_nextframenumber;
return OK; return OK;
#else #else
return Beb_GetStartingFrameNumber(retval, send_to_ten_gig); return Beb_GetNextFrameNumber(retval, send_to_ten_gig);
#endif #endif
} }
@ -1086,8 +1092,8 @@ int setModule(sls_detector_module myMod, char *mess) {
} }
// threshold // threshold
if (myMod.eV >= 0) if (myMod.eV[0] >= 0)
setThresholdEnergy(myMod.eV); setThresholdEnergy(myMod.eV[0]);
else { else {
// (loading a random trim file) (dont return fail) // (loading a random trim file) (dont return fail)
setSettings(UNDEFINED); setSettings(UNDEFINED);
@ -2252,7 +2258,7 @@ void *start_timer(void *arg) {
// Send data // Send data
{ {
uint64_t frameNr = 0; uint64_t frameNr = 0;
getStartingFrameNumber(&frameNr); getNextFrameNumber(&frameNr);
// loop over number of frames // loop over number of frames
for (int iframes = 0; iframes != numFrames; ++iframes) { for (int iframes = 0; iframes != numFrames; ++iframes) {
@ -2260,7 +2266,7 @@ void *start_timer(void *arg) {
// check if manual stop // check if manual stop
if (sharedMemory_getStop() == 1) { if (sharedMemory_getStop() == 1) {
setStartingFrameNumber(frameNr + iframes + 1); setNextFrameNumber(frameNr + iframes + 1);
break; break;
} }
@ -2353,7 +2359,7 @@ void *start_timer(void *arg) {
} }
} }
} }
setStartingFrameNumber(frameNr + numFrames); setNextFrameNumber(frameNr + numFrames);
} }
closeUDPSocket(0); closeUDPSocket(0);
@ -2391,8 +2397,8 @@ int stopStateMachine() {
// ensure all have same starting frame numbers // ensure all have same starting frame numbers
uint64_t retval = 0; uint64_t retval = 0;
if (Beb_GetStartingFrameNumber(&retval, send_to_ten_gig) == -2) { if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {
Beb_SetStartingFrameNumber(retval + 1); Beb_SetNextFrameNumber(retval + 1);
} }
return OK; return OK;
#endif #endif
@ -2550,8 +2556,8 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) {
destMod->iodelay = srcMod->iodelay; destMod->iodelay = srcMod->iodelay;
if (srcMod->tau >= 0) if (srcMod->tau >= 0)
destMod->tau = srcMod->tau; destMod->tau = srcMod->tau;
if (srcMod->eV >= 0) if (srcMod->eV[0] >= 0)
destMod->eV = srcMod->eV; destMod->eV[0] = srcMod->eV[0];
LOG(logDEBUG1, ("Copying register %x (%x)\n", destMod->reg, srcMod->reg)); LOG(logDEBUG1, ("Copying register %x (%x)\n", destMod->reg, srcMod->reg));
if (destMod->nchan != 0) { if (destMod->nchan != 0) {

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