Skip to content

[AGIPD][CORRECT] FIX/Avoid applying ff_gain factor in SlopesFF is not retrieved

Karim Ahmed requested to merge fix/xray_corr_empty_constant into master

Expose the creation-time for all retrieved constants (when dictionary) to init_constants

Summary:

This MR is related to https://git.xfel.eu/gitlab/detectors/calibration_workshop/issues/234

As we have now a new ff_gain conversion parameter to get ADU output after applying SlopesFF calibration constant, It is important to avoid using this conversion factor, if SlopesFF was set to empty constant (numpy array of Ones). I have exposed when dictionary to init_constant to not do any operations on SlopesFF, SlopesPC and the related BadPixels in case of None creation-time, which means a constant was not retrieved.

Advantage:

Test:

This was tested using:

xfel-calibrate AGIPD CORRECT \
--in-folder /gpfs/exfel/exp/MID/202022/p002693/raw \
--out-folder /gpfs/exfel/data/scratch/ahmedk/test/AGIPD_xray_corr_fix \
--run 1424 \
--rel-gain \
--xray-gain \
--sequences 0

Reviewers:

@danilevc @hammerd

Note: In principle, this could be done as well for the SlopesPC. Should I add it as well here ??

Edited by Karim Ahmed

Merge request reports