[AGIPD][CORRECT] FIX/Avoid applying ff_gain factor in SlopesFF is not retrieved
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:
-
It gives the option of avoiding the software lines related to this constant (speed)
-
It avoids changing many parameters to different values, e.g:
-
self.ff_gainhttps://git.xfel.eu/gitlab/detectors/pycalibration/blob/master/cal_tools/cal_tools/agipdlib.py#L984 -
And applying 4.48 gain factor on lower gains for the SlopesPC calculated
rel_gainconstant at https://git.xfel.eu/gitlab/detectors/pycalibration/blob/master/cal_tools/cal_tools/agipdlib.py#L1064
-
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:
Note: In principle, this could be done as well for the SlopesPC. Should I add it as well here ??