Skip to content

Draft: Inject/retrieve AGIPD constant with extra dataset

Karim Ahmed requested to merge feat/inject_constant_with_extra_dataset into master

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:

    1. Update send_to_db to add the extra_dataset dictionary before injection.
  • cal_tools.agipdlib and cal_tools.agipdutils:

    1. Update initialize_from_yaml and initialize_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 the extra_datasets, if expected.
    2. A function to open each constant file in init_constants based on the when dictionary.
    3. Avoid sanitization for slopesPC constant for V1 constants and read the slopes medians for blc_stripes correction, instead of recomputing them.

How Has This Been Tested?

Not tested yet.

Relevant Documents (optional)

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Reviewers

@schmidtp

Edited by Karim Ahmed

Merge request reports