Compare commits

...

838 Commits

Author SHA1 Message Date
ae58e9f0f4 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-25 19:28:12 +02:00
603ddb0d75 updated docs, execcommand multiple words 2020-09-25 19:24:26 +02:00
c0be5ab8cb merge args fix 2020-09-25 11:55:55 +02:00
30f4c80031 fix 2020-09-25 11:00:51 +02:00
d25da43851 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-25 11:00:25 +02:00
ec2d6c597f added merge_args 2020-09-25 11:00:14 +02:00
fe81963873 rxr: udp socket size max of INT_MAX/2 (#191) 2020-09-25 10:15:39 +02:00
f950e32893 fix to utils 2020-09-25 08:53:35 +02:00
aa3af2f0ce Merge pull request #190 from slsdetectorgroup/g2cont
G2cont
2020-09-24 17:20:05 +02:00
e4615a11bb binary in 2020-09-24 17:19:21 +02:00
c01ce3d514 Merge branch 'developer' into g2cont 2020-09-24 17:18:04 +02:00
99642dad69 g2 fix: cont trigger frames in rxr should be 1 2020-09-24 17:16:46 +02:00
2c1fddee84 Cmddacs (#189)
Moved dacs to it's own command for command line. 
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2020-09-24 17:16:34 +02:00
c862f1df81 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-24 16:55:50 +02:00
671a2724ac more set_using_dict 2020-09-24 16:55:41 +02:00
9c5d8cfcd7 gui fix g2 disabling frame period in con ext 2020-09-24 16:05:43 +02:00
8483e05f4c binary in 2020-09-24 15:44:07 +02:00
d96352f2ae g2:fix for period in trigger cont 2020-09-24 15:43:14 +02:00
0f65633ea3 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-24 14:07:15 +02:00
18d5c5e26d more element 2020-09-24 14:06:58 +02:00
3f19f29c9e G2ContTrigger (#188)
* g2: setting #frames  to 1 and period to 0 for cont trigger, extra frame reg is set to #frames for cont auto and #trigger for cont trigger
2020-09-24 11:59:11 +02:00
101f029eef generalized set_using_dict 2020-09-24 11:01:51 +02:00
97fea10ee2 more of @element 2020-09-24 08:39:12 +02:00
d3fbfebeb7 generalized make_ for python 2020-09-23 17:44:19 +02:00
50fd9276ce removed unused tests 2020-09-23 17:14:38 +02:00
1f31dd667b more element and dict 2020-09-23 17:06:30 +02:00
18cd363f8f tests in 2020-09-23 16:34:18 +02:00
0b0f5c94d5 master file no index 2020-09-23 16:28:50 +02:00
23720e3c63 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-23 15:09:25 +02:00
3432343adb element 2020-09-23 15:09:16 +02:00
d06e0d1e7f wip, doc 2020-09-23 15:07:12 +02:00
750adffe6a wip, doc 2020-09-23 15:07:03 +02:00
0b02fabaf8 wip, doc 2020-09-23 14:59:27 +02:00
4aa33b5d7f Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-23 14:58:33 +02:00
40a1d27e3a wip, doc 2020-09-23 14:58:30 +02:00
b23410bc5e wip, doc 2020-09-23 14:58:25 +02:00
b6d5efd441 fix for clientversion 2020-09-23 14:54:16 +02:00
79a03c6c92 WIP 2020-09-23 14:25:51 +02:00
330df3463a version prints hex 2020-09-23 14:08:41 +02:00
11754fbb5e tempvalues gives int in case of single value or same values 2020-09-23 13:54:18 +02:00
e786b9f037 wip, doc 2020-09-23 13:15:53 +02:00
bd4299fd15 Wip, doc 2020-09-23 12:32:51 +02:00
a4bdffd0b9 Merge branch 'eigerserverlock' into developer 2020-09-22 18:48:35 +02:00
bb575c6017 wip, doc 2020-09-22 18:39:46 +02:00
65da9e701b wip, doc 2020-09-21 18:30:33 +02:00
804ad0997c wip, doc 2020-09-21 18:20:59 +02:00
2fc0768ad1 minor warning fix 2020-09-21 17:57:31 +02:00
ca0192e27e Merge pull request #184 from slsdetectorgroup/eigerserverlock
Eigerserverlock
2020-09-21 17:29:03 +02:00
4ad486fda0 Merge branch 'developer' into eigerserverlock 2020-09-21 17:28:38 +02:00
cf8581caaa Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-21 17:28:03 +02:00
a8cc47d25c wip, doc 2020-09-21 17:27:49 +02:00
d50c40e2ad Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-21 17:18:43 +02:00
f6a442fd10 detsize in python 2020-09-21 17:18:31 +02:00
f5b8681811 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-21 17:09:49 +02:00
54ca9f7ebb wip, doc 2020-09-21 17:09:39 +02:00
9920987b4d dacvalues return int if same 2020-09-21 14:41:30 +02:00
569c014d3c WIP, doc 2020-09-21 11:23:46 +02:00
608b71d5ea Merge branch 'eigerserverlock' of github.com:slsdetectorgroup/slsDetectorPackage into eigerserverlock 2020-09-18 18:16:09 +02:00
c83daab56d merge solved 2020-09-18 18:15:54 +02:00
d65030f5ca Merge pull request #186 from slsdetectorgroup/g2cwframes
G2cwframes
2020-09-18 18:01:45 +02:00
c3366a6748 g2 binary in 2020-09-18 17:59:48 +02:00
7c21aa96a9 g2: setting continuous mode frames in naother reg, and when changing from burst to continous 2020-09-18 17:58:39 +02:00
d028a120bb binaries in 2020-09-18 14:20:05 +02:00
f6dd02acc2 minor print in temp_Fpgafl in eiger 2020-09-18 14:18:19 +02:00
0906efaf31 moving temp_fpgafl and temp_fpgafr back to the stop server 2020-09-18 14:09:23 +02:00
8ef79ce173 binaries in 2020-09-18 11:37:25 +02:00
539c0c295b replaced pthread_mutex_t with sem_t 2020-09-18 11:30:04 +02:00
e91420bd16 locking in list 2020-09-18 11:23:57 +02:00
515a0c05b9 removed locking in locallink 2020-09-18 11:23:46 +02:00
46b75c1429 minor 2020-09-18 11:23:33 +02:00
092b3fa8b9 eiger: locking for local link access in shared memory 2020-09-18 11:23:21 +02:00
a7e24717a9 dacs 2020-09-17 17:29:57 +02:00
e01e41926c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-17 17:13:30 +02:00
44a8ce864b dacs for docs 2020-09-17 17:13:22 +02:00
e18f10051e jungfrau and gotthard binaries in 2020-09-17 17:11:57 +02:00
d9bb028da2 added dacnames in server defs for g1 and jungfrau 2020-09-17 17:11:09 +02:00
6d01348bf4 removed setClockFrequency and added some python commands 2020-09-17 16:03:58 +02:00
e8cd75a6ac more python commands 2020-09-17 15:10:02 +02:00
d945f39142 removed unused variables 2020-09-17 14:39:20 +02:00
ac1e9569b5 removed unused fields and added popcount 2020-09-17 14:20:02 +02:00
ea1b41c84a fixed bool ini with nullptr 2020-09-17 14:07:19 +02:00
b0dd82c667 removing sem_wait in acquire (#182) 2020-09-17 13:55:20 +02:00
bf69951456 Merge pull request #183 from slsdetectorgroup/positions
Replacing initializer list with vector
2020-09-17 12:57:18 +02:00
2d2e80469c format 2020-09-17 12:18:34 +02:00
5d648443fa replaced remaning {} 2020-09-17 12:18:08 +02:00
1fb7352378 added missing unit in test 2020-09-17 12:13:09 +02:00
511c206787 replaced initializer list with vector for CmdProxy 2020-09-17 12:11:19 +02:00
74edb6a1c1 test for single mod exptime 2020-09-17 11:42:44 +02:00
3376f7fa37 wip, doc 2020-09-14 15:39:21 +02:00
bfe36085f2 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-14 15:18:55 +02:00
f061d2273a wip, doc 2020-09-14 15:18:48 +02:00
b12ae5d929 Merge pull request #180 from slsdetectorgroup/serverdoc
Adding auto generated server default #define in documentation
2020-09-14 10:44:01 +02:00
2285061623 column wrap for long attributes 2020-09-11 17:47:28 +02:00
e10ebe33d7 fixed cmake command 2020-09-11 17:25:27 +02:00
01921bc016 WIp, doc 2020-09-11 16:05:53 +02:00
aa10c4665f added ctb 2020-09-11 15:25:23 +02:00
f644cba244 wip, doc 2020-09-11 15:19:22 +02:00
884da7197e fixed command 2020-09-11 15:13:26 +02:00
8ae0659478 docs 2020-09-11 15:09:44 +02:00
ad95f729dc subheadings in Detector API doc 2020-09-11 12:15:51 +02:00
3b071cc43f WIP doc 2020-09-11 09:30:30 +02:00
2805359cd0 Merge pull request #179 from slsdetectorgroup/kernelcheck
g2 and m3: kernel checks only when its too old
2020-09-11 08:55:48 +02:00
1515b79c97 Merge branch 'kernelcheck' of github.com:slsdetectorgroup/slsDetectorPackage into kernelcheck 2020-09-11 08:50:01 +02:00
2ab4bb1c04 minor 2020-09-11 08:49:52 +02:00
5214c0f1a4 binaries in 2020-09-10 18:43:26 +02:00
60bc3a8fa7 Merge branch 'kernelcheck' of github.com:slsdetectorgroup/slsDetectorPackage into kernelcheck 2020-09-10 18:41:49 +02:00
00f780665f using common.c to extract date and using nios.c to check kernel version(a bit specific to nios) and using c api instead of system command to get uname 2020-09-10 18:41:31 +02:00
ab738790e0 python nmod 2020-09-10 17:13:05 +02:00
d4cff5b99c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-10 17:08:55 +02:00
84f49a9b27 python 2020-09-10 17:08:51 +02:00
a4926e6ae1 help fix for cmd line 2020-09-10 17:04:08 +02:00
cf8785ad2e Merge branch 'developer' into kernelcheck 2020-09-10 16:57:54 +02:00
be8284f5c2 nmod added to command line 2020-09-10 16:57:30 +02:00
3fd32b2c9c missing file 2020-09-10 16:47:51 +02:00
d70090967d python funcs 2020-09-10 16:47:34 +02:00
88fe306902 binaries in 2020-09-10 16:23:29 +02:00
d931416def g2 and m3: kernel checks only when its too old 2020-09-10 16:22:08 +02:00
6cfaa92b61 removed wrongly named functions 2020-09-10 15:54:45 +02:00
c94dfde17c updated compare script 2020-09-10 15:48:25 +02:00
b879a377ba python cmds 2020-09-10 15:28:29 +02:00
d420451751 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-10 14:45:38 +02:00
2bc33ad34a default value for setDAC 2020-09-10 14:45:31 +02:00
cb23e827bf Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-10 14:11:29 +02:00
a0f915316e rx_readfreq to rx_zmqfreq and rx_datastream to rx_zmqstream 2020-09-10 14:11:21 +02:00
2733bc5320 added now 2020-09-10 14:02:25 +02:00
3b82e9fcc1 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-10 12:16:38 +02:00
a95d8f664a added slowadc to python 2020-09-10 12:16:25 +02:00
11e7d89da3 Merge branch 'developer' into pydoc 2020-09-10 12:01:38 +02:00
34043c358f Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-10 11:53:31 +02:00
da9c7c354e adc- 2020-09-10 11:53:17 +02:00
4d499e231d Merge pull request #178 from slsdetectorgroup/eigertempblockingfix
eiger temp fix: tempfpgafl and tempfpgafr cannot be used during block…
2020-09-10 11:48:31 +02:00
0a7809286b eiger temp fix: tempfpgafl and tempfpgafr cannot be used during blocking acquire as it goes through control server now 2020-09-10 11:47:42 +02:00
00abb5e14b Merge pull request #177 from slsdetectorgroup/eigerfw27
eiger: fw 27 fix for delays
2020-09-10 10:40:09 +02:00
22c2bb0258 eiger: fw 27 fix for delays 2020-09-10 10:26:16 +02:00
9d1cd09fd4 Merge pull request #176 from slsdetectorgroup/m3clks
M3 clks
2020-09-10 10:20:41 +02:00
80b053eb10 binaries resolved, merge conflict from developer 2020-09-10 10:19:34 +02:00
3cd4f3897b M3: software trigger (#175) 2020-09-10 10:15:45 +02:00
d011186b9a Merge pull request #173 from slsdetectorgroup/updatemode
server: Update mode to skip detector setup
2020-09-09 18:33:43 +02:00
669c14d6d5 Merge branch 'm3clks' into pydoc 2020-09-09 17:36:12 +02:00
ecabc94ade Merge branch 'developer' into m3clks 2020-09-09 17:34:02 +02:00
c58a2d957d Merge branch 'developer' into updatemode 2020-09-09 17:31:09 +02:00
1b214778a5 fix import 2020-09-09 17:26:50 +02:00
d5f6cbc075 Merge branch 'm3clks' into pydoc 2020-09-09 16:45:38 +02:00
52303daffd binaries in 2020-09-09 16:44:23 +02:00
02d4769f6a WIP 2020-09-09 16:39:48 +02:00
a9d1a78662 m3:smp_clk (timing rxr) changed back to clk div 5 2020-09-09 15:55:13 +02:00
3cf2160a2d binaries in 2020-09-09 15:25:48 +02:00
4917812bb0 Merge pull request #171 from slsdetectorgroup/rmMoenchAPI
Rm moench api
2020-09-09 15:22:30 +02:00
a0f9c6fe8c updated python API 2020-09-09 15:15:36 +02:00
82e978e901 WIP 2020-09-09 13:47:54 +02:00
04bf2aca6d Merge branch 'developer' into rmMoenchAPI 2020-09-09 13:45:19 +02:00
8bdfe7527f Merge pull request #170 from slsdetectorgroup/m3parallel
M3parallel
2020-09-09 13:44:40 +02:00
b33fdf4462 merge conflict fixed and merged with developer 2020-09-09 12:31:36 +02:00
70386633f6 Merge pull request #168 from slsdetectorgroup/serverargs
Server arguments
2020-09-09 12:29:44 +02:00
6c8443f09e binaries in 2020-09-09 12:14:38 +02:00
bf52ec10da help printed neutral 2020-09-09 11:06:47 +02:00
bdac4d133e conflict solved and merged with developer 2020-09-09 10:27:14 +02:00
e8156d412e G2: continuous internal mode (#167) 2020-09-09 10:13:15 +02:00
97687f0f6d binary in 2020-09-08 17:33:06 +02:00
bfbfe204f4 m3: default clocks changed 2020-09-08 17:31:44 +02:00
67d57eb5cd Merge branch 'updatemode' into m3trigger 2020-09-08 16:55:07 +02:00
f940c09290 Merge branch 'rmMoenchAPI' into updatemode 2020-09-08 16:54:44 +02:00
30293b1d36 Merge branch 'm3parallel' into rmMoenchAPI 2020-09-08 16:54:13 +02:00
8e09b50c5e python and gui fix for parallel, gui: clkdivider also for jungfrau and parallel also for m3 2020-09-08 16:53:42 +02:00
87bad38f80 binary in 2020-09-08 15:46:32 +02:00
67f1f9924a m3:software trigger 2020-09-08 15:45:35 +02:00
e1e04ee755 binaries in 2020-09-08 15:18:07 +02:00
6e06d4307d WIP 2020-09-08 15:10:57 +02:00
20a959bf61 update mode to skip firmware checks and setupDetector, kernel check added to m3and g2 2020-09-08 15:08:45 +02:00
8e49a114db moench: removed api that goes only to processor (future: one has to use rX_jsonaddheader or rx_jsonpara to set key and values) 2020-09-08 12:34:56 +02:00
aecde086a0 binaries in 2020-09-08 12:16:41 +02:00
311cebcd00 m3:added parallel mode 2020-09-08 12:16:02 +02:00
8496f5715f binaries in 2020-09-08 11:55:17 +02:00
f26d8e514b merged with g2continuous 2020-09-08 08:46:37 +02:00
0b9ff70244 binaries in 2020-09-08 08:25:24 +02:00
e82e531fb1 server arguments like linux 2020-09-08 08:18:48 +02:00
503f83e8e3 Merge branch 'developer' into g2continuous 2020-09-07 17:07:09 +02:00
1a90c58d9e Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-07 16:52:07 +02:00
c467bd677e missing file 2020-09-07 16:52:03 +02:00
f280d033b9 binarie sin 2020-09-07 16:44:48 +02:00
c9cf845c9a WIP 2020-09-07 16:44:26 +02:00
63bbbfb438 Merge pull request #166 from slsdetectorgroup/rxrmetadata
Rxrmetadata
2020-09-07 16:37:55 +02:00
5540f16116 Merge branch 'developer' into g2continuous 2020-09-07 16:36:42 +02:00
a77833b4c7 Merge branch 'developer' into g2continuous 2020-09-07 16:36:00 +02:00
9ee67f2cfa python rx_jsonpara 2020-09-07 16:23:28 +02:00
cf3758f155 Merge branch 'developer' into rxrmetadata 2020-09-07 16:15:56 +02:00
b20720686e gotthard2: changed order of burst mode enums, added a 4th burst mode cw internal burst mode 2020-09-07 16:13:33 +02:00
1edb1e8816 GUI: adding 1D detectors by default in x direction, others in y dir (#164) 2020-09-07 13:03:15 +02:00
30e06c6386 Merge branch 'developer' into rxrmetadata 2020-09-07 11:53:41 +02:00
ea601fe1f7 lock to ensure json add header can be updated on the fly 2020-09-07 11:52:51 +02:00
f0c576c779 WIP 2020-09-07 11:15:51 +02:00
fb8842e048 build and libname 2020-09-07 09:14:47 +02:00
5b182469a1 rxr: fixed all updates from rxParameters, connected them in masterAttributes, added json header and scan parametes in metadata 2020-09-04 13:49:30 +02:00
a1b88d3a62 fix 2020-09-04 11:20:33 +02:00
514346c3ba static support lib 2020-09-04 11:00:34 +02:00
9218ef5a95 Merge branch 'developer' into rxrmetadata 2020-09-03 18:02:05 +02:00
b124cea67b Merge branch 'developer' into rxrmetadata 2020-09-03 17:48:03 +02:00
497eff6f04 Merge pull request #163 from slsdetectorgroup/guitrimval
gui: enable trimming for m3
2020-09-03 17:38:04 +02:00
92635c5bd3 mythen3 gui: trimbit files feature enabled 2020-09-03 17:36:23 +02:00
a00231dab6 m3 gui: enabled trimval feature 2020-09-03 17:21:37 +02:00
35c7e46d60 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-09-03 17:20:48 +02:00
47da2540af json 2020-09-03 17:20:38 +02:00
891b8dbd2c mythen3: wrong hardware version number, so it didnt reboot after programfpga 2020-09-03 17:04:58 +02:00
89f0479318 txndelay in python 2020-09-03 16:30:13 +02:00
7048a75808 triggersl and print fix for acq 2020-09-03 16:21:15 +02:00
a081fbbdaa Merge branch 'developer' into rxrmetadata 2020-09-03 15:52:01 +02:00
22f14cacb0 virtual and vetofile 2020-09-03 15:33:12 +02:00
6b7dee2631 added versions and parallel to python 2020-09-03 11:49:08 +02:00
6d1856daa2 gui: added burstmode (#159)
Added burst mode in the GUI. Visible only for detectors that supports it.
2020-09-03 10:47:02 +02:00
7bb9696151 Merge branch 'developer' into rxrmetadata 2020-09-02 18:07:22 +02:00
44335f9cf4 Merge pull request #157 from slsdetectorgroup/g2printout
G2printout
2020-09-02 17:04:15 +02:00
d62d5ef804 binaries in 2020-09-02 17:03:19 +02:00
dbaab61ea2 g2: print ns in server before converting to freq 2020-09-02 17:02:12 +02:00
180c7b7191 Gui slot call focus fix (#150)
* fix for editingFinished for qlineedit using isModified()

* spinbox disable keyboard tracking to use valuechanged so slot called only after editing finished, focus fix

* return pressed forces qtextfield to be set (slot for tab checks for modification flag due to avoid unnecessary set when focus). This is to remove inconsistencies from command line. A return should set even if it looks like no modification in gui

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
2020-09-02 16:56:57 +02:00
050f0ff8a0 Merge pull request #156 from slsdetectorgroup/g2clkchange
gotthard2: change default clock divider of readout clocks 1 and 2 fro…
2020-09-02 16:50:32 +02:00
658a804cca gotthard2: change default clock divider of readout clocks 1 and 2 from 8 to 6 2020-09-02 16:48:58 +02:00
73530ddd6f python udp_srcmac 2020-09-02 16:48:51 +02:00
abe34d573c WIP 2020-09-02 16:15:33 +02:00
05d5652532 exptime example 2020-09-02 12:32:14 +02:00
38e0351068 zmqports work like command line 2020-09-02 12:20:08 +02:00
e192cad1f2 zmqport fix 2020-09-02 12:07:47 +02:00
b8350b070e rx_zmqip fix 2020-09-02 11:55:27 +02:00
3ddeea3c2b minor fix docs 2020-09-02 11:44:13 +02:00
42b5ff3a62 WIP, doc 2020-09-02 10:25:36 +02:00
00978a52c8 added smp_clk, changed rdo vco freq from 1.25GHz to 1GHz, changed rdo clock dividers 2020-09-01 12:06:39 +02:00
8400c686b5 binaries in 2020-08-31 18:22:41 +02:00
adb6171e35 eiger server: more checks for feb interface reg readouts 2020-08-31 18:22:16 +02:00
973b8f7106 eiger server: more checks for feb interface reg readouts 2020-08-31 18:19:56 +02:00
2f81c233f5 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-31 14:17:14 +02:00
e4274e3f95 WIP, doc 2020-08-31 14:17:09 +02:00
b92f9af025 hex example 2020-08-31 10:14:01 +02:00
7ca1609c58 minor doc 2020-08-31 09:50:42 +02:00
4cd81437ab pyver 2020-08-31 09:49:25 +02:00
7e202b6c26 getting started 2020-08-31 09:32:48 +02:00
e0df9fcd99 wip, doc 2020-08-28 19:47:19 +02:00
30307220e3 QIP, doc 2020-08-28 18:12:08 +02:00
6a74851e0c enums 2020-08-28 12:21:07 +02:00
ac30717083 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-28 12:08:21 +02:00
bfed02b41e getting started 2020-08-28 12:08:13 +02:00
b5669dc921 WIP, doc 2020-08-28 10:57:21 +02:00
97ee2d269d Merge pull request #149 from slsdetectorgroup/stopfix
stopping in virtual server needs a usleep before acquiring lock to ge…
2020-08-27 18:22:51 +02:00
bc5cc3fa29 stopping in virtual server needs a usleep before acquiring lock to get status 2020-08-27 18:21:46 +02:00
abd2808924 WIP, doc 2020-08-27 18:00:19 +02:00
786b14e88b Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-27 17:58:21 +02:00
f19799343e WIP, doc 2020-08-27 17:58:15 +02:00
2e4783f296 sort and remove duplicates before sending rxdbitlist 2020-08-27 17:08:53 +02:00
3954913661 fixed ratecorr 0 in python 2020-08-27 16:45:14 +02:00
7eafceb0f9 Exposing vector of strings for loading parameters (#147) 2020-08-27 16:17:56 +02:00
a1e06ca7a9 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-26 17:45:17 +02:00
27c1916d63 WIP, doc 2020-08-26 17:45:12 +02:00
64075c0e75 added tempvalues 2020-08-26 12:21:33 +02:00
9505c51404 merge conflict 2020-08-26 11:13:34 +02:00
6d8168722a WIP, doc 2020-08-26 11:11:51 +02:00
f9261c0f32 return ratecorr in s 2020-08-26 11:00:56 +02:00
d44388a44e mv to mV 2020-08-25 17:27:29 +02:00
6a18a214ba Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-25 17:18:22 +02:00
83baf18490 WIP, doc 2020-08-25 17:18:18 +02:00
ddf2085b4b exptime for mythen3 2020-08-25 16:55:58 +02:00
508ec150f5 added Gotthard and Moench 2020-08-25 15:48:56 +02:00
5eda75ebdd added patsetbit 2020-08-25 14:59:57 +02:00
0253933271 newline in command docs 2020-08-25 14:46:06 +02:00
0f80079d16 enum example 2020-08-25 09:05:02 +02:00
fd601128b7 enum helper 2020-08-25 09:02:31 +02:00
bc09b8bfb9 WIP doc 2020-08-21 17:13:43 +02:00
e85326d415 WIP doc 2020-08-21 16:00:33 +02:00
396685e6a9 WIP doc 2020-08-21 15:25:47 +02:00
cf6a48d7a9 WIP doc 2020-08-21 13:20:32 +02:00
4f45110cda WIP doc 2020-08-21 13:05:33 +02:00
3aa75ce167 WIP doc 2020-08-20 17:11:15 +02:00
5b364b9ad8 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-20 16:59:45 +02:00
550ab51f34 wip doc 2020-08-20 16:59:38 +02:00
e782fcce62 added gotthard2 2020-08-20 16:49:55 +02:00
a2ec86006d inherited-members in doc 2020-08-20 15:45:06 +02:00
6399d1bdfb added dacvalues to python 2020-08-20 15:34:06 +02:00
6cd8bbcb12 python templist 2020-08-20 15:23:15 +02:00
678967bfe1 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-20 15:16:36 +02:00
ffd694eda1 temlist and tempvalues added 2020-08-20 15:16:28 +02:00
ab2f929e83 dac example 2020-08-20 15:15:09 +02:00
4540eddd68 added timinglist and settingslist to python 2020-08-20 14:55:05 +02:00
534c7105f4 dac example 2020-08-20 14:52:47 +02:00
c8a39d1d9e temperature example 2020-08-20 14:13:27 +02:00
bd6d212f99 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-20 13:46:33 +02:00
c4f0052ac9 WIP 2020-08-20 13:46:25 +02:00
5bfbc83a04 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-20 12:58:23 +02:00
429eb8da53 doc wip 2020-08-20 12:58:17 +02:00
f6cde374c4 WIP 2020-08-20 12:27:30 +02:00
1f811dfabd added examples 2020-08-20 12:22:49 +02:00
8ef6f32be6 example and updated python bindings 2020-08-20 12:19:35 +02:00
a7cc2b38d8 temperature reading for eiger 2020-08-20 11:46:35 +02:00
9b26f5a6c8 added python examples in source 2020-08-20 09:21:59 +02:00
c4fde7f7bc Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-19 18:45:47 +02:00
5f23a664fa wip doc 2020-08-19 18:45:39 +02:00
209c97f44c vthrehsold 2020-08-19 18:01:27 +02:00
d631fda2c7 updated non-blocking example 2020-08-19 17:48:22 +02:00
caff89a040 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-19 17:27:09 +02:00
42067b3de3 WIP doc 2020-08-19 17:27:04 +02:00
a287ce46b1 WIP doc 2020-08-19 17:13:39 +02:00
7212a0d433 added start, rx_start etc 2020-08-19 17:06:54 +02:00
9bae97ec4c doc update, 1st trial 2020-08-19 16:37:21 +02:00
096b0c424d spaces in percentage printout for python 2020-08-19 12:56:22 +02:00
39c2ab4743 rxr:minor removed unused function in general data for m3 to change size depending on dr 2020-08-19 12:27:40 +02:00
57e0fd805e added support for ~ expansion 2020-08-19 12:03:32 +02:00
071a1c9f98 python docs 2020-08-19 07:44:53 +02:00
0cb418a89b Merge pull request #141 from slsdetectorgroup/m3txndelay
M3txndelay
2020-08-18 15:58:41 +02:00
4e9c99d65d Merge branch 'developer' into m3txndelay 2020-08-18 15:58:32 +02:00
dd918fb326 eiger deactivate beb functions (#140)
eiger: some deactivated beb functions should return a value instead of accessng  beb
2020-08-18 15:52:52 +02:00
7ea86dec43 m3 binaries in 2020-08-18 15:28:30 +02:00
eeb386fef5 mythen3: txndelay frame added 2020-08-18 15:27:30 +02:00
afabc9a503 Fixed file cluster closing and cprintf warning in moenchZmqProcess 2020-08-18 10:56:21 +02:00
1d8f9a5aed more detail in packet loss statistic percentage 2020-08-14 17:21:35 +02:00
d4e11e56ea added drlist and timinglist, moved daclist and settingslist from cmdprozy.cpp to .h 2020-08-14 15:47:39 +02:00
de69e666a9 progress changed to double 2020-08-14 12:16:35 +02:00
28ffad223d update comment on api, move updaterxratecorrection to the right setexptime 2020-08-14 11:22:41 +02:00
f0d0e9ab1f Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-13 10:15:52 +02:00
854d8d4ae2 alternate sphinx name 2020-08-13 10:15:45 +02:00
16af67924e bugfix: load trimbits also for individual setting 2020-08-12 17:11:09 +02:00
d822600c68 fix for cmd free help 2020-08-12 16:57:59 +02:00
816e5200b2 fixed cmk.sh to only compile documentation or only rst 2020-08-12 16:10:25 +02:00
9c58b4802c gcc4.8 still does not have strict order of evaluation from left to right for <<, so has to be separated 2020-08-12 11:19:45 +02:00
0c7759d7e4 formatting 2020-08-11 17:09:36 +02:00
690947ec3a Update feature_request.md 2020-08-11 09:54:42 +02:00
45182283d1 Update bug_report.md 2020-08-11 09:51:10 +02:00
03ac0910cd Update feature_request.md 2020-08-11 09:51:04 +02:00
b6c94b2ab4 Update change_request.md 2020-08-11 09:50:06 +02:00
336dfcae60 Update bug_report.md 2020-08-11 09:45:00 +02:00
d47f0feb17 Update bug_report.md 2020-08-11 09:30:18 +02:00
784628589e update eiger manual to developer 2020-08-10 18:37:29 +02:00
21995b3d4a rxr: missed out on initializing function pointers to null (rxr) 2020-08-10 16:54:25 +02:00
27b2a607c8 binaries in 2020-08-10 12:05:37 +02:00
8e2bd17704 updated client script 2020-08-10 12:04:31 +02:00
0e011a77b5 array init fix for old gcc 2020-08-10 10:35:26 +02:00
d56b2134ef updated client versions 2020-08-10 09:58:57 +02:00
8af1183220 house keeping 2020-08-06 16:50:29 +02:00
78fdf5b60a removed casts 2020-08-06 12:33:43 +02:00
132043a70d static_assert enum size 2020-08-06 11:50:35 +02:00
b51290d0fe avoid conversions 2020-08-05 16:49:23 +02:00
0369413201 rename fix 2020-08-05 15:22:47 +02:00
04d6644753 Merge pull request #128 from slsdetectorgroup/rxrchrono
rxr chrono
2020-08-05 13:58:08 +02:00
949c6a81ce vector to array 2020-08-05 13:54:56 +02:00
aa0c36713c Utility function to get a vector of set bits
Template function to return a vector with the positions of all set bits in a variable.
2020-08-05 13:42:57 +02:00
4aee113dda temp fix 2020-08-05 13:27:19 +02:00
6c3f0d18ec rxr:removed delte and initialize memebers 2020-08-05 13:23:45 +02:00
7b6f4d0b5b rxr chrono 2020-08-05 12:07:45 +02:00
6db5954d21 Merge pull request #127 from slsdetectorgroup/configuremac
Configuremac
2020-08-05 10:22:20 +02:00
69d9680034 mior 2020-08-05 10:17:47 +02:00
bbf8ab4b88 binary in 2020-08-05 09:49:13 +02:00
79f010a438 renamed is_configurable to is_udp_configured 2020-08-05 09:37:58 +02:00
ab05da4d0e clean up 2020-08-05 09:13:53 +02:00
6e67ff9f90 tests 2020-08-04 17:54:40 +02:00
321ed13659 merge from developer 2020-08-04 17:43:38 +02:00
de39310a9c Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-04 17:40:27 +02:00
e1de2f72ba partial clean2 2020-08-04 17:40:17 +02:00
f6172f9b9e binary in 2020-08-04 17:36:49 +02:00
5616d4aeeb m3: deserializers reg also have to updated when changing dr, #counters 2020-08-04 17:32:34 +02:00
857aa47ee7 partial clean 2020-08-04 17:00:20 +02:00
bb3951c201 binaries in 2020-08-04 16:57:06 +02:00
380b062216 configure mac 2020-08-04 16:55:31 +02:00
a70d4e1e5d Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-08-04 15:38:45 +02:00
3301a80d99 send string 2020-08-04 15:38:38 +02:00
ce25b3018c Merge pull request #126 from slsdetectorgroup/m3
M3
2020-08-04 15:21:30 +02:00
d25f9093d5 binary in 2020-08-04 12:02:37 +02:00
d24edd52e1 m3: optimizing 1g and 10g digitizing by setting number of packets depending on 10/1g, dr and #counters 2020-08-04 12:01:28 +02:00
7b1ede32b1 m3: optimizing 1g and 10g digitizing by setting number of packets depending on 10/1g, dr and #counters 2020-08-04 11:58:20 +02:00
4174d193b4 removed exec_command from ClientInterface 2020-08-04 10:50:57 +02:00
0514f00552 m3: update deserializers except for deserializer reg 2020-08-03 17:23:04 +02:00
8631f5e2b0 m3: counter mask in master file 2020-08-03 16:39:31 +02:00
540a203139 Merge pull request #125 from slsdetectorgroup/eiger
Eiger
2020-08-03 15:04:25 +02:00
57c3cb0849 class to struct: review 2020-08-03 14:48:27 +02:00
e82bcafb76 moved class to struct masterattributes 2020-08-03 14:36:35 +02:00
3cdf98b230 Merge branch 'eiger' of github.com:slsdetectorgroup/slsDetectorPackage into eiger 2020-08-03 14:29:23 +02:00
acc43842eb code reviewe 2020-08-03 14:29:16 +02:00
63a5b4d61f send vector for ratecorr 2020-08-03 13:05:36 +02:00
3083260b28 changed clkdiv to speed in python 2020-08-03 11:13:47 +02:00
6e4b7f5bd7 fixed space in python enums 2020-08-03 11:10:01 +02:00
ddd562f8b5 fix 2020-08-03 10:27:06 +02:00
e2f1fd076a rate correction updated in rxr also when chanign exptime, subexptime, default rate correction 2020-08-03 10:07:00 +02:00
6a084e99b4 eiger manual for 5.0 2020-07-31 21:03:22 +02:00
885b22eca8 ratecorrectiosn addded to master file 2020-07-31 18:38:27 +02:00
bea4ba131a eiger rxr added threshold to master file 2020-07-31 17:45:33 +02:00
09fa8a3ba5 timing mode into receiver master file 2020-07-31 17:37:04 +02:00
874092a9d0 gui sub frame index now shows 2020-07-31 17:26:53 +02:00
5c4d355d57 minor 2020-07-31 17:18:15 +02:00
4702a76235 Merge branch 'developer' into eiger 2020-07-31 17:15:07 +02:00
fd503e84af m3: gui: when counters change, the npixelsx also changes 2020-07-31 16:50:17 +02:00
1211d02428 hdf5 dependant master attributes 2020-07-31 16:19:34 +02:00
ec27d35d6d refactor 2020-07-31 14:09:21 +02:00
ea2e7839d0 binary master attributes done, hdf5 WIP 2020-07-31 13:59:06 +02:00
d5b893e452 readErrorMessage 2020-07-31 13:32:53 +02:00
68c0f76bd9 created detector dependant master file attributes 2020-07-31 12:15:38 +02:00
4eaa9588ba created detector dependant master file attributes 2020-07-31 12:15:28 +02:00
459a715b9c minor 2020-07-31 12:15:02 +02:00
40d0430f2e get type from detector 2020-07-31 12:02:12 +02:00
0cb38a9c51 simplified sending 2020-07-31 11:51:06 +02:00
caef8c111c added overload to send vector 2020-07-31 11:05:39 +02:00
02d5cf14e4 removed extra decltype 2020-07-31 09:17:04 +02:00
bd221fefe5 Merge branch 'eiger' of github.com:slsdetectorgroup/slsDetectorPackage into eiger 2020-07-31 08:51:04 +02:00
c683f62452 Merge branch 'developer' into eiger 2020-07-31 08:50:51 +02:00
1177e54602 Remove VLAs (#124)
Removing the use of VLAs in the client and receiver side code. In addition cleaning up sending jsonheader
2020-07-30 18:22:39 +02:00
85c958facf WIP det dependant master file attribtes 2020-07-30 18:05:47 +02:00
87c33c8e81 gotthard2: bug fix: reversed list, but gain indices not reversed 2020-07-30 15:39:26 +02:00
7492f7dbfa m3: numpackets to 2 or 20 depending on ten giga enable (#123) 2020-07-30 15:02:33 +02:00
c2b586a333 eiger: virtual server more print minor 2020-07-30 14:07:02 +02:00
d31839e80e roi constructor added 2020-07-30 14:04:50 +02:00
b47f751d66 Merge branch 'm3' into eiger 2020-07-30 12:04:34 +02:00
aa52028690 Merge branch 'developer' into m3 2020-07-30 12:04:14 +02:00
6f5635a402 gotthard2: vetoref taken as decimal and not hex in server 2020-07-30 12:03:36 +02:00
5b9c7c4105 python vhighvoltage to highvoltage 2020-07-30 11:52:22 +02:00
98ffe350f3 changing command from vhighvoltage to highvoltage 2020-07-30 11:50:56 +02:00
7dfeb987db changing command from vhighvoltage to highvoltage 2020-07-30 11:50:03 +02:00
7899c5faef Merge branch 'm3' into eiger 2020-07-30 11:31:55 +02:00
17fb497774 Merge branch 'developer' into m3 2020-07-30 11:20:57 +02:00
e9c03c6eaf Merge pull request #122 from slsdetectorgroup/g2
G2
2020-07-30 11:18:56 +02:00
f497177022 fixes fro review 2020-07-30 11:18:40 +02:00
984b43545e Merge branch 'm3' into eiger 2020-07-29 17:26:20 +02:00
327218cb2b Merge branch 'g2' into m3 2020-07-29 17:26:04 +02:00
cdfd3934ee Merge branch 'developer' into g2 2020-07-29 17:25:45 +02:00
4cebefbc55 Merge branch 'm3' into eiger 2020-07-29 17:21:14 +02:00
24c4cd8d84 Merge branch 'g2' into m3 2020-07-29 17:15:37 +02:00
f358492e09 all binaries in 2020-07-29 16:53:21 +02:00
86d3fc7e55 fixes from review, moving from array to vector to avoid VLA 2020-07-29 16:52:22 +02:00
89da671ae2 m3: numpackets to 2 or 20 depending on ten giga enable 2020-07-29 15:10:54 +02:00
24e44d56fe Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-07-29 15:02:22 +02:00
b13d04dd89 eiger manual in 5.x 2020-07-29 15:02:11 +02:00
d19530b3d4 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-07-29 14:39:44 +02:00
5ba3a414d6 Warn on the use of VLAs 2020-07-29 14:39:34 +02:00
54ad92a2bf binarires in 2020-07-29 13:26:55 +02:00
74a7ca9b71 gotthard2: vetophoton now has gain thresholds for each row and the get writes to file gain indices and adu for each channel, adus written in dec instead of hex, veto file in server removed and uses vetophoton instead 2020-07-29 13:24:42 +02:00
6846939f92 eiger rxr: space between subperiod(ns) in master file 2020-07-29 09:56:03 +02:00
99ec7f0046 eiger: always change speed when changing dr 2020-07-28 17:06:46 +02:00
df3ae7f409 gotthard2: reversing order of adc channels to chip 2020-07-28 15:08:13 +02:00
410f38c804 jungfrau calibrated settings in 2020-07-28 09:26:20 +02:00
91652df5b1 minor 2020-07-28 08:41:45 +02:00
02bda7c533 using GET_FLAG directly 2020-07-27 16:55:26 +02:00
9204a56ff7 Merge pull request #121 from slsdetectorgroup/checkargs
Check args for sending to detector/receiver
2020-07-27 15:49:19 +02:00
3ec637601d Merge branch 'developer' into checkargs 2020-07-27 15:49:08 +02:00
dc33f1a5da const 2020-07-27 09:14:58 +02:00
879b2c8864 clean getThresholdTemp 2020-07-27 08:58:33 +02:00
b1a4723028 WIP 2020-07-27 08:53:10 +02:00
bad7fd3906 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-07-24 15:48:44 +02:00
21c8b77e2c fixed tests 2020-07-24 15:45:21 +02:00
097acf8086 renamed function to checkArgs 2020-07-24 14:26:58 +02:00
799f540d71 Update change_request.md 2020-07-24 11:32:51 +02:00
a412b465c6 Create change_request.md 2020-07-24 11:32:09 +02:00
bb2f70beb5 Update feature_request.md 2020-07-24 11:27:01 +02:00
096e94562a Update bug_report.md 2020-07-24 11:25:54 +02:00
9063a8d4ed Update feature_request.md 2020-07-24 11:25:02 +02:00
b1d3cbb25e Create feature_request.md 2020-07-24 11:23:50 +02:00
1fefc001f9 added const methods for detector 2020-07-24 11:17:45 +02:00
e8556abbe7 WIP 2020-07-24 10:57:54 +02:00
f8da057735 Update bug_report.md 2020-07-24 10:57:00 +02:00
df0b52604f Update bug_report.md 2020-07-24 10:55:39 +02:00
f792d59682 Update bug_report.md 2020-07-24 10:55:05 +02:00
98d061a032 Create bug_report.md 2020-07-24 10:51:43 +02:00
2bb9629f14 Create config.yml 2020-07-24 10:50:32 +02:00
cf2e1c1dfc Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-07-24 07:57:20 +02:00
cb54bf6225 docs 2020-07-24 07:57:12 +02:00
3b0f68c3c4 gotthard2: fix of ext burst mode global settings 2020-07-23 17:05:43 +02:00
5faf3c7336 format 2020-07-23 14:01:59 +02:00
3ddb264875 minor 2020-07-23 14:01:13 +02:00
1fb19aeae2 constexpr 2020-07-23 12:29:08 +02:00
ad297e9c51 Readlink (#117)
* gotthard config file path using readlink

* gotthard2

* eiger

* eieger, mnythen3, moench

* binaries in

* moved readlink to a common function

* binaries in
2020-07-23 12:17:46 +02:00
beb6afe101 Merge pull request #120 from slsdetectorgroup/usleep
Replaced usleep with std::this_thread::sleep_for
2020-07-23 11:44:30 +02:00
78a6896ae9 replaced usleep with sleep_for 2020-07-23 11:07:42 +02:00
9ea8882c05 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-07-23 10:57:47 +02:00
4cf5e81971 removed usleep 2020-07-23 10:48:59 +02:00
2fa5e7d00c Merge pull request #118 from slsdetectorgroup/rxstartfix
Fixed rx_start
2020-07-23 10:28:38 +02:00
af17fb9f61 removed make_timedelta 2020-07-23 09:34:04 +02:00
07869134d6 removed additional buggy signatures 2020-07-23 08:19:08 +02:00
8b9a69e1f1 overload for rx void return type 2020-07-23 08:07:36 +02:00
023924c4cc updatd gotthard2 module id for new hdi 2020-07-22 11:22:58 +02:00
01d00164e5 added cast to silence warning in CTB server 2020-07-22 08:57:02 +02:00
e6c8ba0e88 Merge pull request #116 from slsdetectorgroup/serverconfigs
Serverconfigs
2020-07-21 10:33:41 +02:00
37fc69b297 modified permissions of config file 2020-07-20 18:01:13 +02:00
e1e265bd49 moench fix 2020-07-20 17:53:38 +02:00
b46809e1c0 binaries in 2020-07-20 17:36:55 +02:00
396d82bd62 eiger 2020-07-20 17:33:19 +02:00
e7ff96fe8d gotthard2 2020-07-20 17:30:44 +02:00
07a292af95 gotthard 2020-07-20 17:28:29 +02:00
e4433a99a5 moench 2020-07-20 17:24:55 +02:00
28fb1023fa mythen3: rename default pattern txt and move to inst dir 2020-07-20 17:18:59 +02:00
c4374e623e Merge pull request #115 from slsdetectorgroup/mythen3
Mythen3
2020-07-17 19:24:34 +02:00
da2f12072f virtual data mythen3 fix 2020-07-17 19:19:21 +02:00
918da2402f binaries in 2020-07-17 19:06:30 +02:00
94e9591974 gui: dr enabled for m3 2020-07-17 18:49:05 +02:00
a76ed6d8db tengiga enable 2020-07-17 18:34:23 +02:00
b7cb341ee3 dr 2020-07-17 17:33:43 +02:00
546bef5e5a powerchip at server startup 2020-07-17 15:38:27 +02:00
97ddfed819 Merge pull request #114 from slsdetectorgroup/gotthard2
Gotthard2
2020-07-17 13:00:07 +02:00
2d68b61f00 binaries recompiled 2020-07-17 12:59:37 +02:00
3bdf02a23c rx_zmqstartfnum added to have an offset of streaming frame numbers 2020-07-17 11:11:19 +02:00
f70d28b175 Merge branch 'developer' into gotthard2 2020-07-17 10:34:46 +02:00
d076fda59a Merge pull request #113 from slsdetectorgroup/shmissue
Shmissue
2020-07-17 07:19:46 +02:00
a3062a5e00 formatting 2020-07-17 07:19:19 +02:00
c6921bf954 virtual memory error verbosity 2020-07-16 17:19:05 +02:00
ae9499047b powerpc and nios binaries in 2020-07-16 16:36:49 +02:00
8dd9bb6ea3 blackfin binaries 2020-07-16 16:21:00 +02:00
9a284f75c3 pthread mutex works on blackfin 2020-07-16 16:18:40 +02:00
3e87cfa5c1 WIP shm deletion working on blackfin 2020-07-16 16:01:30 +02:00
6136eabee2 WIP shm deletion working on blackfin 2020-07-16 16:00:28 +02:00
67bb0dff1a rx_zmqstartfnum, not tested 2020-07-16 12:18:18 +02:00
ca298580f3 badchannels done 2020-07-15 18:24:17 +02:00
d7f490701b confadc added to client, removed conf adc depending on burst mode 2020-07-15 13:30:30 +02:00
7752b86d97 veto file in 2020-07-14 18:51:47 +02:00
35dbc3813d filter and cds gain, burst and continuous value to asic changed, bug fix to scanning function addresses in server_funcs.c 2020-07-14 17:09:51 +02:00
a096434864 new few version 2020-07-14 15:38:32 +02:00
ab4d89aa70 updated new config file 2020-07-14 15:37:47 +02:00
c67b7aab4d fix for datasocket and clientsocket, to be reviewed.
clientsocket: to print origin of error (rx/det) for tcp socket failure
datasocket: usleep only for send for rhel7, not for fedora.. when fpath /, fwrite 1, rx_start fails without sending exception
2020-07-14 13:04:33 +02:00
293fda0c7a mythen3, gotthard2: bug fix- changing wrong pll phases when changing frequency 2020-07-13 15:47:43 +02:00
bef35eb3d6 Merge pull request #112 from slsdetectorgroup/m3pattern
M3pattern
2020-07-08 17:10:30 +02:00
eea013d492 Merge branch 'developer' into m3pattern 2020-07-08 14:10:04 +02:00
890a641304 temp via stop server fix 2020-07-08 14:09:41 +02:00
1e0160d655 updated default pattern 2020-07-08 12:33:33 +02:00
42b7f6fa7c binary in 2020-07-08 11:35:46 +02:00
4a1943216b default pattern file for mythen3 2020-07-07 15:50:32 +02:00
a23504c9c4 help print 2020-07-07 14:14:03 +02:00
4db3473e32 Merge pull request #111 from slsdetectorgroup/shm
Shm
2020-07-07 13:35:52 +02:00
8c1c696f64 no scan at module level 2020-07-06 09:43:10 +02:00
39bbc5c688 OutString for scanParameters 2020-07-06 09:19:44 +02:00
28b3fb4101 binaries 2020-07-03 17:15:24 +02:00
05059c1176 Test 2020-07-03 17:14:45 +02:00
95089b5faa WIP 2020-07-03 16:06:12 +02:00
7c48ef8931 binaries and fix 2020-07-02 17:15:24 +02:00
0dc062e6d3 binaries 2020-07-02 16:41:03 +02:00
9b1b878f95 Merge branch 'shm' of github.com:slsdetectorgroup/slsDetectorPackage into shm 2020-07-02 16:40:25 +02:00
e23a8e7da2 frames fix 2020-07-02 16:40:18 +02:00
a228ae0773 binaries 2020-07-02 16:38:00 +02:00
9787c6a385 Merge branch 'shm' of github.com:slsdetectorgroup/slsDetectorPackage into shm 2020-07-02 16:37:01 +02:00
4d1fad04c3 frames fix 2020-07-02 16:36:54 +02:00
c5a9ff3024 binaries in 2020-07-02 15:53:57 +02:00
25ec47dfff state machine on a different thread 2020-07-02 15:50:22 +02:00
93c5505285 WIP 2020-07-02 13:42:32 +02:00
a656668d73 WIP 2020-07-01 20:00:36 +02:00
3156e6f50e binaries 2020-07-01 13:13:52 +02:00
f224b7dadf Merge branch 'shm' of github.com:slsdetectorgroup/slsDetectorPackage into shm 2020-07-01 13:13:18 +02:00
ccf54f29b6 binaries 2020-07-01 12:52:31 +02:00
ef564e382c fix 2020-07-01 12:50:46 +02:00
e571f7bb3e WIP 2020-07-01 09:10:49 +02:00
aacc61b058 WIP 2020-06-30 17:11:51 +02:00
7d128585e1 WIP 2020-06-30 16:55:02 +02:00
279986d77c WIP 2020-06-30 12:09:23 +02:00
ff729fb43f WIP 2020-06-30 11:59:35 +02:00
488e0230ba WIP, eiger 2020-06-30 10:55:31 +02:00
c04793a9d7 fix frame rates 2020-06-30 09:54:30 +02:00
f1cbf49449 binaries in 2020-06-30 09:06:15 +02:00
285ef30439 WIP 2020-06-29 20:01:55 +02:00
75e9d63341 WIP 2020-06-29 19:11:57 +02:00
21a79752e2 clang-tidy delete nullptr 2020-06-29 17:54:08 +02:00
5780cabe8d clang-tidy nullptr 2020-06-29 17:48:22 +02:00
cec26f81e1 more using .empty() 2020-06-29 17:41:06 +02:00
0c045f0faa WIP 2020-06-29 17:40:41 +02:00
19e40cf0e6 using .empty() on stl containers 2020-06-29 17:20:56 +02:00
902366fede inbetween WIP, startstatemachien ugly 2020-06-26 19:08:03 +02:00
ee67c28711 WIP, all servers with virtual stop and start working 2020-06-26 16:47:58 +02:00
cfe9a431f9 WIP, moving virtual status stop to shm from files 2020-06-26 11:50:40 +02:00
524c86de49 WIP 2020-06-26 11:50:00 +02:00
05ef55b258 target skipping doxygen 2020-06-25 10:32:47 +02:00
bcd217b6fe Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-06-24 09:11:38 +02:00
4ca46e4123 removed old python docs 2020-06-24 09:11:26 +02:00
7333909f6b unnecessary hdf5 define, allows doxygen to include them 2020-06-24 09:10:54 +02:00
ba7f54744b doc warnings fixed 2020-06-23 17:32:56 +02:00
cd677e4d97 Merge pull request #110 from slsdetectorgroup/pattern
Pattern
2020-06-23 14:30:23 +02:00
4240ea57d4 fix 2020-06-23 14:26:54 +02:00
692ade6c17 fix 2020-06-23 13:56:45 +02:00
4cbe354396 pattern word prints every 10 for pattern file 2020-06-23 12:47:06 +02:00
39d5a7db26 Merge branch 'pattern' of github.com:slsdetectorgroup/slsDetectorPackage into pattern 2020-06-23 12:10:52 +02:00
ae88af2a72 fix 2020-06-23 12:10:40 +02:00
f592d21570 clkctrl 2020-06-23 11:49:13 +02:00
35f95e603e removed patternClockControl removed from python 2020-06-23 11:45:13 +02:00
5c42792580 binaries in 2020-06-23 11:00:51 +02:00
301073e60b WIP 2020-06-23 10:53:17 +02:00
159b0a0367 WIP 2020-06-23 09:30:17 +02:00
f6911c4238 WIP 2020-06-23 09:02:26 +02:00
1d53dc65cd WIP 2020-06-23 08:48:54 +02:00
9d3bbc0a68 WIP 2020-06-22 15:02:28 +02:00
801f2c4559 WIP 2020-06-22 09:33:09 +02:00
da2ce03e1d Merge pull request #108 from slsdetectorgroup/removeget
Removeget
2020-06-19 14:24:32 +02:00
f366e9ae6f fixed python enums 2020-06-19 14:14:52 +02:00
5bf6b7a338 Refactor of ZmqSocket (#109)
Changed data type of address from char[1000] to string to reduce stack size of object.

Removed redundant calls to Close

Removed function exposing the socket descriptor

Using functions from network_utils instead of duplicates

Added tests
2020-06-19 12:41:03 +02:00
991acc7c07 binaries 2020-06-18 17:54:57 +02:00
b40e481da9 WIP 2020-06-18 17:53:43 +02:00
12b40a44a2 first test for ZmqSocket 2020-06-18 17:49:40 +02:00
f14c2d06a5 binaries in 2020-06-18 17:41:32 +02:00
0cc547c2de WIP 2020-06-18 17:40:23 +02:00
489fccb25c removed GET_ flags, replaced -1 with GET_FLAG 2020-06-18 17:10:53 +02:00
7c23f1e42c Merge pull request #106 from slsdetectorgroup/settingsfile
removed settings file option for gotthard and jungfrau, also removed …
2020-06-18 16:05:00 +02:00
f66345d128 removed store in ram from python 2020-06-18 15:36:43 +02:00
e7da4ae862 fix 2020-06-18 14:48:20 +02:00
8adddfb083 binaries in 2020-06-18 12:42:53 +02:00
7cc05ead89 WIP 2020-06-18 12:41:10 +02:00
ebc164aaa6 WIP 2020-06-18 11:02:33 +02:00
a57f7943ee WIP 2020-06-17 18:30:25 +02:00
db8616fcb3 Merge branch 'developer' into settingsfile 2020-06-17 15:35:48 +02:00
55af974c4e moench zmq processor option included to compile 2020-06-17 15:33:41 +02:00
1f3fd010a7 reordering WIP 2020-06-17 15:25:59 +02:00
cf9ec3de0d moench zmq (#107) 2020-06-17 10:34:42 +02:00
b5781e1f9b multisize to numberofdetectors 2020-06-17 09:57:56 +02:00
e09fc8cd2b from previous 2020-06-17 09:33:39 +02:00
48b8116849 removed settings file option for gotthard and jungfrau, also removed ghost functiosn writesettingsfile and savesettingsfile in module 2020-06-17 09:30:51 +02:00
f5759921d2 Merge pull request #105 from slsdetectorgroup/eiger
Eiger
2020-06-17 09:15:00 +02:00
b5b50a2061 binary in 2020-06-17 09:11:44 +02:00
a7d2a89c50 Merge branch 'developer' into eiger 2020-06-17 09:11:08 +02:00
e80bc905d6 minor print fix 2020-06-17 09:10:48 +02:00
c6b664b25b added tests 2020-06-17 08:28:24 +02:00
f078e6147d Merge branch 'developer' into eiger 2020-06-16 16:55:49 +02:00
7609a2bda4 mythen3: timers based on run clk and not on sync clk 2020-06-16 16:47:03 +02:00
d5ae9a22f4 mythen3: changed system vco from 1.25GHz to 1GHz and hence the sytem clock dividers defaults 2020-06-16 15:00:02 +02:00
ffb1a59df0 binary 2020-06-16 12:53:34 +02:00
889e926479 WIP 2020-06-16 12:47:40 +02:00
19bd39eece WIP 2020-06-16 12:47:06 +02:00
f28b41b130 WIP 2020-06-16 12:42:19 +02:00
9a80975929 WIP 2020-06-16 12:41:39 +02:00
efc247f46f WIP 2020-06-16 12:32:28 +02:00
c0e8e44b41 WIP 2020-06-16 10:47:53 +02:00
82a6383466 WIP 2020-06-16 10:47:23 +02:00
0289f22a0d WIP 2020-06-16 10:44:41 +02:00
6a919ece02 Merge branch 'eiger' of github.com:slsdetectorgroup/slsDetectorPackage into eiger 2020-06-16 10:42:55 +02:00
d0baa4c7b9 WIP 2020-06-16 10:42:44 +02:00
6dccf48759 WIP 2020-06-15 17:37:52 +02:00
b128837538 Merge branch 'eiger' of github.com:slsdetectorgroup/slsDetectorPackage into eiger 2020-06-15 17:30:14 +02:00
3c46204b14 WIP 2020-06-15 17:30:05 +02:00
807a588c4b WIP 2020-06-15 17:15:31 +02:00
fb5b2133f5 WIP 2020-06-15 17:13:49 +02:00
6f2413fd5d WIP 2020-06-15 17:11:33 +02:00
5412569e77 WIP 2020-06-15 17:10:38 +02:00
0375e80b42 WIP 2020-06-15 16:51:59 +02:00
569d0464e7 WIP 2020-06-15 16:44:18 +02:00
cc8549e6cb WIP 2020-06-15 16:43:16 +02:00
bcb5b8047b WIP 2020-06-15 16:41:40 +02:00
8c9341836b WIP 2020-06-15 16:26:26 +02:00
ad36ee2ba2 and bottom... 2020-06-15 10:40:30 +02:00
afa71895e7 eiger virtual slave missing c99 2020-06-15 10:38:55 +02:00
62449b81ad format 2020-06-15 10:36:59 +02:00
6794d58db1 Merge branch 'developer' into eiger 2020-06-15 10:36:36 +02:00
3775ff302e WIP 2020-06-15 10:36:24 +02:00
e76da84c9f eiger dac names 2020-06-15 10:34:16 +02:00
24af0ee578 WIP 2020-06-15 10:29:50 +02:00
e0b86799ae Merge branch 'developer' into eiger 2020-06-15 09:39:45 +02:00
5a7451e29e Merge pull request #104 from slsdetectorgroup/gnu99
Gnu99
2020-06-15 09:39:07 +02:00
e0c056be09 eiger fix 2020-06-15 09:22:26 +02:00
cf0681a23c Merge branch 'gnu99' of github.com:slsdetectorgroup/slsDetectorPackage into gnu99 2020-06-15 09:21:25 +02:00
24168d5e32 fix 2020-06-15 09:20:38 +02:00
7c2949f372 WIP 2020-06-12 17:07:58 +02:00
5a7eeb3d76 WIP 2020-06-12 16:22:31 +02:00
64a94b962a binaries in 2020-06-10 17:32:43 +02:00
ab72d342c9 formatting 2020-06-10 17:29:28 +02:00
200186ddde binaries in, std=gnu99, for loop variable declaration inside for loop 2020-06-10 17:27:02 +02:00
7388bb4aa7 clang-tidy string init 2020-06-10 08:39:24 +02:00
9c26cd5552 clang-tidy delete nullptr 2020-06-10 08:37:06 +02:00
5f91198328 clang-tidy nullptr 2020-06-10 08:30:12 +02:00
265e96d675 clang-tidy nullptr 2020-06-10 08:27:35 +02:00
f5160b0978 exposing receiver thread ids to client (#102)
* exposing receiver thread ids to client

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2020-06-09 16:18:37 +02:00
2a2bb5f63a binary in 2020-06-08 14:12:06 +02:00
e306c39e1d mythen3: numcounters to mask, updating gateperiod 2020-06-08 10:15:22 +02:00
6c95bf171b Merge branch 'test' into developer 2020-06-05 09:07:42 +02:00
fd948f1a00 updated binaries 2020-06-05 09:06:49 +02:00
ff9811895f WIP 2020-06-05 09:04:32 +02:00
7f6d57d6ba WIP 2020-06-04 17:42:24 +02:00
099805ba8b WIP 2020-06-04 17:02:56 +02:00
1e2a3f2767 WIP 2020-06-04 15:21:53 +02:00
9a8300ca08 WIP 2020-06-04 12:12:40 +02:00
40257fc82d Adds the stripDetector daemon 2020-06-04 11:50:33 +02:00
3bdc8e95ce WIP 2020-06-03 16:10:47 +02:00
223e24f924 WIP 2020-06-03 14:56:24 +02:00
4053594c4d WIP 2020-06-03 14:40:51 +02:00
f07e722d26 read/write reg moved to stop server, tests 2020-06-02 11:56:50 +02:00
2ef8f2f046 WIP 2020-05-29 19:36:41 +02:00
0e514a470d gotthard2 config example 2020-05-29 17:04:54 +02:00
294612b03c WIP 2020-05-29 17:04:10 +02:00
f223415f94 fix for testing 2020-05-29 16:26:57 +02:00
c6ff50d753 merge vetoheader 2020-05-29 10:50:33 +02:00
f0a318777c mythen3 bnaries in 2020-05-28 13:11:32 +02:00
8aa7144252 mythen3: fix of external signals to not allow master output inversion, but can edge detect not configurable, and default dout pulse length 2020-05-28 13:09:09 +02:00
15eea51f12 gotthard2 new firmware veto header reduced to 16 (frames, bunchid) 2020-05-28 12:44:03 +02:00
e884836f5c Merge branch 'vetoheader' of github.com:slsdetectorgroup/slsDetectorPackage into vetoheader 2020-05-28 11:33:59 +02:00
104d91e8c6 more jf stuff 2020-05-28 11:33:52 +02:00
9ddebc4c09 binaries in 2020-05-28 10:36:17 +02:00
0525e374b2 settign veto also configures mac, sending veto data for 10gb only if veto and numinterfaces==2, changed veto entry offset 2020-05-28 10:35:48 +02:00
e727b97d75 gottahrd2 binary in 2020-05-28 09:46:12 +02:00
5ca987ecbb Merge branch 'vetoheader' of github.com:slsdetectorgroup/slsDetectorPackage into vetoheader 2020-05-28 09:44:32 +02:00
2a64a9f6e0 gotthard2: removed check for module attached when setting veto, for later 2020-05-28 09:44:25 +02:00
a708da5455 Merge branch 'vetoheader' of github.com:slsdetectorgroup/slsDetectorPackage into vetoheader 2020-05-28 09:29:02 +02:00
e2eb1598d3 jf stuff 2020-05-28 09:28:53 +02:00
d175ba0936 check for module attached only when enabling veto streaming, not disabling 2020-05-28 09:21:19 +02:00
6189fd157a gotthard2: cehck if module attached when setting veto to 1 2020-05-28 09:19:55 +02:00
6c753f3b50 veto 2020-05-28 08:48:11 +02:00
098d3e6d98 gotthard2: binaries in 2020-05-27 14:39:28 +02:00
4300e95a8e virtual, adding veto command 2020-05-27 14:37:52 +02:00
46daa7e2de merge from developer (mythen3 branch) 2020-05-27 14:19:33 +02:00
754536898a Merge pull request #100 from slsdetectorgroup/mythen3
Mythen3
2020-05-27 14:12:52 +02:00
20bfe92573 gatedelay 2020-05-27 14:02:33 +02:00
9493ae3da9 WIP 2020-05-27 11:30:47 +02:00
0fca9fba79 Merge branch 'mythen3' of github.com:slsdetectorgroup/slsDetectorPackage into mythen3 2020-05-27 11:30:23 +02:00
b543708d9d exptime 2020-05-27 11:30:11 +02:00
e0ea08332f gotthard2: fix in rxr for gotthard2 2020-05-26 17:44:31 +02:00
e229fee6ba gotthard2: hv soft max uptdated to 500v 2020-05-26 14:59:48 +02:00
44a88893ba mythen3: hv soft max uptdated to 500v 2020-05-26 14:58:41 +02:00
f4ba46c19b update function and enum generation 2020-05-26 11:26:24 +02:00
37cb0bb1c0 minor PR fixes 2020-05-26 08:57:48 +02:00
f293ba8c56 gui cmake fix 2020-05-26 08:50:09 +02:00
e9ca17f860 Merge branch 'vetoheader' of github.com:slsdetectorgroup/slsDetectorPackage into vetoheader 2020-05-25 14:23:45 +02:00
30391a2faf veto header size in server using sizeof 2020-05-25 14:23:10 +02:00
7ba877446c gotthard2 binary 2020-05-25 12:21:44 +02:00
6bdc506a34 veto header smaller size 2020-05-25 12:20:40 +02:00
9592d1760f gui fix 2020-05-25 11:09:26 +02:00
8ffb27c300 WIP 2020-05-25 11:05:51 +02:00
0a66605111 tests mainly and minor print 2020-05-22 15:23:56 +02:00
02d8b1fb5f mythen3 binary 2020-05-20 17:30:40 +02:00
457f31ed61 mythen3 server minor print fix 2020-05-20 17:30:07 +02:00
be3f095b56 gui minor fix 2020-05-20 17:27:22 +02:00
174bb32744 gui minor fix 2020-05-20 17:26:57 +02:00
07d90d127f gui fix 2020-05-20 17:25:39 +02:00
0debd6a457 mythen3: auto mode does not ignore #triggers 2020-05-20 17:12:45 +02:00
8f0ef68029 binaries in 2020-05-20 17:07:41 +02:00
d71e40729a external signals 2020-05-20 17:05:42 +02:00
9475e01062 gui done 2020-05-20 12:41:14 +02:00
dc8f67cd7b gui fix 2020-05-20 12:04:48 +02:00
3ebb1fca02 gui WIP 2020-05-20 11:51:18 +02:00
8973ef1aaa from timetest merge 2020-05-20 10:18:51 +02:00
5690914048 Merge branch 'mythen3' of github.com:slsdetectorgroup/slsDetectorPackage into mythen3 2020-05-20 10:15:04 +02:00
fa768e584e rxr 2020-05-20 10:14:57 +02:00
62e69b900b Merge pull request #99 from slsdetectorgroup/timetest
directly writing exptime
2020-05-20 09:56:34 +02:00
30fc346e22 directly writing exptime 2020-05-20 09:47:41 +02:00
761f93d753 exptime of gates 2020-05-20 09:36:43 +02:00
6d71d6cf9f fix with virtual server 2020-05-19 19:11:05 +02:00
e208d3ebe8 WIP 2020-05-19 18:59:07 +02:00
cd90f09a30 WIP 2020-05-19 18:24:32 +02:00
4570ffc8ad Merge branch 'mythen3' of github.com:slsdetectorgroup/slsDetectorPackage into mythen3 2020-05-18 14:36:17 +02:00
a7ce30391c register defs from pattern control to flow control 2020-05-18 14:35:59 +02:00
c33c479ada removed funcs from install 2020-05-18 14:18:12 +02:00
c8eda1a458 mythen binary up 2020-05-15 17:07:27 +02:00
ecc692ad9a start pattern without binaries 2020-05-15 17:06:08 +02:00
00c1211c56 unformatting regdefs 2020-05-15 16:14:57 +02:00
599625e6ed server binaries up 2020-05-15 15:49:59 +02:00
3514b14bc9 servers: removing notification file as this will be done by daemon 2020-05-15 15:48:52 +02:00
395b9f1b72 reordering one function, minor 2020-05-15 13:08:59 +02:00
26dfccf77e binaries compiling, removed inline for c 2020-05-15 13:03:50 +02:00
50d2d21018 fix for virtual servers for rhel7 2020-05-15 12:44:44 +02:00
2c83abcac7 merged detFuncs for c and c++ 2020-05-15 12:24:06 +02:00
ea7cc9db8c less public headers 2020-05-15 10:52:23 +02:00
0dd5a099c8 renamed FixedCap.. to StaticVector 2020-05-15 09:03:23 +02:00
e6deccc2c6 Merge pull request #98 from slsdetectorgroup/gotthard2
Gotthard2
2020-05-14 11:54:09 +02:00
ad42a61bae Merge branch 'developer' into gotthard2 2020-05-14 11:53:59 +02:00
cbc2856c1c rxr should print ip, mac, when set from structure 2020-05-13 18:35:46 +02:00
e34fbb4350 binaries in 2020-05-13 17:55:08 +02:00
eea67014b7 gotthard2 with veto data on second interface 2020-05-13 17:50:18 +02:00
3962714b48 format + exception.cpp 2020-05-13 14:48:52 +02:00
f0f97f265a removed non used slsDetectorUsers 2020-05-13 14:05:05 +02:00
e730c124e3 Merge pull request #97 from slsdetectorgroup/eiger26
Eiger26
2020-05-13 10:47:53 +02:00
f51c4e1d7c c99 2020-05-13 09:41:41 +02:00
a62b650e24 eiger binary in 2020-05-13 09:25:58 +02:00
af4b5bbf50 Pr fix 2020-05-13 09:22:40 +02:00
d8ca9bb6b5 eiger virtual server fix 2020-05-12 13:49:08 +02:00
9a1fdc4104 Merge branch 'developer' into eiger26 2020-05-12 13:43:36 +02:00
b3ebce378d Merge pull request #96 from slsdetectorgroup/rxthrow
More receiver functions throws
2020-05-12 13:42:43 +02:00
46afcfe694 removed logging 2020-05-12 11:49:49 +02:00
d7563fdd1a Merge branch 'developer' into eiger26 2020-05-12 11:39:29 +02:00
ccf1889113 formatting 2020-05-11 20:09:45 +02:00
88f801061f fix for reset 2020-05-11 20:09:09 +02:00
e3d3c88d74 update format 2020-05-11 19:53:50 +02:00
80f4f115f9 updated bianries 2020-05-11 19:53:00 +02:00
9a7d15bbf6 WIP 2020-05-11 19:36:12 +02:00
e148a584df formatting 2020-05-11 19:27:49 +02:00
5aaefc8e00 fix using real detectors, moving readconfig to end (due to initialization) 2020-05-11 19:26:22 +02:00
ed8d606eb2 WIP 2020-05-11 19:19:49 +02:00
eff664e790 cleanup 2020-05-11 18:28:06 +02:00
1ed1b5da86 migrate to return values 2020-05-11 12:15:16 +02:00
353b8d0057 migrate to return values 2020-05-11 11:48:18 +02:00
bbe9108fb9 migrate to return values 2020-05-11 11:39:11 +02:00
1998f9541e reorder read settings func 2020-05-11 10:30:55 +02:00
6620027439 reset to hardware evn if no file 2020-05-08 18:14:59 +02:00
30078d6c1f eiger: deactivate at startup, hostname activates, config file for top or master, if none, reset to hardware, no binaries 2020-05-08 18:11:15 +02:00
13c1f7c2d6 WIP 2020-05-08 16:31:26 +02:00
28bafb012a fixed test for new default values 2020-05-08 15:09:12 +02:00
9c7ff84b73 compiled all servers again 2020-05-08 13:57:23 +02:00
ab5cad4fde formatted servers 2020-05-08 13:56:47 +02:00
dac9998161 updated all servers 2020-05-08 13:42:07 +02:00
1dfac6ae6a Merge pull request #95 from slsdetectorgroup/trim
Trim
2020-05-08 13:39:42 +02:00
2e75f36fa0 pr fixes 2020-05-08 12:24:12 +02:00
c1902c713d mythne3 binary 2020-05-08 11:16:10 +02:00
61f5564bb7 Merge branch 'trim' of github.com:slsdetectorgroup/slsDetectorPackage into trim 2020-05-08 11:15:34 +02:00
ec2f7db729 mythen3: settings file of dac -1 fix 2020-05-08 11:15:27 +02:00
676055837f mythen3: binaries for 1 chip fix 2020-05-08 11:04:47 +02:00
cce028b825 Merge branch 'trim' of github.com:slsdetectorgroup/slsDetectorPackage into trim 2020-05-08 11:04:13 +02:00
d468641138 fix 2020-05-08 11:04:04 +02:00
01d1c86403 mythen3 trim one chip fix 2020-05-08 11:03:00 +02:00
2ac7451a99 eiger server 2020-05-08 10:53:34 +02:00
15b57b29fb all binaries except eiger 2020-05-08 10:18:54 +02:00
902616a09d Merge branch 'trim' of github.com:slsdetectorgroup/slsDetectorPackage into trim 2020-05-08 10:18:38 +02:00
eb3971fedc all binaries except eiger 2020-05-08 10:18:29 +02:00
64f0aa98ab Merge branch 'trim' of github.com:slsdetectorgroup/slsDetectorPackage into trim 2020-05-08 10:17:43 +02:00
61b86962bd no binaries yet, malloc need no casting 2020-05-08 10:17:36 +02:00
0e5a96e1ed binaries mythen3, gotthard2 2020-05-08 09:42:29 +02:00
2f11dbc2c9 nios, for variable delcaration in loop 2020-05-08 09:39:36 +02:00
9b21f44d94 binary 2020-05-07 17:41:56 +02:00
e56b431dc3 trim crash fix 2020-05-07 17:41:23 +02:00
1741c84406 binary 2020-05-07 17:22:43 +02:00
1623448086 minor 2020-05-07 17:14:51 +02:00
1a39f92f8f binary 2020-05-07 17:14:20 +02:00
4ea1f2c7e3 Merge branch 'trim' of github.com:slsdetectorgroup/slsDetectorPackage into trim 2020-05-07 17:07:56 +02:00
66d30cb2f1 remove printouts during trimming 2020-05-07 17:07:44 +02:00
8f021fe4ac binaries 2020-05-07 16:48:27 +02:00
7f42f5cadb trim change mythen3 2020-05-07 16:40:09 +02:00
999c548aa1 mythen3: trim: removing printout while tirmming 2020-05-07 16:36:09 +02:00
6872f24037 mythen3: binary 2020-05-07 16:07:24 +02:00
1a75170eed mythen3: set trimbits (not settings, threshold yet), set all trimbits 2020-05-07 16:04:30 +02:00
a12d47da36 Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer 2020-05-06 12:02:54 +02:00
c16411ba00 new regex for version 2020-05-06 12:02:42 +02:00
379b9b53b4 fixed still one index in cluster finder 2020-05-06 12:02:22 +02:00
d76f43f5fd Fixed problem in cluster finder 2020-05-06 11:59:49 +02:00
7d94ad51ab format slsdetectorservers .c 2020-05-05 15:30:44 +02:00
671cf45fd7 format slsdetectorservers 2020-05-05 15:23:11 +02:00
31ec3c8cf7 check for clang-format version 2020-05-05 10:37:17 +02:00
8ff9b0cdac format GUI 2020-05-05 10:12:05 +02:00
ea4044e4b1 format support lib 2020-05-05 10:07:19 +02:00
e599bb7c24 format receiver 2020-05-05 10:04:52 +02:00
3618f6e5d3 removed obsolete tests 2020-05-05 09:20:05 +02:00
959fd562d3 clang-format 2020-05-04 16:30:00 +02:00
32662baef8 cleaning 2020-05-04 16:18:55 +02:00
4e4f06560c Adding support for clang-format (#94) 2020-05-04 16:16:23 +02:00
efcb6cf480 Merge branch 'static' into developer 2020-04-30 18:06:55 +02:00
9ae933b177 WIP 2020-04-30 18:04:30 +02:00
f87e8d3c19 WIP 2020-04-30 18:03:17 +02:00
903ebb2679 WIP 2020-04-30 17:58:31 +02:00
f41083842f WIP 2020-04-30 17:09:14 +02:00
9a87ba610a WIP 2020-04-30 15:26:50 +02:00
7224ad989a WIP 2020-04-30 14:04:50 +02:00
64f5c0f34b jungfrau virtual bug fix: sends multiple frames for both interfaces now 2020-04-29 18:07:59 +02:00
3238ecfc8d WIP 2020-04-29 18:02:57 +02:00
395d7ba98a Merge branch 'developer' into static 2020-04-29 14:20:12 +02:00
96ec3b2123 merge conflict resolved 2020-04-29 14:17:07 +02:00
b7805ae0d4 gotthard2, moench: remove leading spaces in config file on board detector server 2020-04-29 14:09:35 +02:00
1f6b0b5887 gotthard2: new default clk dividers 2020-04-29 12:51:05 +02:00
b1cdc79bd4 Merge branch 'developer' into static 2020-04-28 18:31:11 +02:00
f626db454e updated gotthard2, mythen3 binaries 2020-04-28 17:07:18 +02:00
86b39853a3 gotthard2, mythen3: making them clkdivider dependant and not clkfrequency, binaries not loaded yet 2020-04-28 17:04:57 +02:00
e3044689dd WIP 2020-04-28 14:26:59 +02:00
337e56d9bf cleaned up LTO detection 2020-04-23 08:23:36 +02:00
eb257154c6 added triggers 2020-04-22 09:15:31 +02:00
421 changed files with 56823 additions and 49501 deletions

View File

@ -4,3 +4,4 @@ IndentWidth: 4
UseTab: Never
ColumnLimit: 80
AlignConsecutiveAssignments: false
AlignConsecutiveMacros: true

42
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,42 @@
---
name: Bug Report
about: Create a report to help us improve
title: New Bug Report
labels: action - Bug, priority - Unclassified, status - Pending
template: bug_report.md
---
<!-- Preview changes before submitting -->
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
##### *Distribution:
<!-- RHEL7, RHEL6, Fedora, etc -->
##### *Detector type:
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
##### *Software Package Version:
<!-- developer, 4.2.0, 4.1.1, etc -->
##### Priority:
<!-- Super Low, Low, Medium, High, Super High -->
##### *Describe the bug
<!-- A clear and concise description of what the bug is -->
##### Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
##### To Reproduce
<!-- Steps to reproduce the behavior: -->
<!-- 1. Go to '...' -->
<!-- 2. Click on '....' -->
<!-- 3. Scroll down to '....' -->
<!-- 4. See error -->
##### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
##### Additional context
<!-- Add any other context about the problem here. -->

View File

@ -0,0 +1,28 @@
---
name: Change Request
about: Suggest a change to an existing feature
title: New Change Request
labels: action - Change, priority - Unclassified, status - Pending
template: change_request.md
---
<!-- Preview changes before submitting -->
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
##### *Detector type:
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
##### *Software Package Version:
<!-- developer, 4.2.0, 4.1.1, etc -->
##### Priority:
<!-- Super Low, Low, Medium, High, Super High -->
##### *State the change request:
<!-- A clear and concise description of what the change is to an existing feature -->
##### Is your change request related to a problem. Please describe:
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
##### Additional context:
<!-- Add any other context about the feature here -->

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -0,0 +1,34 @@
---
name: Feature Request
about: Suggest a feature, documentation or submit a question
title: New Feature Request
labels: action - Enhancement, priority - Unclassified, status - Pending
template: feature_request.md
---
<!-- Preview changes before submitting -->
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
##### *Detector type:
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
##### *Software Package Version:
<!-- developer, 4.2.0, 4.1.1, etc -->
##### Priority:
<!-- Super Low, Low, Medium, High, Super High -->
##### *State the feature:
<!-- A clear and concise description of what the feature is -->
##### Is your feature request related to a problem. Please describe:
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
##### Describe the solution you'd like:
<!-- A clear and concise description of what you want to happen -->
##### Describe alternatives you've considered:
<!-- A clear and concise description of any alternative solutions or features you've considered -->
##### Additional context:
<!-- Add any other context about the feature here -->

View File

@ -45,18 +45,36 @@ option(SLS_USE_CTBGUI "ctb GUI" OFF)
option(SLS_BUILD_DOCS "docs" OFF)
option(SLS_BUILD_EXAMPLES "examples" OFF)
option(SLS_TUNE_LOCAL "tune to local machine" OFF)
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
# 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_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else ()
message(WARNING "GNU gold linker isn't available, using the default system linker.")
endif ()
endif ()
# set(ClangFormat_BIN_NAME clang-format)
set(ClangFormat_EXCLUDE_PATTERNS "build/"
"libs/"
"slsDetectorCalibration/"
"ctbGui/"
"manual/"
"python/"
"sample/"
${CMAKE_BINARY_DIR})
find_package(ClangFormat)
#Enable LTO if available
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
# # Use ld.gold if it is available and isn't disabled explicitly
# option(SLS_USE_LD_GOLD "Use GNU gold linker" ON)
# 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)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
@ -80,6 +98,7 @@ target_compile_options(slsProjectWarnings INTERFACE
-Wformat=2
-Wredundant-decls
# -Wconversion
-Wvla
-Wdouble-promotion
-Werror=return-type
@ -213,11 +232,16 @@ if(SLS_BUILD_DOCS)
add_subdirectory(docs)
endif(SLS_BUILD_DOCS)
if(SLS_USE_MOENCH)
add_subdirectory(slsDetectorCalibration/moenchExecutables)
endif(SLS_USE_MOENCH)
if(SLS_MASTER_PROJECT)
# Set install dir CMake packages
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
# Set the list of exported targets
set(PROJECT_LIBRARIES slsSupportLib slsDetectorShared slsReceiverShared)
set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared)
# Generate and install package config file and version
include(cmake/package_config.cmake)
endif()

View File

@ -1,2 +1,114 @@
Draft
- dr 4, 8, 16 in eiger -> speed 0, 32 stays same (speed 1)
SLS Detector Package 5.0.0-rc1 released on 25.09.2020 (Release Candidate 1)
===========================================================================
CONTENTS
--------
1. Firmware Requirements
2. Download, Documentation & Support
1. Firmware Requirements
========================
Eiger
=====
Minimum compatible version : 27
Latest compatible version : 27
Jungfrau
========
Minimum compatible version (PCB v1.0) : 24.07.2020 (v0.8)
Latest compatible version (PCB v1.0) : 24.07.2020 (v0.8)
Minimum compatible version (PCB v2.0) : 21.07.2020 (v2.1)
Latest compatible version (PCB v2.0) : 21.07.2020 (v2.1)
Gotthard
========
Minimum compatible version : 11.01.2013
Latest compatible version : 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)
Mythen3
=======
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Gotthard2
=========
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Moench
======
Minimum compatible version : 02.03.2020
Latest compatible version : 02.03.2020
Ctb
===
Minimum compatible version : 27.11.2019
Latest compatible version : 27.11.2019
Detector Upgrade
================
Eiger Remotely via bit files
Jungfrau Remotely using sls_detector_put programfpga <pof>
Gotthard Cannot be upgraded remotely. Requires programming via USB blaster
Mythen3 Remotely using sls_detector_put programfpga <rbf>
Gotthard2 Remotely using sls_detector_put programfpga <rbf>
Moench Remotely using sls_detector_put programfpga <pof>
Ctb Remotely using sls_detector_put programfpga <pof>
Instructions available at
https://slsdetectorgroup.github.io/devdoc/firmware.html
Please refer to the link below for more details on the firmware versions.
https://www.psi.ch/en/detectors/firmware
2. Download, Documentation & Support
====================================
Download
--------
The Source Code (Default C++ API):
https://github.com/slsdetectorgroup/slsDetectorPackage
Documentation
-------------
Installation:
https://slsdetectorgroup.github.io/devdoc/installation.html#
Consuming slsDetectorPackage:
https://slsdetectorgroup.github.io/devdoc/consuming.html
Command Line Documentation:
https://slsdetectorgroup.github.io/devdoc/commandline.html
C++ API Documentation:
https://slsdetectorgroup.github.io/devdoc/detector.html
C++ API Example:
https://slsdetectorgroup.github.io/devdoc/examples.html#
Python API Documentation:
https://slsdetectorgroup.github.io/devdoc/pygettingstarted.html
Python API Example:
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
TroubleShooting:
https://www.psi.ch/en/detectors/troubleshooting
Further Documentation:
https://www.psi.ch/en/detectors/users-support
Support
-------
dhanya.thattil@psi.ch
erik.frojdh@psi.ch
anna.bergamaschi@psi.ch

View File

@ -0,0 +1,39 @@
# Find Clang format
if(NOT ClangFormat_BIN_NAME)
set(ClangFormat_BIN_NAME clang-format)
endif()
# if custom path check there first
if(ClangFormat_ROOT_DIR)
find_program(ClangFormat_BIN
NAMES
${ClangFormat_BIN_NAME}
PATHS
"${ClangFormat_ROOT_DIR}"
NO_DEFAULT_PATH)
endif()
find_program(ClangFormat_BIN NAMES ${ClangFormat_BIN_NAME})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
ClangFormat
DEFAULT_MSG
ClangFormat_BIN)
mark_as_advanced(
ClangFormat_BIN)
if(ClangFormat_FOUND)
exec_program(${ClangFormat_BIN} ${CMAKE_CURRENT_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE CLANG_VERSION_TEXT)
string(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+" CLANG_VERSION ${CLANG_VERSION_TEXT})
if((${CLANG_VERSION} GREATER "9") OR (${CLANG_VERSION} EQUAL "9"))
# A CMake script to find all source files and setup clang-format targets for them
message(STATUS "found clang-format \"${CLANG_VERSION}\" adding formatting targets")
include(clang-format)
else()
message(STATUS "clang-format version \"${CLANG_VERSION}\" found but need at least 9. Not setting up format targets")
endif()
else()
message(STATUS "clang-format not found. Not setting up format targets")
endif()

View File

@ -1,6 +1,6 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
NAMES sphinx-build sphinx-build-3.6
DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)

47
cmake/clang-format.cmake Normal file
View File

@ -0,0 +1,47 @@
# A CMake script to find all source files and setup clang-format targets for them
# Find all source files
set(ClangFormat_CXX_FILE_EXTENSIONS ${ClangFormat_CXX_FILE_EXTENSIONS} *.cpp *.h *.cxx *.hxx *.hpp *.cc *.ipp *.c)
file(GLOB_RECURSE ALL_SOURCE_FILES ${ClangFormat_CXX_FILE_EXTENSIONS})
# Don't include some common build folders
set(ClangFormat_EXCLUDE_PATTERNS ${ClangFormat_EXCLUDE_PATTERNS} "/CMakeFiles/" "cmake")
# get all project files file
foreach (SOURCE_FILE ${ALL_SOURCE_FILES})
foreach (EXCLUDE_PATTERN ${ClangFormat_EXCLUDE_PATTERNS})
string(FIND ${SOURCE_FILE} ${EXCLUDE_PATTERN} EXCLUDE_FOUND)
if (NOT ${EXCLUDE_FOUND} EQUAL -1)
list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE})
endif ()
endforeach ()
endforeach ()
#target for formatting soruce files
add_custom_target(format
COMMENT "Running clang-format to change files"
COMMAND ${ClangFormat_BIN}
-style=file
-i
${ALL_SOURCE_FILES}
)
#target to check format on source files
add_custom_target(format-check
COMMENT "Checking clang-format changes"
# Use ! to negate the result for correct output
COMMAND !
${ClangFormat_BIN}
-style=file
-output-replacements-xml
${ALL_SOURCE_FILES}
| grep -q "replacement offset"
)
# debug to check which file will be formatted
add_custom_target(
listformatfiles
COMMAND
echo ${ALL_SOURCE_FILES}
)

48
cmk.sh
View File

@ -12,6 +12,8 @@ TESTS=0
SIMULATOR=0
CTBGUI=0
MANUALS=0
MANUALS_ONLY_RST=0
MOENCHZMQ=0
CLEAN=0
@ -20,7 +22,7 @@ CMAKE_PRE=""
CMAKE_POST=""
usage() { echo -e "
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-j] <Number of threads>
-[no option]: only make
-c: Clean
-b: Builds/Rebuilds CMake files normal mode
@ -36,6 +38,8 @@ Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d <HDF5 director
-e: Debug mode
-i: Builds tests
-m: Manuals
-n: Manuals without compiling doxygen (only rst)
-z: Moench zmq processor
Rebuild when you switch to a new build and compile in parallel:
./cmk.sh -bj5
@ -71,7 +75,7 @@ For rebuilding only certain sections
" ; exit 1; }
while getopts ":bpchd:j:trgeisum" opt ; do
while getopts ":bpchd:j:trgeisumnz" opt ; do
case $opt in
b)
echo "Building of CMake files Required"
@ -130,6 +134,14 @@ while getopts ":bpchd:j:trgeisum" opt ; do
echo "Compiling Manuals"
MANUALS=1
;;
n)
echo "Compiling Manuals (Only RST)"
MANUALS_ONLY_RST=1
;;
z)
echo "Compiling Moench Zmq Processor"
MOENCHZMQ=1
;;
u)
echo "Compiling Options: Chip Test Gui"
CTBGUI=1
@ -210,6 +222,12 @@ if [ $MANUALS -eq 1 ]; then
echo "Manuals Option enabled"
fi
#Moench zmq processor
if [ $MOENCHZMQ -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_MOENCH=ON "
echo "Moench Zmq Processor Option enabled"
fi
#Chip Test Gui
if [ $CTBGUI -eq 1 ]; then
CMAKE_POST+=" -DSLS_USE_CTBGUI=ON "
@ -256,18 +274,38 @@ fi
#make
if [ $COMPILERTHREADS -gt 0 ]; then
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
BUILDCOMMAND="make -j$COMPILERTHREADS"
echo $BUILDCOMMAND
eval $BUILDCOMMAND
else
make
fi
if [ $MANUALS -eq 1 ]; then
BUILDCOMMAND="make docs -j$COMPILERTHREADS"
echo $BUILDCOMMAND
eval $BUILDCOMMAND
else
BUILDCOMMAND="make rst -j$COMPILERTHREADS"
echo $BUILDCOMMAND
eval $BUILDCOMMAND
fi
fi
else
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
echo "make"
make
else
if [ $MANUALS -eq 1 ]; then
echo "make docs"
make docs
else
echo "make rst"
make rst
fi
fi
fi

View File

@ -33,6 +33,7 @@ requirements:
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- expat
host:
- libstdcxx-ng
@ -45,6 +46,7 @@ requirements:
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- expat
run:
- zeromq
@ -96,3 +98,4 @@ outputs:
- {{ pin_subpackage('slsdetlib', exact=True) }}
- qwt 6.*
- qt 4.8.*
- expat

View File

@ -59,14 +59,13 @@ set( HEADERS
#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# ROOT dictionary generation
include("${ROOT_DIR}/modules/RootNewMacros.cmake")
include("${ROOT_DIR}/RootMacros.cmake")
root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h)
add_library(ctbRootLib SHARED ctbDict.cxx)
target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(ctbRootLib PUBLIC
ROOT::Core
slsDetectorShared
slsSupportLib
${ROOT_LIBRARIES}
${ROOT_EXE_LINKER_FLAGS}
)
@ -78,7 +77,6 @@ set_target_properties(
target_link_libraries(ctbGui PUBLIC
slsDetectorShared
slsSupportLib
ctbRootLib
${TIFF_LIBRARIES}
)

View File

@ -21,6 +21,7 @@ if [ -f "$infile" ]
then
gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
echo compiling
echo gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
$exe ;
echo cleaning
rm $exe

View File

@ -38,11 +38,15 @@ set(SPHINX_SOURCE_FILES
src/pydetector.rst
src/pyenums.rst
src/pyexamples.rst
src/servers.rst
src/receiver.rst
src/result.rst
src/type_traits.rst
src/ToString.rst
src/examples.rst
src/pygettingstarted.rst
src/firmware.rst
src/serverupgrade.rst
)
@ -56,8 +60,21 @@ configure_file(
"${SPHINX_BUILD}/conf.py"
@ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/gen_server_doc.py.in"
"${SPHINX_BUILD}/gen_server_doc.py"
@ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
"${SPHINX_BUILD}/static/css/extra.css"
@ONLY)
add_custom_target(server_rst python gen_server_doc.py)
add_custom_target(docs
gendoc
COMMAND python gen_server_doc.py
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
@ -66,4 +83,11 @@ add_custom_target(docs
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx")
add_custom_target(rst
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
-c "${SPHINX_BUILD}"
${SPHINX_BUILD}/src
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx")

View File

@ -21,7 +21,7 @@ print(sys.path)
# -- Project information -----------------------------------------------------
project = 'slsDetectorPackage'
copyright = '2019, PSD Detector Group'
copyright = '2020, PSD Detector Group'
author = 'PSD Detector Group'
version = '@PROJECT_VERSION@'
@ -59,4 +59,8 @@ html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
html_static_path = ['static']
def setup(app):
app.add_stylesheet('css/extra.css') # may also be an URL

86
docs/gen_server_doc.py.in Normal file
View File

@ -0,0 +1,86 @@
import os
import re
from pathlib import Path
def remove_comments(text):
def replacer(match):
s = match.group(0)
if s.startswith('/'):
return " " # note: a space and not an empty string
else:
return s
pattern = re.compile(
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
re.DOTALL | re.MULTILINE
)
return re.sub(pattern, replacer, text)
# @CMAKE_CURRENT_BINARY_DIR@
print('\n\n\n\n SERVER CSV')
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
detectors = ['Mythen3', 'Gotthard2', 'Eiger',
'Jungfrau', 'Moench', 'Gotthard', 'Ctb']
for det in detectors:
print(det)
in_fname = src/f'{det.lower()}DetectorServer/slsDetectorServer_defs.h'
#print(f'Reading: {in_fname}')
with open(in_fname) as f:
lines = f.read().replace('\\\n', '')
lines = lines.splitlines(keepends = True)
lines = [l.strip('#define').strip(' ') for l in lines if l.startswith('#define')]
output = []
signals = []
fields = ['Name,', 'Value', 'Comment']
excluded = ['DAC_NAMES', 'DEFAULT_DAC_VALS', 'CLK_NAMES', 'ONCHIP_DAC_NAMES']
header = f'{fields[0]:35}{fields[1]:35}\n'
output.append(header)
signals.append(header)
dac_names = []
dac_values = []
for line in lines:
name, *parts = line.split()
arg = ' '.join(parts)
value, *comments = arg.split('//')
value = value.strip('() ')
# value = value.replace(', ', ' ')
value = value.replace('\"', '')
if name not in excluded:
name += ','
if name.startswith('SIGNAL_'):
signals.append(f'{name:35}{value}\n')
else:
output.append(f'{name:35}\"{value}\"\n')
elif name == 'DAC_NAMES':
dac_names = [v.strip(', ') for v in value.split()]
dac_names = [n+',' for n in dac_names]
elif name == 'DEFAULT_DAC_VALS':
dac_values = remove_comments(value).strip('{}; ')
dac_values = dac_values.replace(',', '').split()
dac_values = [v.strip('') for v in dac_values]
print(f"dac_names: {len(dac_names)}, dac_values={len(dac_values)}")
if len(dac_values) == 0:
dac_values = ['N/A']*len(dac_names)
rstpath = Path('@CMAKE_SOURCE_DIR@')/'docs/src/'
out_fname = Path.cwd()/f'src/{det.lower()}.csv'
out_dac_fname = Path.cwd()/f'src/{det.lower()}-dacs.csv'
#print(f'Writing: {out_fname}')
with open(out_fname, 'w') as f:
f.writelines(output)
output = [f'{n:35}{v}\n' for n,v in zip(dac_names, dac_values)]
output.insert(0, header)
with open(out_dac_fname, 'w') as f:
f.writelines(output)
print('END\n\n\n\n')

View File

@ -4,12 +4,28 @@ Command line interface
Usage
-------------
Commands can be uses either with sls_detector_get or sls_detector_put
Commands can be used either with sls_detector_get or sls_detector_put
.. code-block::
sls_detector_get vrf
Help
--------
.. code-block::
# get list of commands
sls_detector_get list
# search for a particular command using a word
sls_detector_get list | grep adc
# get help for a particular command
sls_detector_get -h fpath
sls_detector_help fpath
Commands
-----------

View File

@ -42,7 +42,7 @@ The documentation that you are reading now is built with
* Doxygen (to extract C++ classes etc.)
* Breathe (Sphinx plugin to handle doxygen xml)
* Sphinx
* Sphinx with sphinx_rtd_theme
-----------------------
Packaged in libs/

357
docs/src/firmware.rst Normal file
View File

@ -0,0 +1,357 @@
Firmware Upgrade
=================
Eiger
-------------
.. note ::
| Eiger firmware can be upgraded remotely.
| The programming executable (bcp) and corresponding bit files are provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 27
Latest compatible version : 27
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
Upgrade
^^^^^^^^
#. Tftp must be already installed on your pc to use the bcp executable.
#. Kill the on-board servers and copy new servers to the board.
.. code-block:: bash
# Option 1: from detector console
# kill old server
ssh root@bebxxx
killall eigerDetectorServer
# copy new server
cd executables
scp user@pc:/path/eigerDetectorServerxxx .
chmod 777 eigerDetectorServerxxx
ln -sf eigerDetectorServerxxx eigerDetectorServer
sync
# Options 2: from client console for multiple modules
for i in bebxxx bebyyy;
do ssh root@$i killall eigerDetectorServer;
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
ssh root@$i sync; done
* This is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
#. Bring the board into programmable mode using either of the 2 ways. Both methods result in only the central LED blinking.
* **Manual:**
Do a hard reset for each half module on back panel boards, between the LEDs, closer to each of the 1G ethernet connectors. Push until all LEDs start to blink.
* Software:
.. code-block:: bash
ssh root@bebxxx
cd executables
./boot_recovery
#. Start a terminal for each half module and run the following to see progress.
.. code-block:: bash
nc -p 3000 -u bebxxx 3000
# Press enter twice to see prompt with board name.
> bebxxx
# After each bcp command, wait for this terminal to print "Success".
#. In another terminal, run the following to update firmware. Please update bit files with great caution as it could make your board inaccessible, if done incorrectly.
.. code-block:: bash
#update back end fpga
bcp download.bit bebxxx:/fw0
#update front left fpga
bcp download.bit bebxxx:/febl
#update front right fpga
bcp download.bit bebxxx:/febr
#update kernel (only if required by the SLS Detector Group)
bcp download.bit bebxxx:/kernel
#. Reboot the detector.
Jungfrau
-------------
.. note ::
| Jungfrau firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
# PCB v1.0
Minimum compatible version : 24.07.2020 (v0.8)
Latest compatible version : 24.07.2020 (v0.8)
# PCB v2.0
Minimum compatible version : 21.07.2020 (v2.1)
Latest compatible version : 21.07.2020 (v2.1)
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
Upgrade (from v4.x.x)
^^^^^^^^^^^^^^^^^^^^
#. Tftp must be installed on pc.
#. Update client package to the latest (5.0.0-rc1).
#. Disable server respawning or kill old server
.. code-block:: bash
# Option 1: if respawning enabled
telnet bchipxxx
# edit /etc/inittab
# comment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
reboot
# ensure servers did not start up after reboot
telnet bchipxxx
ps
# Option 2: if respawning already disabled
telnet bchipxxx
killall jungfrauDetectorServerv*
#. Copy new server and start in update mode
.. code-block:: bash
tftp pcxxx -r jungfrauDetectorServervxxx -g
chmod 777 jungfrauDetectorServervxxx
./jungfrauDetectorServervxxx -u
#. Program fpga from the client console
.. code-block:: bash
sls_detector_get free
# Crucial that the next command executes without any errors
sls_detector_put hostname bchipxxx
sls_detector_put programfpga xxx.pof
#. After programming, kill update server using Ctrl + C.
#. Enable server respawning if needed
.. code-block:: bash
telnet bchipxxx
# edit /etc/inittab
# uncomment out line #ttyS0::respawn:/jungfrauDetectorServervxxx
# ensure the line has the new server name
reboot
# ensure both servers are running using ps
jungfrauDetectorServervxxx
jungfrauDetectorServervxxx --stop-server 1953
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof
Gotthard
---------
.. warning ::
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
| It is generally updated by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 11.01.2013
Latest compatible version : 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)
`Older versions <https://www.psi.ch/en/detectors/latest-installation>`_
Upgrade
^^^^^^^^
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`_.
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
#. In the Mode combo box, select "Active Serial Programming".
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
#. Click on 'Add file'. Select programming (pof) file provided by the SLS Detector group.
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
#. In case of error messages, check the polarity of cable (that pin1 corresponds) and that the correct programming connector is selected.
#. Reboot the detector.
Mythen3
-------
.. note ::
| Mythen3 firmware can be upgraded remotely.
| The corresponding programming file (rbf) is provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# and reboots (new server not respawned currently)
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
Gotthard2
----------
.. note ::
| Gotthard2 firmware can be upgraded remotely.
| The corresponding programming file (rbf) is provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 25.09.2020
Latest compatible version : 25.09.2020
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# and reboots (new server not respawned currently)
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
Moench
------
.. note ::
| Moench firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 02.03.2020
Latest compatible version : 02.03.2020
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof
Ctb
---
.. note ::
| Ctb firmware can be upgraded remotely.
| The corresponding programming file (pof) is provided by the SLS Detector group.
Compatibility
^^^^^^^^^^^^^
**Release candidate 5.0.0-rc1**
.. code-block:: bash
Minimum compatible version : 27.11.2019
Latest compatible version : 27.11.2019
Upgrade (from v5.0.0-rc1)
^^^^^^^^^^^^^^^^^^^^^^^^
#. Program from console
.. code-block:: bash
# copies server from tftp folder of pc, programs fpga,
# removes old server from respawn, sets up new server to respawn
# and reboots
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof

View File

@ -9,7 +9,6 @@
#include <string>
#include <vector>
#include "CmdProxy.h"
#include "Detector.h"
#include "sls_detector_defs.h"
@ -49,8 +48,7 @@ int main() {
auto tmp = os.str().erase(0, cmd.size());
auto usage = tmp.substr(0, tmp.find_first_of('\n'));
tmp.erase(0, usage.size());
auto help = replace_all(tmp, "\n\t", "\n\t\t");
auto help = replace_all(tmp, "\n\t", "\n\t\t| ");
fs << '\t' << cmd << usage << help << "\n";
}
}

View File

@ -32,6 +32,7 @@ Welcome to slsDetectorPackage's documentation!
:caption: Python API
:maxdepth: 2
pygettingstarted
pydetector
pyenums
pyexamples
@ -49,6 +50,17 @@ Welcome to slsDetectorPackage's documentation!
type_traits
ToString
.. toctree::
:caption: Servers
servers
serverupgrade
.. toctree::
:caption: Firmware
firmware
.. Indices and tables
.. ==================

View File

@ -1,9 +1,5 @@
Installation
==============================================
Build from source using CMake
---------------------------------
.. note ::
@ -13,17 +9,74 @@ Build from source using CMake
without being communicated. If absolute stability of the API is needed please
use one of the release versions.
.. warning ::
Before building from source make sure that you have the
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
manage the dependencies.
Installation
==============================================
Build from source using CMake
---------------------------------
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
It is also required to clone with the option --recursive to get the git submodules used
in the package.
.. code-block:: bash
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
mkdir build && cd build
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
make -j12
make -j12 #or whatever number of cores you are using to build
make install
The easiest way to configure options is to use the ccmake utility.
.. code-block:: bash
#from the build directory
ccmake .
Build using cmk.sh script
-------------------------
.. code-block:: bash
# new build and make with 9 parallel threads
./cmk.sh -cbj9
# build with python
./cmk.sh -bpj9
# build with GUI
./cmk.sh -bgj9
# build with hdf5
./cmk.sh -hj9 -d [path of hdf5 dir]
# get all options
./cmk.sh -?
Install binaries using conda
--------------------------------
Conda is not only useful to manage python environments but can also
be used as a user space package manager.
We have three different packages available:
* **slsdetlib**, shared libraries and command line utilities
* **slsdetgui**, GUI
* **slsdet**, Python bindings
.. code-block:: bash
#Add channels for dependencies and our library
@ -32,14 +85,19 @@ Install binaries using conda
conda config --set channel_priority strict
#cerate an environment with our library, then activate
conda create -n myenv slsdetlib=2020.03.18.dev2
codna activate myenv
conda create -n myenv slsdetlib=2020.07.23.dev0
conda activate myenv
#ready to use
sls_detector_get exptime
etc ...
.. code-block:: bash
#List available versions
conda search slsdet
Build from source on old distributions
-----------------------------------------
@ -67,3 +125,10 @@ is to use conda
.. code-block:: bash
conda create -n myenv python sphinx sphinx_rtd_theme
Then enable the option SLS_BUILD_DOCS to create the targets
.. code-block:: bash
make docs # generate API docs and build Sphinx RST
make rst # rst only, saves time in case the API did not change

View File

@ -7,3 +7,4 @@ Detector
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

View File

@ -4,9 +4,80 @@ Enums
These enums are defined in slsDetectorDefs in the C++ package and
exposed to Python through pybind11.
.. py:currentmodule:: sls_detector
::
# Most settings are represented as enums that can be
# explicitly imported
from slsdet import Detector, fileFormat
d = Detector()
d.fformat = fileFormat.BINARY
# Altough not recommended for convenience all enums
# and some other things can be impored using *
from slsdet import *
d.speed = speedLevel.FULL_SPEED
# To list the available enums, use dir()
import slsdet.enums
for enum in dir(slsdet.enums):
# filter out special memebers
if not enum.startswith('_'):
print(enum)
.. py:currentmodule:: slsdet
.. autoclass:: runStatus
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: detectorType
:undoc-members:
.. autoclass:: frameDiscardPolicy
:undoc-members:
.. autoclass:: fileFormat
:undoc-members:
.. autoclass:: dimension
:undoc-members:
.. autoclass:: externalSignalFlag
:undoc-members:
.. autoclass:: timingMode
:undoc-members:
.. autoclass:: dacIndex
:undoc-members:
.. autoclass:: detectorSettings
:undoc-members:
.. autoclass:: clockIndex
:undoc-members:
.. autoclass:: speedLevel
:undoc-members:
.. autoclass:: readoutMode
:undoc-members:
.. autoclass:: masterFlags
:undoc-members:
.. autoclass:: frameModeType
:undoc-members:
.. autoclass:: detectorModeType
:undoc-members:
.. autoclass:: burstMode
:undoc-members:
.. autoclass:: timingSourceType
:undoc-members:

View File

@ -1,7 +1,73 @@
Examples
================
Some short hints on how to use the detector
Some short examples on how to use slsdet. If something is missing don't hesitate to
open an issue in our our `github repo
<https://github.com/slsdetectorgroup/slsDetectorPackage>`_.
------------------------------------
Setting exposure time
------------------------------------
Setting and reading back exposure time can be done either using a Python datetime.timedelta
or by setting the time in seconds.
::
# Set exposure time to 1.2 seconds
>>> d.exptime = 1.2
# Setting exposure time using timedelta
import datetime as dt
>>> d.exptime = dt.timedelta(seconds = 1.2)
# With timedelta any arbitrary combination of units can be used
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
# To set exposure time for individual detector one have to resort
# to the C++ style API.
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
>>> d.setExptime(1.2, [0, 6, 12])
>>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12])
------------------------------------
Converting numbers to hex
------------------------------------
Python support entering numbers in format by using the 0x prefix. However, when reading
back you will get a normal integer. This can then be converted to a hex string representation
using the built in hex() function.
.. code-block :: python
from slsdet import Detector
>>> d = Detector()
>>> d.patwait0 = 0xaa
>>> d.patwait0
170
# Convert to string
>>> hex(d.patwait0)
'0xaa'
For multiple values one can use a list comprehension to loop over the values.
.. code-block :: python
>>> values = [1,2,3,4,5]
>>> [(v) for v in values]
['0x1', '0x2', '0x3', '0x4', '0x5']
# or to a single string by passing the list to .join
>>> ', '.join([hex(v) for v in values])
'0x1, 0x2, 0x3, 0x4, 0x5'
------------------------
Simple threshold scan
@ -74,37 +140,39 @@ But lets start looking at the at the manual way:
::
import time
from sls_detector import Eiger
d = Eiger()
from slsdet import Detector, runStatus
n = 10
t = 1
d.exposure_time = t
d.n_frames = n
d.reset_frames_caught()
n_frames = 10
t_exp = 1
# Set exposure time and number of frames
d = Detector()
d.exptime = t_exp
d.frames = n_frames
# Start the measurement
t0 = time.time()
d.start_receiver()
d.start_detector()
d.startDetector()
d.startReceiver()
# Wait for the detector to be ready or do other important stuff
time.sleep(t*n)
time.sleep(t_exp * n_frames)
# check if the detector is ready otherwise wait a bit longer
while d.status != 'idle':
while d.status != runStatus.IDLE:
time.sleep(0.1)
# Stop the receiver after we got the frames
# Detector is already idle so we don't need to stop it
d.stop_receiver()
d.stopReceiver()
lost = d.rx_framescaught - n_frames
print(
f"{n_frames} frames of {t_exp}s took {time.time()-t0:{.3}}s with {lost} frames lost "
)
lost = d.frames_caught - n
print(f'{n} frames of {t}s took {time.time()-t0:{.3}}s with {lost} frames lost ')
#Reset to not interfere with a potential next measurement
d.reset_frames_caught()
Instead launching d.acq() from a different process is a bit easier since the control of receiver and detector
is handled in the acq call. However, you need to join the process used otherwise a lot of zombie processes would
@ -114,30 +182,104 @@ hang around until the main process exits.
import time
from multiprocessing import Process
from sls_detector import Eiger
from slsdet import Detector, runStatus
def acquire():
"""
Create a new Eiger object that still referes to the same actual detector
and same shared memory. Then launch acq.
"""
detector = Eiger()
detector.acq()
#This is the detector we use throughout the session
d = Eiger()
d = Detector()
#Process to run acquire
p = Process(target=acquire)
#Create a separate process to run acquire in
p = Process(target=d.acquire)
#Start the thread and short sleep to allow the acq to start
p.start()
time.sleep(0.01)
#Do some other work
while d.busy is True:
print(d.busy)
while d.status != runStatus.IDLE:
print("Working")
time.sleep(0.1)
#Join the process
p.join()
------------------------------
Setting and getting times
------------------------------
::
import datetime as dt
from slsdet import Detector
from slsdet.utils import element_if_equal
d = Detector()
# The simplest way is to set the exposure time in
# seconds by using the exptime property
# This sets the exposure time for all modules
d.exptime = 0.5
# exptime also accepts a python datetime.timedelta
# which can be used to set the time in almost any unit
t = dt.timedelta(milliseconds = 2.3)
d.exptime = t
# or combination of units
t = dt.timedelta(minutes = 3, seconds = 1.23)
d.exptime = t
# exptime however always returns the time in seconds
>>> d.exptime
181.23
# To get back the exposure time for each module
# it's possible to use getExptime, this also returns
# the values as datetime.timedelta
>>> d.getExptime()
[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]
# In case the values are the same it's possible to use the
# element_if_equal function to reduce the values to a single
# value
>>> t = d.getExptime()
>>> element_if_equal(t)
datetime.timedelta(seconds=1)
--------------
Reading dacs
--------------
::
from slsdet import Detector, Eiger, dacIndex
#using the specialized class
e = Eiger()
>>> e.dacs
========== DACS =========
vsvp : 0 0
vtrim : 2480 2480
vrpreamp : 3300 3300
vrshaper : 1400 1400
vsvn : 4000 4000
vtgstv : 2556 2556
vcmp_ll : 1000 1000
vcmp_lr : 1000 1000
vcal : 0 0
vcmp_rl : 1000 1000
rxb_rb : 1100 1100
rxb_lb : 1100 1100
vcmp_rr : 1000 1000
vcp : 1000 1000
vcn : 2000 2000
vishaper : 1550 1550
iodelay : 650 650
# or using the general class and the list
d = Detector()
for dac in d.daclist:
r = d.getDAC(dac, False)
print(f'{dac.name:10s} {r}')

View File

@ -0,0 +1,228 @@
Getting Started
==================
--------------------
Which Python?
--------------------
We require at lest Python 3.6 and strongly recommended that you don't use the system
Python installation. The examples in this documentation uses `conda
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
also for non Python packages but there are also other alternatives like, pyenv.
Using something like conda also allows you to quickly switch beteen different Python
environments.
.. warning ::
If you use conda avoid also installing packages with pip.
---------------------
PYTHONPATH
---------------------
If you install slsdet using conda everything is set up and you can
directly start using the Python bindings. However, if you build
from source you need to tell Python where to find slsdet. This
is be done by adding your build/bin directory to PYTHONPATH.
.. code-block:: bash
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
.. note ::
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable
the Python bindings or if you use the cmk.sh script -p.
--------------------------------------
Which detector class should I use?
--------------------------------------
We provide a generic class called Detector and detector specific
versions like, Eiger, Jungfrau etc. The most or all functionality
is there in the base class except the convenient access to dacs
and temperatures.
::
from slsdet import Detector, Eiger
d = Detector()
e = Eiger()
# Both classes can be used to control an Eiger detector
d.exptime = 0.5
e.period = 1
# But Eiger gives a simpler interface to the dacs
>>> e.dacs
========== DACS =========
vsvp : 0
vtrim : 2480
vrpreamp : 3300
vrshaper : 1400
vsvn : 4000
vtgstv : 2556
vcmp_ll : 1000
vcmp_lr : 1000
vcal : 0
vcmp_rl : 1000
rxb_rb : 1100
rxb_lb : 1100
vcmp_rr : 1000
vcp : 1000
vcn : 2000
vishaper : 1550
iodelay : 650
.. note ::
Depending on user feedback we might move some detector specific
functionality to the specialized classes.
----------------------------------
Hey, there seems to be two APIs?
----------------------------------
To make the Python API approachable, both if you come from the command line
or are using the C++ API, we provide two interfaces to the detector.
One is property based and tries to stay as close to the command line syntax
as is possible, and the other one directly maps the C++ API found in Detector.h.
There is also an underlying design reason for the two APIs since we auto
generate the bindings to the C++ code using a mix of pybind11 and clang-tools.
The property based API covers most of the functionality but in some cases
you have to reach for the C++ like interface.
::
d = Detector()
# C++ like API
d.setExptime(0.1)
# or a bit more pythonic
d.exptime = 0.1
The c++ style API offers more control over access to individual modules
in a large detector.
::
# Set exposure time for module 1, 5 and 7
d.setExptime(0.1, [1,5,7])
--------------------
Finding functions
--------------------
To find out which properties and methods that a Python object have you
can use dir()
::
>>> from slsdet import Detector
>>> d = Detector()
>>> dir(d)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__',
'__eq__', '__format__', '__ge__', '__getattribute__', '__gt__',
'__hash__', '__init__', '__init_subclass__', '__le__', '__len__',
'__lt__', '__module__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
'__str__', '__subclasshook__', '_adc_register', '_frozen',
'_register', 'acquire', 'adcclk', 'adcphase', 'adcpipeline',
'adcreg', 'asamples', 'auto_comp_disable', 'clearAcquiringFlag',
'clearBit', 'clearROI', 'client_version', 'config', 'copyDetectorServer',
'counters', 'daclist', 'dacvalues', 'dbitclk', 'dbitphase' ...
Since the list for Detector is rather long it's an good idea to filter it.
The following example gives you properties and methods containing time in
their name.
::
>>> [item for item in dir(d) if 'time' in item]
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2',
'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime']
The above method works on any Python object but for convenience we also
included two functions to find names. View prints the names one per line
while find returns a list of names.
::
from slsdet.lookup import view, find
>>> view('exptime')
exptime
getExptime
getExptimeForAllGates
getExptimeLeft
getSubExptime
setExptime
setSubExptime
subexptime
>>> find('exptime')
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
------------------------------------
Finding out what the function does
------------------------------------
To access the documentation of a function directly from the Python prompt use help().
.. code-block :: python
>>> help(Detector.period)
Help on property:
Period between frames, accepts either a value in seconds or datetime.timedelta
Note
-----
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
Examples
-----------
>>> d.period = 1.05
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
>>> d.period
181.23
>>> d.getPeriod()
[datetime.timedelta(seconds=181, microseconds=230000)]
----------------------
Where are the ENUMs?
----------------------
To set some of the detector settings like file format you have
to pass in an enum.
::
>>> d.setFileFormat(fileFormat.BINARY)
The enums can be found in slsdet.enums
::
import slsdet
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
['burstMode', 'clockIndex', 'dacIndex', 'detectorModeType',
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
'fileFormat', 'frameDiscardPolicy', 'frameModeType', 'masterFlags',
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
'timingSourceType']
# Even though importing using * is not recommended one could
# get all the enums like this:
>>> from slsdet.enums import *

View File

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

108
docs/src/servers.rst Normal file
View File

@ -0,0 +1,108 @@
Default values
==============================================
Some general intro
Mythen3
-------------
.. csv-table:: Default values
:file: mythen3.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Mythen3 DACS
:file: mythen3-dacs.csv
:widths: 35, 35
:header-rows: 1
Gotthard2
-------------
.. csv-table:: Default values
:file: gotthard2.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard 2 DACS
:file: gotthard2-dacs.csv
:widths: 35, 35
:header-rows: 1
Moench
-------------
.. csv-table:: Default values
:file: moench.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Moench DACS
:file: moench-dacs.csv
:widths: 35, 35
:header-rows: 1
Ctb
-------------
.. csv-table:: Default values
:file: ctb.csv
:widths: 35, 35
:header-rows: 1
Eiger
-------------
.. csv-table:: Default values
:file: eiger.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Eiger DACS
:file: eiger-dacs.csv
:widths: 35, 35
:header-rows: 1
Jungfrau
-------------
.. csv-table:: Default values
:file: jungfrau.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Jungfrau DACS
:file: jungfrau-dacs.csv
:widths: 35, 35
:header-rows: 1
Gotthard
-------------
.. csv-table:: Default values
:file: gotthard.csv
:widths: 35, 35
:header-rows: 1
DACS
^^^^^^^^^^^^^
.. csv-table:: Gotthard DACS
:file: gotthard-dacs.csv
:widths: 35, 35
:header-rows: 1

View File

@ -0,0 +1,88 @@
Server Upgrade
=================
Eiger
-------------
#. Kill old server and copy new server
.. code-block:: bash
# Option 1: from detector console
# kill old server
ssh root@bebxxx
killall eigerDetectorServer
# copy new server
cd executables
scp user@pc:/path/eigerDetectorServerxxx .
chmod 777 eigerDetectorServerxxx
ln -sf eigerDetectorServerxxx eigerDetectorServer
sync
# Options 2: from client console for multiple modules
for i in bebxxx bebyyy;
do ssh root@$i killall eigerDetectorServer;
scp eigerDetectorServerxxx root@$i:~/executables/eigerDetectorServer;
ssh root@$i sync; done
#. Reboot the detector.
Jungfrau
-------------
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver jungfrauDetectorServerxxx pcxxx
Gotthard
---------
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver gotthardDetectorServerxxx pcxxx
Mythen3
-------
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
sls_detector_put copydetectorserver mythen3DetectorServerxxx pcxxx
Gotthard2
----------
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder and reboots (does not respawn)
sls_detector_put copydetectorserver gotthard2DetectorServerxxx pcxxx
Moench
------
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver moenchDetectorServerxxx pcxxx
Ctb
---
#. Program from console (only from 5.0.0-rc1)
.. code-block:: bash
# copies new server from pc tftp folder, respawns and reboots
sls_detector_put copydetectorserver ctbDetectorServerxxx pcxxx

4
docs/static/extra.css vendored Normal file
View File

@ -0,0 +1,4 @@
/* override table no-wrap */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}

View File

@ -12,7 +12,7 @@ hostname bchip007
0:rx_udpip 129.129.202.98
0:rx_hostname pc6898
0:outdir /bigRAID/datadir_gotthard/rec_test_data
0:vhighvoltage 120
0:highvoltage 120
master -1
sync none
outdir /bigRAID/datadir_gotthard/rec_test_data

View File

@ -0,0 +1,129 @@
#Gain index ADU value (12 bit)
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655
1 3655

View File

@ -1,132 +1,129 @@
#G1 Energy #G2 Energy
300 7000
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain (for every channel) ADU
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
100 100 100 10 1 0.1
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain #G1 Energy #G2 Energy
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000
100 100 100 10 1 0.1 300 7000

View File

@ -0,0 +1,29 @@
hostname strip3
udp_srcip 10.1.1.184
udp_dstip 10.1.1.107
udp_dstport2 50084
udp_srcip2 10.1.1.185
udp_dstip2 10.1.1.107
rx_hostname pc12365:1954
#udp_dstmac 3c:fd:fe:d2:a4:25
fpath /tmp
fname run
fwrite 0
bursts 10
frames 2700
burstperiod 100ms
numinterfaces 2
veto 1
#fixing data looks
# Sampling pipeline 1 clk
reg 0x120 0x00000010
clkphase 1 135 deg

View File

@ -6,12 +6,12 @@ hostname bchip074+bchip075+
0:extsig:0 trigger_in_rising_edge
0:rx_tcpport 1954
0:rx_udpport 50001
0:vhighvoltage 0
0:highvoltage 0
1:extsig:0 trigger_in_rising_edge
1:rx_tcpport 1955
1:rx_udpport 50002
1:vhighvoltage 0
1:highvoltage 0
##############################################################################
#########
@ -41,11 +41,11 @@ hostname bchip074+bchip075+
r_readfreq 1
rx_datastream 1
rx_zmqstream 1
#replace my_receiver_hostname with the hostname of 1Gb IP of the machine where the receiver runs
rx_hostname my_receiver_hostname
rx_datastream 1
rx_zmqstream 1
outdir /tmp/
@ -53,5 +53,5 @@ settings veryhighgain
exptime 0.000005
period 0.0001
vhighvoltage 90
highvoltage 90

View File

@ -459,8 +459,8 @@ rx_hostname mpc2011
tengiga 1
rx_datastream 1
rx_readfreq 1
rx_zmqstream 1
rx_zmqfreq 1
dac 6 800
@ -498,4 +498,4 @@ rx_jsonpara detectorMode analog
reg 0x5e 0x00010000
#powerchip 1
vhighvoltage 90
highvoltage 90

View File

@ -6,7 +6,7 @@ hostname localhost
rx_hostname localhost
#powerchip 1
#vhighvoltage 200
#highvoltage 200
#extsig:0 trigger_in_rising_edge
#timing trigger

View File

@ -17,7 +17,7 @@ hostname bchip048+bchip052+
rx_hostname pcmoench01
powerchip 1
vhighvoltage 200
highvoltage 200
#extsig:0 trigger_in_rising_edge
#timing trigger

View File

@ -35,7 +35,7 @@ zmqport 50001
tengiga 1
rx_datastream 1
rx_zmqstream 1
@ -46,7 +46,7 @@ period 0.0006
############################################
fpath /mnt/moench_data/scratch/
fwrite 0
rx_datastream 1
rx_zmqstream 1
rx_jsonpara frameMode frame
rx_jsonpara detectorMode counting
@ -56,7 +56,7 @@ rx_discardpolicy discardpartial
adcpipeline 15
powerchip 1
vhighvoltage 90
highvoltage 90
#adcreg 0x14 0x40

View File

@ -19,7 +19,7 @@ hostname bchip007+bchip009+
0:rx_udpip 10.1.1.1
0:rx_hostname 129.129.202.134
0:outdir /data/speedt
0:vhighvoltage 120
0:highvoltage 120
#1:hostname bchip009
@ -37,7 +37,7 @@ hostname bchip007+bchip009+
1:rx_udpip 10.1.2.1
1:rx_hostname 129.129.202.134
1:outdir /data/speedt
1:vhighvoltage 120
1:highvoltage 120
master -1

View File

@ -1,5 +1,5 @@
#include "catch.hpp"
#include "DetectorImpl.h"
#include "catch.hpp"
#include "string_utils.h"
#include "tests/globals.h"
#include <iostream>

26
integrationTests/test-integrationDectector.cpp Executable file → Normal file
View File

@ -2,9 +2,9 @@
#include "catch.hpp"
#include "ClientSocket.h"
#include "logger.h"
#include "DetectorImpl.h"
#include "Module.h"
#include "logger.h"
#include "sls_detector_defs.h"
#include "Timer.h"
@ -79,7 +79,6 @@ TEST_CASE("Set control port then create a new object with this control port",
d.freeSharedMemory();
}
TEST_CASE("single EIGER detector no receiver basic set and get",
"[.integration][eiger]") {
// TODO! this test should take command line arguments for config
@ -130,8 +129,6 @@ TEST_CASE("single EIGER detector no receiver basic set and get",
d.freeSharedMemory();
}
TEST_CASE("Locking mechanism and last ip", "[.integration][.single]") {
Module d(test::type);
d.setHostname(test::hostname);
@ -160,7 +157,6 @@ TEST_CASE("Set settings", "[.integration][.single]"){
CHECK(d.setSettings(defs::STANDARD) == defs::STANDARD);
}
TEST_CASE("Timer functions", "[.integration][cli]") {
// FRAME_NUMBER, /**< number of real time frames: total number of
// acquisitions is number or frames*number of triggers */ ACQUISITION_TIME,
@ -204,8 +200,7 @@ TEST_CASE("Timer functions", "[.integration][cli]") {
if (test::type != dt::EIGER) {
auto delay = 10000;
d.setDelayAfterTrigger(delay);
CHECK(d.getDelayAfterTrigger() ==
delay);
CHECK(d.getDelayAfterTrigger() == delay);
}
auto triggers = 2;
@ -221,7 +216,6 @@ TEST_CASE("Timer functions", "[.integration][cli]") {
d.startAndReadAll();
d.freeSharedMemory();
}
// TEST_CASE("Aquire", "[.integration][eiger]"){
@ -382,8 +376,8 @@ TEST_CASE("Chiptestboard Loading Patterns", "[.ctbintegration]") {
}
}
TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegration][dbit]") {
TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
"[.ctbintegration][dbit]") {
SingleDetectorConfig c;
// pick up multi detector from shm id 0
@ -450,17 +444,20 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert", "[.ctbintegrat
m.setExternalSampling(1);
CHECK(m.getExternalSampling() == 1);
CHECK(m.readRegister(0x7b) == 0x1003E);
}
TEST_CASE("Eiger or Jungfrau startingfnum", "[.eigerintegration][.jungfrauintegration][startingfnum]") {
TEST_CASE("Eiger or Jungfrau startingfnum",
"[.eigerintegration][.jungfrauintegration][startingfnum]") {
SingleDetectorConfig c;
// pick up multi detector from shm id 0
DetectorImpl m(0);
// ensure ctb detector type, hostname and online
REQUIRE(((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER) || (m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::JUNGFRAU)));
REQUIRE(
((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER) ||
(m.getDetectorTypeAsEnum() ==
slsDetectorDefs::detectorType::JUNGFRAU)));
REQUIRE(m.getHostname() == c.hostname);
CHECK(m.setNumberOfFrames(1) == 1);
@ -498,7 +495,8 @@ TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {
DetectorImpl m(0);
// ensure detector type, hostname
REQUIRE((m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER));
REQUIRE(
(m.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER));
REQUIRE(m.getHostname() == c.hostname);
m.setDynamicRange(16);

6
integrationTests/test-integrationMulti.cpp Executable file → Normal file
View File

@ -1,5 +1,5 @@
#include "catch.hpp"
#include "DetectorImpl.h"
#include "catch.hpp"
#include "string_utils.h"
#include "tests/globals.h"
#include <iostream>
@ -24,8 +24,6 @@ TEST_CASE("Initialize a multi detector", "[.integration][.multi]") {
d.freeSharedMemory();
}
TEST_CASE("Set and read timers", "[.integration][.multi]") {
DetectorImpl d(0, true, true);
@ -57,7 +55,6 @@ TEST_CASE("Set and read timers", "[.integration][.multi]") {
// PROGRESS, /**< fraction of measurement elapsed - only get! */
// MEASUREMENTS_NUMBER,
// FRAMES_FROM_START,
// FRAMES_FROM_START_PG,
// SAMPLES,
@ -78,7 +75,6 @@ TEST_CASE("Set and read timers", "[.integration][.multi]") {
CHECK(d.setSubFrameExposureDeadTime(-1) == Approx(subframe_deadtime));
}
if (test::type == dt::EIGER) {
// 32bit is needed for subframe exposure
d.setDynamicRange(32);

View File

@ -99,7 +99,7 @@ If one desires to set the zmqport manually, he offset has to be taken into accou
{\tt{slsMultiReceiver}} uses two or more receivers in one single terminal: {\tt{./slsMultiReceiver startTCPPort numReceivers withCallback}}, where startTCPPort assumes the other ports are consecutively increased.
The command {\tt{r\_framesperfile}} sets the number of frames written in the same file. By default now it is 10000. It can be changes. It needs to be lowered particularly if one wants to parallelize the following conversion of the files.
The command {\tt{r\_framesperfile}} (\tt{\textcolor{red}{rx\_framesperfile}}) sets the number of frames written in the same file. By default now it is 10000. It can be changes. It needs to be lowered particularly if one wants to parallelize the following conversion of the files.
\subsection{Mandatory setup - Client}
@ -122,7 +122,23 @@ To do that:
sls_detector_put 0-config mydetector.config
\end{verbatim}
In the config file, if client, receiver and detector are using \textbf{1GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_1Gb.config):
In the config file, if client, receiver and detector are using \textbf{1GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_1Gb.config). It has been adapted to the the new 5.0 major release change:
\begin{verbatim}
detsize 1024 512 #detector geometry, long side of the module first
hostname beb059+beb058+ #1Gb detector hostname for controls
#1Gb receiver pc hostname to be inserted immediately and tcp\_ports to be stated immediately
rx_hostname x12sa-vcons:1991+pc1875:1992+
0:udp_dstport 50011 #udp port first quadrant, first halfmodule
0:udp_dstport2 50012 #udp port second quadrant, first halfmodule
1:udp_dstport 50013 #udp port first quadrant, second halfmodule
1:udp_dstport2 50014 #udp port second quadrant, second halfmodule
0:udp_srcip 129.129.202.237
0:udp_dstip auto
1:udp_srcip 129.129.202.236
1:udp_dstip auto
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
\end{verbatim}
In the old 3.x and 4.x release it was:
\begin{verbatim}
detsizechan 1024 512 #detector geometry, long side of the module first
hostname beb059+beb058+ #1Gb detector hostname for controls
@ -138,21 +154,39 @@ threaded 1
\end{verbatim}
In the config file, if client, receiver and detector commands are on 1Gb, but detector data to receiver are sent using \textbf{10GbE} the following lines are mandatory (see slsDetectorsPackage/examples/eiger\_10Gb.config):
It has been adapted to the the new 5.0 major release change:
\begin{verbatim}
detsize 1024 512
hostname beb059+beb058+
rx_hostname pc1875:1955+pc1875:1956+
0:udp_dstport 50011
0:udp_dstport2 50012
0:udp_dstip 10.0.30.210
0:udp_srcip 10.0.30.100
1:flippeddatax 1
1:udp_dstport 50013
1:udp_dstport2 50014
1:udp_dstip 0.0.40.210
1:udp_srcip 10.0.40.101
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
\end{verbatim}
In the old 3.x and 4.x release it was:
\begin{verbatim}
detsizechan 1024 512 #detector geometry, long side of the module first
hostname beb059+beb058+ #1Gb detector hostname for controls
0:rx_tcpport 1991 #tcpport for the first halfmodule
0:rx_tcpport 1955 #tcpport for the first halfmodule
0:rx_udpport 50011 #udp port first quadrant, first halfmodule
0:rx_udpport2 50012 #udp port second quadrant, first halfmodule
0:rx_udpip 10.0.30.210 #udp IP of the receiver over 10Gb
0:detectorip 10.0.30.100 #first half module 10 Gb IP
1:rx_tcpport 1992 #tcpport for the second halfmodule
1:flippeddatax 1
1:rx_tcpport 1956 #tcpport for the second halfmodule
1:rx_udpport 50013 #udp port first quadrant, second halfmodule
1:rx_udpport2 50014 #udp port second quadrant, second halfmodule
1:rx_udpip 10.0.40.210 #udp IP of the receiver over 10Gb,
can be the same or different from 0:rx_udpip
1:detectorip 10.0.40.101 #second half module 10 Gb IP
rx_hostname x12sa-vcons #1Gb receiver pc hostname
rx_hostname pc1875 #1Gb receiver pc hostname
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
threaded 1
\end{verbatim}
@ -172,24 +206,25 @@ configuremac 0
rx_udpmac xx:xx:...
\end{verbatim}
Now we will give general communication commands. Commands with a diffent name in the \textcolor{red}{5.x} realease will be highlighted in \textcolor{red}{red}.
One can configure all the detector settings in a parameter file {\tt{setup.det}}, which is loaded by doing:
\begin{verbatim}
sls_detector_put 0-parameters setup.det
\end{verbatim}
Note that the parameter file for any realease before 4.1.1 has not the possibility to understand parameters to be set differently for different half modules, i.e. {\tt{0:txndelay\_left xxxxx},\tt{1:txndelay\_left yyyyy}}.
In the case of \E, the proper bias voltage of the sensor has to be setup, i.e. the {\tt{setup.det}} file needs to contain the line {\tt{vhighvoltage 150}}. Other detector functionality, which are rarely changed can be setup here.
In the case of \E, the proper bias voltage of the sensor has to be setup, i.e. the {\tt{setup.det}} file needs to contain the line {\tt{highvoltage 150}}. Other detector functionality, which are rarely changed can be setup here.
Other important settings that are configured in the {\tt{setup.det}} file are:
\begin{itemize}
\item {\tt{tengiga 0/1}}, which sets whether the detector is enabled to send data through the 1~or the 10~Gb Ethernet.
\item {\tt{flags parallel/nonparallel}}, which sets whether the detector is set in parallel acquisition and readout or in sequential mode. This changes the readout time of the chip and affects the frame rate capability (faster is {\tt{parallel}}, with higher noise but needed when the frame rate is $>2$~kHz.
\item {\tt{flags parallel/nonparallel}} or {\tt{\textcolor{red}{parallel 1/0}}}, which sets whether the detector is set in parallel acquisition and readout or in sequential mode. This changes the readout time of the chip and affects the frame rate capability (faster is {\tt{parallel}}).
\item {\tt{dr 32/16/8/4}} sets the detector in autosumming mode (32 bit counter or not autosumming, 12 bit out of the chip). This is strictly connected to what is required for the readout clock of chip. See next point.
\item {\tt{clkdivider 0/1/2}}. Changes the readout clock: 200, 100, 50~MHz (also referred to as full, half, quarter speed). Note that autosumming mode ({\tt{dr 32}} only works at {clkdivider 2}=quarter speed). By selecting Refer to readout timing specifications in~section\ref{timing} for how to set the detector.
\item {\tt{clkdivider 0/1/2}} or {\tt{\textcolor{red}{speed full\_speed/half\_speed/quart\_speed}}}. Changes the readout clock: 200, 100, 50~MHz (also referred to as full, half, quarter speed). Note that autosumming mode ({\tt{dr 32}} only works at \tt{clkdivider 2}=\tt{quart\_speed}). By selecting Refer to readout timing specifications in~section\ref{timing} for how to set the detector.
\item {\tt{flags continuous/storeinram}}. Allows to take frame continuously or storing them on memory. Users should use the {\tt{continuous}} flags. Enabling the {\tt{stroreinram}} flag makes the data to be sent out all at the end of the acquisition. Refer to readout timing specifications in section~\ref{timing} for how to set the detector. Examples will be given in section~\ref{}.
\end{itemize}
One should notice that, by default, by choosing the option {\tt{dr 32}}, then the software automatically sets the detector to {\tt{clkdivider 2}}. By choosing the option {\tt{dr 16}}, the software automatically sets the detector to {\tt{clkdivider 1}}. One needs to choose {\tt{clkdivider 0}} after setting the {\tt{dr 16}} option to have the fastest frame rate.
We would recommend expert users (beamline people) to write their parameters file for the users.
One should notice that, by default, by choosing the option {\tt{dr 32}}, then the software automatically sets the detector to {\tt{clkdivider 2}} ({\tt{\textcolor{red}{quart\_speed}}}). By choosing the option {\tt{dr 16}}, the software automatically sets the detector to {\tt{clkdivider 1}} ({\tt{\textcolor{red}{speed quart\_speed}}}). From release 5.x,
\section{API versioning} \label{api}
The eigerDetectorServer running on the boards has a versioning API scheme that will make it crash if used with a wrong firmware.
@ -210,10 +245,18 @@ Killing and starting the server on the boards allows you to check the firmware v
\section{Setting up the threshold}
\begin{verbatim}
sls_detector_put 0-settingsdir /path
sls_detector_put 0-trimen N xxxx yyyy zzzz
sls_detector_put 0-settings standard
sls_detector_put 0-threshold energy_in_eV standard
\end{verbatim}
or in \textcolor{red}{5.x}:
\begin{verbatim}
sls_detector_put 0-settingspath /path}
sls_detector_put 0-trimen N xxxx yyyy zzzz}
sls_detector_put 0-threshold energy_in_eV standard
\end{verbatim}
The first line requires to specify how many ({\tt{N}}) and at which energies in eV {\{tt{xxxx}}, {\tt{yyyy}}, {\tt{zzzz}} and so on) trimmed files were generated (to allow for an interpolation). This line should normally be included into the {\tt{mydetector.config}} file and should be set for you by one of the detector group.
NORMALLY, in this new calibration scheme, only {\tt{settings standard}} will be provided to you, unless specific cases to be discussed.
The threshold at 6000 eV , for example would be set as:{\tt{sls\_detector\_put 0-threshold 6000 standard}}.
@ -244,11 +287,11 @@ In this acquisition 10 consecutive 1~s frames will be acquired. Note that {\tt{p
You need to setup where the files will be written to
\begin{verbatim}
sls_detector_put 0-outdir /scratch
sls_detector_put 0-outdir /scratch (\textcolor{red}{0-fpath})
sls_detector_put 0-fname run
sls_detector_put 0-index 0
sls_detector_put 0-index 0 (\textcolor{red}{0-findex})
\end{verbatim}
this way your files will all be named /scratch/run\_dj\_i.raw where $j$ is relative to each specific half module, $i$ in the {\tt{index}} starts from 0 when starting the detector the first time and is automatically incremented. The next acquisition {\tt{index}} will be 1. One can reset the {\tt{index}} to what wished.
this way your files will all be named /scratch/run\_dj\_i.raw where $j$ is relative to each specific half module, $i$ in the {\tt{index}} starts from 0 when starting the detector the first time and is automatically incremented. The next acquisition {\tt{index}} will be 1. One can reset the {\tt{index}} (\tt{\textcolor{red}{findex}}) to what wished.
To acquire simply type:
\begin{verbatim}
@ -267,12 +310,13 @@ sls_detector_get receiver
There is a more complex way of performing an acquisition, that is useful for debugging and in case one wants a non blocking behavior:
You can then reset to zero the number of frames caught, then start the receiver and the detector:
You can then reset to zero the number of frames caught (in releases<5.0), then start the receiver and the detector:
\begin{enumerate}
\item {\tt{sls\_detector\_put 0-resetframescaught 0}}
\item {\tt{sls\_detector\_put 0-receiver start}}
\item {\tt{sls\_detector\_put 0-status start}}
\end{enumerate}
In release \textcolor{red}{5.0} it is not needed to reset the frames caughts.
You can poll the detector status using:
\begin{verbatim}
@ -347,8 +391,11 @@ col : 257 pixels
\end{verbatim}
\section{Readout timing- maximum frame rate}\label{timing}
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the speed at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} and the dead time between frames through {\tt{flags parallel}}, i.e. acquire and read at the same time or acquire and then read out.
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT.
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the {\tt{textcolor}{red}{speed} at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} ({\tt{
\textcolor{red}{speed full\_speed/half\_speed/quart\_speed}}) and the dead time between frames through {\tt{flags parallel}} or {\tt{\textcolor{red}{parallel 1}}}, i.e. acquire and read at the same time or acquire and then read out.
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT. WE recconmmend using the detector in \tt{dr 4/8/16}, \tt{\textcolor{red}{speed full\_speed}}, \tt{parallel 1} or \tt{dr 32}, \tt{\textcolor{red}{speed quart\_speed}}, \tt{parallel 1. All those options are now the defaults options starting from version 5.x.
In the case of REAL CONTINUOUS readout, i.e. continuous acquire and readout from the boards (independent on how the chip is set), the continuous frame rates are listed in table~\ref{tcont}. The time to send out the frame out of the board
\begin{table}
@ -360,16 +407,16 @@ In the case of REAL CONTINUOUS readout, i.e. continuous acquire and readout from
\hline
1 & 32 & \textbf{128} & 7820 & \\
\hline
10 & 4 & \textbf{10240} & 98 & 105/128\\
10 & 4 & \textbf{7813} & 98 & 105/128\\
\hline
10 & 8 & \textbf{5120} & 196 & 210/250\\
10 & 8 & \textbf{4000} & 196 & 210/250\\
\hline
10 & 16 & \textbf{2560} & 391 & 420/490\\
10 & 16 & \textbf{2000} & 391 & 420/490\\
\hline
10 & 32 & \textbf{1280} & 782 & 840/977\\
10 & 32 & \textbf{1023} & 782 & 840/977\\
\hline
\end{tabular}
\caption{Frame rate limits for the CONTINUOS streaming out of images, i.e. the data rate out is just below 1Gb/s or 10Gb/s. 1280~Hz for 32-bit, 10GbE is obtained from the 10GbE limitation. The maximum achievable frame rate is 977~Hz.}
\caption{Frame rate limits for the CONTINUOS streaming out of images, i.e. the data rate out is just below 1Gb/s or 10Gb/s. 1023~Hz for 32-bit, 10GbE is obtained from the 10GbE limitation. The maximum achievable frame rate is 977~Hz.}
\label{tcont}\end{table}
Note that in the {\tt{continuous}} flag mode, some buffering is still done on the memories, so a higher frame rate than the proper real continuous one can be achieved. Still, this extra buffering is possible till the memories are not saturated. The number of images that can be stored on the DDR2 on board memories are listed in table~\ref{timgs}.
\begin{table}
@ -384,11 +431,11 @@ dynamic range & images\\
16 & 7600\\
\hline
\end{tabular}
\caption{Amount of images that can be stored on board. As while we store them, we start to send them out, the effective number of images could be larger than this, but it will depend on the network setup (how fats you stream out images).}
\caption{Amount of images that can be stored on board. As while we store them, we start to send them out, the effective number of images could be larger than this, but it will depend on the network setup (how fast you stream out images).}
\label{timgs}
\end{table}
The maximum frame rate achievable with 10~GbE, {\tt{dr 16}}, {\tt{flags continuous}}, {\tt{flags parallel}},{\tt{clkdivider 0}}, \textbf{6.1~kHz}. This is currently limited by the connection between the Front End Board and the Backend board. We expect the 32 bit mode limit, internally, to be \textbf{2~kHz} ({\tt{clkdivider 2}}).
The maximum frame rate achievable with 10~GbE, {\tt{dr 16}}, {\tt{flags continuous}}, {\tt{flags parallel}} ({\tt{\textcolor{red}{parallel 1}}}),{\tt{clkdivider 0}} ({\tt{\textcolor{red}{speed full\_speed}}}), \textbf{6.1~kHz}. This is currently limited by the connection between the Front End Board and the Backend board. We expect the 32 bit mode limit, internally, to be \textbf{2~kHz} ({\tt{clkdivider 2}}).
In dynamic range {\tt{dr 8}} the frame rate is \textbf{11~kHz} and for{\tt{dr 4}} is \textbf{22~kHz}. For 4 and 8 bit mode the frame rate are directly limited by the speed of the detector chip and not by the readout boards.
\subsection{Minimum time between frames and Maximum frame rate}
@ -459,6 +506,23 @@ where the 'minimum time between frames' and the minimum period will be discussed
\textbf{From software version 4.0.0, there is a very useful function {\tt{sls\_detector\_get measuredperiod}} which return the measured period AFTER the acquisition. This is important to check that the settings to obtain the targeted frame rate was correct.}
In release \textcolor{red}{5.0} in 4-bit modes one can set a sort of ROI in the detector such to read half of the module (the central part) or a quarter of it with almost double or four times the frame rate. By default the \tt{\textcolor{red}{readnlines}} is set to \tt{256} meaning the whole chip. With \tt{\textcolor{red}{readnlines 128}} or \tt{\textcolor{red}{readnlines 64}} one sets to read half/quarter rows from the chip. In table~\ref{table:hfrpartial} the maximum frame rates, exposure time and period for the partial readout.\\
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
readnlines & \# pixels & Active area (cm$^2$) & Max frame rate (kHz) & Period ($\mu$s) & Dead time ($\mu$s) & \# buffered images\\
\hline
256 &1024 $\times$ 512 & 8 $\times$ 3.8 & 22.7 & 44.0 &4.1 & 30k\\
\hline
128 &1024 $\times$ 256 & 8 $\times$ 1.9 & 42.1 & 23.7 &4.2 & 60k\\
\hline
64 & 1024 $\times$ 128 & 8 $\times$ 0.95 & 73.5 & 13.6 &4.2 & 120k\\
\hline
\end{tabular}
\label{table:hfrpartial}
\textbf{If you run too fast, the detector could become noisier (see problem shooting), it is important to match the detector settings to your frame rate. This can be done having more parameters files and load the one suitable with your experiment.} We experienced that with low energy settings could not reach 6~kHz and no noise.
In 16 bit mode, it could make sense, in case of noise and low threshold to either reduce the frame rate:
\begin{equation}
@ -579,10 +643,10 @@ The number of subframes composing a single 32bit acquisition can be calculated a
\end{equation}
This also means that {\tt{exptime}}$<${\tt{subexptime}} will be rounded to{\tt{subexptime}}. If you want shorter acquisitions, either reduce the {\tt{subexptime}} or switch two 16-bit mode (you can always sum offline if needed).
From release 4.0.0, an extra {\tt{flag overflow/nooverflow}} is added, with {\tt{nooverflow}} default:
From release 4.0.0, an extra {\tt{flag overflow/nooverflow}} is added (\tt{\textcolor{red}{overflow 0/1}}), with {\tt{nooverflow}} (\tt{\textcolor{red}{overflow 0}}) default:
\begin{itemize}
\item {\tt{nooverflow}}: the internal 12-bit result is summed, even if there was saturation of the 12-bit counter (4095) in any of the subframes. Note that if there is saturation for every subframe, you might get as a result a value of the counter equal to (4095$\times$~number~of~subframes), which you need to correctly identify. On the other hand if the saturation occurred only one time, you will get something "close'' to the real number.
\item {\tt{overflow}}: In this case, even if a pixel saturate only 1 time in a subframe, you will be returned as a value of the counter for that pixel: $2^{32}-1$, i.e. 4294967295.
\item {\tt{nooverflow}} (\tt{\textcolor{red}{overflow 0}}): the internal 12-bit result is summed, even if there was saturation of the 12-bit counter (4095) in any of the subframes. Note that if there is saturation for every subframe, you might get as a result a value of the counter equal to (4095$\times$~number~of~subframes), which you need to correctly identify. On the other hand if the saturation occurred only one time, you will get something "close'' to the real number.
\item {\tt{overflow}} (\tt{\textcolor{red}{overflow 1}})): In this case, even if a pixel saturate only 1 time in a subframe, you will be returned as a value of the counter for that pixel: $2^{32}-1$, i.e. 4294967295.
\end{itemize}
The UDP header will contain, after you receive the data, the effective number of subframe per image (see section~\ref{UDP}) as "SubFrame Num or Exp Time", i.e. the number of subframes recorded (32 bit eiger).
@ -610,17 +674,17 @@ The detector can be setup such to receive external triggers. Connect a LEMO sign
\begin{verbatim}
sls_detector_put 0-timing [auto/trigger/burst_trigger/gating]
sls_detector_put 0-frames x
sls_detector_put 0-cycles y
sls_detector_put 0-cycles y (\textcolor{red}{triggers})
sls_detector_acquire 0-
\end{verbatim}
No timeout is expected between the start of the acquisition and the arrival of the first trigger.
Here are the implemented options so far:
\begin{itemize}
\item {\tt{auto}} is the software controlled acquisition (does not use triggers), where {\tt{exptime}} and {\tt{period}} have to be set. Set number of cycles (i.e. triggers) to 1 using {\tt{cycles}}. Set number of frames using {\tt{frames}}.
\item {\tt{trigger}} 1 frame taken for 1 trigger. Your {\tt{frames}} needs to be 1 always, {\tt{cycles}} can be changed and defines how many triggers are considered. {\tt{exptime}} needs to be set. In the GUI this is called trigger exposure series.
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
\item {\tt{auto}} is the software controlled acquisition (does not use triggers), where {\tt{exptime}} and {\tt{period}} have to be set. Set number of {\tt{cycles}} (\textcolor{red}{triggers}) to 1. Set number of frames using {\tt{frames}}.
\item {\tt{trigger}} 1 frame taken for 1 trigger. Your {\tt{frames}} needs to be 1 always, {\tt{cycles}} ({\tt{\textcolor{red}{triggers}}}) can be changed and defines how many triggers are considered. {\tt{exptime}} needs to be set. In the GUI this is called trigger exposure series.
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} ({\tt{\textcolor{red}{triggers}}}) needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} (\tt{\textcolor{red}{triggers}}) allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
ATTENTION: From release 4.1.1 with the {\tt{trigger}} option it is possible to have software triggers as a debugging tool (instead of the hardware trigger signal. One should start the acquisition (with the blocking {\tt{sls\_detector\_acquire}} if wanted and with another client one can send the softare trigger {\tt{sls\_detector\_put status trigger}}. This option allows for example to perform a motor scan (moving a motor in between single images) and still writing all images to the same file.
When using 32-bit mode, by default the acquisition ends the last complete subframe that was started when still the acquisition time was valid. This has been chosen as many people wants to know the exact acquisition time for when the detector was taking data and also, if {\tt{ratecorr}} are active, the last subframe will be correctly corrected, while otherwise it will be corrected with a wrong subdeadtime.
@ -630,13 +694,13 @@ However, from 4.1.0, in gating mode, an option to immediately terminate the subf
Hardware-wise, the ENABLE OUT signal outputs when the chips are really acquiring. This means that the single subframes will be output in 32 bit mode. The TRIGGER OUT outputs the sum-up-signal at the moment (which is useless). This will be changed in the future to output the envelop of the enable signal.
We are planning to change some functionality, i.e. unify the {\tt{trigger}} and {\tt{burst\_trigger}} trigger modes and make both {\tt{frames}} and {\tt{cycles}} configurable at the same time.
We are planning to change some functionality, i.e. unify the {\tt{trigger}} and {\tt{burst\_trigger}} trigger modes and make both {\tt{frames}} and {\tt{cycles}} (\tt{\textcolor{red}{triggers}}) configurable at the same time.
There is the possibility to use {\tt{timing trigger/burst\_trigger}} and send software single commands to fake the trigger. This is done with:
\begin{verbatim}
sls_detector_put 0-timing [trigger/burst_trigger]
sls_detector_put 0-frames x
sls_detector_put 0-cycles y
sls_detector_put 0-cycles y (\textcolor{red}{triggers})
sls_detector_status trigger
\end{verbatim}
Note that this functionality is very (!) useful if you need to do something between and acquisition and the next. This can be used to do a fast threshold scan for example. See section~\ref{sec:fastthresholdscan}.
@ -716,8 +780,8 @@ If \textbf{dr} is 32 and \textbf{clkdivider} is not 2, whatever the detector get
Here is a list of parameters that should be reset:
\begin{enumerate}
\item \textbf{resetframescaught} should be reset to zero after every acquisition taken with {\tt{receiver start}},{\tt{status start}},{\tt{receiver stop}}. If the acquisition is taken with {\tt{sls\_detector\_acquire}}, there is no need to reset this.
\item After changing the {\tt{timing}} mode of the detector, one should reset to '1' the unused value, in that specific timing mode, between \textbf{frames} and \textbf{cycles}. See section~\ref{triggering} for how to use the timing. At the present moment the detector will acquire more frames than planned if the variable not used between \textbf{frames} and \textbf{cycles} is not reset. In future releases, the unused variable will be ignored. Still resetting is a good practice.
\item \textbf{resetframescaught} (only for releases < 5.x) should be reset to zero after every acquisition taken with {\tt{receiver start}},{\tt{status start}},{\tt{receiver stop}}. If the acquisition is taken with {\tt{sls\_detector\_acquire}}, there is no need to reset this.
\item After changing the {\tt{timing}} mode of the detector, one should reset to '1' the unused value, in that specific timing mode, between \textbf{frames} and \textbf{cycles} (\tt{\textcolor{red}{triggers}}). See section~\ref{triggering} for how to use the timing. At the present moment the detector will acquire more frames than planned if the variable not used between \textbf{frames} and \textbf{cycles} (\tt{\textcolor{red}{trigger}}) is not reset. In future releases, the unused variable will be ignored. Still resetting is a good practice.
\end{enumerate}
@ -746,7 +810,7 @@ Extremely advanced options allow to:
\begin{itemize}
\item Activate the flow control for 10~Gb/s~E (by default the 1~Gb/s~E is always active and cannot be switched off:
\begin{verbatim}
./sls_detector_put flowcontrol_10g 1
./sls_detector_put flowcontrol_10g 1 (\textcolor{red}{flowcontrol10g})
\end{verbatim}
\item Delay the transmission of the left port. This delay option is useful in the case of many simultaneous receivers running, such that it reduces the throughput to the receivers all at the same time. To be used board by board (i.e {\tt{X:, Y:,etc..}} with different units:
\begin{verbatim}
@ -839,7 +903,7 @@ NOTE THAT THIS SETTINGS WILL BE LOST IF YOU REBOOT THE COMPUTER.
Very important is to activate the flow control in 10Gb (in 1Gb it is on by default and not configurable)
\begin{verbatim}
./sls_detector_put flowcontrol_10g 1
./sls_detector_put flowcontrol_10g 1 (\textcolor{red}{flowcontrol10g 1})
\end{verbatim}
You ned to check that flow control is setup on the reeceiving interfaces. Check with:
\begin{verbatim}
@ -1128,10 +1192,10 @@ In 500k--2M pixel systems there is a hardware temperature safety switch, which w
The HV can also be set and read through the software:
\begin{verbatim}
./sls_detector_put vhighvoltage 150
./sls_detector_get vhighvoltage
./sls_detector_put vhighvoltage 150 (\textcolor{red}{highvoltage})
./sls_detector_get vhighvoltage (\textcolor{red}{highvoltage})
\end{verbatim}
Note that the get {\tt{vhighvoltage}} would return the measured HV from the master module only. If getting the vhighvoltage for individual halfmodules, only the master will have a value different from -999.
Note that the get {\tt{vhighvoltage}}(\tt{\textcolor{red}{highvoltage}}) would return the measured HV from the master module only. If getting the highvoltage for individual halfmodules, only the master will have a value different from -999.
\appendix
@ -1220,6 +1284,14 @@ sls_detector_put pulsechip N #to pulse N
sls_detector_put pulsechip -1 #to get out of testing mode
\end{verbatim}
Note that the answer will be $2 \cdot \textrm{{\tt{N}}} +2$ in this case.
Or in \textcolor{red}{5.x}:
\begin{verbatim}
sls_detector_put vthreshold 4000
sls_detector_put vtrim 4000
sls_detector_put pulsechip N #to pulse N
sls_detector_put pulsechip -1 #to get out of testing mode
\end{verbatim}
Note that the answer will be $2 \cdot \textrm{{\tt{N}}} +4$ in this case.
\item \textbf{Pulse analogically:} You want to really check the analogical part of the detector, not just the readout.
@ -1238,8 +1310,25 @@ sls_detector_put resmat 0
sls_detector_acquire
\end{verbatim}
You read {\tt{N}} in every pixel if you are setup correctly.
or in realese \textcolor{red}{5.x}:
\begin{verbatim}
sls_detector_put vcal 3600
sls_detector_put vthreshold 1700
sls_detector_put vrpreamp 3100
for i in $(seq 0 7) ;
do px=$((-255+i));
sls_detector_put pulse 0 $px 0;
for j in $(seq 0 255) ; do
sls_detector_put pulsenmove 100 0 1;
done;
done;
sls_detector_put partialreset 1
\end{verbatim}
\end{itemize}
\section{Load a noise pattern with shape}
For debug purposes, we have created a noise pattern with a shape. If you reconstruct correctly your image, you should be able to read ".EIGER'' in the same direction for both the top and bottom in normal human readable orientation.
To load the special noise file look at {\tt{settingsdir/eiger/standard/eigernoise.sn0xx}} in the package.
@ -1262,10 +1351,10 @@ We have also been requested if we could speed up the threshold scan. At the mome
\begin{verbatim}
./sls_detector_put exptime 0.01
./sls_detector_put timing trigger
./sls_detector_put enablefwrite 0
./sls_detector_put resetframescaught 0
./sls_detector_put index 0
./sls_detector_put cycles 21
./sls_detector_put enablefwrite 0 (\textcolor{red}{fwrite} 0)
./sls_detector_put resetframescaught 0 (\textcolor{red}{not needed anymore})
./sls_detector_put index 0 (\textcolor{red}{findex} 0)
./sls_detector_put cycles 21 (\textcolor{red}{triggers} 21)
./sls_detector_put receiver start
./sls_detector_put status start
for i in $(seq 0 20);
@ -1383,7 +1472,7 @@ Environment variable SLSDETNAME can be set for using 2 different detectors from
\subsection{Measure the HV}
For every system:
\begin{itemize}
\item Software-wise measure it (now the software returns the measured value), with {\tt{sls\_detector\_get vhighvoltage}}. The returned value is the HV (for proper Eiger setting is approximately 150~V) if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:vhighvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
\item Software-wise measure it (now the software returns the measured value), with {\tt{sls\_detector\_get highvoltage}}. The returned value is the HV (for proper Eiger setting is approximately 150~V) if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:highvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
\item Hardware-wise (opening the detector) measure value of HV on C14 on the power distribution board. Check also that the small HV connector cable is really connected.
\end{itemize}
@ -1434,7 +1523,7 @@ Scroll up in the terminal till you find:\\
There is also an easier way, that is that only the master module will return the real value of the HV. If you have more than 1 detector system, then you will have more than 1 physical master, as the HV needs to be applied to all the systems.
\begin{verbatim}
for i in $(seq 0 36); do sls_detector_put $i:vhighvoltage; done
for i in $(seq 0 36); do sls_detector_put $i:highvoltage; done
\end{verbatim}
Only the master will return to you a sensible number (150 normally). the others will return -999.
@ -1595,10 +1684,10 @@ ratecorr number
where {\tt{number}} is a string that should be interpreted as a float in s. 0.000000 means correction off. Values above zero are the value of $\tau$ in ns.
\item \begin{verbatim}
sls_detector_get vhighvoltage
vhighvoltage number
sls_detector_get highvoltage
highvoltage number
\end{verbatim}
where {\tt{number}} is a string that should be interpreted as an int and for proper Eiger setting is approximately 150~V if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:vhighvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
where {\tt{number}} is a string that should be interpreted as an int and for proper Eiger setting is approximately 150~V if it is correctly set. If two master modules are presents (multi systems), the average is returned (still to be tested). If one asks for the individual $n$ half module bias voltage through {\tt{sls\_detector\_get n:highvoltage}}, if the $n$ module is a master, the actual voltage will be returned. If it is a slave, -999 will be returned.
\item \begin{verbatim}
sls_detector_get busy

View File

@ -142,7 +142,7 @@
"vpreamp"; // sets/get vpreamp value (advanced! Mythen)
"vshaper1"; // sets/get vshaper1 value (advanced! Mythen)
"vshaper2"; // sets/get vshaper2 value (advanced! Mythen)
"vhighvoltage"; // sets/get vhighvoltage value (advanced! Chiptest board and Eiger)
"highvoltage"; // sets/get highvoltage value (advanced! Chiptest board and Eiger)
"vapower"; // sets/get vapower value (advanced! Chiptest board)
"vddpower"; // sets/get vddpower value (advanced! Chiptest board)
"vshpower"; // sets/get vshpower value (advanced! Chiptest board)

View File

@ -335,7 +335,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
\item[vpreamp n] Sets the DAC value of the preamp feedback to n.
\item[vshaper1 n] Sets the DAC value of the shaper1 feedback to n.
\item[vshaper2 n] Sets the DAC value of the shaper2 feedback to n.
\item[vhighvoltage n] Sets the DAC value of the high voltage to n (in V).
\item[highvoltage n] Sets the DAC value of the high voltage to n (in V).
\item[vapower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
\item[vddpower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
\item[vshpower n] CHIPTEST BOARD ONLY - Sets the comparator power supply in dac units (0-1024).
@ -648,7 +648,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
\item[vpreamp] Returns the DAC value of the preamp feedback to n.
\item[vshaper1] Returns the DAC value of the shaper1 feedback to n.
\item[vshaper2] Returns the DAC value of the shaper2 feedback to n.
\item[vhighvoltage] Returns the DAC value of the high voltage to n.
\item[highvoltage] Returns the DAC value of the high voltage to n.
\item[vapower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
\item[vddpower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
\item[vshpower] CHIPTEST BOARD ONLY - Returns the comparator power supply in dac units (0-1024).
@ -714,7 +714,7 @@ One can configure all the detector settings in a parameter file {\tt{setup.det}}
sls_detector_put parameters setup.det
\end{verbatim}
In the case of \E, the parameter file ({\tt{setup.det}} needs to setup the proper bias voltage of the sensor, i.e. needs to contain the line {\tt{vhighvoltage 150}}.
In the case of \E, the parameter file ({\tt{setup.det}} needs to setup the proper bias voltage of the sensor, i.e. needs to contain the line {\tt{highvoltage 150}}.
\subsection{Standard acquisition}

View File

@ -322,7 +322,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
\item[vpreamp n] Sets the DAC value of the preamp feedback to n.
\item[vshaper1 n] Sets the DAC value of the shaper1 feedback to n.
\item[vshaper2 n] Sets the DAC value of the shaper2 feedback to n.
\item[vhighvoltage n] CHIPTEST BOARD ONLY - Sets the DAC value of the high voltage to n.
\item[highvoltage n] CHIPTEST BOARD ONLY - Sets the DAC value of the high voltage to n.
\item[vapower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
\item[vddpower n] CHIPTEST BOARD ONLY - Sets the DAC value of the analog voltage to n.
\item[vshpower n] CHIPTEST BOARD ONLY - Sets the comparator power supply in dac units (0-1024).
@ -594,7 +594,7 @@ Advanced settings changing the analog or digital performance of the acquisition.
\item[vpreamp] Returns the DAC value of the preamp feedback to n.
\item[vshaper1] Returns the DAC value of the shaper1 feedback to n.
\item[vshaper2] Returns the DAC value of the shaper2 feedback to n.
\item[vhighvoltage] CHIPTEST BOARD ONLY - Returns the DAC value of the high voltage to n.
\item[highvoltage] CHIPTEST BOARD ONLY - Returns the DAC value of the high voltage to n.
\item[vapower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
\item[vddpower] CHIPTEST BOARD ONLY - Returns the DAC value of the analog voltage to n.
\item[vshpower] CHIPTEST BOARD ONLY - Returns the comparator power supply in dac units (0-1024).

View File

@ -11,7 +11,8 @@ pybind11_add_module(_slsdet
target_link_libraries(_slsdet PUBLIC
slsDetectorShared
slsReceiverShared
slsSupportLib
slsSupportShared
${ZeroMQ_LIBRARIES}
)
@ -29,11 +30,17 @@ set( PYTHON_FILES
detector_property.py
detector.py
eiger.py
enums.py
errors.py
gotthard.py
gotthard2.py
moench.py
proxy.py
ctb.py
jungfrau.py
mythen3.py
registers.py
temperature.py
lookup.py
utils.py

View File

@ -0,0 +1,42 @@
"""
Example showing how to set and get exposure times
"""
import datetime as dt
from slsdet import Detector
from slsdet.utils import element_if_equal
d = Detector()
# The simplest way is to set the exposure time in
# seconds by using the exptime property
# This sets the exposure time for all modules
d.exptime = 0.5
# exptime also accepts a python datetime.timedelta
# which can be used to set the time in almost any unit
t = dt.timedelta(milliseconds = 2.3)
d.exptime = t
# or combination of units
t = dt.timedelta(minutes = 3, seconds = 1.23)
d.exptime = t
#exptime however always returns the time in seconds
# >>> d.exptime
# 181.23
# To get back the exposure time for each module
# it's possible to use getExptime, this also returns
# the values as datetime.timedelta
# >>> d.getExptime()
# [datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]
# In case the values are the same it's possible to use the
# element_if_equal function to reduce the values to a single
# value
# >>> t = d.getExptime()
# >>> element_if_equal(t)
# datetime.timedelta(seconds=1)

View File

@ -0,0 +1,21 @@
import time
from multiprocessing import Process
from slsdet import Detector, runStatus
d = Detector()
#Create a separate process to run acquire in
p = Process(target=d.acquire)
#Start the thread and short sleep to allow the acq to start
p.start()
time.sleep(0.01)
#Do some other work
while d.status != runStatus.IDLE:
print("Working")
time.sleep(0.1)
#Join the process
p.join()

View File

@ -0,0 +1,33 @@
import time
from slsdet import Detector, runStatus
n_frames = 10
t_exp = 1
# Set exposure time and number of frames
d = Detector()
d.exptime = t_exp
d.frames = n_frames
# Start the measurement
t0 = time.time()
d.startDetector()
d.startReceiver()
# Wait for the detector to be ready or do other important stuff
time.sleep(t_exp * n_frames)
# check if the detector is ready otherwise wait a bit longer
while d.status != runStatus.IDLE:
time.sleep(0.1)
# Stop the receiver after we got the frames
# Detector is already idle so we don't need to stop it
d.stopReceiver()
lost = d.rx_framescaught - n_frames
print(
f"{n_frames} frames of {t_exp}s took {time.time()-t0:{.3}}s with {lost} frames lost "
)

View File

@ -0,0 +1,32 @@
from slsdet import Detector, Eiger, dacIndex
#using the specialized class
e = Eiger()
e.dacs
# >>> e.dacs
# ========== DACS =========
# vsvp : 0 0
# vtrim : 2480 2480
# vrpreamp : 3300 3300
# vrshaper : 1400 1400
# vsvn : 4000 4000
# vtgstv : 2556 2556
# vcmp_ll : 1000 1000
# vcmp_lr : 1000 1000
# vcal : 0 0
# vcmp_rl : 1000 1000
# rxb_rb : 1100 1100
# rxb_lb : 1100 1100
# vcmp_rr : 1000 1000
# vcp : 1000 1000
# vcn : 2000 2000
# vishaper : 1550 1550
# iodelay : 650 650
# or using the general class and the list
d = Detector()
for dac in d.daclist:
r = d.getDAC(dac, False)
print(f'{dac.name:10s} {r}')

View File

@ -0,0 +1,45 @@
from slsdet import Detector, Eiger, dacIndex
#Using the general detector class and calling with an index
d = Detector()
fpga_temp = d.getTemperature(dacIndex.TEMPERATURE_FPGA)
print(f'fpga_temp: {fpga_temp}\n')
#Using the specialized detector class
e = Eiger()
print("All temperatures for Eiger\n")
print(e.temp)
# >>> e.temp
# temp_fpga : 54°C 60°C
# temp_fpgaext : 49°C 52°C
# temp_10ge : 47°C 45°C
# temp_dcdc : 52°C 53°C
# temp_sodl : 51°C 53°C
# temp_sodl : 51°C 51°C
# temp_fpgafl : 45°C 49°C
# temp_fpgafr : 39°C 42°C
# The temperatures can also be returned in a dictionary
t = e.temp.to_dict()
print(t)
# >>> e.temp.to_dict()
# {'fpga': array([55, 60]), 'fpgaext': array([49, 52]),
# 't10ge': array([47, 45]), 'dcdc': array([52, 53]),
# 'sodl': array([51, 53]), 'sodr': array([51, 51]), '
# temp_fpgafl': array([45, 49]),
# 'temp_fpgafr': array([39, 42])}
# or in a numpy array
t = e.temp.to_array()
print(t)
# >>> e.temp.to_array()
# array([[55, 60],
# [49, 52],
# [47, 45],
# [52, 53],
# [51, 53],
# [51, 51],
# [45, 49],
# [40, 43]])

View File

@ -0,0 +1,8 @@
from slsdet import Eiger
d = Eiger()
threshold = range(0, 2000, 200)
for th in threshold:
print(f'{th=}')
d.vthreshold = th
d.acquire()

View File

@ -0,0 +1,20 @@
# Most settings are represented as enums that can be
# explicitly imported
from slsdet import Detector, fileFormat
d = Detector()
d.fformat = fileFormat.BINARY
# Altough not recommended for convenience all enums
# and some other things can be impored using *
from slsdet import *
d.speed = speedLevel.FULL_SPEED
# To list the available enums, use dir()
import slsdet.enums
for enum in dir(slsdet.enums):
# filter out special memebers
if not enum.startswith('_'):
print(enum)

View File

@ -1,15 +1,20 @@
import os
import sys
import numpy as np
from pathlib import Path
sys.path.append(os.path.join(os.getcwd(), 'bin'))
from slsdet import Detector, Mythen3, Eiger, Jungfrau, DetectorDacs, Dac, Ctb
from slsdet import Detector, Mythen3, Eiger, Jungfrau, DetectorDacs, Dac, Ctb, Gotthard2, Moench
from slsdet import dacIndex, readoutMode
from slsdet.lookup import view, find
import slsdet
d = Detector()
# e = Eiger()
e = Eiger()
c = Ctb()
g = Gotthard2()
# j = Jungfrau()
# m = Mythen3()
m = Moench()

View File

@ -1,26 +0,0 @@
import subprocess
import locale
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
cmd = out.stdout.splitlines()
cmd.pop(0)
from slsdet import Detector, Eiger, Ctb
pycmd = dir(Detector)+dir(Eiger)+dir(Ctb)
#Add commands that we should not expect as direct commands in python
pycmd += ['vrf', 'vtr', 'vrs', 'vtgstv', 'vsvn', 'vtrim',
'vsvp', 'vth1', 'vth2', 'vth3', 'vshaper', 'vshaperneg', 'rxb_rb',
'rxb_lb', 'vref_prech', 'vref_rstore', 'vref_cds',
'vpreamp', 'vref_comp', 'vref_comp_fe vref_ds', 'vref_h_adc',
'vref_l_adc', 'iodelay', 'list', 'vref_ds', 'vis', 'vpl',
'vref_comp_fe', 'vph', 'vout_cm', 'vcp', 'vcn', 'vcmp_ll', 'vcmp_lr'
, 'vcmp_rl', 'vcmp_rr']
missing = []
for c in cmd:
if c not in pycmd:
print(c)
missing.append(c)
print(f'Missing: {len(missing)} commands')

View File

@ -0,0 +1,143 @@
import subprocess
import locale
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
cmd = out.stdout.splitlines()
cmd.pop(0)
from slsdet import Detector
pycmd = dir(Detector)
# dacs are in general not included in the python commands and we expect to
# set them from the specialized class or using an enum
dacs = [
'adcvpp',
'iodelay',
'list',
'rxb_lb',
'rxb_rb',
'v_chip',
'vb_comp',
'vb_comp_adc',
'vb_comp_fe',
'vb_cs',
'vb_ds',
'vb_opa_1st',
'vb_opa_fd',
'vb_pixbuf',
'vb_sda',
'vbp_colbuf',
'vcal',
'vcal_n',
'vcal_p',
'vipre_out',
'vcas',
'vcasc_out',
'vcasc_sfp',
'vcascn_pb',
'vcascp_pb',
'vcassh',
'vchip_comp_adc',
'vchip_comp_fe',
'vchip_cs',
'vchip_opa_1st',
'vchip_opa_fd',
'vchip_ref_comp_fe',
'vcmp_ll',
'vcmp_lr',
'vcmp_rl',
'vcmp_rr',
'vcn',
'vcom_adc1',
'vcom_adc2',
'vcom_cds',
'vcp',
'vdcsh',
'vdd_prot',
'vicin',
'vin_cm',
'vin_com',
'vipre',
'vipre_cds',
'vipre_out',
'vishaper',
'vout_cm',
'vref_cds',
'vref_comp',
'vref_comp_fe',
'vref_ds',
'vref_h_adc',
'vref_l_adc',
'vref_prech',
'vref_rstore',
'vrpreamp',
'vrshaper',
'vrshaper_n',
'vsvn',
'vsvp',
'vtgstv',
'vth1',
'vth2',
'vth3',
'vtrim',
'ib_test_c',
'ibias_sfp',
]
intentionally_missing = [
'activate', #use getActive and getRxPadDeactivatedMode syntax is not a good fit for python
'temp_10ge', #temperatures already available from enum or specialized class
'temp_adc',
'temp_dcdc',
'temp_fpga',
'temp_fpgaext',
'temp_fpgafl',
'temp_fpgafr',
'temp_slowadc',
'temp_sodl',
'temp_sodr',
'trigger', #use sendSoftwareTrigger
'update', #use updateServerAndFirmare
'udp_validate', #use validateUdpConfiguration
'udp_reconfigure', #use reconfigureUdpDestination
'pulse', # use pulseChip pulsePixel pulsePixelNmove
'pulsechip',
'pulsenmove',
'savepattern', #use savePattern()
'resetfpga', #use resetFPGA()
'rebootcontroller', #use rebootController()
'firmwaretest', #use executeFirmwareTest
'bustest', # executeBusTest
'programfpga', #programFPGA
'dac', #use setDAC or detector specific class
'clearroi', #clearROI
]
pycmd += intentionally_missing
pycmd += dacs
missing = []
for c in cmd:
if c not in pycmd:
print(c)
missing.append(c)
print(f'\nMissing: {len(missing)} commands')
print(f'Excluded: {len(dacs)} dacs')
print(f'Excluded: {len(intentionally_missing)} other commands')
not_in_cmd = []
for c in pycmd:
if c.islower() and not c.startswith('_'):
if c not in cmd:
not_in_cmd.append(c)
print(f'\nCommands in Python and NOT in command line: {len(not_in_cmd)}')
for c in not_in_cmd:
print(c)
# print(',\n'.join([f'\'{d}\'' for d in sorted(dacs)]))

View File

@ -11,6 +11,10 @@ import subprocess
from parse import remove_comments
def single_line_enum(line):
sub = line[line.find('{')+1:line.find('}')]
return sub.strip().split(',')
def extract_enums(lines):
line_iter = iter(lines)
enums = {}
@ -18,8 +22,15 @@ def extract_enums(lines):
m = re.search("(?<=enum )\w+(?= {)", line)
if m:
enum_name = m.group()
# print(enum_name)
print(enum_name)
# print(line)
fields = []
#deal with single line enums
if '};' in line:
fields = single_line_enum(line)
else:
#deal with multi line enums
while True:
l = next(line_iter)
if '};' in l:
@ -31,6 +42,7 @@ def extract_enums(lines):
except:
pass
fields = [f.strip() for f in fields]
enums[enum_name] = fields
return enums

View File

@ -47,6 +47,8 @@ lines = []
ag2 = []
cn = []
def get_arguments(node):
args = [a.type.spelling for a in node.get_arguments()]
args = [
@ -58,6 +60,23 @@ def get_arguments(node):
args = f", {args}"
return args
def get_arguments_with_default(node):
args = []
for arg in node.get_arguments():
tokens = [t.spelling for t in arg.get_tokens()]
print(tokens)
if '=' in tokens:
if arg.type.spelling == "sls::Positions": #TODO! automate
args.append("py::arg() = Positions{}")
else:
args.append('py::arg()' + ''.join(tokens[tokens.index('='):]))
else:
args.append('py::arg()')
args = ", ".join(args)
if args:
args = f", {args}"
return args
def get_fdec(node):
args = [a.type.spelling for a in node.get_arguments()]
@ -66,8 +85,12 @@ def get_fdec(node):
else:
return_type = 'void'
if node.is_const_method():
const = 'const'
else:
const = ''
args = ", ".join(args)
args = f'({return_type}(Detector::*)({args}))'
args = f'({return_type}(Detector::*)({args}){const})'
return args
@ -80,11 +103,13 @@ def visit(node):
and child.access_specifier == cindex.AccessSpecifier.PUBLIC
):
m.append(child)
args = get_arguments(child)
# args = get_arguments(child)
args = get_arguments_with_default(child)
fs = get_fdec(child)
lines.append(
f'.def("{child.spelling}",{fs} &Detector::{child.spelling}{args})'
)
cn.append(child)
for child in node.get_children():
visit(child)

View File

@ -1,5 +1,5 @@
"""
Setup file for sls_detector
Setup file for slsdet
Build upon the pybind11 example found here: https://github.com/pybind/python_example
"""
from setuptools import setup, Extension, find_packages

View File

@ -1,17 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 14 16:49:07 2017
@author: l_frojdh
"""
fw_version = 23
detector_type = 'Eiger'
known_hostnames = ['beb083', 'beb098']
image_size = (512,1024) #rows, cols
module_geometry = (1,2) #horizontal, vertical
#Remember to change these in the settings file as well!
settings_path = '/home/l_frojdh/slsDetectorPackage/settingsdir/eiger'
file_path = '/home/l_frojdh/out'

View File

@ -1,27 +0,0 @@
import pytest
from sls_detector import Detector
@pytest.fixture
def detector():
from sls_detector import Detector
return Detector()
@pytest.fixture
def eiger():
from sls_detector import Eiger
d = Eiger()
d.n_frames = 1
d.exposure_time = 1
d.file_write = False
return d
@pytest.fixture
def jungfrau():
from sls_detector import Jungfrau
return Jungfrau()
detector_type = Detector().detector_type
eigertest = pytest.mark.skipif(detector_type != 'Eiger', reason = 'Only valid for Eiger')
jungfrautest = pytest.mark.skipif(detector_type != 'Jungfrau', reason = 'Only valid for Jungfrau')

View File

@ -1,33 +0,0 @@
detsizechan 1024 512
#hostname for top+bottom+
hostname beb083+beb098+
#top
0:rx_tcpport 1954
0:lock 0
0:rx_udpport 50010
0:rx_udpport2 50011
0:rx_hostname mpc2048
0:flippeddatax 0
#bottom
1:rx_tcpport 1955
1:lock 0
1:rx_udpport 50004
1:rx_udpport2 50005
1:rx_hostname mpc2048
1:flippeddatax 1
settingsdir /home/l_frojdh/slsDetectorPackage/settingsdir/eiger
outdir /home/l_frojdh/out
vthreshold 1500
vtr 4000
dr 32
threaded 1
tengiga 0
vhighvoltage 150
iodelay 660
#gappixels 1

View File

@ -1,2 +0,0 @@
vrf 3000
vthreshold 1800

View File

@ -1,44 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Testing setting dynamic range for Eiger.
If the detector is not Eiger the tests are skipped
"""
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError
@eigertest
def test_set_dynamic_range_and_make_acq(eiger):
eiger.exposure_time = 0.5
eiger.n_frames = 2
for dr in [4, 8, 16, 32]:
eiger.dynamic_range = dr
assert eiger.dynamic_range == dr
eiger.acq()
assert eiger.frames_caught == 2
@eigertest
def test_set_dynamic_range_raises(eiger):
with pytest.raises(DetectorValueError):
eiger.dynamic_range = 1
with pytest.raises(DetectorValueError):
eiger.dynamic_range = 75
with pytest.raises(DetectorValueError):
eiger.dynamic_range = -3
with pytest.raises(DetectorValueError):
eiger.dynamic_range = 12
@eigertest
def test_set_dynamic_range_reduces_speed(eiger):
eiger.readout_clock = 'Full Speed'
eiger.dynamic_range = 32
assert eiger.dynamic_range == 32
assert eiger.readout_clock == 'Quarter Speed'
eiger.dynamic_range = 16
assert eiger.dynamic_range == 16
assert eiger.readout_clock == 'Half Speed'

View File

@ -1,119 +0,0 @@
import pytest
import config_test
import time
from sls_detector.errors import DetectorValueError
from fixtures import eiger, eigertest
@eigertest
def test_set_matrix_reset(eiger):
eiger.eiger_matrix_reset = False
assert eiger.eiger_matrix_reset == False
eiger.eiger_matrix_reset = True
assert eiger.eiger_matrix_reset == True
@eigertest
def test_set_tx_delay_left_single(eiger):
eiger.tx_delay.left[0] = 130
assert eiger.tx_delay.left[0] == 130
eiger.tx_delay.left[1] = 150
assert eiger.tx_delay.left[1] == 150
eiger.tx_delay.left[0] = 0
eiger.tx_delay.left[1] = 0
assert eiger.tx_delay.left[0] == 0
assert eiger.tx_delay.left[1] == 0
@eigertest
def test_set_tx_delay_right_single(eiger):
eiger.tx_delay.right[0] = 130
assert eiger.tx_delay.right[0] == 130
eiger.tx_delay.right[1] = 150
assert eiger.tx_delay.right[1] == 150
eiger.tx_delay.right[0] = 0
eiger.tx_delay.right[1] = 0
assert eiger.tx_delay.right[0] == 0
assert eiger.tx_delay.right[1] == 0
@eigertest
def test_set_tx_delay_frame_single(eiger):
eiger.tx_delay.frame[0] = 500
eiger.tx_delay.frame[1] = 600
assert eiger.tx_delay.frame[0] == 500
assert eiger.tx_delay.frame[1] == 600
eiger.tx_delay.frame[0] = 0
eiger.tx_delay.frame[1] = 0
assert eiger.tx_delay.frame[0] == 0
assert eiger.tx_delay.frame[1] == 0
@eigertest
def test_tx_delay_from_list(eiger):
eiger.tx_delay.left = [123,456]
assert eiger.tx_delay.left[:] == [123,456]
eiger.tx_delay.right = [789,100]
assert eiger.tx_delay.right[:] == [789,100]
eiger.tx_delay.frame = [1000,90000]
assert eiger.tx_delay.frame[:] == [1000,90000]
eiger.tx_delay.left = [0, 0]
eiger.tx_delay.right = [0, 0]
eiger.tx_delay.frame = [0, 0]
assert eiger.tx_delay.left[:] == [0, 0]
assert eiger.tx_delay.right[:] == [0, 0]
assert eiger.tx_delay.frame[:] == [0, 0]
@eigertest
def test_acitve(eiger):
eiger.file_write = False
eiger.reset_frames_caught()
eiger.active[1] = False
eiger.acq()
assert eiger._api.getFramesCaughtByReceiver(1) == 0
assert eiger._api.getFramesCaughtByReceiver(0) == 1
eiger.active = True
time.sleep(0.5)
eiger.acq()
assert eiger.frames_caught == 1
@eigertest
def test_set_default_settings(eiger):
eiger.default_settings()
assert eiger.n_frames == 1
assert eiger.exposure_time == 1
assert eiger.period == 0
assert eiger.n_cycles == 1
assert eiger.dynamic_range == 16
@eigertest
def test_flowcontrol10g(eiger):
eiger.flowcontrol_10g = True
assert eiger.flowcontrol_10g == True
eiger.flowcontrol_10g = False
assert eiger.flowcontrol_10g == False
@eigertest
def test_read_vcmp(eiger):
eiger.vthreshold = 1500
assert eiger.vcmp[:] == [1500]*4*eiger.n_modules
@eigertest
def test_set_vcmp(eiger):
eiger.vcmp = [1000,1100,1200,1300,1400,1500,1600,1700]
assert eiger.vcmp[:] == [1000,1100,1200,1300,1400,1500,1600,1700]
eiger.vthreshold = 1500
#Disabled only works with receiver on the same pc
# @eigertest
# def test_setup500k():
# from sls_detector import Eiger, free_shared_memory
# free_shared_memory()
# d = Eiger()
# d.setup500k(config_test.known_hostnames)
# d.acq()
# assert d.rx_tcpport == [1954,1955]
# assert d.frames_caught == 1
# #could assert more setting but if the frame is caught it worked...

View File

@ -1,129 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests specific for the firmware.
Check that register values are correct after starting an exposure
0x4 exposure time
0x5 period
0x6 sub exposure time
"""
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError
from sls_detector.utils import eiger_register_to_time
# testdata_exptimes = [0.001, 0.002, 0.0236]
@eigertest
def test_short_exposure_time(eiger):
t = 1.23
eiger.exposure_time = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
#Register 0x4 holds exposure time
reg = eiger.register[0x4]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
@eigertest
def test_short_minimal_exposure_time(eiger):
t = 1e-8
eiger.exposure_time = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
#Register 0x4 holds exposure time
reg = eiger.register[0x4]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
@eigertest
def test_long_exposure_time(eiger):
t = 623
eiger.exposure_time = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x4 holds exposure time
reg = eiger.register[0x4]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
@eigertest
def test_short_period(eiger):
t = 0.1
eiger.exposure_time = 0.001
eiger.period = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x5 holds period
reg = eiger.register[0x5]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
@eigertest
def test_long_period(eiger):
t = 8900
eiger.exposure_time = 0.001
eiger.period = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x5 holds period
reg = eiger.register[0x5]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
@eigertest
def test_zero_period_with_acq(eiger):
t = 0
eiger.exposure_time = 0.001
eiger.period = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x5 holds period
reg = eiger.register[0x5]
assert pytest.approx(t, 1e-9) == eiger_register_to_time(reg)
testdata_times = [0.001, 0.002, 0.0236]
@eigertest
@pytest.mark.parametrize("t", testdata_times)
def test_subexptime(eiger,t):
eiger.sub_exposure_time = t
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x6 holds sub exposure time
# time is stored straight as n clocks
reg = eiger.register[0x6]
assert pytest.approx(t, 1e-9) == reg/100e6
@eigertest
@pytest.mark.parametrize("t", testdata_times)
def test_subdeadtime(eiger, t):
eiger.sub_deadtime = t
eiger.sub_exposure_time = 1
eiger.sub_exposure_time = 0.001
eiger.file_write = False
eiger.start_detector()
eiger.stop_detector()
# Register 0x7 holds sub period
# time is stored straight as n clocks
# exptime+deadtime
reg = eiger.register[0x7]
assert pytest.approx(t, 1e-7) == (reg/100e6-0.001)

View File

@ -1,187 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
General tests for the Detector class. Should not depend on the connected detector. Aim is to have tests working
for both Jungfrau and Eiger.
NOTE! Uses hostnames from config_test
"""
import pytest
import config_test
from fixtures import detector
from sls_detector.errors import DetectorValueError, DetectorError
def test_error_handling(detector):
with pytest.raises(DetectorError):
detector._provoke_error()
def test_not_busy(detector):
"""Test that the detector is not busy from the start"""
assert detector.busy == False
def test_reset_frames_caught(detector):
detector.file_write = False
detector.acq()
assert detector.frames_caught == 1
detector.reset_frames_caught()
assert detector.frames_caught == 0
def test_set_busy_true_then_false(detector):
"""Test both cases of assignment"""
detector.busy = True
assert detector.busy == True
detector.busy = False
assert detector.busy == False
def test_set_readout_speed(detector):
for s in ['Full Speed', 'Half Speed', 'Quarter Speed', 'Super Slow Speed']:
detector.readout_clock = s
assert detector.readout_clock == s
def test_wrong_speed_raises_error(detector):
with pytest.raises(KeyError):
detector.readout_clock = 'Something strange'
def test_readout_clock_remains(detector):
s = detector.readout_clock
try:
detector.readout_clock = 'This does not exists'
except KeyError:
pass
assert detector.readout_clock == s
def test_len_method(detector):
"""to test this we need to know the length, this we get from the configuration of hostnames"""
assert len(detector) == len(config_test.known_hostnames)
def test_setting_n_cycles_to_zero_gives_error(detector):
with pytest.raises(DetectorValueError):
detector.n_cycles = 0
def test_setting_n_cycles_to_negative_gives_error(detector):
with pytest.raises(DetectorValueError):
detector.n_cycles = -50
def test_set_cycles_frome_one_to_ten(detector):
for i in range(1,11):
detector.n_cycles = i
assert detector.n_cycles == i
detector.n_cycles = 1
assert detector.n_cycles == 1
def test_get_detector_type(detector):
assert detector.detector_type == config_test.detector_type
def test_set_file_index(detector):
detector.file_index = 5
assert detector.file_index == 5
def test_negative_file_index_raises(detector):
with pytest.raises(ValueError):
detector.file_index = -8
def test_setting_file_name(detector):
fname = 'hej'
detector.file_name = fname
assert detector.file_name == fname
def test_set_file_write(detector):
detector.file_write = True
assert detector.file_write == True
detector.file_write = False
assert detector.file_write == False
def test_set_high_voltage(detector):
detector.high_voltage = 55
assert detector.high_voltage == 55
def test_negative_voltage_raises(detector):
with pytest.raises(DetectorValueError):
detector.high_voltage = -5
def test_high_voltage_raises_on_to_high(detector):
with pytest.raises(DetectorValueError):
detector.high_voltage = 500
def test_get_image_size(detector):
"""Compares with the size in the config file"""
assert detector.image_size.rows == config_test.image_size[0]
assert detector.image_size.cols == config_test.image_size[1]
def test_get_module_geometry(detector):
"""Compares with the size in the config file"""
assert detector.module_geometry.horizontal == config_test.module_geometry[0]
assert detector.module_geometry.vertical == config_test.module_geometry[1]
def test_set_nframes(detector):
detector.n_frames = 5
assert detector.n_frames == 5
detector.n_frames = 1
assert detector.n_frames == 1
def test_set_n_measurements(detector):
detector.n_measurements = 7
assert detector.n_measurements == 7
detector.n_measurements = 1
assert detector.n_measurements == 1
def test_negative_nframes_raises(detector):
with pytest.raises(DetectorValueError):
detector.n_frames = -2
def test_nmodules(detector):
"""Assume that the number of modules should be the same as the number of hostnames"""
assert detector.n_modules == len(config_test.known_hostnames)
def test_is_detector_online(detector):
assert detector.online == True
def test_set_online(detector):
detector.online = False
assert detector.online == False
detector.online = True
assert detector.online == True
def test_receiver_is_online(detector):
assert detector.receiver_online == True
def test_set_receiver_online(detector):
detector.receiver_online = False
assert detector.receiver_online == False
detector.receiver_online = True
assert detector.receiver_online == True
def test_set_receiver_online_raises_on_non_bool(detector):
with pytest.raises(TypeError):
detector.receiver_online = 'probably not this'
def test_set_period(detector):
detector.period = 5.123
assert detector.period == 5.123
detector.period = 0
assert detector.period == 0
def test_set_timing_mode(detector):
detector.timing_mode = 'trigger'
assert detector.timing_mode == 'trigger'
detector.timing_mode = 'auto'
assert detector.timing_mode == 'auto'

View File

@ -1,38 +0,0 @@
import pytest
import config_test
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
from sls_detector.detector import element_if_equal
from sls_detector.errors import DetectorValueError
from fixtures import eiger, eigertest
@eigertest
def test_load_config_file_eiger(eiger):
"""Load a settings file and assert all settings"""
eiger.load_config(os.path.join(dir_path, 'test.config'))
assert eiger.rx_tcpport == [1954, 1955]
assert eiger.lock == False
assert eiger.rx_udpport == [50010, 50011, 50004, 50005]
assert eiger.rx_hostname == 'mpc2048'
assert eiger.flipped_data_x[:] == [False, True]
assert eiger.settings_path == config_test.settings_path
assert eiger.file_path == config_test.file_path
assert eiger.vthreshold == 1500
assert element_if_equal(eiger.dacs.vtr[:]) == 4000
assert eiger.dynamic_range == 32
assert eiger.tengiga == False
assert eiger.high_voltage == 150
assert element_if_equal(eiger.dacs.iodelay[:]) == 660
@eigertest
def test_load_parameters_file_eiger(eiger):
"""Load a parametes file and assert the settings in the file"""
eiger.load_parameters(os.path.join(dir_path, 'test.par'))
assert element_if_equal(eiger.dacs.vrf[:]) == 3000
assert eiger.vthreshold == 1800

View File

@ -1,81 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for network related functions of the detector
"""
import pytest
import config_test
from fixtures import eiger, eigertest, detector
# def test_last_client(detector):
# import socket
# # We probably should check for multiple ip's
# myip = socket.gethostbyname_ex(socket.gethostname())[-1][0]
# assert detector.last_client_ip == myip
def test_get_hostname(detector):
for detector_host, config_host in zip(detector.hostname, config_test.known_hostnames):
assert detector_host == config_host
def test_hostname_has_same_length_as_n_modules(detector):
assert len(detector.hostname) == detector.n_modules
# # def test_get_receiver_hostname(detector):
# # """Assume that the receiver are on the local computer"""
# # import socket
# # host = socket.gethostname().split('.')[0]
# # assert detector.rx_hostname == host
# def test_set_receiver_hostname(detector):
# import socket
# host = socket.gethostname().split('.')[0]
# phony_host = 'madeup'
# detector.rx_hostname = phony_host
# assert detector.rx_hostname == phony_host
# detector.rx_hostname = host
# assert detector.rx_hostname == host
@eigertest
def test_set_rx_zmqport_single_value(eiger):
eiger.rx_zmqport = 35000
assert eiger.rx_zmqport == [35000, 35001, 35002, 35003]
@eigertest
def test_set_rx_zmqport_list(eiger):
eiger.rx_zmqport = [37000, 38000]
assert eiger.rx_zmqport == [37000, 37001, 38000, 38001]
@eigertest
def test_set_rx_updport(eiger):
ports = [60010,60011,60012,60013]
eiger.rx_udpport = ports
assert eiger.rx_udpport == ports
eiger.acq()
assert eiger.frames_caught == 1
@eigertest
def test_rx_tcpport(eiger):
ports = eiger.rx_tcpport
eiger.rx_tcpport = [2000,2001]
assert eiger.rx_tcpport == [2000,2001]
eiger.rx_tcpport = ports
assert eiger.rx_tcpport == ports
eiger.acq()
assert eiger.frames_caught == 1
# @eigertest
# @pytest.mark.new
# def test_enable_disable_tengiga(eiger):
# """
# This test does not check for dat on the 10Gbit link, only the set and get functions
# """
# eiger.tengiga = True
# assert eiger.tengiga == True
# eiger.tengiga = False
# assert eiger.tengiga == False
#TODO! Add test for Jungfrau

View File

@ -1,54 +0,0 @@
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError
@eigertest
@pytest.mark.local
def test_set_path(eiger, tmpdir):
import os
path = os.path.join(tmpdir.dirname, tmpdir.basename)
eiger.file_path = path
assert eiger.file_path == path
@eigertest
@pytest.mark.local
def test_set_path_and_write_files(eiger, tmpdir):
import os
prefix = 'testprefix'
path = os.path.join(tmpdir.dirname, tmpdir.basename)
eiger.file_path = path
eiger.file_write = True
eiger.exposure_time = 0.1
eiger.n_frames = 1
eiger.timing_mode = 'auto'
eiger.file_name = prefix
eiger.file_index = 0
eiger.acq()
files = [f.basename for f in tmpdir.listdir()]
assert len(files) == 5
assert (prefix+'_d0_0.raw' in files) == True
assert (prefix+'_d1_0.raw' in files) == True
assert (prefix+'_d2_0.raw' in files) == True
assert (prefix+'_d3_0.raw' in files) == True
def test_set_discard_policy(detector):
detector.frame_discard_policy = 'nodiscard'
assert detector.frame_discard_policy == 'nodiscard'
detector.frame_discard_policy = 'discardpartial'
assert detector.frame_discard_policy == 'discardpartial'
detector.frame_discard_policy = 'discardempty'
assert detector.frame_discard_policy == 'discardempty'
def test_set_discard_policy_raises(detector):
with pytest.raises(ValueError):
detector.frame_discard_policy = 'adjfvadksvsj'
def test_set_frames_perfile(detector):
detector.frames_per_file = 5000
assert detector.frames_per_file == 5000

View File

@ -1,47 +0,0 @@
import pytest
import config_test
import time
from sls_detector.errors import DetectorValueError
import os
from fixtures import eiger, eigertest
testdata_th = [0,333,500,1750,2000]
@eigertest
@pytest.mark.parametrize("th", testdata_th)
def test_set_vthreshold(eiger, th):
eiger.vthreshold = th
assert eiger.vthreshold == th
@eigertest
def test_vthreshold_with_different_vcmp(eiger):
#When vcmp is different for the chip vthreshold should return -1
eiger.vthreshold = 1500
eiger.dacs.vcmp_ll = 1400
assert eiger.vthreshold == -1
@eigertest
def test_set_settingsdir(eiger):
path = os.path.dirname( os.path.realpath(__file__) )
path = os.path.join(path, 'settingsdir')
eiger.settings_path = path
assert eiger.settings_path == path
@eigertest
def test_set_trimmed_energies(eiger):
en = [5000,6000,7000]
eiger.trimmed_energies = en
assert eiger.trimmed_energies == en
#TODO! add checks for vcmp as well and improve naming
#TODO! remove dependency on beb number
testdata_en = [(5000, 500),(5500,750),(6000,1000),(6200,1100),(7000,1500)]
@eigertest
@pytest.mark.parametrize('val', testdata_en)
def test_set_energy_threshold(eiger, val):
eiger.settings = 'standard'
eiger.threshold = val[0]
assert eiger.threshold == val[0]
assert eiger.dacs.vrf[0] == val[1]

View File

@ -1,136 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests regarding exposure time and period of the detector
Set and get test as well as test for duration and on detector
measurement of the time.
"""
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError, DetectorError
import time
testdata_times = [1e-8, 0.001, 0.5, 3.125, 5.0, 600, 784]
@pytest.mark.parametrize("t", testdata_times)
def test_set_and_get_exposure_time(eiger, t):
"""
Test that the exposure time we set in the detector
is the same as the one read back
"""
eiger.exposure_time = t
assert eiger.exposure_time == t
def test_negative_exposure_time_raises_error(eiger):
with pytest.raises(DetectorValueError):
eiger.exposure_time = -15
testdata_times = [0.001, 0.0025, 0.005, 5]
@pytest.mark.parametrize("t", testdata_times)
def test_set_subexptime(eiger, t):
eiger.sub_exposure_time = t
assert eiger.sub_exposure_time == t
testdata_times = [-5,6,7,50]
@pytest.mark.parametrize("t", testdata_times)
def test_set_subextime_too_large_or_neg(eiger, t):
with pytest.raises((DetectorError, DetectorValueError)):
eiger.sub_exposure_time = t
testdata_times = [0.2, 0.5, 1, 2, 5, 7]
@pytest.mark.slow
@pytest.mark.parametrize("t", testdata_times)
def test_measure_exposure_time_from_python(eiger, t):
"""
The main idea with this test is to make sure the overhead of a
single acq is less than tol[s]. This test also catches stupid bugs
that would for example not change the exposure time or make acquire
not blocking.
"""
tol = 0.5
eiger.dynamic_range = 16
eiger.file_write = False
eiger.n_frames = 1
eiger.exposure_time = t
assert eiger.exposure_time == t
t0 = time.time()
eiger.acq()
duration = time.time()-t0
assert duration < (t+tol)
testdata_times = [0.5, 1, 3, 5]
@pytest.mark.slow
@pytest.mark.parametrize("t", testdata_times)
def test_measure_period_from_python_and_detector(eiger, t):
tol = 0.5
nframes = 5
eiger.dynamic_range = 16
eiger.file_write = False
eiger.n_frames = nframes
eiger.exposure_time = 0.001
eiger.period = t
t0 = time.time()
eiger.acq()
duration = time.time()-t0
assert duration < t*(nframes-1)+tol
for mp in eiger.measured_period:
assert pytest.approx(mp, 1e-5) == t
testdata_times = [0.001, 0.002, 0.003, 0.005, 0.01]
@pytest.mark.parametrize("t", testdata_times)
def test_measure_subperiod_nonparallel(eiger, t):
readout_time = 500e-6
eiger.dynamic_range = 32
eiger.file_write = False
eiger.flags = 'nonparallel'
eiger.n_frames = 1
eiger.period = 0
eiger.exposure_time = 0.5
eiger.sub_exposure_time = t
eiger.sub_deadtime = 0
eiger.acq()
for mp in eiger.measured_subperiod:
assert pytest.approx(mp, abs=1e-5) == t+readout_time
@pytest.mark.parametrize("t", testdata_times)
def test_measure_subperiod_parallel(eiger, t):
readout_time = 12e-6
eiger.dynamic_range = 32
eiger.file_write = False
eiger.flags = 'parallel'
eiger.n_frames = 1
eiger.period = 0
eiger.exposure_time = 0.5
eiger.sub_exposure_time = t
eiger.sub_deadtime = 0
eiger.acq()
for mp in eiger.measured_subperiod:
assert pytest.approx(mp, abs=1e-5) == t+readout_time
@pytest.mark.parametrize("t", testdata_times)
def test_measure_subperiod_parallel_when_changing_deadtime(eiger, t):
readout_time = 12e-6
exposure_time = 0.001
eiger.dynamic_range = 32
eiger.file_write = False
eiger.flags = 'parallel'
eiger.n_frames = 1
eiger.period = 0
eiger.exposure_time = 0.5
eiger.sub_exposure_time = exposure_time
eiger.sub_deadtime = t
eiger.acq()
for mp in eiger.measured_subperiod:
assert pytest.approx(mp, abs=1e-5) == t+exposure_time

View File

@ -1,34 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for trimbit and dac related functions
"""
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError
@eigertest
def test_set_trimbits(eiger):
"""Limited values due to time"""
for i in [17, 32, 60]:
print(i)
eiger.trimbits = i
assert eiger.trimbits == i
@eigertest
def test_set_trimbits_raises_on_too_big(eiger):
with pytest.raises(DetectorValueError):
eiger.trimbits = 75
@eigertest
def test_set_trimbits_raises_on_negative(eiger):
with pytest.raises(DetectorValueError):
eiger.trimbits = -5
# @jungfrautest
# def test_jungfrau(jungfrau):
# """Example of a test that is not run with Eiger connected"""
# pass

View File

@ -1,16 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for hostname related functions of the detector
"""
import pytest
import config_test
from fixtures import detector, eiger, jungfrau, eigertest, jungfrautest
from sls_detector.errors import DetectorValueError
def test_firmware_version(detector):
assert detector.firmware_version == config_test.fw_version

View File

@ -1,42 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 22 14:13:48 2018
@author: l_frojdh
"""
import os
from sls_detector_tools.io import write_trimbit_file
from sls_detector_tools import mask
energy = [5000, 6000, 7000]
vrf = [500, 1000, 1500]
for i,e in enumerate(energy):
dacs = np.array( [[ 0., 0.], #vsvp
[4000., 4000.], #vtr
[vrf[i], vrf[i]], #vrf
[1400., 1400.], #vrs
[4000., 4000.], #vsvn
[2556., 2556.], #vtgstv
[1400., 1400.], #vcmp_ll
[1500., 1500.], #vcmp_lr
[4000., 4000.], #vcall
[1500., 1500.], #vcmp_rl
[1100., 1100.], #rxb_rb
[1100., 1100.], #rxb_lb
[1500., 1500.], #vcmp_rr
[1500., 1500.], #vcp
[2000., 2000.], #vcn
[1550., 1550.], #vis
[ 660., 660.], #iodelay
[ 0., 0.], #tau
])
tb = np.zeros((256,1024))
for beb in [83,98]:
write_trimbit_file(f'settingsdir/standard/{e}eV/noise.sn{beb:03d}', tb, dacs[:,0])
#print(os.getcwd())
#print( os.path.realpath(__file__))

View File

@ -1,17 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 14 16:49:07 2017
@author: l_frojdh
"""
fw_version = 0x180220
detector_type = 'Jungfrau'
known_hostnames = ['bchip038']
image_size = (512,1024) #rows, cols
module_geometry = (1,1) #horizontal, vertical
#Remember to change these in the settings file as well!
settings_path = '/home/l_lopez/projects/slsDetectorPackage/settingsdir/jungfrau'
file_path = '/home/l_lopez/out'

View File

@ -1,23 +0,0 @@
import pytest
from sls_detector import Detector
@pytest.fixture
def detector():
from sls_detector import Detector
return Detector()
@pytest.fixture
def eiger():
from sls_detector import Eiger
return Eiger()
@pytest.fixture
def jungfrau():
from sls_detector import Jungfrau
return Jungfrau()
detector_type = Detector().detector_type
eigertest = pytest.mark.skipif(detector_type != 'Eiger', reason = 'Only valid for Eiger')
jungfrautest = pytest.mark.skipif(detector_type != 'Jungfrau', reason = 'Only valid for Jungfrau')

View File

@ -1,17 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
General tests for the Jungfrau detector.
NOTE! Uses hostnames from config_test
"""
import pytest
import config_test
import tests
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
pytest.main(['-x', '-s', os.path.join(dir_path, 'tests/test_load_config.py')]) #Test 1
pytest.main(['-x', '-s', os.path.join(dir_path, 'tests/test_overtemperature.py')]) #Test 2

View File

@ -1,21 +0,0 @@
detsizechan 1024 512
settingsdir /home/l_lopez/projects/slsDetectorPackage/settingsdir/jungfrau
caldir /home/l_lopez/projects/slsDetectorPackage/settingsdir/jungfrau
lock 0
hostname bchip094+
rx_udpport 1754
rx_udpip 10.1.1.107
rx_udpmac 90:E2:BA:9A:4F:D4
detectorip 10.1.1.9
detectormac 00:aa:bb:cc:dd:ee
configuremac 0
powerchip 1
timing auto
outdir /home/l_lopez/out
threaded 1
high

View File

@ -1 +0,0 @@
vhighvoltage 200

View File

@ -1,43 +0,0 @@
import pytest
import config_test
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
from fixtures import jungfrau, jungfrautest
def load_config_file_jungfrau_test(jungfrau):
"""Load a settings file and assert all settings"""
print('\tStarting load_config_file_jungfrau_test test case')
jungfrau.free_shared_memory
jungfrau.load_config(os.path.join(dir_path, 'test.config'))
assert jungfrau.lock == False
assert jungfrau.rx_udpport == ['1754']
assert jungfrau.hostname == ['bchip094']
assert jungfrau.firmware_version == config_test.fw_version
print('\tFinished load_config_file_jungfrau_test test case')
def load_parameters_file_jungfrau_test(jungfrau):
"""Load a parametes file and assert the settings in the file"""
print('\tStarting load_parameters_file_jungfrau_test test case')
jungfrau.load_parameters(os.path.join(dir_path, 'test.par'))
assert jungfrau.high_voltage == 200
print('\tFinished load_parameters_file_jungfrau_test test case')
@jungfrautest
def test_main(jungfrau):
print('\nTesting configuration file loading')
load_config_file_jungfrau_test(jungfrau)
load_parameters_file_jungfrau_test(jungfrau)
print('Tested configuration file loading')

View File

@ -1,68 +0,0 @@
import pytest
import config_test
import time
from fixtures import jungfrau, jungfrautest
def powerchip_test(jungfrau, control):
"""
Test the main overtemperature protection control
"""
#Set test initial conditions
print('\tStarting powerchip_test test case')
jungfrau.power_chip = False
jungfrau.temperature_control = control
assert jungfrau.power_chip == False
jungfrau.temperature_threshold = 35
jungfrau.power_chip = True
if jungfrau.temperature_control is True:
if jungfrau.temperature_event is True:
assert jungfrau.power_chip == False
jungfrau.power_chip = True
assert jungfrau.power_chip == False
jungfrau.temperature_control = False
assert jungfrau.power_chip == True
jungfrau.temperature_control = True
jungfrau.temperature_threshold = 50
assert jungfrau.power_chip == False
print('\t\tWaiting to cool down the board. This may take a while...')
while jungfrau.temperature_threshold < jungfrau.temp.fpga[0]:
time.sleep(5)
print('\t\tJungfrau MCB temperature: {0:.2f} °C'.format(jungfrau.temp.fpga[0]))
#Leave enough time to let the board cool down a bit more
time.sleep(30)
jungfrau.reset_temperature_event()
assert jungfrau.temperature_event == False
assert jungfrau.power_chip == True
else:
assert jungfrau.power_chip == True
else:
print('\t\tWaiting to warm up the board. This may take a while...')
while jungfrau.temperature_threshold > jungfrau.temp.fpga[0]:
time.sleep(5)
print('\t\tJungfrau MCB temperature: {0:.2f} °C'.format(jungfrau.temp.fpga[0]))
assert jungfrau.temperature_event == False
assert jungfrau.power_chip == True
print('\tFinished powerchip_test test case')
#@jungfrautest
def test_main(jungfrau):
print('\nTesting overtemperature protection control')
powerchip_test(jungfrau, False)
powerchip_test(jungfrau, True)
print('Tested overtemperature protection control')

View File

@ -5,19 +5,16 @@ from .dacs import DetectorDacs, Dac
from .detector import Detector
from .jungfrau import Jungfrau
from .mythen3 import Mythen3
# from .jungfrau_ctb import JungfrauCTB
# from _slsdet import DetectorApi
from .gotthard2 import Gotthard2
from .gotthard import Gotthard
from .moench import Moench
import _slsdet
xy = _slsdet.xy
defs = _slsdet.slsDetectorDefs
runStatus = _slsdet.slsDetectorDefs.runStatus
speedLevel = _slsdet.slsDetectorDefs.speedLevel
timingMode = _slsdet.slsDetectorDefs.timingMode
dacIndex = _slsdet.slsDetectorDefs.dacIndex
detectorType = _slsdet.slsDetectorDefs.detectorType
detectorSettings = _slsdet.slsDetectorDefs.detectorSettings
readoutMode = _slsdet.slsDetectorDefs.readoutMode
from .enums import *
IpAddr = _slsdet.IpAddr
MacAddr = _slsdet.MacAddr

View File

@ -1,23 +1,33 @@
from functools import partial
class Adc:
def __init__(self, name, detector):
def __init__(self, name, enum, detector):
self.name = name
self.enum = enum
self._detector = detector
self.get_nmod = self._detector._api.getNumberOfDetectors
self.get_nmod = self._detector.size
# Bind functions to get and set the dac
self.get = partial(self._detector._api.getAdc, self.name)
self.get = partial(self._detector.getAdc, self.enum)
def __getitem__(self, key):
"""
Get dacs either by slice, key or list
"""
if key == slice(None, None, None):
return [self.get(i) / 1000 for i in range(self.get_nmod())]
return self.get()
elif isinstance(key, Iterable):
return [self.get(k) / 1000 for k in key]
return self.get(list(key))
else:
return self.get(key) / 1000
return self.get([key])[0] #No list for single value
# def __getitem__(self, key):
# """
# Get dacs either by slice, key or list
# """
# if key == slice(None, None, None):
# return [self.get(i) / 1000 for i in range(self.get_nmod())]
# elif isinstance(key, Iterable):
# return [self.get(k) / 1000 for k in key]
# else:
# return self.get(key) / 1000
def __repr__(self):
"""String representation for a single adc in all modules"""

View File

@ -32,10 +32,9 @@ class Dac(DetectorProperty):
def __repr__(self):
"""String representation for a single dac in all modules"""
dacstr = ''.join([f'{item:5d}' for item in self.get()])
return f'{self.__name__:10s}:{dacstr}'
return f'{self.__name__:15s}:{dacstr}'
# a = Dac('vrf', dacIndex.VRF, 0, 4000, 2500, d )
# @freeze
class DetectorDacs:
_dacs = []
_dacnames = [_d[0] for _d in _dacs]
@ -93,6 +92,9 @@ class DetectorDacs:
dac_array[i,:] = _d[:]
return dac_array
def to_array(self):
return self.get_asarray()
def set_from_array(self, dac_array):
"""
Set the dacs from an numpy array with dac values. [ndacs, nmodules]
@ -101,6 +103,9 @@ class DetectorDacs:
for i, _d in enumerate(self):
_d[:] = dac_array[i]
def from_array(self, dac_array):
self.set_from_array(dac_array)
def set_default(self):
"""
Set all dacs to their default values

File diff suppressed because it is too large Load Diff

View File

@ -6,22 +6,17 @@ Created on Wed Dec 6 11:51:18 2017
@author: l_frojdh
"""
from .detector import Detector
# from .adcs import Adc, DetectorAdcs
from .temperature import Temperature, DetectorTemperature
from .dacs import DetectorDacs
import _slsdet
dacIndex = _slsdet.slsDetectorDefs.dacIndex
from .detector_property import DetectorProperty
# from .utils import element_if_equal
# from sls_detector.errors import DetectorValueError, DetectorError
class EigerVcmp:
"""
Convenience class to be able to loop over vcmp for Eiger
.. todo::
Support single assignment and perhaps unify with Dac class
@ -60,77 +55,25 @@ class EigerDacs(DetectorDacs):
"""
Eiger specific dacs
"""
_dacs = [('vsvp', dacIndex.SVP,0, 4000, 0),
('vtr', dacIndex.VTR,0, 4000, 2500),
('vrf', dacIndex.VRF,0, 4000, 3300),
('vrs', dacIndex.VRS,0, 4000, 1400),
('vsvn', dacIndex.SVN,0, 4000, 4000),
_dacs = [('vsvp', dacIndex.VSVP,0, 4000, 0),
('vtrim', dacIndex.VTRIM,0, 4000, 2500),
('vrpreamp', dacIndex.VRPREAMP,0, 4000, 3300),
('vrshaper', dacIndex.VRSHAPER,0, 4000, 1400),
('vsvn', dacIndex.VSVN,0, 4000, 4000),
('vtgstv', dacIndex.VTGSTV,0, 4000, 2556),
('vcmp_ll', dacIndex.VCMP_LL,0, 4000, 1500),
('vcmp_lr', dacIndex.VCMP_LR,0, 4000, 1500),
('vcall', dacIndex.CAL,0, 4000, 4000),
('vcal', dacIndex.VCAL,0, 4000, 4000),
('vcmp_rl', dacIndex.VCMP_RL,0, 4000, 1500),
('rxb_rb', dacIndex.RXB_RB,0, 4000, 1100),
('rxb_lb', dacIndex.RXB_LB,0, 4000, 1100),
('vcmp_rr', dacIndex.VCMP_RR,0, 4000, 1500),
('vcp', dacIndex.VCP,0, 4000, 200),
('vcn', dacIndex.VCN,0, 4000, 2000),
('vis', dacIndex.VIS,0, 4000, 1550),
('vishaper', dacIndex.VISHAPER,0, 4000, 1550),
('iodelay', dacIndex.IO_DELAY,0, 4000, 660)]
_dacnames = [_d[0] for _d in _dacs]
# # noinspection PyProtectedMember
# class DetectorDelays:
# _delaynames = ['frame', 'left', 'right']
# def __init__(self, detector):
# # We need to at least initially know which detector we are connected to
# self._detector = detector
# setattr(self, '_frame', DetectorProperty(detector._api.getDelayFrame,
# detector._api.setDelayFrame,
# detector._api.getNumberOfDetectors,
# 'frame'))
# setattr(self, '_left', DetectorProperty(detector._api.getDelayLeft,
# detector._api.setDelayLeft,
# detector._api.getNumberOfDetectors,
# 'left'))
# setattr(self, '_right', DetectorProperty(detector._api.getDelayRight,
# detector._api.setDelayRight,
# detector._api.getNumberOfDetectors,
# 'right'))
# # Index to support iteration
# self._current = 0
# def __getattr__(self, name):
# return self.__getattribute__('_' + name)
# def __setattr__(self, name, value):
# if name in self._delaynames:
# return self.__getattribute__('_' + name).__setitem__(slice(None, None, None), value)
# else:
# super().__setattr__(name, value)
# def __next__(self):
# if self._current >= len(self._delaynames):
# self._current = 0
# raise StopIteration
# else:
# self._current += 1
# return self.__getattr__(self._delaynames[self._current-1])
# def __iter__(self):
# return self
# def __repr__(self):
# hn = self._detector.hostname
# r_str = ['Transmission delay [ns]\n'
# '{:11s}{:>8s}{:>8s}{:>8s}'.format('', 'left', 'right', 'frame')]
# for i in range(self._detector.n_modules):
# r_str.append('{:2d}:{:8s}{:>8d}{:>8d}{:>8d}'.format(i, hn[i], self.left[i], self.right[i], self.frame[i]))
# return '\n'.join(r_str)
from .detector import freeze
@ -152,76 +95,18 @@ class Eiger(Detector):
self._dacs = EigerDacs(self)
self._vcmp = EigerVcmp(self)
# self._active = DetectorProperty(self.getActive,
# self.setActive,
# self.size,
# 'active')
# Eiger specific adcs
self._temp = DetectorTemperature()
self._temp.fpga = Temperature('temp_fpga', dacIndex.TEMPERATURE_FPGA, self)
self._temp.fpgaext = Temperature('temp_fpgaext', dacIndex.TEMPERATURE_FPGAEXT, self)
self._temp.t10ge = Temperature('temp_10ge', dacIndex.TEMPERATURE_10GE, self)
self._temp.dcdc = Temperature('temp_dcdc', dacIndex.TEMPERATURE_DCDC, self)
self._temp.sodl = Temperature('temp_sodl', dacIndex.TEMPERATURE_SODL, self)
self._temp.sodr = Temperature('temp_sodl', dacIndex.TEMPERATURE_SODR, self)
self._temp.temp_fpgafl = Temperature('temp_fpgafl', dacIndex.TEMPERATURE_FPGA2, self)
self._temp.temp_fpgafr = Temperature('temp_fpgafr', dacIndex.TEMPERATURE_FPGA3, self)
# self._trimbit_limits = namedtuple('trimbit_limits', ['min', 'max'])(0, 63)
# self._delay = DetectorDelays(self)
# # Eiger specific adcs
# self._temp = DetectorAdcs()
# self._temp.fpga = Adc('temp_fpga', self)
# self._temp.fpgaext = Adc('temp_fpgaext', self)
# self._temp.t10ge = Adc('temp_10ge', self)
# self._temp.dcdc = Adc('temp_dcdc', self)
# self._temp.sodl = Adc('temp_sodl', self)
# self._temp.sodr = Adc('temp_sodr', self)
# self._temp.fpgafl = Adc('temp_fpgafl', self)
# self._temp.fpgafr = Adc('temp_fpgafr', self)
# @property
# def active(self):
# """
# Is the detector active? Can be used to enable or disable a detector
# module
# Examples
# ----------
# ::
# d.active
# >> active: [True, True]
# d.active[1] = False
# >> active: [True, False]
# """
# return self._active
# @active.setter
# def active(self, value):
# self._active[:] = value
# @property
# def measured_period(self):
# return self._api.getMeasuredPeriod()
# @property
# def measured_subperiod(self):
# return self._api.getMeasuredSubPeriod()
# @property
# def add_gappixels(self):
# """Enable or disable the (virual) pixels between ASICs
# Examples
# ----------
# ::
# d.add_gappixels = True
# d.add_gappixels
# >> True
# """
# return self._api.getGapPixels()
# @add_gappixels.setter
# def add_gappixels(self, value):
# self._api.setGapPixels(value)
@property
def dacs(self):
@ -284,68 +169,6 @@ class Eiger(Detector):
"""
return self._dacs
# @property
# def tx_delay(self):
# """
# Transmission delay of the modules to allow running the detector
# in a network not supporting the full speed of the detector.
# ::
# d.tx_delay
# >>
# Transmission delay [ns]
# left right frame
# 0:beb048 0 15000 0
# 1:beb049 100 190000 100
# d.tx_delay.left = [2000,5000]
# """
# return self._delay
# def pulse_all_pixels(self, n):
# """
# Pulse each pixel of the chip **n** times using the analog test pulses.
# The pulse height is set using d.dacs.vcall with 4000 being 0 and 0 being
# the highest pulse.
# ::
# #Pulse all pixels ten times
# d.pulse_all_pixels(10)
# #Avoid resetting before acq
# d.eiger_matrix_reset = False
# d.acq() #take frame
# #Restore normal behaviour
# d.eiger_matrix_reset = True
# """
# self._api.pulseAllPixels(n)
# def pulse_diagonal(self, n):
# """
# Pulse pixels in super colums in a diagonal fashion. Used for calibration
# of vcall. Saves time compared to pulsing all pixels.
# """
# self._api.pulseDiagonal(n)
# def pulse_chip(self, n):
# """
# Advance the counter by toggling enable. Gives 2*n+2 int the counter
# """
# n = int(n)
# if n >= -1:
# self._api.pulseChip(n)
# else:
# raise ValueError('n must be equal or larger than -1')
@property
def vcmp(self):
@ -437,40 +260,33 @@ class Eiger(Detector):
# else:
# self._api.setReceiverStreamingPort(port, -1)
# @property
# def temp(self):
# """
# An instance of DetectorAdcs used to read the temperature
# of different components
@property
def temp(self):
"""
An instance of DetectorAdcs used to read the temperature
of different components
# Examples
# -----------
Examples
-----------
# ::
::
# detector.temp
# >>
# temp_fpga : 36.90°C, 45.60°C
# temp_fpgaext : 31.50°C, 32.50°C
# temp_10ge : 0.00°C, 0.00°C
# temp_dcdc : 36.00°C, 36.00°C
# temp_sodl : 33.00°C, 34.50°C
# temp_sodr : 33.50°C, 34.00°C
# temp_fpgafl : 33.81°C, 30.93°C
# temp_fpgafr : 27.88°C, 29.15°C
detector.temp
>>
temp_fpga : 36.90°C, 45.60°C
temp_fpgaext : 31.50°C, 32.50°C
temp_10ge : 0.00°C, 0.00°C
temp_dcdc : 36.00°C, 36.00°C
temp_sodl : 33.00°C, 34.50°C
temp_sodr : 33.50°C, 34.00°C
temp_fpgafl : 33.81°C, 30.93°C
temp_fpgafr : 27.88°C, 29.15°C
# a = detector.temp.fpga[:]
# a
# >> [36.568, 45.542]
a = detector.temp.fpga[:]
a
>> [36.568, 45.542]
# """
# return self._temp
# def set_delays(self, delta):
# self.tx_delay.left = [delta*(i*2) for i in range(self.n_modules)]
# self.tx_delay.right = [delta*(i*2+1) for i in range(self.n_modules)]
"""
return self._temp

17
python/slsdet/enums.py Normal file
View File

@ -0,0 +1,17 @@
import _slsdet
runStatus = _slsdet.slsDetectorDefs.runStatus
speedLevel = _slsdet.slsDetectorDefs.speedLevel
detectorType = _slsdet.slsDetectorDefs.detectorType
frameDiscardPolicy = _slsdet.slsDetectorDefs.frameDiscardPolicy
fileFormat = _slsdet.slsDetectorDefs.fileFormat
dimension = _slsdet.slsDetectorDefs.dimension
externalSignalFlag = _slsdet.slsDetectorDefs.externalSignalFlag
timingMode = _slsdet.slsDetectorDefs.timingMode
dacIndex = _slsdet.slsDetectorDefs.dacIndex
detectorSettings = _slsdet.slsDetectorDefs.detectorSettings
clockIndex = _slsdet.slsDetectorDefs.clockIndex
readoutMode = _slsdet.slsDetectorDefs.readoutMode
masterFlags = _slsdet.slsDetectorDefs.masterFlags
burstMode = _slsdet.slsDetectorDefs.burstMode
timingSourceType = _slsdet.slsDetectorDefs.timingSourceType

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