-
David Hammer authored
commit c7e948a9 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 13 14:59:07 2023 +0200 Overhaul context warning lamps, add to arbiter kernel commit 08353704 Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 12 09:56:11 2023 +0200 Arbiter kernels call super().__init__ commit d113cd10 Merge: 8e1508ca fbe20f97 Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 12 09:54:34 2023 +0200 Merge branch 'master' into train-picker-device commit 8e1508ca Merge: 45cb6810 fe4589be Author: David Hammer <david.hammer@xfel.eu> Date: Thu Sep 7 11:23:34 2023 +0200 Merge branch 'feed-parameter-optimizer' into 'train-picker-device' Interface CrystFEL with Karabo and allow automatic parameter tunning with rcrystfel See merge request !59 commit 45cb6810 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 13:36:15 2023 +0200 PickyBoi goes to another repository commit fe4589be Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 11:02:34 2023 +0200 Move PickyBoi to own repository commit 4ed8c643 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 10:56:44 2023 +0200 Move CrystfelRunner to crystfel-integration commit 2e29b821 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:22:36 2023 +0200 Using get instead of unsafe_get commit 4db44ada Merge: 91232763 e3d4a37f Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:16:03 2023 +0200 Merged. commit 91232763 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:12:46 2023 +0200 Filter data by source in PickyBoi. commit e3d4a37f Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 5 17:04:29 2023 +0200 PickyBoi: add source filter, format commit 1bc121cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 16:40:30 2023 +0200 Removed the CrystfelORchestrator: rcrystfel is interacting with all devices directly. commit f6a7655e Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 16:16:20 2023 +0200 Re-create the ZMQ server to be sure everything has been processed. commit d371317d Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 15:09:38 2023 +0200 Be less verbose. commit e06ba684 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 14:16:06 2023 +0200 Avoid setting NDARRAY properties: they cannot be serialized in JSON. commit 0e8aee4c Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:33:30 2023 +0200 Make breakStreamAfterEnd reconfigurable. commit 7920c582 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:19:44 2023 +0200 Send end of stream signal when all trains were caught too. commit 93e276c3 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:19:24 2023 +0200 Clean up before shut down and don't start streaming by default. commit 36bcf881 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 11:40:07 2023 +0200 Use USR1 to end CrystFEL instead. commit 72c7a883 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 11:23:50 2023 +0200 Fixed defunct CrystFEL process, by requesting its status code. Added debug messages. Keeping the ZMQ stream open, as it is unnecessary to close it. commit 1f8de2b6 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 18:55:40 2023 +0200 Removed debug message. commit 282b7546 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 18:55:15 2023 +0200 Releasing all resources almost cleanly. commit d49a4f0c Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 13:23:40 2023 +0200 Fixed logic for breaking the stream. commit 60350c66 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 11:16:42 2023 +0200 Set state after ending the stream. commit b5856348 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 10:56:14 2023 +0200 Signal end of stream. commit 4569f9bd Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 15:00:01 2023 +0200 Get rid of dataFormat, use shape of data or look at geometry commit 4adafc84 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 14:58:27 2023 +0200 Improve temporary file handling commit 9a6c6000 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 11:16:36 2023 +0200 Add buildGeometry slot to CrystfelRunner commit e83011e1 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 10:24:02 2023 +0200 Only update output channel once per input commit b0b5aad7 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:42:20 2023 +0200 Remove tail_proc, as we read the file directly. commit e516c9d2 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:38:48 2023 +0200 Allow reconfiguration of CrystFEL parameters without shutting down the device. commit df0f4116 Merge: 89adb332 cbb4a7cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:17:05 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 89adb332 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:16:40 2023 +0200 Prevent bugfix from messing -j option. commit cbb4a7cf Merge: 1c8f21cb d6cef850 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 17:10:57 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 1c8f21cb Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 17:10:50 2023 +0200 Allow TrainRatioTracker to see the same train again commit d6cef850 Merge: 40c598cf 85ee451d Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:00:14 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 40c598cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:00:09 2023 +0200 Bug fix reading data path: we have to avoid reading spaces and the comment character. commit 85ee451d Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 16:17:13 2023 +0200 Allow PickyBoi to handle multiple data per input commit cf627845 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 15:59:05 2023 +0200 Many bug fixes. commit 8356ad4b Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 12:33:53 2023 +0200 Fixed initial NDARRAY setting for cell. commit e35f9a02 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 12:18:10 2023 +0200 ADapted initial value of the detCentre. commit 4f8bce30 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 11:31:28 2023 +0200 Merged output parser. commit 42a7ce6e Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 17:12:40 2023 +0200 Added detailed stats output. commit ccae52c5 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 15:35:23 2023 +0200 Removed unitcellPath commit 91138012 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 15:28:34 2023 +0200 Keep only a misc set of parameters and leave indexing and peakfinding to be sent in misc. commit 17c5bded Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 24 14:29:39 2023 +0200 Start work on CrystfelOrchestrator When behind a WebProxy, this will serve as a single endpoint for a REST API to control the whole CrystFEL setup. commit dc74d5b0 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 24 11:08:56 2023 +0200 Removing unuseful test device Testing of the bridge part of the code is much more convenient to (copy-paste into and) run in a notebook; just use a kernel based on the Karabo environment. commit 6b29320f Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 23 13:37:53 2023 +0200 Fix queue length counting, change name commit 6d26c1e3 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 23 13:37:42 2023 +0200 Enable sending image data commit 727d7fd8 Author: David Hammer <dhammer@mailbox.org> Date: Tue Aug 22 22:12:42 2023 +0200 Fix merge errors commit 26d2fee5 Merge: 3f1afea9 02aebda9 Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 18:09:12 2023 +0200 Merge branch 'train-picker-device' into feed-parameter-optimizer commit 3f1afea9 Merge: 619a3d5c 1405aadc Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 18:08:56 2023 +0200 Merge branch 'master' into crystfel-adapter commit 619a3d5c Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 17:53:42 2023 +0200 Fix states, slots, add crystfelStats commit 61f206e1 Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 17:29:16 2023 +0200 Add slots to start, stop CrystFEL and reset queue commit 02aebda9 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 2 13:08:15 2023 +0200 Allow selecting one train from range and adding offset to PPU commit 693698c2 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 2 12:48:04 2023 +0200 Add error handling when getting initial PPU configuration commit ba108b3c Author: David Hammer <dhammer@mailbox.org> Date: Tue Aug 1 12:48:17 2023 +0200 Revert arbiter use of device client, work with existing matching commit a408d2a8 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 31 19:23:58 2023 +0200 PickyBoi: track incoming trains commit 6e799fc7 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 31 19:22:48 2023 +0200 PickyBoi: enable following PPU device commit 9c861a3a Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 18:28:44 2023 +0200 Sketch PPU frame selection arbiter kernel commit 9d7454bb Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 18:28:29 2023 +0200 Pass device to arbiter kernels for DeviceClient commit 223ebb7a Merge: 5e4b34aa 26b97f12 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 17:56:19 2023 +0200 Merge branch 'train-picker-device' of ssh://git.xfel.eu:10022/calibration/calng into train-picker-device commit 5e4b34aa Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 14:57:31 2023 +0200 Minor fixes commit 45556239 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 24 17:07:20 2023 +0200 Allow multiple consecutive trains commit 025899b3 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 21 19:20:35 2023 +0200 Start sketching changes based on dev meeting commit 7a2231e7 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 7 11:18:59 2023 +0200 Add prototype train ID picking device commit 26b97f12 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 14:57:31 2023 +0200 Minor fixes commit 2bb185c0 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 24 17:07:20 2023 +0200 Allow multiple consecutive trains commit ca4f12eb Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 21 19:20:35 2023 +0200 Start sketching changes based on dev meeting commit a8b13319 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 7 11:18:59 2023 +0200 Add prototype train ID picking device commit 97d359d9 Author: David Hammer <dhammer@mailbox.org> Date: Thu Jun 15 16:54:31 2023 +0200 Almost there commit c8e9e133 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jun 14 23:23:58 2023 +0200 Read some things from geometry, filter tail output commit c8c314b7 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jun 14 18:09:55 2023 +0200 WIP closer to running nicely commit 0399c429 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jun 9 16:55:40 2023 +0200 Start working towards streaming to CrystFEL commit 60024124 Author: David Hammer <dhammer@mailbox.org> Date: Fri Apr 14 12:52:20 2023 +0200 Add generic arbiter kernels: reduce-threshold and boolean commit dc2e5e5f Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 31 12:54:59 2023 +0200 Add post-reshape hook, a few docstrings commit ab9ebc69 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 31 09:48:47 2023 +0200 Moving frame selection arbiter kernels to entry point structure commit 57ce4b61 Author: David Hammer <dhammer@mailbox.org> Date: Tue Mar 21 15:34:10 2023 +0100 Hotfix from SPB: always nd.array the mask (can be VECTOR_BOOL) commit c15bbc65 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:26:22 2023 +0100 Add rough peakfinder9 implementation commit 8e51b499 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:25:44 2023 +0100 Fix usage of _enabled_addons, allow time for init commit 8ebc1ff8 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:25:25 2023 +0100 Move grid computation to utils commit 4b550e35 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 15:42:22 2023 +0100 Fix pep8 warnings for setup.py commit 9d04d20e Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 15:23:06 2023 +0100 (Ab)use entry point extras to specify detectors TODO: add boilerplate to remaining detectors. For now, AGIPD will have both IntetgratedIntensityAddon and RandomFramesAddon whereas DSSC only has RandomFramesAddon. commit e0a8c905 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 13:51:28 2023 +0100 Provide correction device plugins as entry points commit a2f7534f Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 11:50:46 2023 +0100 Fix device schema injection, add reconfigure hook, add random plugin commit 90a1270f Merge: 14f0b611 ff952c76 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 09:34:03 2023 +0100 Merge branch 'frame-selection' of ssh://git.xfel.eu:10022/calibration/calng into frame-selection commit 14f0b611 Author: David Hammer <dhammer@mailbox.org> Date: Fri Feb 17 14:59:12 2023 +0100 Make sure the mask is boolean commit 7911e10a Author: David Hammer <dhammer@mailbox.org> Date: Tue Feb 14 15:23:52 2023 +0100 Prototype configurable frame selection arbiter commit 4f78506f Author: David Hammer <dhammer@mailbox.org> Date: Mon Feb 13 19:42:00 2023 +0100 Add sketch of correction device addon structure commit ff952c76 Author: David Hammer <dhammer@mailbox.org> Date: Fri Feb 17 14:59:12 2023 +0100 Make sure the mask is boolean commit c3d2d437 Author: David Hammer <dhammer@mailbox.org> Date: Tue Feb 14 15:23:52 2023 +0100 Prototype configurable frame selection arbiter commit ba6eaa9f Author: David Hammer <dhammer@mailbox.org> Date: Mon Feb 13 19:42:00 2023 +0100 Add sketch of correction device addon structure
David Hammer authoredcommit c7e948a9 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 13 14:59:07 2023 +0200 Overhaul context warning lamps, add to arbiter kernel commit 08353704 Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 12 09:56:11 2023 +0200 Arbiter kernels call super().__init__ commit d113cd10 Merge: 8e1508ca fbe20f97 Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 12 09:54:34 2023 +0200 Merge branch 'master' into train-picker-device commit 8e1508ca Merge: 45cb6810 fe4589be Author: David Hammer <david.hammer@xfel.eu> Date: Thu Sep 7 11:23:34 2023 +0200 Merge branch 'feed-parameter-optimizer' into 'train-picker-device' Interface CrystFEL with Karabo and allow automatic parameter tunning with rcrystfel See merge request !59 commit 45cb6810 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 13:36:15 2023 +0200 PickyBoi goes to another repository commit fe4589be Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 11:02:34 2023 +0200 Move PickyBoi to own repository commit 4ed8c643 Author: David Hammer <dhammer@mailbox.org> Date: Wed Sep 6 10:56:44 2023 +0200 Move CrystfelRunner to crystfel-integration commit 2e29b821 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:22:36 2023 +0200 Using get instead of unsafe_get commit 4db44ada Merge: 91232763 e3d4a37f Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:16:03 2023 +0200 Merged. commit 91232763 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 17:12:46 2023 +0200 Filter data by source in PickyBoi. commit e3d4a37f Author: David Hammer <dhammer@mailbox.org> Date: Tue Sep 5 17:04:29 2023 +0200 PickyBoi: add source filter, format commit 1bc121cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 16:40:30 2023 +0200 Removed the CrystfelORchestrator: rcrystfel is interacting with all devices directly. commit f6a7655e Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 16:16:20 2023 +0200 Re-create the ZMQ server to be sure everything has been processed. commit d371317d Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 15:09:38 2023 +0200 Be less verbose. commit e06ba684 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 14:16:06 2023 +0200 Avoid setting NDARRAY properties: they cannot be serialized in JSON. commit 0e8aee4c Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:33:30 2023 +0200 Make breakStreamAfterEnd reconfigurable. commit 7920c582 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:19:44 2023 +0200 Send end of stream signal when all trains were caught too. commit 93e276c3 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 13:19:24 2023 +0200 Clean up before shut down and don't start streaming by default. commit 36bcf881 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 11:40:07 2023 +0200 Use USR1 to end CrystFEL instead. commit 72c7a883 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Sep 5 11:23:50 2023 +0200 Fixed defunct CrystFEL process, by requesting its status code. Added debug messages. Keeping the ZMQ stream open, as it is unnecessary to close it. commit 1f8de2b6 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 18:55:40 2023 +0200 Removed debug message. commit 282b7546 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 18:55:15 2023 +0200 Releasing all resources almost cleanly. commit d49a4f0c Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 13:23:40 2023 +0200 Fixed logic for breaking the stream. commit 60350c66 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 11:16:42 2023 +0200 Set state after ending the stream. commit b5856348 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon Sep 4 10:56:14 2023 +0200 Signal end of stream. commit 4569f9bd Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 15:00:01 2023 +0200 Get rid of dataFormat, use shape of data or look at geometry commit 4adafc84 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 14:58:27 2023 +0200 Improve temporary file handling commit 9a6c6000 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 11:16:36 2023 +0200 Add buildGeometry slot to CrystfelRunner commit e83011e1 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 31 10:24:02 2023 +0200 Only update output channel once per input commit b0b5aad7 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:42:20 2023 +0200 Remove tail_proc, as we read the file directly. commit e516c9d2 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:38:48 2023 +0200 Allow reconfiguration of CrystFEL parameters without shutting down the device. commit df0f4116 Merge: 89adb332 cbb4a7cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:17:05 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 89adb332 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:16:40 2023 +0200 Prevent bugfix from messing -j option. commit cbb4a7cf Merge: 1c8f21cb d6cef850 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 17:10:57 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 1c8f21cb Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 17:10:50 2023 +0200 Allow TrainRatioTracker to see the same train again commit d6cef850 Merge: 40c598cf 85ee451d Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:00:14 2023 +0200 Merge branch 'feed-parameter-optimizer' of ssh://git.xfel.eu:10022/calibration/calng into feed-parameter-optimizer commit 40c598cf Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 17:00:09 2023 +0200 Bug fix reading data path: we have to avoid reading spaces and the comment character. commit 85ee451d Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 30 16:17:13 2023 +0200 Allow PickyBoi to handle multiple data per input commit cf627845 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 15:59:05 2023 +0200 Many bug fixes. commit 8356ad4b Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 12:33:53 2023 +0200 Fixed initial NDARRAY setting for cell. commit e35f9a02 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 12:18:10 2023 +0200 ADapted initial value of the detCentre. commit 4f8bce30 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Wed Aug 30 11:31:28 2023 +0200 Merged output parser. commit 42a7ce6e Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 17:12:40 2023 +0200 Added detailed stats output. commit ccae52c5 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 15:35:23 2023 +0200 Removed unitcellPath commit 91138012 Author: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Tue Aug 29 15:28:34 2023 +0200 Keep only a misc set of parameters and leave indexing and peakfinding to be sent in misc. commit 17c5bded Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 24 14:29:39 2023 +0200 Start work on CrystfelOrchestrator When behind a WebProxy, this will serve as a single endpoint for a REST API to control the whole CrystFEL setup. commit dc74d5b0 Author: David Hammer <dhammer@mailbox.org> Date: Thu Aug 24 11:08:56 2023 +0200 Removing unuseful test device Testing of the bridge part of the code is much more convenient to (copy-paste into and) run in a notebook; just use a kernel based on the Karabo environment. commit 6b29320f Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 23 13:37:53 2023 +0200 Fix queue length counting, change name commit 6d26c1e3 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 23 13:37:42 2023 +0200 Enable sending image data commit 727d7fd8 Author: David Hammer <dhammer@mailbox.org> Date: Tue Aug 22 22:12:42 2023 +0200 Fix merge errors commit 26d2fee5 Merge: 3f1afea9 02aebda9 Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 18:09:12 2023 +0200 Merge branch 'train-picker-device' into feed-parameter-optimizer commit 3f1afea9 Merge: 619a3d5c 1405aadc Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 18:08:56 2023 +0200 Merge branch 'master' into crystfel-adapter commit 619a3d5c Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 17:53:42 2023 +0200 Fix states, slots, add crystfelStats commit 61f206e1 Author: David Hammer <dhammer@mailbox.org> Date: Fri Aug 11 17:29:16 2023 +0200 Add slots to start, stop CrystFEL and reset queue commit 02aebda9 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 2 13:08:15 2023 +0200 Allow selecting one train from range and adding offset to PPU commit 693698c2 Author: David Hammer <dhammer@mailbox.org> Date: Wed Aug 2 12:48:04 2023 +0200 Add error handling when getting initial PPU configuration commit ba108b3c Author: David Hammer <dhammer@mailbox.org> Date: Tue Aug 1 12:48:17 2023 +0200 Revert arbiter use of device client, work with existing matching commit a408d2a8 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 31 19:23:58 2023 +0200 PickyBoi: track incoming trains commit 6e799fc7 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 31 19:22:48 2023 +0200 PickyBoi: enable following PPU device commit 9c861a3a Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 18:28:44 2023 +0200 Sketch PPU frame selection arbiter kernel commit 9d7454bb Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 18:28:29 2023 +0200 Pass device to arbiter kernels for DeviceClient commit 223ebb7a Merge: 5e4b34aa 26b97f12 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 17:56:19 2023 +0200 Merge branch 'train-picker-device' of ssh://git.xfel.eu:10022/calibration/calng into train-picker-device commit 5e4b34aa Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 14:57:31 2023 +0200 Minor fixes commit 45556239 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 24 17:07:20 2023 +0200 Allow multiple consecutive trains commit 025899b3 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 21 19:20:35 2023 +0200 Start sketching changes based on dev meeting commit 7a2231e7 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 7 11:18:59 2023 +0200 Add prototype train ID picking device commit 26b97f12 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jul 26 14:57:31 2023 +0200 Minor fixes commit 2bb185c0 Author: David Hammer <dhammer@mailbox.org> Date: Mon Jul 24 17:07:20 2023 +0200 Allow multiple consecutive trains commit ca4f12eb Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 21 19:20:35 2023 +0200 Start sketching changes based on dev meeting commit a8b13319 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jul 7 11:18:59 2023 +0200 Add prototype train ID picking device commit 97d359d9 Author: David Hammer <dhammer@mailbox.org> Date: Thu Jun 15 16:54:31 2023 +0200 Almost there commit c8e9e133 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jun 14 23:23:58 2023 +0200 Read some things from geometry, filter tail output commit c8c314b7 Author: David Hammer <dhammer@mailbox.org> Date: Wed Jun 14 18:09:55 2023 +0200 WIP closer to running nicely commit 0399c429 Author: David Hammer <dhammer@mailbox.org> Date: Fri Jun 9 16:55:40 2023 +0200 Start working towards streaming to CrystFEL commit 60024124 Author: David Hammer <dhammer@mailbox.org> Date: Fri Apr 14 12:52:20 2023 +0200 Add generic arbiter kernels: reduce-threshold and boolean commit dc2e5e5f Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 31 12:54:59 2023 +0200 Add post-reshape hook, a few docstrings commit ab9ebc69 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 31 09:48:47 2023 +0200 Moving frame selection arbiter kernels to entry point structure commit 57ce4b61 Author: David Hammer <dhammer@mailbox.org> Date: Tue Mar 21 15:34:10 2023 +0100 Hotfix from SPB: always nd.array the mask (can be VECTOR_BOOL) commit c15bbc65 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:26:22 2023 +0100 Add rough peakfinder9 implementation commit 8e51b499 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:25:44 2023 +0100 Fix usage of _enabled_addons, allow time for init commit 8ebc1ff8 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 19:25:25 2023 +0100 Move grid computation to utils commit 4b550e35 Author: David Hammer <dhammer@mailbox.org> Date: Mon Mar 20 15:42:22 2023 +0100 Fix pep8 warnings for setup.py commit 9d04d20e Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 15:23:06 2023 +0100 (Ab)use entry point extras to specify detectors TODO: add boilerplate to remaining detectors. For now, AGIPD will have both IntetgratedIntensityAddon and RandomFramesAddon whereas DSSC only has RandomFramesAddon. commit e0a8c905 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 13:51:28 2023 +0100 Provide correction device plugins as entry points commit a2f7534f Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 11:50:46 2023 +0100 Fix device schema injection, add reconfigure hook, add random plugin commit 90a1270f Merge: 14f0b611 ff952c76 Author: David Hammer <dhammer@mailbox.org> Date: Fri Mar 17 09:34:03 2023 +0100 Merge branch 'frame-selection' of ssh://git.xfel.eu:10022/calibration/calng into frame-selection commit 14f0b611 Author: David Hammer <dhammer@mailbox.org> Date: Fri Feb 17 14:59:12 2023 +0100 Make sure the mask is boolean commit 7911e10a Author: David Hammer <dhammer@mailbox.org> Date: Tue Feb 14 15:23:52 2023 +0100 Prototype configurable frame selection arbiter commit 4f78506f Author: David Hammer <dhammer@mailbox.org> Date: Mon Feb 13 19:42:00 2023 +0100 Add sketch of correction device addon structure commit ff952c76 Author: David Hammer <dhammer@mailbox.org> Date: Fri Feb 17 14:59:12 2023 +0100 Make sure the mask is boolean commit c3d2d437 Author: David Hammer <dhammer@mailbox.org> Date: Tue Feb 14 15:23:52 2023 +0100 Prototype configurable frame selection arbiter commit ba6eaa9f Author: David Hammer <dhammer@mailbox.org> Date: Mon Feb 13 19:42:00 2023 +0100 Add sketch of correction device addon structure
Correction addons and frame selection
This page describes two different places in calng pipelines where user code can be executed to improve online analysis applications: correction addons, which run within each correction device (and therefore per module), and frame selection kernels, which run in an arbiter, telling group matchers which frames they should forward.
The purpose of correction addons may be to perform additional computation on the corrected detector data to provide useful information either to downstream online analysis or for use with a frame selection arbiter. The purpose of the arbiter is to select on a train-by-train basis which frames should be sent out of the pipeline, thus allowing flexible data reduction for online analysis. The arbiter will have access only to small data / metadata (and not the full image data), but it will get this for every module for each train. Used in combination, a correction addon may, for instance, be used to compute a few interesting values per frame, which an arbiter can then use to decide, over the full detector, which frames are relevant for further analysis. The sketch below illustrates the data flow with a frame selection arbiter in place (for simplicity, only one group of correction devices is drawn):
For the operator
The rest of the content of this page will be more technical than other pages in the user documentation. From an operator point of view, these extensions mostly introduce additional configuration and thus complexity to running pipelines.
The correction addons each register their configuration subnodes in the correction device schema under addons
.
Configuring these will typically be done via the manager.
Only addons which are marked as enabled are actually executed.
The frame selection feature involves an arbiter - essentially yet another train matcher - which runs user code and interation with each of the group matchers.
The group matchers will only try to filter out frames if frameSelector.enable
is set and if they actually receive data from the arbiter (specified by the frameSelector.arbiterSource
).
That means that if the arbiter for some reason did not provide a mask for a given train (arbiter could be down, not matching, or otherwise having issues), all data is still forwarded as usual.
Configuration of the arbiter consists of setting up the matching part (it behaves like a full matcher except it does not get full image data) and the arbiter kernel part.
Only the latter differs from other matchers and involves user kernels.
The frameSelection
node contains all the relevant configuration: frameSelection.kernelChoice
selects which of the installed kernels to use and under frameSelection.kernels
, each of these installed kernels may provide additional configuration parameters needs.
Correction addon API
A correction addon should inherit from calng.correction_addons.BaseCorrectionAddon
.
This base class, for now, contains method stubs.
When writing a subclass, you will want to override a subset of these stubs:
-
__init__(self, config)
: initializer similar to that of a karabo device.- The
config
passed to the addon will be the contents of the addon's node within the the correction device's configuration. - This means you will here get the keys you added under the prefix with
extend_device_schema
.
- The
-
extend_device_schema(schema, prefix)
: a static method which will be called during the correction device'sexpectedParameters
(where the class tells Karabo about the schema of this device type).- This is used to add configurable parameters for the addon in the regular Karabo bound API style.
-
schema
is the device schema (passed from theexpectedParameters
call. -
prefix
will be a substring under which you should put any elements you add to the schema. - You will probably want to add
.tags("managed")
to most parameters to control them via the manager. - Note that the boolean to control whether the addon is active is added and managed automatically.
Please use it - this means add elements by something like
FLOAT_ELEMENT(schema).key(f"{prefix}.someParameter")
. - Ordinary Karabo schema features apply.
Remember to
.commit()
, give default values, and consider.reconfigurable()
.
-
extend_output_schema(schema)
: a static method used to extend the output schema of the correction device, typically to add additional fields to the output.- You can technically add keys to the output hashes without advertising them in the schema, but please use this method to indicate what you will want to add.
-
post_correction(self, processed_data, cell_table, pulse_table, output_hash)
: the main hook where the addon will want to compute something exciting.-
processed_data
is the image data right after it has been corrected. If running a GPU kernel, this data is still on GPU which you may want to exploit. -
cell_table
andpulse_table
are the mappings from frame to cells and pulses provided by the detector (if available). These are discussed in preview configuration and may be relevant for some kernel types. -
output_hash
is the hash which will eventually be written to the main output channel. The addon can do whatever it wants with this hash. Typically, you will want to add some new computed keys to it (which you have hopefully mentioned inextend_output_schema
).
-
-
post_reshape
is mostly the same aspost_correction
, except it is called slightly later in the input handler and data is guaranteed to be in system memory rather than on GPU. -
reconfigure
: when any of the addon's parameters are changed, this is called with the parameters which have been changed (similar topreReconfigure
in Karabo bound).
Frame selection API
A frame selection arbiter kernel should inherit from calng.arbiter_kernels.BaseArbiterKernel
.
This class for now containts stubs for the methods a kernel will need to provide:
-
__init__(self, config)
: as with correction addons, this initializer behaves very much like one from a Karabo bound device.- It is given the part of the device configuration hash under the node belonging to this kernel.
- This depends on what is added via
extend_device_schema
.
-
extend_device_schema(schema, prefix)
: see the method of the same name for correction addons. -
consider(self, train_id, sources, num_frames)
is the main function called upon matching to compute a frame mask.- The default one provides a mask of all ones (truthy), meaning all frames are included.
Note that the
dtype
of the returned array isnumpy.uint8
. - The
sources
argument comes fromon_matched_data
(the arbiter is aTrainMatcher
). It is a dictionary mapping source names to tuples of data (the data hash received from the source) and timestamp.
- The default one provides a mask of all ones (truthy), meaning all frames are included.
Note that the
The configuration keys added by extend_device_schema
will go in the arbiter schema under frameSelection.kernels.[node name]
where the node name is automatically based on the class name.
Note that this node name is automatically part of the prefix
passed to extend_device_schema
.
Most parameters to most arbiter kernels should be reconfigurable - if not, changing them means restarting the kernel arbiter entirely.
For now, changing a parameter for the kernel will cause the kernel to be reinstantiated; in the future, a reconfigure
option similar to that of correction addons may be added for kernels which are changed often / expensive to reinstantiate.
From the base class, an arbiter kernel gets the following properties / methods:
-
_config
: points to the hash with the configuration passed to init -
_device
: will point to the host device - but only after__init__
; should generally not be used directly -
geometry
: property containing the current detector geometry (gotten from device, requires correctly configuredFrameSelectionArbiter
) -
warning_context
: helper function returning a context manager to allow emitting custom warnings via the host device, setting the warning state offrameSelection.kernelState
- Note that uncaught exceptions in
consider
will also trigger this withKernelWarning.PROCESSING
- Some common warning types are defined in the
base_kernel.KernelWarning
enum type; feel free to define additional warnings and pass them to the context manager - See example kernels for examples of how to use this
- Note that uncaught exceptions in
Existing arbiter kernels
The following arbiter kernels are distributed with calng
as examples:
-
BooleanCombination
: will combine a set of existing frame masks with ordinary Boolean operation per frame. This is useful if some correction addon has already computed a frame mask (a vector of booleans underdata.dataFramePattern
) for each detector module in a multi-module detector. In this case, this arbiter kernel allows you to compute a frame mask consisting either of frames where all individual module frame masks include it or where any masks include it. -
RandomFrames
: simple example arbiter demonstrating how to add trivial configuration parameters and provide a valid frame mask. Will usenumpy.random
to filter frames uniformly at random with a given probability per frame. -
ReduceAndThreshold
: a generic kernel applicable in some cases where correction addons provide some relevant stats on a per-frame basis for each module. The reduction will be applied to this stat (name is configured) along the module axis and frames are included based on thresholding the result against a set parameter.
Installing new extensions
Both arbiter kernels as well as correction addons are installed using Python entry points.
Correction addons go in the calng.correction_addon
namespace while arbiter kernels go in calng.arbiter_kernel
.
So to expose custom extensions in a custom package, you may add something like this to your setup.py
:
setup(
...
entry_points={
"calng.correction_addon": [
"CoolAddon = my_package.addon_module:CoolAddon",
],
"calng.arbiter_kernel": [
"CoolKernel = my_package.arbiter_module:CoolKernel",
],
},
...
),
)
Correction addons may be specific to individual detectors and thus correction device classes.
The "extras" field can be used to list detectors (in lowercase) for whcih an addon should be available.
For example, append [agipd]
to the string specifying the path to CoolAddon
in the example above to indicate that it should only be used in the AgipdCorrection
class.
If no extra string is provided, the addon is made available to all correction device classes by default.