Correction basics, updated DSSC device
First order of business: reviewing and merging the base class structure (BaseCorrection
plus some aspects of calcat_utils.py
and BaseGpuRunner
as it applies to DSSC device). This MR is based on running git-filter-repo
on add-agipd-device
(branch used to get to AGIPD field test stage) to get rid of the following distracting changes which should optionally be reviewed and merged individually later:
- Small tweaks to Manager
- Will be needed for properly instantiating correction devices
-
scenes.py
- Will need something to import for devices to work
- Will only need full version for automatic scenes
- AGIPD device
-
ModuleStacker
(will hopefully not be relevant for next run) ShmemToZMQ
- Some rudimentary tests
Main class structure:
-
BaseCorrection
is base class of correction devices (Karabo bound devices), sets up common schema elements and does most shared Karabo stuff.- Subclasses:
AgipdCorrection
andDsscCorrection
- There are a some class attributes the subclasses must set.
- There are some things (like schema extensions) the subclasses have to do on their own.
- Subclasses:
-
BaseGpuRunner
is base class of the objects which handle all GPU interaction.- Subclasses:
AgipdGpuRunner
andDsscGpuRunner
- A
{}GpuRunner
lives inside a{}Correction
, but does not know about this (not tightly integrated into Karabo device).- It holds all its own buffers, can cleanly be deleted and reinstantiated.
- It can be tested independently.
- In
agipd_gpu.py
(home toAgipdGpuRunner
), there are also some enums. Of particular importance isCorrectionFlags
which is used both to give bit mask to kernel for enabling / disabling correction steps, but also to generate part of the device schema. - Each GPU runner class has a
.cpp
file with a correction kernel.
- Subclasses:
-
BaseCalcatFriend
(in need of more serious name) handles interaction with CalCat.- Subclasses:
AgipdCalcatFriend
andDsscCalcatFriend
(all living incalcat_utils.py
for now). - Similar to Philipp's prototype CalCat API wrapper, but these wrap themselves around the device schema for constant parameters (tight integration into Karabo device).
- Specifically, a
{}CalcatFriend
manages the nodesconstantParameters
andfoundConstants
on its correction device (both to get parameters for querying and to set IDs and statuses when it's working). - Subclasses mostly serve to set up condition and constant mapping for a given detector.
- In
calcat_utils.py
, there are also enums likeAgipdConstants
which list all the constants to fetch - also relevant for generation of device schema (see ex._add_status_schema_from_enum
). - They expect a secrets file for CalCat. By default, will look in
${KARABO}/var/data/calibration-client-secrets.json
.
- Subclasses: