Draft: Inject/retrieve AGIPD constant with extra dataset
This MR is based on https://git.xfel.eu/detectors/cal_db_interactive/-/merge_requests/82
This is a draft to replace https://git.xfel.eu/detectors/pycalibration/-/merge_requests/654
Description
This is a draft to replace https://git.xfel.eu/detectors/cal_db_interactive/-/merge_requests/82 which uses CCV variant only in avoiding PC sanitization post retrieval.
- A dict of extra_dataset keys and values to use in writing them in constant h5file pre-injection.
- The main agipdlib changes are to read the constant h5 files within
init_constants
and not load constant data with cal_tools.tools as was done before.
In this MR, there is a bit of an update to injection function in general and AGIPD libraries.
-
cal_tools.tools:
- Update
send_to_db
to add the extra_dataset dictionary before injection.
- Update
-
cal_tools.agipdlib and cal_tools.agipdutils:
- Update
initialize_from_yaml
andinitialize_from_db
to get the whole file path instead of getting only the constant data. to be able to read the constant data along with theextra_dataset
s, if expected. - A function to open each constant file in
init_constants
based on thewhen
dictionary. - Avoid sanitization for slopesPC constant for V1 constants and read the slopes medians for blc_stripes correction, instead of recomputing them.
- Update
How Has This Been Tested?
Not tested yet.
Relevant Documents (optional)
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
-
Discuss the draft. -
Test it. -
Extend the https://git.xfel.eu/detectors/pycalibration/-/merge_requests/604 by saving the slopes medians. -
Update the code documentation.
Reviewers
Edited by Karim Ahmed